PtFontSel

PtFontSel — is used to select font attributes.

Synopsis

class PtFontSel PtContainer
{
    font_display;    // short  (Pt_ARG_FONT_DISPLAY)    
    font_flags;      // flag  (Pt_ARG_FONT_FLAGS)    
    font_name;       // string  (Pt_ARG_FONT_NAME)    
    font_sample;     // PtWidget  (Pt_ARG_FONT_SAMPLE)    
    font_symbol;     // long  (Pt_ARG_FONT_SYMBOL)    
}
		

Base Classes

PtWidget <-- PtBasic <-- PtContainer <-- PtFontSel

Description

This widget is a dialog box that lets you choose a font, edit the size, and make it bold, italic, or anti-aliased. It also has a display for a sample text string of the selected font.

[Note]

For detailed information, please refer to PtFontSel in the Photon documentation.

Instance Variables

font_display

This instance variable controls the categories of fonts offered, and may have one of the following values:

ConstantDescription
Pt_FONTSEL_SCALABLEInclude scalable fonts.
Pt_FONTSEL_BITMAPInclude bitmap fonts.
Pt_FONTSEL_PROPInclude proportional fonts.
Pt_FONTSEL_FIXEDInclude fixed fonts.
Pt_FONTSEL_ALL_FONTSInclude all fonts.

font_flags

This instance variable controls characteristics of the widget, and may be a combination of zero or more of the following flags:

ConstantDescription
Pt_FONTSEL_AA_CHECKRestricts the use of anti-aliasing button to scalable fonts.
Pt_FONTSEL_SAMPLEDisplays sample text using the current font.

font_name

A string specifying the initial and/or currently selected font. Default is "helv12".

font_sample

A string specifying the sample to be displayed if the Pt_FONTSEL_SAMPLE flag is set. Default is "AaBbCcXxYyZz".

font_symbol

A character specifying the font family to include in the selection dialog. 'A', the default, specifies Latin fonts.

Callbacks

The following callback is associated with this widget:

CallbackDescription
Pt_CB_FONT_MODIFYThis callback is generated when a selected font is modified.

Associated Classes

PtCallbackInfo