add cartridge reader
Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
38
main/src/ui/cFrame.cpp
Normal file
38
main/src/ui/cFrame.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "ui/cFrame.h"
|
||||
|
||||
enum { ID_Hello = 1 };
|
||||
|
||||
cFrame::cFrame() : wxMDIParentFrame(nullptr, wxID_ANY, "Hello World") {
|
||||
auto *menuFile = new wxMenu;
|
||||
menuFile->Append(ID_Hello, "&Hello...\tCtrl-H",
|
||||
"Help string shown in status bar for this menu item");
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(wxID_EXIT);
|
||||
|
||||
auto *menuHelp = new wxMenu;
|
||||
menuHelp->Append(wxID_ABOUT);
|
||||
|
||||
auto *menuBar = new wxMenuBar;
|
||||
menuBar->Append(menuFile, "&File");
|
||||
menuBar->Append(menuHelp, "&Help");
|
||||
|
||||
SetMenuBar(menuBar);
|
||||
|
||||
CreateStatusBar();
|
||||
SetStatusText("Welcome to wxWidgets!");
|
||||
|
||||
Bind(wxEVT_MENU, &cFrame::OnHello, this, ID_Hello);
|
||||
Bind(wxEVT_MENU, &cFrame::OnAbout, this, wxID_ABOUT);
|
||||
Bind(wxEVT_MENU, &cFrame::OnExit, this, wxID_EXIT);
|
||||
}
|
||||
|
||||
void cFrame::OnExit(wxCommandEvent &event) { Close(true); }
|
||||
|
||||
void cFrame::OnAbout(wxCommandEvent &event) {
|
||||
wxMessageBox("This is a wxWidgets Hello World example", "About Hello World",
|
||||
wxOK | wxICON_INFORMATION);
|
||||
}
|
||||
|
||||
void cFrame::OnHello(wxCommandEvent &event) {
|
||||
wxLogMessage("Hello world from wxWidgets!");
|
||||
}
|
||||
Reference in New Issue
Block a user