KiCad PCB EDA Suite
dialog_exit_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "dialog_exit_base.h"
9 
11 
12 DIALOG_EXIT_BASE::DIALOG_EXIT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bSizerUpper;
20  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
21 
22  m_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
23  bSizerUpper->Add( m_bitmap, 0, wxALL, 5 );
24 
25  wxBoxSizer* bSizerMessages;
26  bSizerMessages = new wxBoxSizer( wxVERTICAL );
27 
28  m_TextInfo = new wxStaticText( this, wxID_ANY, _("Save changes?"), wxDefaultPosition, wxDefaultSize, 0 );
29  m_TextInfo->Wrap( -1 );
30  m_TextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
31 
32  bSizerMessages->Add( m_TextInfo, 0, wxALL, 5 );
33 
34  m_staticText2 = new wxStaticText( this, wxID_ANY, _("If you don't save, all your changes will be permanently lost."), wxDefaultPosition, wxDefaultSize, 0 );
35  m_staticText2->Wrap( -1 );
36  bSizerMessages->Add( m_staticText2, 0, wxALL, 5 );
37 
38 
39  bSizerUpper->Add( bSizerMessages, 1, wxEXPAND, 5 );
40 
41 
42  bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxALL, 5 );
43 
44  m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
45  bSizerMain->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
46 
47  m_buttonSizer = new wxBoxSizer( wxHORIZONTAL );
48 
49  m_buttonSizer->SetMinSize( wxSize( 475,-1 ) );
50  m_ApplyToAllOpt = new wxCheckBox( this, wxID_ANY, _("Apply to all"), wxDefaultPosition, wxDefaultSize, 0 );
51  m_buttonSizer->Add( m_ApplyToAllOpt, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
52 
53 
54  m_buttonSizer->Add( 20, 0, 1, wxRIGHT|wxLEFT, 5 );
55 
56  m_DiscardButton = new wxButton( this, wxID_ANY, _("Discard Changes"), wxDefaultPosition, wxDefaultSize, 0 );
57  m_buttonSizer->Add( m_DiscardButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
58 
59 
60  m_buttonSizer->Add( 20, 0, 0, wxRIGHT|wxLEFT, 5 );
61 
62  m_sdbSizer1 = new wxStdDialogButtonSizer();
63  m_sdbSizer1OK = new wxButton( this, wxID_OK );
64  m_sdbSizer1->AddButton( m_sdbSizer1OK );
65  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
66  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
67  m_sdbSizer1->Realize();
68 
69  m_buttonSizer->Add( m_sdbSizer1, 0, wxALL, 5 );
70 
71 
72  bSizerMain->Add( m_buttonSizer, 0, wxEXPAND|wxLEFT, 10 );
73 
74 
75  this->SetSizer( bSizerMain );
76  this->Layout();
77  bSizerMain->Fit( this );
78 
79  this->Centre( wxBOTH );
80 
81  // Connect Events
82  m_DiscardButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnDiscard ), NULL, this );
83  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnSave ), NULL, this );
84 }
85 
87 {
88  // Disconnect Events
89  m_DiscardButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnDiscard ), NULL, this );
90  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnSave ), NULL, this );
91 
92 }
wxBoxSizer * m_buttonSizer
virtual void OnSave(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
wxStaticText * m_TextInfo
wxStdDialogButtonSizer * m_sdbSizer1
virtual void OnDiscard(wxCommandEvent &event)
wxCheckBox * m_ApplyToAllOpt
wxStaticLine * m_staticline
wxStaticBitmap * m_bitmap
wxButton * m_sdbSizer1OK
wxButton * m_DiscardButton
wxButton * m_sdbSizer1Cancel
DIALOG_EXIT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStaticText * m_staticText2