-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainform.cpp
184 lines (135 loc) · 3.93 KB
/
mainform.cpp
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/////////////////////////////////////////////////////////////////////////////
// Name: mainform.cpp
// Purpose:
// Author: Talipov S.N.
// Modified by:
// Created: Tue 10 Nov 2020 18:12:38 +06
// RCS-ID:
// Copyright:
// Licence:
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
////@begin includes
////@end includes
#include "mainform.h"
////@begin XPM images
////@end XPM images
/*
* MainForm type definition
*/
IMPLEMENT_CLASS( MainForm, wxFrame )
/*
* MainForm event table definition
*/
BEGIN_EVENT_TABLE( MainForm, wxFrame )
////@begin MainForm event table entries
EVT_BUTTON( ID_BUTTON, MainForm::OnButtonClick )
////@end MainForm event table entries
END_EVENT_TABLE()
/*
* MainForm constructors
*/
MainForm::MainForm()
{
Init();
}
MainForm::MainForm( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
Init();
Create( parent, id, caption, pos, size, style );
}
/*
* MainForm creator
*/
bool MainForm::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin MainForm creation
wxFrame::Create( parent, id, caption, pos, size, style );
CreateControls();
Centre();
////@end MainForm creation
return true;
}
/*
* MainForm destructor
*/
MainForm::~MainForm()
{
////@begin MainForm destruction
////@end MainForm destruction
}
/*
* Member initialisation
*/
void MainForm::Init()
{
////@begin MainForm member initialisation
////@end MainForm member initialisation
}
/*
* Control creation for MainForm
*/
void MainForm::CreateControls()
{
////@begin MainForm content construction
MainForm* itemFrame1 = this;
wxBoxSizer* itemBoxSizer1 = new wxBoxSizer(wxVERTICAL);
itemFrame1->SetSizer(itemBoxSizer1);
wxStaticText* itemStaticText2 = new wxStaticText( itemFrame1, wxID_STATIC, wxGetTranslation(wxString() + (wxChar) 0x042D + (wxChar) 0x0442 + (wxChar) 0x043E + wxT(" ") + (wxChar) 0x043C + (wxChar) 0x0435 + (wxChar) 0x0442 + (wxChar) 0x043A + (wxChar) 0x0430), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer1->Add(itemStaticText2, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* itemButton3 = new wxButton( itemFrame1, ID_BUTTON, wxGetTranslation(wxString() + (wxChar) 0x0410 + wxT(" ") + (wxChar) 0x044D + (wxChar) 0x0442 + (wxChar) 0x043E + wxT(" ") + (wxChar) 0x043A + (wxChar) 0x043D + (wxChar) 0x043E + (wxChar) 0x043F + (wxChar) 0x043E + (wxChar) 0x0447 + (wxChar) 0x043A + (wxChar) 0x0430 + wxT("!")), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer1->Add(itemButton3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
// Connect events and objects
itemButton3->Connect(ID_BUTTON, wxEVT_MIDDLE_DOWN, wxMouseEventHandler(MainForm::OnMiddleDown), NULL, this);
////@end MainForm content construction
}
/*
* Should we show tooltips?
*/
bool MainForm::ShowToolTips()
{
return true;
}
/*
* Get bitmap resources
*/
wxBitmap MainForm::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin MainForm bitmap retrieval
wxUnusedVar(name);
return wxNullBitmap;
////@end MainForm bitmap retrieval
}
/*
* Get icon resources
*/
wxIcon MainForm::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin MainForm icon retrieval
wxUnusedVar(name);
return wxNullIcon;
////@end MainForm icon retrieval
}
/*
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
*/
void MainForm::OnButtonClick( wxCommandEvent& event )
{
wxMessageBox(L"wxWidgets - это круто!!!");
}
/*
* wxEVT_MIDDLE_DOWN event handler for ID_BUTTON
*/
void MainForm::OnMiddleDown( wxMouseEvent& event )
{
wxMessageBox(L"wxWidgets - это бесплатно!!!");
}