Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

pawsPetitionGMWindow Class Reference

Window contains a manageable list of petitions. More...

#include <pawspetitiongmwindow.h>

List of all members.

Public Member Functions

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 popup question window callback.
 pawsPetitionGMWindow ()
 Constructor.
bool PostSetup ()
 Setup the widget with command/message handling capabilities.
void Show ()
 handles the request of petitions and checks if the user is allowed to use this window
virtual ~pawsPetitionGMWindow ()
 Virtual destructor.

Protected Member Functions

void AddPetitions (csArray< psPetitionInfo > &petitions)
 Function to add the petitions to the listbox given a csArray;.
void CloseCurrPetition (const char *desc)
 Send network message to close a petition with explanation.
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
 count the number of actual petitions
pawsListBoxpetitionList
 List widget of petitions for easy access.
psPetitionMessage petitionMessage
 Holds the most recent petition message from the server.
pawsMessageTextBoxpetText
 Displays text of petition.
psPetitionInfo selectedPet
 keep track of the selected petition so that we can select it after receiving a new petition list

Detailed Description

Window contains a manageable list of petitions.

with options for GMs handling them

NOTE: the current expected columns for the listbox are as follows:

1) escalation level 2) player 3) created date/tiem 4) petition

Definition at line 55 of file pawspetitiongmwindow.h.


Constructor & Destructor Documentation

pawsPetitionGMWindow::pawsPetitionGMWindow ( )

Constructor.

virtual pawsPetitionGMWindow::~pawsPetitionGMWindow ( ) [virtual]

Virtual destructor.


Member Function Documentation

void pawsPetitionGMWindow::AddPetitions ( csArray< psPetitionInfo > &  petitions) [protected]

Function to add the petitions to the listbox given a csArray;.

void pawsPetitionGMWindow::CloseCurrPetition ( const char *  desc) [protected]

Send network message to close a petition with explanation.

const char* pawsPetitionGMWindow::HandleCommand ( const char *  cmd) [virtual]

Handles commands.

Implements psCmdBase.

void pawsPetitionGMWindow::HandleMessage ( MsgEntry message) [virtual]

Handles petition server messages.

Implements psCmdBase.

bool pawsPetitionGMWindow::OnButtonReleased ( int  mouseButton,
int  keyModifier,
pawsWidget reporter 
) [virtual]

Handle button clicks.

Reimplemented from pawsWidget.

void pawsPetitionGMWindow::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 pawsPetitionGMWindow::OnStringEntered ( const char *  name,
int  param,
const char *  value 
) [virtual]

Handle popup question window callback.

Implements iOnStringEnteredAction.

bool pawsPetitionGMWindow::PostSetup ( ) [virtual]

Setup the widget with command/message handling capabilities.

Reimplemented from pawsWidget.

void pawsPetitionGMWindow::QueryServer ( ) [protected]

Queries the server for a list of petitions.

void pawsPetitionGMWindow::SetText ( size_t  rowNum,
int  colNum,
const char *  fmt,
  ... 
) [protected]

Quicker way to set text for each column in the listbox:

void pawsPetitionGMWindow::Show ( ) [virtual]

handles the request of petitions and checks if the user is allowed to use this window

Reimplemented from pawsWidget.


Member Data Documentation

Holds the current row number (for cancellation)

Definition at line 103 of file pawspetitiongmwindow.h.

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 113 of file pawspetitiongmwindow.h.

count the number of actual petitions

Definition at line 109 of file pawspetitiongmwindow.h.

List widget of petitions for easy access.

Definition at line 100 of file pawspetitiongmwindow.h.

Holds the most recent petition message from the server.

Definition at line 106 of file pawspetitiongmwindow.h.

Displays text of petition.

Definition at line 119 of file pawspetitiongmwindow.h.

keep track of the selected petition so that we can select it after receiving a new petition list

Definition at line 116 of file pawspetitiongmwindow.h.


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