KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_set_offset_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12DIALOG_SET_OFFSET_BASE::DIALOG_SET_OFFSET_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( wxSize( -1,-1 ), wxDefaultSize );
15
16 wxBoxSizer* bMainSizer;
17 bMainSizer = new wxBoxSizer( wxVERTICAL );
18
19 m_description = new wxStaticText( this, wxID_ANY, _("Set a new value for this offset:"), wxDefaultPosition, wxDefaultSize, 0 );
20 m_description->Wrap( -1 );
21 bMainSizer->Add( m_description, 0, wxALL, 5 );
22
23 wxFlexGridSizer* fgSizer2;
24 fgSizer2 = new wxFlexGridSizer( 0, 5, 5, 0 );
25 fgSizer2->AddGrowableCol( 1 );
26 fgSizer2->SetFlexibleDirection( wxBOTH );
27 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
28
29 m_xLabel = new wxStaticText( this, wxID_ANY, _("Offset X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
30 m_xLabel->Wrap( -1 );
31 fgSizer2->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
32
33 m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
34 fgSizer2->Add( m_xEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
35
36 m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
37 m_xUnit->Wrap( -1 );
38 fgSizer2->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxRIGHT, 5 );
39
40
41 fgSizer2->Add( 10, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
42
43 m_clearX = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
44 fgSizer2->Add( m_clearX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
45
46 m_yLabel = new wxStaticText( this, wxID_ANY, _("Offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
47 m_yLabel->Wrap( -1 );
48 fgSizer2->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
49
50 m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
51 fgSizer2->Add( m_yEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
52
53 m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
54 m_yUnit->Wrap( -1 );
55 fgSizer2->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
56
57
58 fgSizer2->Add( 10, 0, 1, wxEXPAND, 5 );
59
60 m_clearY = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
61 fgSizer2->Add( m_clearY, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
62
63
64 bMainSizer->Add( fgSizer2, 1, wxEXPAND|wxALL, 5 );
65
66 wxBoxSizer* bSizerBottom;
67 bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
68
69 m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
70 m_polarCoords->SetValue(true);
71 bSizerBottom->Add( m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
72
73
74 bSizerBottom->Add( 40, 0, 1, wxEXPAND, 5 );
75
76 m_stdButtons = new wxStdDialogButtonSizer();
77 m_stdButtonsOK = new wxButton( this, wxID_OK );
78 m_stdButtons->AddButton( m_stdButtonsOK );
79 m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
80 m_stdButtons->AddButton( m_stdButtonsCancel );
81 m_stdButtons->Realize();
82
83 bSizerBottom->Add( m_stdButtons, 0, wxBOTTOM|wxTOP, 5 );
84
85
86 bMainSizer->Add( bSizerBottom, 0, wxEXPAND|wxTOP, 5 );
87
88
89 this->SetSizer( bMainSizer );
90 this->Layout();
91 bMainSizer->Fit( this );
92
93 // Connect Events
94 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SET_OFFSET_BASE::OnClose ) );
95 m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SET_OFFSET_BASE::OnTextFocusLost ), NULL, this );
96 m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_OFFSET_BASE::OnClear ), NULL, this );
97 m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SET_OFFSET_BASE::OnTextFocusLost ), NULL, this );
98 m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_OFFSET_BASE::OnClear ), NULL, this );
99 m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SET_OFFSET_BASE::OnPolarChanged ), NULL, this );
100 m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_OFFSET_BASE::OnOkClick ), NULL, this );
101}
102
104{
105 // Disconnect Events
106 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SET_OFFSET_BASE::OnClose ) );
107 m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SET_OFFSET_BASE::OnTextFocusLost ), NULL, this );
108 m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_OFFSET_BASE::OnClear ), NULL, this );
109 m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SET_OFFSET_BASE::OnTextFocusLost ), NULL, this );
110 m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_OFFSET_BASE::OnClear ), NULL, this );
111 m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SET_OFFSET_BASE::OnPolarChanged ), NULL, this );
112 m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_OFFSET_BASE::OnOkClick ), NULL, this );
113
114}
virtual void OnClose(wxCloseEvent &event)
virtual void OnOkClick(wxCommandEvent &event)
wxStdDialogButtonSizer * m_stdButtons
virtual void OnClear(wxCommandEvent &event)
DIALOG_SET_OFFSET_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Set Offset"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnPolarChanged(wxCommandEvent &event)
virtual void OnTextFocusLost(wxFocusEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
#define _(s)