|
Planeshift
|
Window contains a list of the user's petitions. More...
#include <pawspetitionwindow.h>
Public Member Functions | |
| void | Close () |
| Simply calls Hide() unless overidden. | |
| const char * | HandleCommand (const char *cmd) |
| Handles commands. | |
| void | HandleMessage (MsgEntry *message) |
| Handles petition server messages. | |
| bool | OnButtonReleased (int mouseButton, int keyModifier, pawsWidget *reporter) |
| Handle button clicks. | |
| void | OnListAction (pawsListBox *selected, int status) |
| Called whenever an item in a child list box is selected. | |
| void | OnStringEntered (const char *name, int param, const char *value) |
| Handle the prompt window for entering a petition. | |
| pawsPetitionWindow () | |
| Constructor. | |
| bool | PostSetup () |
| Setup the widget with command/message handling capabilities. | |
| virtual void | Show () |
| When the window is opened let the controller window know about it. | |
| virtual | ~pawsPetitionWindow () |
| Virtual destructor. | |
Protected Member Functions | |
| void | AddPetitions (csArray< psPetitionInfo > &petitions) |
| Function to add the petitions to the listbox given a csArray;. | |
| void | QueryServer () |
| Queries the server for a list of petitions. | |
| void | SetText (size_t rowNum, int colNum, const char *fmt,...) |
| Quicker way to set text for each column in the listbox: | |
Protected Attributes | |
| int | currentRow |
| Holds the current row number (for cancellation) | |
| bool | hasPetInterest |
| this is set to true the first time a player looks at this petition window this allows for most players to refrain from querying the petition list | |
| int | petCount |
| to count the number of actual petitions in the list | |
| pawsListBox * | petitionList |
| List widget of petitions for easy access. | |
| psPetitionMessage | petitionMessage |
| Holds the most recent petition message from the server. | |
| pawsMultilineEditTextBox * | petText |
| Displays text of petition. | |
| psPetitionInfo | selectedPet |
| keep track of the selected petition so that we can select it after receiving a new petition list | |
| bool | updateSelectedPetition |
| used to know if we have to update the selected petition after deleting one, or saving one | |
Window contains a list of the user's petitions.
with options to view their resolutions or cancel them
NOTE: the current expected columns for the listbox are as follows:
1) gm 2) status 3) created 4) petition
Definition at line 54 of file pawspetitionwindow.h.
| pawsPetitionWindow::pawsPetitionWindow | ( | ) |
Constructor.
| virtual pawsPetitionWindow::~pawsPetitionWindow | ( | ) | [virtual] |
Virtual destructor.
| void pawsPetitionWindow::AddPetitions | ( | csArray< psPetitionInfo > & | petitions | ) | [protected] |
Function to add the petitions to the listbox given a csArray;.
| void pawsPetitionWindow::Close | ( | ) | [virtual] |
Simply calls Hide() unless overidden.
Reimplemented from pawsWidget.
| const char* pawsPetitionWindow::HandleCommand | ( | const char * | cmd | ) | [virtual] |
Handles commands.
Implements psCmdBase.
| void pawsPetitionWindow::HandleMessage | ( | MsgEntry * | message | ) | [virtual] |
Handles petition server messages.
Implements psCmdBase.
| bool pawsPetitionWindow::OnButtonReleased | ( | int | mouseButton, |
| int | keyModifier, | ||
| pawsWidget * | reporter | ||
| ) | [virtual] |
Handle button clicks.
Reimplemented from pawsWidget.
| void pawsPetitionWindow::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 pawsPetitionWindow::OnStringEntered | ( | const char * | name, |
| int | param, | ||
| const char * | value | ||
| ) | [virtual] |
Handle the prompt window for entering a petition.
Implements iOnStringEnteredAction.
| bool pawsPetitionWindow::PostSetup | ( | ) | [virtual] |
Setup the widget with command/message handling capabilities.
Reimplemented from pawsWidget.
| void pawsPetitionWindow::QueryServer | ( | ) | [protected] |
Queries the server for a list of petitions.
| void pawsPetitionWindow::SetText | ( | size_t | rowNum, |
| int | colNum, | ||
| const char * | fmt, | ||
| ... | |||
| ) | [protected] |
Quicker way to set text for each column in the listbox:
| virtual void pawsPetitionWindow::Show | ( | void | ) | [virtual] |
When the window is opened let the controller window know about it.
Reimplemented from pawsControlledWindow.
int pawsPetitionWindow::currentRow [protected] |
Holds the current row number (for cancellation)
Definition at line 100 of file pawspetitionwindow.h.
bool pawsPetitionWindow::hasPetInterest [protected] |
this is set to true the first time a player looks at this petition window this allows for most players to refrain from querying the petition list
Definition at line 110 of file pawspetitionwindow.h.
int pawsPetitionWindow::petCount [protected] |
to count the number of actual petitions in the list
Definition at line 106 of file pawspetitionwindow.h.
pawsListBox* pawsPetitionWindow::petitionList [protected] |
List widget of petitions for easy access.
Definition at line 97 of file pawspetitionwindow.h.
psPetitionMessage pawsPetitionWindow::petitionMessage [protected] |
Holds the most recent petition message from the server.
Definition at line 103 of file pawspetitionwindow.h.
pawsMultilineEditTextBox* pawsPetitionWindow::petText [protected] |
Displays text of petition.
Definition at line 116 of file pawspetitionwindow.h.
psPetitionInfo pawsPetitionWindow::selectedPet [protected] |
keep track of the selected petition so that we can select it after receiving a new petition list
Definition at line 113 of file pawspetitionwindow.h.
bool pawsPetitionWindow::updateSelectedPetition [protected] |
used to know if we have to update the selected petition after deleting one, or saving one
Definition at line 118 of file pawspetitionwindow.h.
1.7.3