You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
301 lines
11 KiB
301 lines
11 KiB
//Auto-generated by kalyptus. DO NOT EDIT.
|
|
package org.kde.koala;
|
|
|
|
import org.kde.qt.Qt;
|
|
import org.kde.qt.QColor;
|
|
import org.kde.qt.QFont;
|
|
import org.kde.qt.QMetaObject;
|
|
import org.kde.qt.QtSupport;
|
|
import org.kde.qt.QSize;
|
|
import org.kde.qt.QWidget;
|
|
import org.kde.qt.QWidget;
|
|
|
|
/**
|
|
|
|
While KFontChooser as an ordinary widget can be embedded in
|
|
custom dialogs and therefore is very flexible, in most cases
|
|
it is preferable to use the convenience functions in
|
|
KFontDialog.
|
|
\image html kfontchooser.png "KDE Font Chooser"
|
|
See {@link KFontChooserSignals} for signals emitted by KFontChooser
|
|
@author Preston Brown <pbrown@kde.org>, Bernd Wuebben <wuebben@kde.org>
|
|
|
|
@version $Id$
|
|
|
|
@short A font selection widget.
|
|
|
|
*/
|
|
public class KFontChooser extends QWidget {
|
|
protected KFontChooser(Class dummy){super((Class) null);}
|
|
/**
|
|
|
|
<li>
|
|
<code>FamilyList</code> - Identifies the family (leftmost) list.
|
|
</li>
|
|
|
|
<li>
|
|
<code>StyleList</code> - Identifies the style (center) list.
|
|
</li>
|
|
|
|
<li>
|
|
<code>SizeList</code> - Identifies the size (rightmost) list.
|
|
|
|
</li> @short
|
|
*/
|
|
public static final int FamilyList = 0x01;
|
|
public static final int StyleList = 0x02;
|
|
public static final int SizeList = 0x04;
|
|
|
|
/**
|
|
|
|
<li>
|
|
<code>FontDiffFamily</code> - Identifies a requested change in the font family.
|
|
</li>
|
|
|
|
<li>
|
|
<code>FontDiffStyle</code> - Identifies a requested change in the font style.
|
|
</li>
|
|
|
|
<li>
|
|
<code>FontDiffSize</code> - Identifies a requested change in the font size.
|
|
|
|
</li> @short
|
|
*/
|
|
public static final int FontDiffFamily = 0x01;
|
|
public static final int FontDiffStyle = 0x02;
|
|
public static final int FontDiffSize = 0x04;
|
|
|
|
/**
|
|
The selection criteria for the font families shown in the dialog.
|
|
|
|
<li>
|
|
<code>FixedWidthFont</code> when included only fixed-width fonts are returned.
|
|
The fonts where the width of every character is equal.
|
|
</li>
|
|
|
|
<li>
|
|
<code>ScalableFont</code> when included only scalable fonts are returned;
|
|
certain configurations allow bitmap fonts to remain unscaled and
|
|
thus these fonts have limited number of sizes.
|
|
</li>
|
|
|
|
<li>
|
|
<code>SmoothScalableFont</code> when included only return smooth scalable fonts.
|
|
this will return only non-bitmap fonts which are scalable to any size requested.
|
|
Setting this option to true will mean the "scalable" flag is irrelavant.
|
|
|
|
</li> @short The selection criteria for the font families shown in the dialog.
|
|
*/
|
|
public static final int FixedWidthFonts = 0x01;
|
|
public static final int ScalableFonts = 0x02;
|
|
public static final int SmoothScalableFonts = 0x04;
|
|
|
|
public native QMetaObject metaObject();
|
|
public native String className();
|
|
/**
|
|
Constructs a font picker widget.
|
|
It normally comes up with all font families present on the system; the
|
|
getFont method below does allow some more fine-tuning of the selection of fonts
|
|
that will be displayed in the dialog.
|
|
<p>Consider the following code snippet;
|
|
<pre>
|
|
ArrayList list;
|
|
KFontChooser.getFontList(list,SmoothScalableFonts);
|
|
KFontChooser chooseFont = new KFontChooser(0, "FontList", false, list);
|
|
</pre>
|
|
<p>
|
|
The above creates a font chooser dialog with only SmoothScaleble fonts.
|
|
@param parent The parent widget.
|
|
@param name The widget name.
|
|
@param onlyFixed Only display fonts which have fixed-width
|
|
character sizes.
|
|
@param fontList A list of fonts to display, in XLFD format. If
|
|
no list is formatted, the internal KDE font list is used.
|
|
If that has not been created, X is queried, and all fonts
|
|
available on the system are displayed.
|
|
@param diff Display the difference version dialog.
|
|
See KFontDialog.getFontDiff().
|
|
@param makeFrame Draws a frame with titles around the contents.
|
|
@param visibleListSize The minimum number of visible entries in the
|
|
fontlists.
|
|
@param sizeIsRelativeState If not zero the widget will show a
|
|
checkbox where the user may choose whether the font size
|
|
is to be interpreted as relative size.
|
|
Initial state of this checkbox will be set according to
|
|
sizeIsRelativeState, user choice may be retrieved by
|
|
calling sizeIsRelative().
|
|
@short Constructs a font picker widget.
|
|
*/
|
|
public KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame, int visibleListSize, boolean diff, int sizeIsRelativeState) {
|
|
super((Class) null);
|
|
newKFontChooser(parent,name,onlyFixed,fontList,makeFrame,visibleListSize,diff,sizeIsRelativeState);
|
|
}
|
|
private native void newKFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame, int visibleListSize, boolean diff, int sizeIsRelativeState);
|
|
public KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame, int visibleListSize, boolean diff) {
|
|
super((Class) null);
|
|
newKFontChooser(parent,name,onlyFixed,fontList,makeFrame,visibleListSize,diff);
|
|
}
|
|
private native void newKFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame, int visibleListSize, boolean diff);
|
|
public KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame, int visibleListSize) {
|
|
super((Class) null);
|
|
newKFontChooser(parent,name,onlyFixed,fontList,makeFrame,visibleListSize);
|
|
}
|
|
private native void newKFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame, int visibleListSize);
|
|
public KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame) {
|
|
super((Class) null);
|
|
newKFontChooser(parent,name,onlyFixed,fontList,makeFrame);
|
|
}
|
|
private native void newKFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame);
|
|
public KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList) {
|
|
super((Class) null);
|
|
newKFontChooser(parent,name,onlyFixed,fontList);
|
|
}
|
|
private native void newKFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList);
|
|
public KFontChooser(QWidget parent, String name, boolean onlyFixed) {
|
|
super((Class) null);
|
|
newKFontChooser(parent,name,onlyFixed);
|
|
}
|
|
private native void newKFontChooser(QWidget parent, String name, boolean onlyFixed);
|
|
public KFontChooser(QWidget parent, String name) {
|
|
super((Class) null);
|
|
newKFontChooser(parent,name);
|
|
}
|
|
private native void newKFontChooser(QWidget parent, String name);
|
|
public KFontChooser(QWidget parent) {
|
|
super((Class) null);
|
|
newKFontChooser(parent);
|
|
}
|
|
private native void newKFontChooser(QWidget parent);
|
|
public KFontChooser() {
|
|
super((Class) null);
|
|
newKFontChooser();
|
|
}
|
|
private native void newKFontChooser();
|
|
/**
|
|
Enables or disable a font column in the chooser.
|
|
Use this
|
|
function if your application does not need or supports all font
|
|
properties.
|
|
@param column Specify the columns. An or'ed combination of
|
|
<code>FamilyList</code>, <code>StyleList</code> and <code>SizeList</code> is possible.
|
|
@param state If <code>false</code> the columns are disabled.
|
|
@short Enables or disable a font column in the chooser.
|
|
*/
|
|
public native void enableColumn(int column, boolean state);
|
|
/**
|
|
Sets the currently selected font in the chooser.
|
|
@param font The font to select.
|
|
@param onlyFixed Readjust the font list to display only fixed
|
|
width fonts if <code>true</code>, or vice-versa.
|
|
@short Sets the currently selected font in the chooser.
|
|
*/
|
|
public native void setFont(QFont font, boolean onlyFixed);
|
|
public native void setFont(QFont font);
|
|
/**
|
|
@return The bitmask corresponding to the attributes the user
|
|
wishes to change.
|
|
|
|
@short
|
|
*/
|
|
public native int fontDiffFlags();
|
|
/**
|
|
@return The currently selected font in the chooser.
|
|
|
|
@short
|
|
*/
|
|
public native QFont font();
|
|
/**
|
|
Sets the color to use in the preview.
|
|
@short Sets the color to use in the preview.
|
|
*/
|
|
public native void setColor(QColor col);
|
|
/**
|
|
@return The color currently used in the preview (default: the text
|
|
color of the active color group)
|
|
|
|
@short
|
|
*/
|
|
public native QColor color();
|
|
/**
|
|
Sets the background color to use in the preview.
|
|
@short Sets the background color to use in the preview.
|
|
*/
|
|
public native void setBackgroundColor(QColor col);
|
|
/**
|
|
@return The background color currently used in the preview (default:
|
|
the base color of the active colorgroup)
|
|
|
|
@short
|
|
*/
|
|
public native QColor backgroundColor();
|
|
/**
|
|
Sets the state of the checkbox indicating whether the font size
|
|
is to be interpreted as relative size.
|
|
NOTE: If parameter sizeIsRelative was not set in the constructor
|
|
of the widget this setting will be ignored.
|
|
@short Sets the state of the checkbox indicating whether the font size is to be interpreted as relative size.
|
|
*/
|
|
public native void setSizeIsRelative(int relative);
|
|
/**
|
|
@return Whether the font size is to be interpreted as relative size
|
|
(default: QButton:Off)
|
|
|
|
@short
|
|
*/
|
|
public native int sizeIsRelative();
|
|
/**
|
|
@return The current text in the sample text input area.
|
|
|
|
@short
|
|
*/
|
|
public native String sampleText();
|
|
/**
|
|
Sets the sample text.
|
|
Normally you should not change this
|
|
text, but it can be better to do this if the default text is
|
|
too large for the edit area when using the default font of your
|
|
application.
|
|
@param text The new sample text. The current will be removed.
|
|
@short Sets the sample text.
|
|
*/
|
|
public native void setSampleText(String text);
|
|
/**
|
|
Shows or hides the sample text box.
|
|
@param visible Set it to true to show the box, to false to hide it.
|
|
@short Shows or hides the sample text box.
|
|
*/
|
|
public native void setSampleBoxVisible(boolean visible);
|
|
/**
|
|
Reimplemented for internal reasons.
|
|
@short Reimplemented for internal reasons.
|
|
*/
|
|
public native QSize sizeHint();
|
|
/**
|
|
Converts a QFont into the corresponding X Logical Font
|
|
Description (XLFD).
|
|
@param theFont The font to convert.
|
|
@return A string representing the given font in XLFD format.
|
|
|
|
@short Converts a QFont into the corresponding X Logical Font Description (XLFD).
|
|
*/
|
|
public static native String getXLFD(QFont theFont);
|
|
/**
|
|
Creates a list of font strings.
|
|
@param list The list is returned here.
|
|
@param fontListCriteria should contain all the restrictions for font selection as OR-ed values
|
|
@short Creates a list of font strings.
|
|
@see KFontChooser#FontListCriteria
|
|
@see #for
|
|
@see #the
|
|
@see #individual
|
|
@see #values
|
|
*/
|
|
public static native void getFontList(String[] list, int fontListCriteria);
|
|
/** Deletes the wrapped C++ instance */
|
|
protected native void finalize() throws InternalError;
|
|
/** Delete the wrapped C++ instance ahead of finalize() */
|
|
public native void dispose();
|
|
/** Has the wrapped C++ instance been deleted? */
|
|
public native boolean isDisposed();
|
|
}
|