Planeshift
Public Member Functions

pawsSelectorBox Class Reference

This a available->selected widget. More...

#include <pawsselector.h>

List of all members.

Public Member Functions

pawsListBoxRowCreateOption ()
 Create a new entry in the available box.
int GetAvailableCount (void)
 Return number of items in available list.
pawsListBoxRowGetMoved ()
 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 ()

Detailed Description

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.


Constructor & Destructor Documentation

pawsSelectorBox::pawsSelectorBox ( )
pawsSelectorBox::pawsSelectorBox ( const pawsSelectorBox origin)
pawsSelectorBox::~pawsSelectorBox ( )

Member Function Documentation

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.

Parameters:
buttonThe button pressed.
keyModifierModifier key in effect.
widgetThe widget the button belongs to.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

void pawsSelectorBox::OnListAction ( pawsListBox selected,
int  status 
) [virtual]

Called whenever an item in a child list box is selected.

Parameters:
selectedThe listbox that has the item selected.
statusFrom 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.


The documentation for this class was generated from the following file: