The getfont gadget class is used to get fonts and font attributes from a font requester in an easy and consistent way. It consists of two button gadgets, one read-only and one popfont button, that are used to select the font and show the result.
Advantages that this class provides:
-
Consistent behaviour and look in all applications using this class instead of doing their own font selection routines.
-
Easy to use.
Most of these tags operate the same as the ASLFO_#? tags in ASL library. See <
asl.library/AslRequest> for detailed descriptions.
- GETFONT_SampleText (STRPTR)
-
(V51) Text to display in font sample area. Caution: The text is NOT copied.
Defaults to NULL (localized asl.library default).
Applicability is (OM_NEW, OM_SET).
- GETFONT_TitleText (STRPTR)
-
Requester title text.
- Caution:
-
The text is NOT copied.
Defaults to NULL.
Applicability is (OM_NEW, OM_SET).
- GETFONT_TextAttr (struct TextAttr *)
-
Font to show in the gadget. The textattr.ta_Style, textattr.ta_Name, textattr.ta_YSize and textattr.ta_Flags (since V51) fields are used by the font requester as default values in OM_NEW and contain the information about the font in the other methods. The elements ARE copied, including the textattr.ta_Name text.
Defaults to none.
Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
- GETFONT_DoFrontPen (BOOL)
-
Do front pen.
Defaults to FALSE.
Applicability is (OM_NEW, OM_SET).
- GETFONT_DoBackPen (BOOL)
-
Do back pen.
Default to FALSE.
Applicability is (OM_NEW, OM_SET).
- GETFONT_DoStyle (BOOL)
-
Do style.
Defaults to FALSE.
Applicability is (OM_NEW, OM_SET).
- GETFONT_DoDrawMode (BOOL)
-
Do draw mode.
Defaults to FALSE.
Applicability is (OM_NEW, OM_SET).
- GETFONT_DoCharSet (BOOL)
-
(V51) Allow the user to select the font charset. The selected charset can be queried with GETFONT_CharSet and must be specified in the TTextAttr passed to OpenFont()/OpenDiskFont().
Defaults to FALSE.
Applicability is (OM_NEW, OM_SET).
- GETFONT_CharSet (ULONG)
-
(V51) The IANA charset number of the font.
Defaults to 0 (pass current system default charset to asl).
Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
- GETFONT_MinHeight (UWORD)
-
Minimum font height.
Defaults to 6.
Applicability is (OM_NEW, OM_SET).
- GETFONT_MaxHeight (UWORD)
-
Maximum font height.
Defaults to 20.
Applicability is (OM_NEW, OM_SET).
- GETFONT_FixedWidthOnly (BOOL)
-
Only show fixed width fonts.
Defaults to FALSE.
Applicability is (OM_NEW, OM_SET).
- GETFONT_OTagOnly (BOOL)
-
(V51 Only show fonts that are handled via bullet API.
Defaults to FALSE.
Applicability is (OM_NEW, OM_SET).
- GETFONT_ScalableOnly (BOOL)
-
(V51) Only show scalable fonts that are handled via bullet API.
Defaults to FALSE.
Applicability is (OM_NEW, OM_SET).
- GETFONT_Height (WORD)
-
Height of the font requester.
Defaults to 200.
Applicability is (OM_NEW, OM_SET, OM_GET).
- GETFONT_Width (WORD)
-
Width of the font requester.
Defaults to 300.
Applicability is (OM_NEW, OM_SET, OM_GET).
- GETFONT_LeftEdge (WORD)
-
Left edge of the font requester.
Defaults to 30.
Applicability is (OM_NEW, OM_SET, OM_GET).
- GETFONT_TopEdge (WORD)
-
Top edge of the font requester.
Defaults to 20.
Applicability is (OM_NEW, OM_SET, OM_GET).
- GETFONT_FrontPen (UBYTE)
-
Front pen.
Defaults to 1.
Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
- GETFONT_BackPen (UBYTE)
-
Back pen.
Defaults to 0.
Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
- GETFONT_DrawMode (UBYTE)
-
Draw mode.
Defaults to JAM1.
Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
- GETFONT_MaxFrontPen (UBYTE)
-
Max number of colors in front palette.
Defaults to 255.
Applicability is (OM_NEW, OM_SET).
- GETFONT_MaxBackPen (UBYTE)
-
Max number of colors in back palette.
Defaults to 255.
Applicability is (OM_NEW, OM_SET).
- GETFONT_ModeList (STRPTR *)
-
Substitute list for drawmodes.
- Caution:
-
The strings are NOT
copied.
Defaults to none.
Applicability is (OM_NEW, OM_SET).
- GETFONT_FrontPens (UBYTE *)
-
Color table for front pen palette.
- Caution:
-
The table is NOT
copied.
Defaults to none.
Applicability is (OM_NEW, OM_SET).
- GETFONT_BackPens (UBYTE *)
-
Color table for back pen palette.
- Caution:
-
The table is NOT copied.
Defaults to none.
Applicability is (OM_NEW, OM_SET).
- GETFONT_SoftStyle (UBYTE)
-
SoftStyle, provided only for making mapping to button.gadget easier. Textattr.ta_Style in the GETFONT_TextAttr attribute will provide the style in other cases.
Applicability is (OM_GET, OM_NOTIFY).