diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-02-01 21:15:11 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-02-01 21:15:11 +0100 |
| commit | a575fea2bc094831996c47a6a84497b964a90e02 (patch) | |
| tree | 59ff4add7dac624fbdf3cb7ad1688c706c0d3284 /src/gui.cpp | |
| parent | e0babeaf88b2a434b10ffb65824440b1adfaa151 (diff) | |
Add help menu and about dialog
Diffstat (limited to 'src/gui.cpp')
| -rw-r--r-- | src/gui.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/gui.cpp b/src/gui.cpp index b3d564b..d427211 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -26,6 +26,9 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co menu_engine = new wxMenu(); menu_bar->Append( menu_engine, wxT("Engine") ); + menu_help = new wxMenu(); + menu_bar->Append( menu_help, wxT("Help") ); + this->SetMenuBar( menu_bar ); status_bar = this->CreateStatusBar( 1, wxSTB_SIZEGRIP, wxID_ANY ); @@ -47,6 +50,40 @@ MainFrame::~MainFrame() { } +DialogAbout::DialogAbout( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* main_sizer; + main_sizer = new wxBoxSizer( wxVERTICAL ); + + m_notebook3 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + info_panel = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* info_sizer; + info_sizer = new wxBoxSizer( wxVERTICAL ); + + info_richtext = new wxRichTextCtrl( info_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS ); + info_sizer->Add( info_richtext, 1, wxEXPAND | wxALL, 5 ); + + + info_panel->SetSizer( info_sizer ); + info_panel->Layout(); + info_sizer->Fit( info_panel ); + m_notebook3->AddPage( info_panel, wxT("Info"), false ); + + main_sizer->Add( m_notebook3, 1, wxEXPAND | wxALL, 5 ); + + + this->SetSizer( main_sizer ); + this->Layout(); + + this->Centre( wxBOTH ); +} + +DialogAbout::~DialogAbout() +{ +} + DialogLiveEngine::DialogLiveEngine( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); |
