Rogue Wave Views
Gadgets Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvColoredToggle Class Reference

Gadget class. More...

#include <ilviews/gadgets/ctoggle.h>

Inheritance diagram for IlvColoredToggle:
IlvToggle IlvGadget IlvSimpleGraphic IlvStylable IlvGraphic IlvValueInterface

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...
 
IlvColorgetCheckColor () 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...
 
IlvBitmapgetBitmap () 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...
 

Detailed Description

Gadget class.

Library: ilvgadgt

The IlvColoredToggle class defines a toggle button that appears in color when it is checked.

A Colored toggle button

See also
IlvManagerToggleInteractor, IlvViewToggleInteractor.

Accessors

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()

Styling

This class supports the following CSS properties:

Graphic property CSS property Type
Background color background-colorColor
Text color color Color

Constructor & Destructor Documentation

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.

Parameters
displayThe connection to the display.
labelThe label of the toggle button
rectThe size and position of the toggle button.
thicknessThe thickness of the toggle button.
paletteThe 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.

Parameters
displayThe connection to the display.
pointThe position of the toggle button.
labelThe label of the toggle button. The label is copied.
thicknessThe thickness of the toggle button.
paletteThe 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.

Parameters
displayThe connection to the display.
bitmapThe bitmap of the toggle button. The bitmap is locked.
rectThe size and position of the toggle button.
thicknessThe thickness of the toggle button.
paletteThe 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.

Parameters
displayThe connection to the display.
pointThe position of the toggle button.
bitmapThe bitmap of the toggle button. The bitmap is locked.
thicknessThe thickness of the toggle button.
paletteThe palette used by the toggle button.

Member Function Documentation

IlvColor* IlvColoredToggle::getCheckColor ( ) const

Returns The color used to draw the toggle button when checked.

Returns
The color used to draw the toggle button when checked.
See also
setCheckColor().
void IlvColoredToggle::setCheckColor ( IlvColor color)

Sets the color to use when the toggle button is checked.

Parameters
colorThe new check color. The previous check color is unlocked, and the new one is locked.
See also
getCheckColor().

© Copyright 2016, 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.