NpcTextDialog Class Reference
[User interface related classes (windows, dialogs)]

#include <npc_text.h>

Inheritance diagram for NpcTextDialog:

Window

List of all members.


Detailed Description

The npc text dialog.

Definition at line 40 of file npc_text.h.


Public Member Functions

 NpcTextDialog ()
 Constructor.
void action (const gcn::ActionEvent &event)
 Called when receiving actions from the widgets.
void clearText ()
 Clears the text shown in the dialog.
void setText (const std::string &string)
 Sets the text shows in the dialog.
void addText (const std::string &string)
 Adds the text to the text shows in the dialog.
void showNextButton ()
void showCloseButton ()
void nextDialog (int npcID=current_npc)
 Notifies the server that the client has performed a next action.
void closeDialog (int npcID=current_npc)
 Notifies the server that the client has performed a close action.
void widgetResized (const gcn::Event &event)
 Called when resizing the window.

Private Types

enum  NPCTextState { NPC_TEXT_STATE_WAITING, NPC_TEXT_STATE_NEXT, NPC_TEXT_STATE_CLOSE }

Private Attributes

gcn::ScrollArea * mScrollArea
TextBoxmTextBox
gcn::Button * mButton
std::string mText
NPCTextState mState

Member Enumeration Documentation

Enumerator:
NPC_TEXT_STATE_WAITING 
NPC_TEXT_STATE_NEXT 
NPC_TEXT_STATE_CLOSE 

Definition at line 103 of file npc_text.h.


Constructor & Destructor Documentation

NpcTextDialog::NpcTextDialog (  ) 

Constructor.

See also:
Window::Window

Definition at line 36 of file npc_text.cpp.


Member Function Documentation

void NpcTextDialog::action ( const gcn::ActionEvent &  event  ) 

Called when receiving actions from the widgets.

Definition at line 100 of file npc_text.cpp.

void NpcTextDialog::clearText (  ) 

Clears the text shown in the dialog.

Definition at line 68 of file npc_text.cpp.

void NpcTextDialog::setText ( const std::string &  string  ) 

Sets the text shows in the dialog.

Parameters:
string The new text.

Definition at line 74 of file npc_text.cpp.

void NpcTextDialog::addText ( const std::string &  string  ) 

Adds the text to the text shows in the dialog.

Also adds a newline to the end.

Parameters:
string The text to add.

Definition at line 80 of file npc_text.cpp.

void NpcTextDialog::showNextButton (  ) 

Definition at line 86 of file npc_text.cpp.

void NpcTextDialog::showCloseButton (  ) 

Definition at line 93 of file npc_text.cpp.

void NpcTextDialog::nextDialog ( int  npcID = current_npc  ) 

Notifies the server that the client has performed a next action.

Definition at line 123 of file npc_text.cpp.

void NpcTextDialog::closeDialog ( int  npcID = current_npc  ) 

Notifies the server that the client has performed a close action.

Definition at line 128 of file npc_text.cpp.

void NpcTextDialog::widgetResized ( const gcn::Event &  event  ) 

Called when resizing the window.

Parameters:
event The calling event

Reimplemented from Window.

Definition at line 133 of file npc_text.cpp.


Member Data Documentation

gcn::ScrollArea* NpcTextDialog::mScrollArea [private]

Definition at line 97 of file npc_text.h.

Definition at line 98 of file npc_text.h.

gcn::Button* NpcTextDialog::mButton [private]

Definition at line 99 of file npc_text.h.

std::string NpcTextDialog::mText [private]

Definition at line 101 of file npc_text.h.

Definition at line 108 of file npc_text.h.


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

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5