Home  /  Autodocs

checkbox.gadget

create checkbox BOOPSI objects

FUNCTIONS

CHECKBOX_GetClass

SUPERCLASS

gadgetclass

REQUIRES

bevel.image, glyph.image

DESCRIPTION

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 HelpTest.

  • Aspect adaptive checkbox for any resolution and font.

ATTRIBUTES

GA_ID (WORD)
Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_NOTIFY)

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

Defaults to NULL.

Applicability is (OM_NEW, OM_SET, OM_UPDATE)

GA_TextAttr (struct TextAttr *)
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, 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, OM_UPDATE)

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

Defaults to TEXTPEN.

Applicability is (OM_NEW, OM_SET, OM_UPDATE)

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

Defaults to BACKGROUNDPEN.

Applicability is (OM_NEW, 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)