#include <YPushButton.h>
Inheritance diagram for YPushButton:
Public Member Functions | |
YPushButton (const YWidgetOpt &opt, YCPString label) | |
virtual char * | widgetClass () |
YCPValue | changeWidget (const YCPSymbol &property, const YCPValue &newvalue) |
YCPValue | queryWidget (const YCPSymbol &property) |
virtual void | setLabel (const YCPString &label) |
YCPString | getLabel () |
virtual void | setIcon (const YCPString &icon_name) |
const char * | shortcutProperty () |
Protected Attributes | |
YCPString | label |
PushButton IconButton
A PushButton
is a button with a text label the user can press in order to activate some action. If you call UserInput()
and the user presses the button, UserInput()
returns with the id of the pressed button.
You can ( and should ) provide keybord shortcuts along with the button label. For example "& Apply" as a button label will allow the user to activate the button with Alt-A, even if it currently doesn't have keyboard focus. This is important for UIs that don't support using a mouse.
An IconButton
is pretty much the same, but it has an icon in addition to the text. If the UI cannot handle icons, it displays only the text, and the icon is silently omitted.
Icons are ( at the time of this writing ) loaded from the theme directory, /usr/share/YaST2/theme/current
.
|
Creates a new YPushButton
|
|
Implements the ui command changeWidget for the widget specific properties. string Label the text on the PushButton Reimplemented from YWidget. |
|
Get the current label of the text entry. This method cannot be overidden. The value of the label cannot be changed other than by calling setLabel, i.e. not by the ui. Therefore setLabel stores the current label in label. |
|
Implements the ui command changeWidget for the widget specific properties. Reimplemented from YWidget. |
|
Set this button's icon from an icon file in the UI's default icon directory. Clear the icon if the name is empty. This default implementation does nothing. UIs that can handle icons can choose to overwrite this method. |
|
change the label of the push button. Overload this, but call YPushButton::setLabel at the end of your own function. |
|
The name of the widget property that holds the keyboard shortcut. Inherited from YWidget. Reimplemented from YWidget. |
|
Returns a descriptive name of this widget class for logging, debugging etc. Reimplemented from YWidget. |
|
The button label |