@database "getfont_gc" @master "AMIDEV:NDK/Autodocs/getfont_gc.doc" @Node Main "getfont_gc.doc" @toc "Autodocs/AG/INDEX/Main" @{" --datasheet--() " Link "--datasheet--()"} @{" GETFONT_GetClass() " Link "GETFONT_GetClass()"} @EndNode @Node "--datasheet--()" "getfont.gadget/--datasheet--" @{b} NAME@{ub} getfont_gc -- create getfont BOOPSI objects @{b} SUPERCLASS@{ub} gadgetclass @{b} DESCRIPTION@{ub} 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. @{b} METHODS@{ub} @{"OM_NEW" Link "tabs_gc/OM_NEW"} -- Passed to superclass, defaults set, then @{"OM_SET" Link "tabs_gc/OM_SET"}. Children created. @{"OM_SET" Link "tabs_gc/OM_SET"} -- Passed to superclass, custom tags set. @{"OM_GET" Link "tabs_gc/OM_GET"} -- @{"Custom" Link "INCLUDE:hardware/custom.h/Main" 23} 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" Link "tabs_gc/GM_RENDER"} -- Passed to superclass, then children are rendered. @{"GM_HITTEST" Link "tabs_gc/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" Link "tabs_gc/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. @{b} ATTRIBUTES@{ub} Most of these tags operate the same as the ASLFO_#? tags in ASL library. See for detailed descriptions. GETFONT_SampleText (STRPTR) (V51) @{"Text" Link "graphics/Text()"} to display in font sample area. Caution: The text is NOT copied. Defaults to @{"NULL" Link "rexxsupport/NULL"} (localized asl.library default). Applicability is (OM_NEW, OM_SET). GETFONT_TitleText (STRPTR) @{"Requester" Link "INCLUDE:intuition/intuition.h/Main" 142} title text. Caution: The text is NOT copied. Defaults to @{"NULL" Link "rexxsupport/NULL"}. Applicability is (OM_NEW, OM_SET). GETFONT_TextAttr (struct @{"TextAttr" Link "INCLUDE:graphics/text.h/Main" 63} *) 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" Link "tabs_gc/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" Link "tabs_gc/OM_SET"}, @{"OM_GET" Link "tabs_gc/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" Link "INCLUDE:graphics/text.h/Main" 70} passed to @{"OpenFont()/OpenDiskFont()" Link "diskfont/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" Link "tabs_gc/OM_SET"}, @{"OM_GET" Link "tabs_gc/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" Link "tabs_gc/OM_SET"}, OM_GET). GETFONT_Width (WORD) Width of the font requester. Defaults to 300. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_GET). GETFONT_LeftEdge (WORD) Left edge of the font requester. Defaults to 30. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_GET). GETFONT_TopEdge (WORD) Top edge of the font requester. Defaults to 20. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_GET). GETFONT_FrontPen (UBYTE) Front pen. Defaults to 1. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, @{"OM_GET" Link "tabs_gc/OM_GET"}, OM_NOTIFY). GETFONT_BackPen (UBYTE) Back pen. Defaults to 0. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, @{"OM_GET" Link "tabs_gc/OM_GET"}, OM_NOTIFY). GETFONT_DrawMode (UBYTE) @{"Draw" Link "graphics/Draw()"} mode. Defaults to JAM1. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, @{"OM_GET" Link "tabs_gc/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). @EndNode @Node "GETFONT_GetClass()" "getfont.gadget/GETFONT_GetClass" @{b} NAME@{ub} GETFONT_GetClass -- Gets the pointer to the font requester class @{b} SYNOPSIS@{ub} getfont_class = GETFONT_GetClass(); D0 Class * GETFONT_GetClass( void ); @{b} FUNCTION@{ub} Obtains the pointer to the getfont gadget class for use with @{"NewObject()" Link "intuition/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. @{b} INPUTS@{ub} @{b} RESULT@{ub} getfont_class - Pointer to the getfont gadget class. @{b} EXAMPLE@{ub} @{b} NOTES@{ub} @{b} BUGS@{ub} @{b} SEE ALSO@{ub} @EndNode