Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

NguiFrame Class Reference

#include <ngui.h>

List of all members.

Public Methods

 NguiFrame (const wxString &title, const wxPoint &pos, const wxSize &size, long style)
void OnAbout (wxCommandEvent &event)
void OnLoadNetwork (wxCommandEvent &event)
void OnNewNetwork (wxCommandEvent &event)
void OnOpenLog (wxCommandEvent &event)
void OnQuit (wxCommandEvent &event)
void OnSaveNetwork (wxCommandEvent &event)
void Log (wxString str)

Private Attributes

wxDialog * dlg_log
wxTextCtrl * txt_log


Constructor & Destructor Documentation

NguiFrame::NguiFrame const wxString &    title,
const wxPoint &    pos,
const wxSize &    size,
long    style
 

Definition at line 49 of file ngui.cpp.

References NguiFrame_About, NguiFrame_LoadNetwork, NguiFrame_NewNetwork, NguiFrame_OpenLog, NguiFrame_Quit, and NguiFrame_SaveNetwork.

00050     : wxFrame((wxFrame *) NULL, -1, title, pos, size, style)
00051 {
00052     wxMenu *FileMenu     = new wxMenu;
00053     wxMenu *NetworkMenu  = new wxMenu;
00054     wxMenu *DebugMenu    = new wxMenu;
00055     wxMenu *HelpMenu     = new wxMenu;
00056     wxMenuBar *MenuBar   = new wxMenuBar;
00057 
00058     // create a menu bar
00059     FileMenu->AppendSeparator();
00060     FileMenu->Append(NguiFrame_Quit, "&Quit");
00061     NetworkMenu->Append(NguiFrame_NewNetwork, "&New Network");
00062     NetworkMenu->Append(NguiFrame_LoadNetwork, "&Load Network");
00063     NetworkMenu->Append(NguiFrame_SaveNetwork, "&Save Network");
00064     NetworkMenu->AppendSeparator();
00065     DebugMenu->Append(NguiFrame_OpenLog, "&Log");
00066     DebugMenu->AppendSeparator();
00067     HelpMenu->AppendSeparator();
00068     HelpMenu->Append(NguiFrame_About, "&About");
00069 
00070     // Add it to the menu bar
00071     MenuBar->Append(FileMenu, "&File");
00072     MenuBar->Append(NetworkMenu,"&Network");
00073     MenuBar->Append(DebugMenu, "&Debug");
00074     MenuBar->Append(HelpMenu, "&Help");
00075     SetMenuBar(MenuBar);
00076 
00077     // Create the status bar
00078     CreateStatusBar(2);
00079     SetStatusText("Welcome To NeReK");
00080 }


Member Function Documentation

void NguiFrame::Log wxString    str [inline]
 

Definition at line 42 of file ngui.h.

00042 {txt_log << str};

void NguiFrame::OnAbout wxCommandEvent &    event
 

Definition at line 83 of file ngui.cpp.

00084 {
00085 //    size_t monitor_count = wxDisplay::GetCount();
00086     (void)wxMessageBox("NeReK Simulator\nAuthor: Chad Rempp\n",
00087                        "About NeReK Simulator");
00088 }

void NguiFrame::OnLoadNetwork wxCommandEvent &    event
 

Definition at line 91 of file ngui.cpp.

References ParseFile.

00092 {
00093     wxFileDialog load_dialog(this, "Load Network File", "", "",
00094                         "Network Files (*.net)|*.net");
00095     //wxTextCtrl &txt_log = *GetTextCtrl();
00096     wxString tmp;
00097     if (load_dialog.ShowModal() == wxID_OK)
00098     {
00099         wxTextFile *network_file = new wxTextFile(load_dialog.GetPath().c_str());
00100         network_file->Open();
00101 
00102         ParseFile(network_file);
00103 
00104         //tmp = network_file->GetLine(1);
00105         //(*txt_log) << tmp;
00106     }
00107 }

void NguiFrame::OnNewNetwork wxCommandEvent &    event
 

Definition at line 110 of file ngui.cpp.

00111 {
00112 }

void NguiFrame::OnOpenLog wxCommandEvent &    event
 

Definition at line 127 of file ngui.cpp.

References dlg_log, and txt_log.

00128 {
00129     dlg_log = new wxDialog(this, -1, "Debug Log", wxPoint(400,400),
00130                            wxSize(400,500));
00131     txt_log = new wxTextCtrl(dlg_log, -1, "", wxPoint(0,0), wxSize(400,500),
00132                              wxTE_MULTILINE | wxTE_READONLY);
00133 //    (*txt_log) << "Log Window";
00134     dlg_log->Show();
00135 }

void NguiFrame::OnQuit wxCommandEvent &    event
 

void NguiFrame::OnSaveNetwork wxCommandEvent &    event
 

Definition at line 122 of file ngui.cpp.

00123 {
00124 }


Member Data Documentation

wxDialog* NguiFrame::dlg_log [private]
 

Definition at line 45 of file ngui.h.

Referenced by OnOpenLog.

wxTextCtrl* NguiFrame::txt_log [private]
 

Definition at line 46 of file ngui.h.

Referenced by OnOpenLog.


The documentation for this class was generated from the following files:
Generated on Mon Jun 23 23:09:59 2003 for NeReK Documentation by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002