メイン・コンテンツまでスキップ

BoxWithBorderButtonStyle

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:

See: AbstractButtonContainer, BoxWithBorder

Inherits from: T

Public Functions

BoxWithBorderButtonStyle()
voidsetBorderSize(uint8_t size)
Sets border size.
voidsetBoxWithBorderColors(const colortype colorReleased, const colortype colorPressed, const colortype borderColorReleased, const colortype borderColorPressed)
Sets the colors.
voidsetBoxWithBorderHeight(int16_t height)
Sets the height.
voidsetBoxWithBorderPosition(int16_t x, int16_t y, int16_t width, int16_t height)
Sets the size and position of this BoxWithBorderButtonStyle, relative to its parent.
voidsetBoxWithBorderWidth(int16_t width)
Sets the width.

Protected Functions

virtual voidhandleAlphaUpdated()
Handles what should happen when the alpha is updated.
virtual voidhandlePressedUpdated()
Handles what should happen when the pressed state is updated.

Protected Attributes

BoxWithBorderborderBox
The border box.
colortypeborderDown
The border down.
colortypeborderUp
The border up.
colortypedown
The down.
colortypeup
The up.

Public Functions Documentation

BoxWithBorderButtonStyle

setBorderSize

void setBorderSize(uint8_tsize)

Sets border size.

Parameters:
sizeThe size.

setBoxWithBorderColors

void setBoxWithBorderColors(const colortypecolorReleased ,
const colortypecolorPressed ,
const colortypeborderColorReleased ,
const colortypeborderColorPressed
)

Sets the colors.

Parameters:
colorReleasedThe color released.
colorPressedThe color pressed.
borderColorReleasedThe border color released.
borderColorPressedThe border color pressed.

setBoxWithBorderHeight

void setBoxWithBorderHeight(int16_theight)

Sets the height.

Parameters:
heightThe height.

setBoxWithBorderPosition

void setBoxWithBorderPosition(int16_tx ,
int16_ty ,
int16_twidth ,
int16_theight
)

Sets the size and position of this BoxWithBorderButtonStyle, relative to its parent.

Parameters:
xThe x coordinate of this BoxWithBorderButtonStyle.
yThe y coordinate of this BoxWithBorderButtonStyle.
widthThe width of this BoxWithBorderButtonStyle.
heightThe height of this BoxWithBorderButtonStyle.
Note

Changing this does not automatically yield a redraw.

setBoxWithBorderWidth

void setBoxWithBorderWidth(int16_twidth)

Sets the width.

Parameters:
widthThe 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

The up.