MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / ActionDialogBase

Method ActionDialogBase

src/forms/Dialog/ActionDialogBase.cpp:12–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10///////////////////////////////////////////////////////////////////////////
11
12ActionDialogBase::ActionDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
13{
14 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15
16 wxBoxSizer* mainSizer;
17 mainSizer = new wxBoxSizer( wxVERTICAL );
18
19 m_questionText = new wxStaticText( this, wxID_ANY, wxT("Question"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
20 m_questionText->Wrap( -1 );
21 mainSizer->Add( m_questionText, 1, wxALL|wxEXPAND, 5 );
22
23 wxBoxSizer* buttonSizer;
24 buttonSizer = new wxBoxSizer( wxHORIZONTAL );
25
26 m_cancelButton = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
27 buttonSizer->Add( m_cancelButton, 1, wxALL|wxEXPAND, 5 );
28
29 m_okButton = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
30 buttonSizer->Add( m_okButton, 1, wxALL|wxEXPAND, 5 );
31
32
33 mainSizer->Add( buttonSizer, 1, wxEXPAND, 5 );
34
35
36 this->SetSizer( mainSizer );
37 this->Layout();
38 mainSizer->Fit( this );
39
40 this->Centre( wxBOTH );
41
42 // Connect Events
43 m_cancelButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActionDialogBase::onClickCancel ), NULL, this );
44 m_okButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ActionDialogBase::onClickOK ), NULL, this );
45}
46
47ActionDialogBase::~ActionDialogBase()
48{

Callers

nothing calls this directly

Calls 1

AddMethod · 0.80

Tested by

no test coverage detected