-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.cpp
More file actions
54 lines (42 loc) · 1.41 KB
/
Copy pathgui.cpp
File metadata and controls
54 lines (42 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <wx/wx.h>
#include <wx/menu.h>
class MyApp : public wxApp
{
public:
virtual bool OnInit();
};
wxIMPLEMENT_APP(MyApp);
class MyFrame : public wxFrame
{
public:
MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size);
};
bool MyApp::OnInit()
{
MyFrame *frame = new MyFrame("The Credit", wxDefaultPosition, wxDefaultSize);
frame->Show(true);
return true;
}
MyFrame::MyFrame(const wxString &title, const wxPoint &pos, const wxSize &size) : wxFrame(nullptr, wxID_ANY, title, pos, size)
{
wxMenuBar *menubar;
wxMenu *file;
wxMenu *help;
wxTextCtrl *textctrl;
wxPanel *panel = new wxPanel(this, -1);
menubar = new wxMenuBar;
file = new wxMenu;
help = new wxMenu;
menubar->Append(file, wxT("&Options"));
menubar->Append(help, wxT("&Help"));
SetMenuBar(menubar);
wxPanel *panel_top = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(200, 100));
panel_top->SetBackgroundColour(wxColor(33, 33, 31));
wxPanel *panel_bottom = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(200, 100));
panel_bottom->SetBackgroundColour(wxColor(100, 200, 100));
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
sizer->Add(panel_top, 2.5, wxEXPAND | wxLEFT | wxTOP | wxRIGHT, 10);
sizer->Add(panel_bottom,1,wxEXPAND| wxLEFT| wxTOP| wxRIGHT, 10);
wxSizer *sizer_bottom = new wxBoxSizer(wxVERTICAL);
this->SetSizerAndFit(sizer);
}