Planeshift
|
A basic combo box widget. More...
#include <pawscombo.h>
Public Member Functions | |
bool | Clear () |
pawsListBox * | GetChoiceList () |
@@ Hack: please someone tell me how to do this better? | |
int | GetRowCount () |
int | GetSelectedRowNum () |
Returns index of selected option (-1 if none is selected. | |
csString | GetSelectedRowString () |
Returns string of selected option. | |
pawsListBoxRow * | NewOption () |
pawsListBoxRow * | NewOption (const csString &text) |
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. | |
pawsComboBox (const pawsComboBox &origin) | |
pawsComboBox () | |
bool | PostSetup () |
This is called after the widget and all of it's children have been created. | |
pawsListBoxRow * | Select (const char *text) |
pawsListBoxRow * | Select (int optionNum) |
Selects given option in combo. | |
void | SetNumRows (int numRows) |
void | SetRowHeight (int height) |
void | SetSorted (bool sorting) |
sets if the list has to be sorted. NOTE: call before adding entries. | |
bool | Setup (iDocumentNode *node) |
Setup this widget. | |
void | SetUpButtonImage (const char *name) |
void | SetUpButtonPressedImage (const char *name) |
void | SetUpDownButtonImage (const char *name) |
void | SetUpDownButtonPressedImage (const char *name) |
~pawsComboBox () |
A basic combo box widget.
This widget consists of a textbox and a drop down list box. When an item from the list box is selected the textbox is updated.
This is the format of how it is defined in a widget file:
<widget name="comboBox" factory="pawsComboBox"> <!-- Size of text box with the current choice --> <frame x="100" y="100" width="100" height="30" border="no" />
<!-- Number of list box choices with height of a choice row --> <listbox rows="5" height="30" text="InitialText" /> </widget>
This class sets the listbox with the id of the combo widget so if you want to track messages from this you override the Selected( pawsListBox* widget ) funtion in your controlling widget and have a case for this widget's ID number.
Definition at line 53 of file pawscombo.h.
pawsComboBox::pawsComboBox | ( | ) |
pawsComboBox::~pawsComboBox | ( | ) |
pawsComboBox::pawsComboBox | ( | const pawsComboBox & | origin | ) |
bool pawsComboBox::Clear | ( | ) |
pawsListBox* pawsComboBox::GetChoiceList | ( | ) | [inline] |
@@ Hack: please someone tell me how to do this better?
Definition at line 96 of file pawscombo.h.
int pawsComboBox::GetRowCount | ( | ) |
int pawsComboBox::GetSelectedRowNum | ( | ) |
Returns index of selected option (-1 if none is selected.
csString pawsComboBox::GetSelectedRowString | ( | ) |
Returns string of selected option.
pawsListBoxRow* pawsComboBox::NewOption | ( | ) |
pawsListBoxRow* pawsComboBox::NewOption | ( | const csString & | text | ) |
bool pawsComboBox::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 pawsComboBox::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.
bool pawsComboBox::PostSetup | ( | ) | [virtual] |
This is called after the widget and all of it's children have been created.
Reimplemented from pawsWidget.
pawsListBoxRow* pawsComboBox::Select | ( | int | optionNum | ) |
Selects given option in combo.
pawsListBoxRow* pawsComboBox::Select | ( | const char * | text | ) |
void pawsComboBox::SetNumRows | ( | int | numRows | ) | [inline] |
Definition at line 65 of file pawscombo.h.
void pawsComboBox::SetRowHeight | ( | int | height | ) | [inline] |
Definition at line 69 of file pawscombo.h.
void pawsComboBox::SetSorted | ( | bool | sorting | ) |
sets if the list has to be sorted. NOTE: call before adding entries.
bool pawsComboBox::Setup | ( | iDocumentNode * | ) | [virtual] |
Setup this widget.
Reimplemented from pawsWidget.
void pawsComboBox::SetUpButtonImage | ( | const char * | name | ) | [inline] |
Definition at line 73 of file pawscombo.h.
void pawsComboBox::SetUpButtonPressedImage | ( | const char * | name | ) | [inline] |
Definition at line 81 of file pawscombo.h.
void pawsComboBox::SetUpDownButtonImage | ( | const char * | name | ) | [inline] |
Definition at line 77 of file pawscombo.h.
void pawsComboBox::SetUpDownButtonPressedImage | ( | const char * | name | ) | [inline] |
Definition at line 85 of file pawscombo.h.