Planeshift
|
This a available->selected widget. More...
#include <pawsselector.h>
Public Member Functions | |
pawsListBoxRow * | CreateOption () |
Create a new entry in the available box. | |
int | GetAvailableCount (void) |
Return number of items in available list. | |
pawsListBoxRow * | GetMoved () |
Get the row that was moved from one list to the other. | |
bool | OnButtonPressed (int mouseButton, int keyModifier, pawsWidget *widget) |
Called whenever a button is pressed. | |
void | OnListAction (pawsListBox *widget, int status) |
Called whenever an item in a child list box is selected. | |
pawsSelectorBox () | |
pawsSelectorBox (const pawsSelectorBox &origin) | |
void | RemoveFromAvailable (int id) |
Remove the row with id from available list. | |
void | RemoveFromSelected (int id) |
Remove the row with id from selected list. | |
bool | SelectAndMoveRow (int rowNo, bool toSelected=true) |
Move row automatically, default available->selected. | |
bool | Setup (iDocumentNode *node) |
Setup this widget. | |
~pawsSelectorBox () |
This a available->selected widget.
This is a fairly complex widget set. It is used for when you have a list of available options in one list box and a list of selected items in a second box and arrows to add/remove them from one to the other.
This widget assumes that the left side is the available ones and the right side is the selected ones.
Widget is defined as:
<widget name="TEST" factory="pawsSelectorBox" > <frame x="10" y="10" width="500" height="400" border="yes" /> <available width="200" rowheight="30" /> <selected width="200" rowheight="30" /> </widget>
Definition at line 66 of file pawsselector.h.
pawsSelectorBox::pawsSelectorBox | ( | ) |
pawsSelectorBox::pawsSelectorBox | ( | const pawsSelectorBox & | origin | ) |
pawsSelectorBox::~pawsSelectorBox | ( | ) |
pawsListBoxRow* pawsSelectorBox::CreateOption | ( | ) |
Create a new entry in the available box.
int pawsSelectorBox::GetAvailableCount | ( | void | ) |
Return number of items in available list.
pawsListBoxRow* pawsSelectorBox::GetMoved | ( | ) | [inline] |
Get the row that was moved from one list to the other.
Definition at line 81 of file pawsselector.h.
bool pawsSelectorBox::OnButtonPressed | ( | int | button, |
int | keyModifier, | ||
pawsWidget * | widget | ||
) | [virtual] |
Called whenever a button is pressed.
button | The button pressed. |
keyModifier | Modifier key in effect. |
widget | The widget the button belongs to. |
Reimplemented from pawsWidget.
void pawsSelectorBox::OnListAction | ( | pawsListBox * | selected, |
int | status | ||
) | [virtual] |
Called whenever an item in a child list box is selected.
selected | The listbox that has the item selected. |
status | From listbox when a row is selected. |
Reimplemented from pawsWidget.
void pawsSelectorBox::RemoveFromAvailable | ( | int | id | ) |
Remove the row with id from available list.
void pawsSelectorBox::RemoveFromSelected | ( | int | id | ) |
Remove the row with id from selected list.
bool pawsSelectorBox::SelectAndMoveRow | ( | int | rowNo, |
bool | toSelected = true |
||
) |
Move row automatically, default available->selected.
bool pawsSelectorBox::Setup | ( | iDocumentNode * | ) | [virtual] |
Setup this widget.
Reimplemented from pawsWidget.