@database "fuelgauge_gc" @master "AMIDEV:NDK/Autodocs/fuelgauge_gc.doc" @Node Main "fuelgauge_gc.doc" @toc "Autodocs/AG/INDEX/Main" @{" --datasheet--() " Link "--datasheet--()"} @{" FUELGAUGE_GetClass() " Link "FUELGAUGE_GetClass()"} @EndNode @Node "--datasheet--()" "fuelgauge_gc/--datasheet--" @{b} NAME@{ub} fuelgauge_gc -- create fuelgauge BOOPSI objects @{b} SUPERCLASS@{ub} gadgetclass @{b} REQUIRES@{ub} bevel.image @{b} DESCRIPTION@{ub} The fuelgauge gadget class is used to display stage of completion of some operation, such as formating a floppy. Or, perhaps as a means of indication, such as free drive space. Advantages that this class provides: > Supports window relativity. > Optional tick marks, and short ticks. > Ability to change background pen, text pen, and filltext pen. > Supports OS 3.0 BOOPSI @{"Gadget" Link "INCLUDE:intuition/intuition.h/Main" 212} HelpTest. @{b} METHODS@{ub} @{"OM_NEW" Link "tabs_gc/OM_NEW"} -- Passed to superclass to creates object instance @{"OM_SET" Link "tabs_gc/OM_SET"} -- Sets all possible settings, then passed to superclass @{"OM_GET" Link "tabs_gc/OM_GET"} -- Returns requested setting or passed to superclass OM_DISPOSE -- Passed to superclass @{"GM_HITTEST" Link "tabs_gc/GM_HITTEST"} -- Returns 0. @{"GM_RENDER" Link "tabs_gc/GM_RENDER"} -- Passed to superclass, then renders fuelgauge GM_DOMAIN -- Returns GDOMAIN_MINIMUM, GDOMAIN_NOMINAL and GDOMAIN_MAXIMUM dimensions. @{"GM_GOACTIVE" Link "tabs_gc/GM_GOACTIVE"} -- NO OP GM_HANDLEINPUT -- NO OP GM_GOINACTIVE -- NO OP @{b} ATTRIBUTES@{ub} GA_Text (STRPTR) Used to specify the @{"NULL" Link "rexxsupport/NULL"} terminated string to use as the text for the gadget. The @{"Text()" Link "graphics/Text()"} function is used to draw the text. @{"NULL" Link "rexxsupport/NULL"} is valid input, and will enable the default centered percentage rendering. Changing the label will invoke @{"GM_RENDER" Link "tabs_gc/GM_RENDER"}. @{"Text" Link "graphics/Text()"} string is clipped to fit inside the gauge via the @{"TextFit()" Link "graphics/TextFit()"} function. The text string may contain varargs format specifiers compatible to @{"RawDoFmt()" Link "exec/RawDoFmt()"} if the varargs data is supplied via FUELGAUGE_VarArgs. Do not forget to disable percentage display with the FUELGAUGE_Percent tag or your text will not appear. Applicability is (OM_NEW, OM_SET) GA_TextAttr (struct @{"TextAttr" Link "INCLUDE:graphics/text.h/Main" 63} *) Font to use for the gadget text. Defaults to the screen's font. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_GET) GA_BackFill (struct @{"Hook" Link "INCLUDE:utility/hooks.h/Main" 26} *) A layer backfill hook to provide a more complex background pattern. See @{"InstallLayerHook()" Link "layers/InstallLayerHook()"} for more details about the backfill hook. Defaults to @{"NULL" Link "rexxsupport/NULL"}. Applicability is (OM_NEW, OM_SET) FUELGAUGE_Min (LONG) Minimum value of the gauge. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE, OM_GET) FUELGAUGE_Max (LONG) Maximum value of the gauge. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE, OM_GET) FUELGAUGE_Level (LONG) Current gauge setting, usually something between Min and Max. Based on Min, Max and Current a percentage can be calculated and displayed by the gadget. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE, OM_GET) FUELGAUGE_Orientation (WORD) Sets the orientation of the fuel gauge to vertical or horizontal. Accepted values as defined in @{"" Link "INCLUDE:gadgets/fuelgauge.h/Main" 0} are: FGORIENT_HORIZ FGORIENT_VERT Defaults to FGORIENT_HORIZ Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE) FUELGAUGE_Percent (WORD) @{"Enable/Disable" Link "exec/Disable()"} Percentage display. Percentage is displayed in the center of the gauge using the requested font, provided it fits within the gadget bounds. Percentage overrides the GA_Text text display. Defaults to TRUE. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE, OM_GET) FUELGAUGE_Ticks (BOOL) Sets the number of "tickmarks" rendered along the bottom of the gadget. Take note, the tickmarks are rendered within the gadgets size dimentions. Values greater than 0 enable the tick mark(s). Defaults to 4. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE) FUELGAUGE_ShortTicks (BOOL) Enables rendering of "short ticks", smaller size tickmarks rendered in between the larger tick marks. Defaults to FALSE. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE) FUELGAUGE_TickSize (WORD) Sets the size, in pixels, of the large tickmarks. Shorttick size is TickHeight / 2. Note, if NOT setting FUELGAUGE_Ticks non-zero, then you may need to 0 this as well depending on the fuelgauge release version! Defaults to 5 pixels Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE) FUELGAUGE_TickPen (WORD) Pen number used to render the tickmarks. Defaults to SHINEPEN. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE) FUELGAUGE_PercentPen (WORD) Pen number used to render the percentage text label. Defaults to TEXTPEN. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE) FUELGAUGE_EmptyPen (WORD) Pen number used to render the empty section of the gauge. Defaults to BACKGROUNDPEN. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE) FUELGAUGE_FillPen (WORD) Pen number used to render the filled section of the gauge. Defaults to FILLPEN. Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE) FUELGAUGE_VarArgs (APTR) Varargs data array to supply data for @{"RawDoFmt()" Link "exec/RawDoFmt()"} when format specifiers are to be used in GA_Text text strings. The VarArgs internal result buffer is 256 bytes in V47 and later, but only 128 bytes in V45 and earlier; take care not to exceed this buffer. Defaults to @{"NULL" Link "rexxsupport/NULL"}. Applicability is (OM_NEW, OM_SET) FUELGAUGE_Justification (WORD) Justification mode of fuelgauge (GA_Text) text label. Percentage rendering, when enabled, is always centered. Supports: FGJ_LEFT FGJ_CENTER Defaults to FGJ_LEFT. Applicability is (OM_NEW, OM_SET) @EndNode @Node "FUELGAUGE_GetClass()" "fuelgauge_gc/FUELGAUGE_GetClass" @{b} NAME@{ub} FUELGAUGE_GetClass -- Gets the pointer to the fuelgauge class. @{b} SYNOPSIS@{ub} fuelgauge_class = FUELGAUGE_GetClass(); D0 Class * FUELGAUGE_GetClass(VOID); @{b} FUNCTION@{ub} Obtains the pointer to the FuelGauge 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} Nothing. @{b} RESULT@{ub} fuelgauge_class - Pointer to the FuelGauge gadget class. @{b} SEE ALSO@{ub} @EndNode