TouchGFX + 0/1 examples
CodeScope will show references to touchgfx::RadioButton from the following samples and libraries:
Examples
STM324x9I_EVAL
Demonstrations
 
Symbols
loading...
Files
loading...

touchgfx::RadioButton class

@class RadioButton RadioButton.hpp touchgfx/widgets/RadioButton.hpp Radio button with two states. A radio button consists of four images, one for its not selected and one for selected. Each of these have an image for a pressed state. RadioButtons can be added to a RadioButtonGroup which handles the de-selection of radio buttons when a new selection is made. @see AbstractButton

Syntax

class RadioButton : public AbstractButton { public:     RadioButton() : AbstractButton(), bitmapUnselected(), bitmapUnselectedPressed(), bitmapSelected(), bitmapSelectedPressed(), alpha(255), selected(false), deselectionEnabled(false), deselectedAction(0)     { }     virtual ~RadioButton() { }     virtual void draw(const Rect& invalidatedArea) const;     virtual void handleClickEvent(const ClickEvent& event);     virtual void setBitmaps(const Bitmap& bmpUnselected, const Bitmap& bmpUnselectedPressed, const Bitmap& bmpSelected, const Bitmap& bmpSelectedPressed);     void setDeselectedAction(GenericCallback< const AbstractButton& >& callback)     {         deselectedAction = &callback;     }     virtual Rect getSolidRect() const;     void setAlpha(uint8_t alpha)     {         this->alpha = alpha;     }     uint8_t getAlpha() const     {         return alpha;     }     void setDeselectionEnabled(bool state)     {         deselectionEnabled = state;     }     bool getDeselectionEnabled() const     {         return deselectionEnabled;     }     void setSelected(bool newSelected);     bool getSelected() const     {         return selected;     }     Bitmap getCurrentlyDisplayedBitmap() const     {         return (selected ? (AbstractButton::pressed ? bitmapSelectedPressed : bitmapSelected) : (AbstractButton::pressed ? bitmapUnselectedPressed : bitmapUnselected));     }     virtual uint16_t getType() const     {         return (uint16_t)TYPE_RADIOBUTTON;     } protected:     Bitmap  bitmapUnselected;             Bitmap  bitmapUnselectedPressed;      Bitmap  bitmapSelected;               Bitmap  bitmapSelectedPressed;        uint8_t alpha;                        bool    selected;                     bool    deselectionEnabled;           GenericCallback< const AbstractButton& >* deselectedAction;  };

Fields

bitmapUnselected

No summary provided. Read more...

bitmapUnselectedPressed

No summary provided. Read more...

bitmapSelected

No summary provided. Read more...

bitmapSelectedPressed

No summary provided. Read more...

alpha

No summary provided. Read more...

selected

No summary provided. Read more...

deselectionEnabled

No summary provided. Read more...

deselectedAction

No summary provided. Read more...

Methods

getSolidRect() const

@fn virtual Rect RadioButton::getSolidRect() const; Gets solid rectangle. Gets solid rectangle. Read more...

setAlpha()

@fn void RadioButton::setAlpha(uint8_t alpha) Sets the alpha channel for the image. Sets the alpha channel for the image. Read more...

getAlpha() const

@fn uint8_t RadioButton::getAlpha() const Gets the current alpha value. Gets the current alpha value. Read more...

setDeselectionEnabled()

@fn void RadioButton::setDeselectionEnabled(bool state) States whether or not it is possible to de-select the RadioButton by clicking it. States whether or not it is possible to de-select the RadioButton by clicking it. Read more...

getDeselectionEnabled() const

@fn bool RadioButton::getDeselectionEnabled() const Gets the current deselectionEnabled state. Gets the current deselectionEnabled state. Read more...

setSelected()

@fn void RadioButton::setSelected(bool newSelected); Sets the radio buttons selected state. Sets the radio buttons selected state. Read more...

getSelected() const

@fn bool RadioButton::getSelected() const Gets the current selected state. Gets the current selected state. Read more...

getCurrentlyDisplayedBitmap() const

@fn Bitmap RadioButton::getCurrentlyDisplayedBitmap() const Gets currently displayed bitmap. Function to obtain the currently displayed bitmap, which depends on the radio button's pressed and selected state. Read more...

getType() const

@fn virtual uint16_t RadioButton::getType() const For GUI testing only. For GUI testing only. Returns type of this drawable. Read more...

draw() const

@fn virtual void RadioButton::draw(const Rect& invalidatedArea) const; Draws the given invalidated area. Draws the given invalidated area. @see Drawable::draw(). Read more...

handleClickEvent()

@fn virtual void RadioButton::handleClickEvent(const ClickEvent& event); Updates the current state of the radio button. Updates the current state of the radio button - pressed or released, selected or not selected - and invalidates it. If a transition from the not selected to selected was made, the associated action is executed and then the Widget is invalidated. @see Drawable::handleClickEvent(). Read more...

setBitmaps()

@fn virtual void RadioButton::setBitmaps(const Bitmap& bmpUnselected, const Bitmap& bmpUnselectedPressed, const Bitmap& bmpSelected, const Bitmap& bmpSelectedPressed); Sets the bitmaps used by this button. Sets the bitmaps used by this button. If no special pressed states are needed just specify the same bitmap for both pressed and non-pressed bitmaps. Read more...

setDeselectedAction()

@fn void RadioButton::setDeselectedAction(GenericCallback& callback) Associates an action to be performed when the AbstractButton is deselected. Associates an action to be performed when the AbstractButton is deselected. @see GenericCallback. Read more...

Examples

touchgfx::RadioButton is referenced by 1 libraries and example projects.