Rogue Wave Views Gadgets Package API Reference Guide |
Rogue Wave Views Documentation Home |
Gadget class. More...
#include <ilviews/gadgets/ctoggle.h>
Public Member Functions | |
IlvColoredToggle (IlvDisplay *display, const char *label, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
IlvColoredToggle (IlvDisplay *display, const IlvPoint &point, const char *label, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
IlvColoredToggle (IlvDisplay *display, IlvBitmap *bitmap, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
IlvColoredToggle (IlvDisplay *display, const IlvPoint &point, IlvBitmap *bitmap, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
IlvColor * | getCheckColor () const |
Returns The color used to draw the toggle button when checked. More... | |
void | setCheckColor (IlvColor *color) |
Sets the color to use when the toggle button is checked. More... | |
Public Member Functions inherited from IlvToggle | |
IlvToggle (IlvDisplay *display, const char *label, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
IlvToggle (IlvDisplay *display, const IlvPoint &point, const char *label, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
IlvToggle (IlvDisplay *display, IlvBitmap *bitmap, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
IlvToggle (IlvDisplay *display, const IlvPoint &point, IlvBitmap *bitmap, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
virtual void | activate () |
Is called by the interactor when the state of the toggle button changes. More... | |
virtual void | drawCheckBox (IlvPort *dst, const IlvRect &rect, const IlvRegion *clip=0) const |
Is called to draw the check box of the toggle button. More... | |
virtual void | drawText (IlvPort *dst, const IlvRect &rect, const IlvRegion *clip=0) const |
Is called to draw the label and bitmap of the toggle button. More... | |
IlvBitmap * | getBitmap () const |
Returns the bitmap displayed by the toggle button. More... | |
IlvDim | getCheckSize () const |
Returns the size of the state marker of the toggle button. More... | |
const char * | getLabel () const |
Returns the label displayed by the toggle button. More... | |
IlvPosition | getPosition () const |
Returns the position of the label or the bitmap relative to the state marker of the toggle button. More... | |
IlBoolean | getState () const |
Returns the state of the toggle button (on or off). More... | |
IlvPosition | getTextAlignment () const |
Returns the alignment of the label or the bitmap relative to the bounding box of the toggle button. More... | |
IlBoolean | isIndeterminateMode () const |
Indicates whether the toggle is in the indeterminate mode. More... | |
IlBoolean | isIndeterminateState () const |
Indicates whether the state of the toggle button is indeterminate. More... | |
IlBoolean | isRadio () const |
Indicates whether the state marker has the shape of a radio button. More... | |
void | setBitmap (IlvBitmap *bitmap) |
Sets the bitmap displayed by the toggle button. More... | |
void | setCheckSize (IlvDim size) |
Sets the size of the state marker. More... | |
void | setIndeterminateMode (IlBoolean value) |
Sets the mode of the toggle button to indeterminate mode. More... | |
void | setIndeterminateState (IlBoolean value) |
Specifies whether the state of the toggle button should be indeterminate. More... | |
void | setLabel (const char *label) |
Sets the label displayed by the toggle button. More... | |
void | setPosition (IlvPosition position) |
Sets the position of the label or the bitmap relative to the state marker of the toggle button. More... | |
void | setRadio (IlBoolean value) |
Specifies whether the state marker should have the shape of a radio button. More... | |
void | setState (IlBoolean value) |
Sets the state of the toggle button (on or off). More... | |
void | setTextAlignment (IlvPosition alignment) |
Sets the alignment of the label or the bitmap relative to the bounding box of the toggle button. More... | |
Gadget class.
Library: ilvgadgt
The IlvColoredToggle
class defines a toggle button that appears in color when it is checked.
A Colored toggle button
IlvManagerToggleInteractor
, IlvViewToggleInteractor
.Accessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods IlvValueInterface::queryValue()
, IlvValueInterface::queryValues()
, IlvValueInterface::changeValue()
, IlvValueInterface::changeValues()
. This class inherits the accessors of its superclass IlvToggle
and adds the following ones:
Name | Type | Equivalent methods |
---|---|---|
checkColor | Color | getCheckColor() , setCheckColor() |
This class supports the following CSS properties:
Graphic property | CSS property | Type |
---|---|---|
Background color | background-color | Color |
Text color | color | Color |
IlvColoredToggle::IlvColoredToggle | ( | IlvDisplay * | display, |
const char * | label, | ||
const IlvRect & | rect, | ||
IlUShort | thickness = IlvDefaultGadgetThickness , |
||
IlvPalette * | palette = 0 |
||
) |
Constructor.
Initializes a new instance of the IlvColoredToggle
class using a label. The label is copied.
display | The connection to the display. |
label | The label of the toggle button |
rect | The size and position of the toggle button. |
thickness | The thickness of the toggle button. |
palette | The palette used by the toggle button. |
IlvColoredToggle::IlvColoredToggle | ( | IlvDisplay * | display, |
const IlvPoint & | point, | ||
const char * | label, | ||
IlUShort | thickness = IlvDefaultGadgetThickness , |
||
IlvPalette * | palette = 0 |
||
) |
Constructor.
Initializes a new instance of the IlvColoredToggle
class using a label.
display | The connection to the display. |
point | The position of the toggle button. |
label | The label of the toggle button. The label is copied. |
thickness | The thickness of the toggle button. |
palette | The palette used by the toggle button. |
IlvColoredToggle::IlvColoredToggle | ( | IlvDisplay * | display, |
IlvBitmap * | bitmap, | ||
const IlvRect & | rect, | ||
IlUShort | thickness = IlvDefaultGadgetThickness , |
||
IlvPalette * | palette = 0 |
||
) |
Constructor.
Initializes a new instance of the IlvColoredToggle
class using a bitmap.
display | The connection to the display. |
bitmap | The bitmap of the toggle button. The bitmap is locked. |
rect | The size and position of the toggle button. |
thickness | The thickness of the toggle button. |
palette | The palette used by the toggle button. |
IlvColoredToggle::IlvColoredToggle | ( | IlvDisplay * | display, |
const IlvPoint & | point, | ||
IlvBitmap * | bitmap, | ||
IlUShort | thickness = IlvDefaultGadgetThickness , |
||
IlvPalette * | palette = 0 |
||
) |
Constructor.
Initializes a new instance of the IlvColoredToggle
class using a bitmap.
display | The connection to the display. |
point | The position of the toggle button. |
bitmap | The bitmap of the toggle button. The bitmap is locked. |
thickness | The thickness of the toggle button. |
palette | The palette used by the toggle button. |
IlvColor* IlvColoredToggle::getCheckColor | ( | ) | const |
Returns The color used to draw the toggle button when checked.
setCheckColor()
. void IlvColoredToggle::setCheckColor | ( | IlvColor * | color | ) |
Sets the color to use when the toggle button is checked.
color | The new check color. The previous check color is unlocked, and the new one is locked. |
getCheckColor()
. © Copyright 2017, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.