TouchGFX + 0/4 examples
CodeScope will show references to touchgfx::Button from the following samples and libraries:
Examples
STM32469I-Discovery
Demonstrations
STM32469I_EVAL
Demonstrations
STM324x9I_EVAL
Demonstrations
STM32F429I-Discovery
Demonstrations
 
Symbols
loading...
Files
loading...

touchgfx::Button class

@class Button Button.hpp touchgfx/widgets/Button.hpp A button with two states. A button consists of two images, one for its normal state and one when it is pressed down. @see AbstractButton

Syntax

class Button : public AbstractButton { public:     Button() : AbstractButton(), up(), down(), alpha(255) { }     virtual ~Button() { }     virtual void draw(const Rect& invalidatedArea) const;     virtual void setBitmaps(const Bitmap& bmpReleased, const Bitmap& bmpPressed);     virtual Rect getSolidRect() const;     void setAlpha(uint8_t alpha)     {         this->alpha = alpha;     }     uint8_t getAlpha() const     {         return alpha;     }     Bitmap getCurrentlyDisplayedBitmap() const     {         return (AbstractButton::pressed ? down : up);     }     virtual uint16_t getType() const     {         return (uint16_t)TYPE_BUTTON;     } protected:     Bitmap  up;         Bitmap  down;       uint8_t alpha;  };

Fields

up

No summary provided. Read more...

down

No summary provided. Read more...

alpha

No summary provided. Read more...

Methods

draw() const

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

setBitmaps()

@fn virtual void Button::setBitmaps(const Bitmap& bmpReleased, const Bitmap& bmpPressed); Sets the bitmaps used by this button. Sets the bitmaps used by this button. Read more...

getSolidRect() const

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

setAlpha()

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

getAlpha() const

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

getCurrentlyDisplayedBitmap() const

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

getType() const

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

Examples

touchgfx::Button is referenced by 4 libraries and example projects.