ButtonView

class mono::ui::ButtonView

Inherits from mono::ui::ResponderView

Public Functions

void setText(String txt)

MARK: Accessors.

void setBorder(Color c)

Sets the border and text color This method will not schedule repaint!

void setHighlight(Color c)

Sets the active / pressed color (border & text) This method will not schedule repaint!

void setBackground(Color c)

Sets the background color This method will not schedule repaint!

const TextLabelView &TextLabel() const

Get a reference to the internal TextLabel object.

template <typename Owner>
void mono::ui::ButtonView::setClickCallback(Owner * obj, void(Owner::*)(void) memPtr)

MARK: Callbacks.

Attach a member function as the button click handler

Provide the callback member function you ewant to be called when the button is clicked.

NOTE: THere can only be one callback function

void setClickCallback(void (*memPtr)(void))

Attach a C function pointeras the button click handler.

Provide a pointer to the callback C function, you ewant to be called when the button is clicked.

NOTE: THere can only be one callback function.

virtual void repaint()

Painters.

Protected Functions

virtual void TouchBegin(TouchEvent &event)

MARK: Touch Handlers.

void initButton()

MARK: Conructors.