getfont.gadget Reference¶
Comprehensive function reference for getfont.gadget, synthesised from the AmigaOS NDK 3.2 Release 4 (Autodocs/getfont).
This page documents 2 functions of getfont.gadget. Each function entry follows the canonical autodoc format. struct Name, union Name, enum Name are clickable links to the type definition in the types reference.
Function index¶
getfont_gc()¶
**getfont_gc -- create getfont BOOPSI objects
SUPERCLASS gadgetclass
DESCRIPTION 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.
METHODS
OM_NEW -- Passed to superclass, defaults set, then OM_SET. Children
created.
OM_SET -- Passed to superclass, custom tags set.
OM_GET -- Custom tag returned or passed to superclass.
OM_UPDATE -- Passed to superclass, options set then rendered.
OM_DISPOSE -- Children disposed of, then passed to superclass.
GM_RENDER -- Passed to superclass, then children are rendered.
GM_HITTEST -- Overrides superclass, returns GMR_GADGETHIT if within
the popfile/drawer button.
GM_HELPTEST -- Overrides superclass, returns GMR_HELPHIT if within
the domain of the gadget.
GM_GOACTIVE -- Passed to superclass, passed to popfile/drawer button.
GM_HANDLEINPUT -- Overrides superclass, all input processed.
GM_GOINACTIVE -- Passed to superclass, popfile/drawer button
deactivated.
GM_DOMAIN -- Returns GDOMAIN_MINIMUM and GDOMAIN_MAXIMUM dimensions.
GM_KEYACTIVE -- Private method for keyboard control.
GM_KEYINACTIVE -- Private method for keyboard control.
GM_CLIPRECT -- Passed to children
GFONT_REQUEST -- getfont gadget method for invoking the font
requester.
ATTRIBUTES
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).**
GETFONT_GetClass()¶
GETFONT_GetClass -- Gets the pointer to the font requester class
Synopsis
getfont_class = GETFONT_GetClass();
D0
Class * GETFONT_GetClass( void );
Function
Obtains the pointer to the getfont gadget class for use with
NewObject(). This function always returns a valid pointer so
you do not need to check it. The reason is that if the library
opens fine, then the pointer returned is already setup. (Of course
this implies that if opening the library fails, you shouldn't be
calling this.)
Note that this function does not create the class, that is done
when the class library is opened.
Inputs
RESULT getfont_class - Pointer to the getfont gadget class.
EXAMPLE