#include <ubutton.hpp>
Inheritance diagram for ufo::UButton:
Public Member Functions | |
UButton (UIcon *icon) | |
UButton (const std::string &text, UIcon *icon=NULL) | |
virtual void | doClick () |
virtual void | doClick (int millis) |
virtual bool | isSelected () const |
virtual void | setSelected (bool b) |
bool | isPressed () const |
void | setPressed (bool b) |
bool | isRolloverEnabled () const |
void | setRolloverEnabled (bool b) |
bool | isRollover () const |
bool | isToggable () const |
void | setToggable (bool b) |
virtual std::string | getActionCommand () const |
virtual void | setActionCommand (const std::string &actionCommand) |
void | setPressedIcon (UIcon *icon) |
UIcon * | getPressedIcon () const |
void | setRolloverIcon (UIcon *icon) |
UIcon * | getRolloverIcon () const |
void | setAccelerator (const UKeyStroke &stroke) |
UKeyStroke | getAccelerator () const |
int | getAcceleratorIndex () const |
void | setButtonGroup (UButtonGroup *buttonGroup) |
UButtonGroup * | getButtonGroup () const |
virtual void | activate () |
virtual bool | isActive () const |
virtual UIcon * | getIcon () const |
virtual void | setText (const std::string &text) |
USignal1< UActionEvent * > & | sigActivated () |
USignal1< UActionEvent * > & | sigHighlighted () |
Protected Member Functions | |
void | fireActionEvent () |
void | buttonUp () |
virtual UDimension | getContentsSize (const UDimension &maxSize) const |
virtual void | processKeyEvent (UKeyEvent *e) |
virtual void | processMouseEvent (UMouseEvent *e) |
virtual void | processShortcutEvent (UShortcutEvent *e) |
In its basic version, it is a standard push button.
|
Activates the button and fires an action event. Reimplemented in ufo::UMenuItem.
|
|
A slot for the doClick method. |
|
Emulates a mouse click on that button, i.e. shows a pressed button, releases it and calls activate.
|
|
Emulates a mouse click on that button, i.e. shows a pressed button, releases it and calls activate. |
|
If the accelerator is Alt+character and the text caption contains that letter, the index of this character within the caption is returned. |
|
Gets the action command
|
|
returns the icon that is currently used to paint this button.
Reimplemented from ufo::UCompound.
|
|
|
|
|
|
Returns whether this widget is active. Mostly this means that the current widget has mouse focus. But this may differ from widget to widget (e.g. text widget are active if they have keyboard focus). This is not really an isolated widget state but the combination of other states. It is used as style hint for the UI object. Reimplemented from ufo::UWidget.
|
|
Checks whether the button is pressed or not. This is mainly for visible effects.
|
|
checks whether rollover effects are taking places, i.e. mouse is over button
|
|
checks whether rollover effects are enabled
|
|
Checks whether the button is selected or not. Only toggable buttons like check boxes and radio buttons can be selected.
|
|
if a button is toggable, you change the state by a mouse click
|
|
Processes key events. Primarily, it is used to notify listeners. Reimplemented from ufo::UWidget.
Reimplemented in ufo::UMenuItem.
|
|
Processes focus events. Primarily, it is used to notify listeners. Reimplemented from ufo::UWidget.
Reimplemented in ufo::UMenuItem.
|
|
Sets the accelerator. If the given key combination is pressed and the focused widget does not process it, the button will be activated. |
|
Sets the action command. This string is delivered as action command to created action events. If no action command is specified, the current text caption is used as actino command.
|
|
Sets the button group. Only one button within a button group can be selected. |
|
Sets whether the button is pressed or not. A button is pressed normally by mouse or keyboard.
|
|
|
|
sets whether rollover effects should be enabled
|
|
|
|
Sets whether the button is selected or not.
|
|
sets the visible text
Reimplemented from ufo::UCompound.
|
|
if a button is toggable, you change the state by a mouse click
|
|
This signal is fired when the button has been clicked, toggled etc. |
|
This signal is fired when the button gets some type of highlight. This can mean that the button got mouse or keyboard focus. |