#include <ngui.h>
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 |
|
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 } |
|
Definition at line 42 of file ngui.h.
00042 {txt_log << str}; |
|
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 } |
|
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 } |
|
Definition at line 110 of file ngui.cpp.
00111 { 00112 } |
|
Definition at line 127 of file ngui.cpp. References dlg_log, and txt_log.
|
|
|
|
Definition at line 122 of file ngui.cpp.
00123 { 00124 } |
|
Definition at line 45 of file ngui.h. Referenced by OnOpenLog. |
|
Definition at line 46 of file ngui.h. Referenced by OnOpenLog. |