BoxWithBorderButtonStyle
touchgfx/containers/buttons/BoxWithBorderButtonStyle.hpp
A box with border button style. This class is supposed to be used with one of the ButtonTrigger classes to create a functional button. This class will show a box with a border in different colors depending on the state of the button (pressed or released).
An image button style. This class is supposed to be used with one of the ButtonTrigger classes to create a functional button. This class will show one of two images depending on the state of the button (pressed or released).
Template Parameters:
- T Generic type parameter. Typically a AbstractButtonContainer subclass.
See: AbstractButtonContainer, BoxWithBorder
Inherits from: T
Public Functions
BoxWithBorderButtonStyle() | |
void | setBorderSize(uint8_t size) |
Sets border size. | |
void | setBoxWithBorderColors(const colortype colorReleased, const colortype colorPressed, const colortype borderColorReleased, const colortype borderColorPressed) |
Sets the colors. | |
void | setBoxWithBorderHeight(int16_t height) |
Sets the height. | |
void | setBoxWithBorderPosition(int16_t x, int16_t y, int16_t width, int16_t height) |
Sets the size and position of this BoxWithBorderButtonStyle, relative to its parent. | |
void | setBoxWithBorderWidth(int16_t width) |
Sets the width. | |
Protected Functions
virtual void | handleAlphaUpdated() |
Handles what should happen when the alpha is updated. | |
virtual void | handlePressedUpdated() |
Handles what should happen when the pressed state is updated. | |
Protected Attributes
BoxWithBorder | borderBox |
The border box. | |
colortype | borderDown |
The border down. | |
colortype | borderUp |
The border up. | |
colortype | down |
The down. | |
colortype | up |
The up. | |
Public Functions Documentation
BoxWithBorderButtonStyle
setBorderSize
void setBorderSize | ( | uint8_t | size | ) | |
Sets border size.
size | The size. |
setBoxWithBorderColors
void setBoxWithBorderColors | ( | const colortype | colorReleased , | ||
const colortype | colorPressed , | ||||
const colortype | borderColorReleased , | ||||
const colortype | borderColorPressed | ||||
) |
Sets the colors.
colorReleased | The color released. |
colorPressed | The color pressed. |
borderColorReleased | The border color released. |
borderColorPressed | The border color pressed. |
setBoxWithBorderHeight
void setBoxWithBorderHeight | ( | int16_t | height | ) | |
Sets the height.
height | The height. |
setBoxWithBorderPosition
void setBoxWithBorderPosition | ( | int16_t | x , | ||
int16_t | y , | ||||
int16_t | width , | ||||
int16_t | height | ||||
) |
Sets the size and position of this BoxWithBorderButtonStyle, relative to its parent.
x | The x coordinate of this BoxWithBorderButtonStyle. |
y | The y coordinate of this BoxWithBorderButtonStyle. |
width | The width of this BoxWithBorderButtonStyle. |
height | The height of this BoxWithBorderButtonStyle. |
Note
Changing this does not automatically yield a redraw.
setBoxWithBorderWidth
void setBoxWithBorderWidth | ( | int16_t | width | ) | |
Sets the width.
width | The width. |
Protected Functions Documentation
handleAlphaUpdated
virtual void handleAlphaUpdated | ( | ) |
Handles what should happen when the alpha is updated.
handlePressedUpdated
virtual void handlePressedUpdated | ( | ) |
Handles what should happen when the pressed state is updated.
Protected Attributes Documentation
borderBox
BoxWithBorder borderBox
The border box.
borderDown
colortype borderDown
The border down.
borderUp
colortype borderUp
The border up.
down
colortype down
The down.
up
colortype up
The up.