Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

GuiClientFrame Class Reference

The GuiClient Frame. More...

List of all members.

Public Member Functions

 GuiClientFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
 The GuiClientFrame Constructor.
 ~GuiClientFrame ()
 GuiClientFrame destructor.
void OnQuit (wxCommandEvent &event)
void OnAbout (wxCommandEvent &event)
void OnMove (wxCommandEvent &event)
 Handles movement button events.
void OnText (wxKeyEvent &event)
 Text input handler.
void OnCheck (wxCommandEvent &event)
void OnCommandEnter (wxCommandEvent &event)
 Console command handler.
void OnSocket (wxSocketEvent &event)
 Handles socket events.
 GuiClientFrame (const wxString &title, const wxPoint &pos, const wxSize &size)
void OnButton (wxCommandEvent &event)
 Short Description.

Private Member Functions

void Connect ()
 Helper function to connect the network.

Private Attributes

wxTextCtrl * console
wxTextCtrl * commandline
wxSocketClient * sock
wxButton * forward
wxButton * left
wxButton * back
wxButton * right
wxButton * stop
wxMsg msg
wxMenu * menuMovement
GuiGraphFramegraph
GuiMapFramemap


Detailed Description

The GuiClient Frame.

This class implements the main window of the application.

Author:
golemon

Definition at line 91 of file guiclient.cpp.


Constructor & Destructor Documentation

GuiClientFrame::GuiClientFrame const wxString &  title,
const wxPoint &  pos,
const wxSize &  size
 

The GuiClientFrame Constructor.

The frame constructor must set up all the controls.

Author:
golemon

Definition at line 245 of file guiclient.cpp.

References back(), Connect(), forward(), ID_About, ID_Back, ID_Commandline, ID_Console, ID_Forward, ID_FOView, ID_Graph, ID_Left, ID_Map, ID_Numeric, ID_Power, ID_Quit, ID_Right, ID_Stop, left, right, sock, and stop().

GuiClientFrame::~GuiClientFrame  ) 
 

GuiClientFrame destructor.

The only thing we must delete is the socket. Everything else is automatically handeled by wxWidgets.

Author:
golemon

Definition at line 341 of file guiclient.cpp.

References sock.

GuiClientFrame::GuiClientFrame const wxString &  title,
const wxPoint &  pos,
const wxSize &  size
 


Member Function Documentation

void GuiClientFrame::Connect  )  [private]
 

Helper function to connect the network.

This function pops up a dialog box asking for the server address, then connects to it.

Author:
golemon

Definition at line 356 of file guiclient.cpp.

References GUI_PORT, __PORT::PORT, and sock.

Referenced by OnSocket().

void GuiClientFrame::OnAbout wxCommandEvent &  event  ) 
 

void GuiClientFrame::OnButton wxCommandEvent &  event  ) 
 

Short Description.

Long Description if necessary.

Parameters:
<parameter_name> <parameter_descreption>
Returns:
<information on="" what="" is="" being="" returned>="">
Author:
<author name>="">

Definition at line 242 of file test.cpp.

void GuiClientFrame::OnCheck wxCommandEvent &  event  ) 
 

Definition at line 617 of file guiclient.cpp.

References graph, ID_FOView, ID_Graph, ID_Map, ID_Numeric, ID_Power, and map.

void GuiClientFrame::OnCommandEnter wxCommandEvent &  event  ) 
 

Console command handler.

Parses, formats and sends data when commands are entered to the console.

Author:
golemon

Definition at line 745 of file guiclient.cpp.

References commandline, endmsg, i, and startmsg().

void GuiClientFrame::OnMove wxCommandEvent &  event  ) 
 

Handles movement button events.

This function sends the correct messages over the wxMsg when a movement button is pressed.

Parameters:
event describes the event that happened.
Author:
golemon

Definition at line 447 of file guiclient.cpp.

References endmsg, ID_Back, ID_Forward, ID_Left, ID_Right, ID_Stop, and startmsg().

void GuiClientFrame::OnQuit wxCommandEvent &  event  ) 
 

void GuiClientFrame::OnSocket wxSocketEvent &  event  ) 
 

Handles socket events.

This function handles displaying the connection status, recieving new data, and reconnecting on disconnects.

Parameters:
event describes the event that happened
Author:
golemon

Definition at line 386 of file guiclient.cpp.

References GuiMapFrame::AddPoint(), buflen, Connect(), console, count, map, GuiMapFrame::PaintMe(), GuiMapFrame::SetAngle(), sock, x, and y.

void GuiClientFrame::OnText wxKeyEvent &  event  ) 
 

Text input handler.

TODO document

Author:
golemon

Definition at line 684 of file guiclient.cpp.

References commandline, ID_Back, ID_Forward, ID_Left, ID_Right, ID_Stop, menuMovement, and stop.


Member Data Documentation

wxButton * GuiClientFrame::back [private]
 

Definition at line 113 of file guiclient.cpp.

wxTextCtrl* GuiClientFrame::commandline [private]
 

Definition at line 111 of file guiclient.cpp.

Referenced by OnCommandEnter(), and OnText().

wxTextCtrl* GuiClientFrame::console [private]
 

Definition at line 110 of file guiclient.cpp.

Referenced by OnSocket().

wxButton* GuiClientFrame::forward [private]
 

Definition at line 113 of file guiclient.cpp.

GuiGraphFrame* GuiClientFrame::graph [private]
 

Definition at line 116 of file guiclient.cpp.

Referenced by OnCheck().

wxButton * GuiClientFrame::left [private]
 

Definition at line 113 of file guiclient.cpp.

GuiMapFrame* GuiClientFrame::map [private]
 

Definition at line 117 of file guiclient.cpp.

Referenced by OnCheck(), and OnSocket().

wxMenu* GuiClientFrame::menuMovement [private]
 

Definition at line 115 of file guiclient.cpp.

Referenced by OnText().

wxMsg GuiClientFrame::msg [private]
 

Definition at line 114 of file guiclient.cpp.

wxButton * GuiClientFrame::right [private]
 

Definition at line 113 of file guiclient.cpp.

wxSocketClient* GuiClientFrame::sock [private]
 

Definition at line 112 of file guiclient.cpp.

Referenced by Connect(), OnSocket(), and ~GuiClientFrame().

wxButton * GuiClientFrame::stop [private]
 

Definition at line 113 of file guiclient.cpp.

Referenced by OnText().


The documentation for this class was generated from the following files:
Generated on Fri Sep 1 14:26:00 2006 for Raptor by  doxygen 1.4.4