|
Planeshift
|
class pawsMenuItem - standard menu item with label, checkbox (optional) and image (optional). More...
#include <pawsmenu.h>
Public Member Functions | |
| virtual void | Draw () |
| Draws the widget and all of it's children. | |
| void | EnableCheckbox (bool enable) |
| Shows or hides checkbox or image: | |
| void | EnableImage (bool enable) |
| pawsMenuAction | GetAction () |
| virtual void | Invoke () |
| Makes the menu item send its menu event,. | |
| virtual bool | Load (iDocumentNode *node) |
| Load a widget based on its <widget></widget> tag. | |
| pawsMenuItem (const pawsMenuItem &origin) | |
| pawsMenuItem () | |
| void | SetAction (const pawsMenuAction &action) |
| Sets/gets content of event that will be sent when the menu item is invoked. | |
| void | SetCheckboxImages (const csString &on, const csString &off) |
| Sets names of bitmaps: | |
| void | SetCheckboxState (bool checked) |
| Sets state of checkbox (true/false) | |
| void | SetImage (const csString &newImage) |
| void | SetLabel (const csString &newLabel) |
| void | SetSizes (int labelWidth, int spacing, int border) |
| Sets layout values: If labelWidth = -1, then sets width of the label so that the text fits right in. | |
| virtual bool | Setup (iDocumentNode *node) |
| Setup this widget. | |
Protected Member Functions | |
| virtual void | LoadAction (iDocumentNode *node) |
| Reads pawsMenuAction data from XML. | |
| void | SetLayout () |
| Calculates and sets positions of the checkbox, label and image. | |
Protected Attributes | |
| pawsMenuAction | action |
| int | border |
| Space between content of the menu item (image, label, checkbox) and border of the item. | |
| pawsButton * | checkbox |
| bool | checkboxEnabled |
| iGraphics2D * | graphics2d |
| pawsWidget * | image |
| bool | imageEnabled |
| Is image/checkbox visible ? | |
| pawsTextBox * | label |
| int | spacing |
| Horizontal distance between parts of the menu item (image, label, checkbox) | |
class pawsMenuItem - standard menu item with label, checkbox (optional) and image (optional).
Definition at line 362 of file pawsmenu.h.
| pawsMenuItem::pawsMenuItem | ( | ) |
| pawsMenuItem::pawsMenuItem | ( | const pawsMenuItem & | origin | ) |
| virtual void pawsMenuItem::Draw | ( | ) | [virtual] |
Draws the widget and all of it's children.
Reimplemented from pawsWidget.
| void pawsMenuItem::EnableCheckbox | ( | bool | enable | ) |
Shows or hides checkbox or image:
| void pawsMenuItem::EnableImage | ( | bool | enable | ) |
| pawsMenuAction pawsMenuItem::GetAction | ( | ) | [inline, virtual] |
Reimplemented from pawsIMenuItem.
Definition at line 375 of file pawsmenu.h.
| virtual void pawsMenuItem::Invoke | ( | ) | [virtual] |
Makes the menu item send its menu event,.
Reimplemented from pawsIMenuItem.
| virtual bool pawsMenuItem::Load | ( | iDocumentNode * | node | ) | [virtual] |
Load a widget based on its <widget></widget> tag.
| node | The xml data for the widget. |
Reimplemented from pawsWidget.
| virtual void pawsMenuItem::LoadAction | ( | iDocumentNode * | node | ) | [protected, virtual] |
Reads pawsMenuAction data from XML.
| void pawsMenuItem::SetAction | ( | const pawsMenuAction & | ) | [virtual] |
Sets/gets content of event that will be sent when the menu item is invoked.
Reimplemented from pawsIMenuItem.
| void pawsMenuItem::SetCheckboxImages | ( | const csString & | on, |
| const csString & | off | ||
| ) |
Sets names of bitmaps:
| void pawsMenuItem::SetCheckboxState | ( | bool | checked | ) |
Sets state of checkbox (true/false)
| void pawsMenuItem::SetImage | ( | const csString & | newImage | ) |
| void pawsMenuItem::SetLabel | ( | const csString & | newLabel | ) |
| void pawsMenuItem::SetLayout | ( | ) | [protected] |
Calculates and sets positions of the checkbox, label and image.
Then sets the width of the whole menu item.
Sets layout values: If labelWidth = -1, then sets width of the label so that the text fits right in.
| virtual bool pawsMenuItem::Setup | ( | iDocumentNode * | ) | [virtual] |
Setup this widget.
Reimplemented from pawsWidget.
pawsMenuAction pawsMenuItem::action [protected] |
Definition at line 422 of file pawsmenu.h.
int pawsMenuItem::border [protected] |
Space between content of the menu item (image, label, checkbox) and border of the item.
Reimplemented from pawsWidget.
Definition at line 437 of file pawsmenu.h.
pawsButton* pawsMenuItem::checkbox [protected] |
Definition at line 420 of file pawsmenu.h.
bool pawsMenuItem::checkboxEnabled [protected] |
Definition at line 427 of file pawsmenu.h.
iGraphics2D* pawsMenuItem::graphics2d [protected] |
Definition at line 439 of file pawsmenu.h.
pawsWidget* pawsMenuItem::image [protected] |
Definition at line 418 of file pawsmenu.h.
bool pawsMenuItem::imageEnabled [protected] |
Is image/checkbox visible ?
Definition at line 427 of file pawsmenu.h.
pawsTextBox* pawsMenuItem::label [protected] |
Definition at line 419 of file pawsmenu.h.
int pawsMenuItem::spacing [protected] |
Horizontal distance between parts of the menu item (image, label, checkbox)
Definition at line 432 of file pawsmenu.h.
1.7.3