-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.cpp
91 lines (64 loc) · 3.25 KB
/
gui.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
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "gui.h"
///////////////////////////////////////////////////////////////////////////
MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxSize( 500,260 ), wxSize( 500,260 ) );
wxBoxSizer* bSizer2;
bSizer2 = new wxBoxSizer( wxVERTICAL );
m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Работа с таблицей"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 );
bSizer2->Add( m_staticText2, 0, wxALIGN_CENTER|wxALL, 5 );
m_grid1 = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
m_grid1->CreateGrid( 4, 4 );
m_grid1->EnableEditing( true );
m_grid1->EnableGridLines( true );
m_grid1->EnableDragGridSize( false );
m_grid1->SetMargins( 0, 0 );
// Columns
m_grid1->EnableDragColMove( false );
m_grid1->EnableDragColSize( true );
m_grid1->SetColLabelSize( 30 );
m_grid1->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Rows
m_grid1->EnableDragRowSize( true );
m_grid1->SetRowLabelSize( 80 );
m_grid1->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Label Appearance
// Cell Defaults
m_grid1->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
bSizer2->Add( m_grid1, 0, wxALIGN_CENTER|wxALL, 5 );
m_staticText_Sum = new wxStaticText( this, wxID_ANY, wxT("нажмите на кнопки ниже"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText_Sum->Wrap( -1 );
bSizer2->Add( m_staticText_Sum, 0, wxALIGN_CENTER|wxALL, 5 );
wxBoxSizer* bSizer3;
bSizer3 = new wxBoxSizer( wxHORIZONTAL );
m_button3 = new wxButton( this, wxID_ANY, wxT("Случайные"), wxDefaultPosition, wxDefaultSize, 0 );
m_button3->SetDefault();
m_button3->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer3->Add( m_button3, 0, wxALL, 5 );
bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
m_button7 = new wxButton( this, wxID_ANY, wxT("Сумма"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3->Add( m_button7, 0, wxALL, 5 );
bSizer2->Add( bSizer3, 1, wxEXPAND, 2 );
this->SetSizer( bSizer2 );
this->Layout();
this->Centre( wxBOTH );
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrameBase::OnCloseFrame ) );
m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrameBase::onRand ), NULL, this );
m_button7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrameBase::onSum ), NULL, this );
}
MainFrameBase::~MainFrameBase()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrameBase::OnCloseFrame ) );
m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrameBase::onRand ), NULL, this );
m_button7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrameBase::onSum ), NULL, this );
}