@database "checkbox_gc"
@master "AMIDEV:NDK/Autodocs/checkbox_gc.doc"

@Node Main "checkbox_gc.doc"
@toc "Autodocs/AG/INDEX/Main"
    @{" --datasheet--() " Link "--datasheet--()"}
    @{" CHECKBOX_GetClass() " Link "CHECKBOX_GetClass()"}
@EndNode

@Node "--datasheet--()" "checkbox_gc/--datasheet--"

@{b}    NAME@{ub}
        checkbox_gc -- create checkbox BOOPSI objects

@{b}    SUPERCLASS@{ub}
        gadgetclass

@{b}    REQUIRES@{ub}
        bevel.image, glyph.image

@{b}    DESCRIPTION@{ub}
        The checkbox gadget class is used to create toggling check buttons.
        Selection of an associated option is denoted by the gadget being
        "checked", or in other words, containing a checkmark with in the
        checkbox. Unlike GadTools, GA_Height and GA_Width DO NOT specify
        the checkbox size, but rather the entire hit box area which
        includes the text label. The checkbox will maintain its aspect
        ratio when possible.

        Advantages that this class provides over the standard gadtools
        checkbox are:

         > Supports window relativity.

         > Ability to change background pen, text pen, and filltext pen.

         > Larger selection area, includes text label area.

         > Supports OS 3.0 BOOPSI @{"Gadget" Link "INCLUDE:intuition/intuition.h/Main" 212} HelpTest.

         > Aspect adaptive checkbox for any resolution and font.

@{b}    METHODS@{ub}
        @{"OM_NEW" Link "tabs_gc/OM_NEW"} -- Passed to superclass first, defaults set, then @{"OM_SET" Link "tabs_gc/OM_SET"}.

        @{"OM_SET" Link "tabs_gc/OM_SET"} -- Passed to superclass first, then custom tags set & render.

        @{"OM_GET" Link "tabs_gc/OM_GET"} -- Returns requested setting or passed to superclass

        OM_UPDATE -- Passed to superclass first, then custom tags set & rende
r.

        OM_NOTIFY -- @{"Tag" Link "INCLUDE:utility/tagitem.h/Main" 28} set then passed to superclass.

        OM_DISPOSE -- Passed to superclass.

        GM_DOMAIN -- Returns aspect ratio corrected minimum and maximum
            sizes.

        @{"GM_GOACTIVE" Link "tabs_gc/GM_GOACTIVE"} -- Passed to superclass first, then check activated

        GM_GOINACTIVE -- Passed to superclass first, then check deactivated

        GM_HANDLEINPUT -- Overrides superclass.

        @{"GM_HITTEST" Link "tabs_gc/GM_HITTEST"} -- Overrides superclass, returns GMR_HITTEST.

        @{"GM_RENDER" Link "tabs_gc/GM_RENDER"} -- Renders or erases checkmark glyph.

        GM_DOMAIN -- Returns GDOMAIN_MINIMUM, GDOMAIN_NOMINAL and
            GDOMAIN_MAXIMUM dimensions.

        GM_KEYACTIVE -- Private method for keyboard control.

        GM_KEYINACTIVE -- Private method for keyboard control.

@{b}    ATTRIBUTES@{ub}

        GA_ID (WORD)
            Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE, OM_NOTIFY)

        GA_Text (STRPTR)
            Used to set the text label for the checkbox

            Defaults to @{"NULL" Link "rexxsupport/NULL"}.

            Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

        GA_TextAttr (struct @{"TextAttr" Link "INCLUDE:graphics/text.h/Main" 63} *)
            Used to set the text font to render the checkbox label.

            Defaults to RPort->Font, which is often the screen or
            window font.

            Applicability is (OM_NEW, OM_SET)

        GA_Selected (BOOL)
            Used to set the checkmark state via application control.

            Defaults to FALSE.

            Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE, OM_NOTIFY)

        GA_Disabled (BOOL)
            Used to disable the gadget, and render a disable ghost
            pattern of the checkbox.

            Defaults to FALSE.

            Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

        CHECKBOX_TextPen (WORD)
            Pen number used to render the text label.

            Defaults to TEXTPEN.

            Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

        CHECKBOX_BackGroundPen (WORD)
            Pen number used to render the gadget background.

            Defaults to BACKGROUNDPEN.

            Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

        CHECKBOX_TextPlace (WORD)
            Location of checkbox text label. Supports:

                PLACETEXT_RIGHT
                PLACETEXT_LEFT

            Defaults to PLACETEXT_RIGHT.

            Applicability is (OM_NEW)

@EndNode

@Node "CHECKBOX_GetClass()" "checkbox_gc/CHECKBOX_GetClass"

@{b}    NAME@{ub}
        CHECKBOX_GetClass -- Gets the pointer to the checkbox class.

@{b}    SYNOPSIS@{ub}
        checkbox_class = CHECKBOX_GetClass();
        D0

        Class * CHECKBOX_GetClass(VOID);

@{b}    FUNCTION@{ub}
        This function is only available in runtime linked version of the
        class, checkbox.gadget and is not in the compiler linker library
        checkbox_gc.lib.

        Obtains the pointer to the CheckBox 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}
        checkbox_class - Pointer to the CheckBox gadget class.

@{b}    SEE ALSO@{ub}

@EndNode

