20 #ifndef PAWS_PETITION_WINDOW_HEADER 21 #define PAWS_PETITION_WINDOW_HEADER 40 #define MAX_PETITION_LENGTH (65) 91 void SetText(
size_t rowNum,
int colNum,
const char* fmt, ...);
This is a window that is controlled by a button on the control bar.
virtual void Show()
When the window is opened let the controller window know about it.
bool hasPetInterest
this is set to true the first time a player looks at this petition window this allows for most player...
pawsPetitionWindow()
Constructor.
int currentRow
Holds the current row number (for cancellation)
bool OnButtonReleased(int mouseButton, int keyModifier, pawsWidget *reporter)
Handle button clicks.
void QueryServer()
Queries the server for a list of petitions.
void AddPetitions(csArray< psPetitionInfo > &petitions)
Function to add the petitions to the listbox given a csArray;.
The structure of 1 queue entry (pointer to a message)
void Close()
Simply calls Hide() unless overidden.
Messages sent to user with petition information.
bool updateSelectedPetition
used to know if we have to update the selected petition after deleting one, or saving one ...
int petCount
to count the number of actual petitions in the list
Contains data for one petition.
void OnListAction(pawsListBox *selected, int status)
Called whenever an item in a child list box is selected.
psPetitionInfo selectedPet
keep track of the selected petition so that we can select it after receiving a new petition list ...
void OnStringEntered(const char *name, int param, const char *value)
Handle the prompt window for entering a petition.
const char * HandleCommand(const char *cmd)
Handles commands.
A simple list box widget.
pawsMultilineEditTextBox * petText
Displays text of petition.
pawsListBox * petitionList
List widget of petitions for easy access.
void HandleMessage(MsgEntry *message)
Handles petition server messages.
bool PostSetup()
Setup the widget with command/message handling capabilities.
Window contains a list of the user's petitions.
This interface defines the callback used by pawsStringPromptWindow to notify another window of a supp...
psPetitionMessage petitionMessage
Holds the most recent petition message from the server.
virtual ~pawsPetitionWindow()
Virtual destructor.
void SetText(size_t rowNum, int colNum, const char *fmt,...)
Quicker way to set text for each column in the listbox:
CREATE_PAWS_FACTORY(pawsPetitionWindow)
The pawsPetitionWindow factory.