KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_offset_item_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_OFFSET_ITEM_BASE::DIALOG_OFFSET_ITEM_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 wxFlexGridSizer* fgSizer2;
20 fgSizer2 = new wxFlexGridSizer( 0, 5, 5, 0 );
21 fgSizer2->AddGrowableCol( 1 );
22 fgSizer2->SetFlexibleDirection( wxBOTH );
23 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
24
25 m_xLabel = new wxStaticText( this, wxID_ANY, _("Offset X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
26 m_xLabel->Wrap( -1 );
27 fgSizer2->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
28
29 m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
30 fgSizer2->Add( m_xEntry, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
31
32 m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
33 m_xUnit->Wrap( -1 );
34 fgSizer2->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP|wxRIGHT, 5 );
35
36
37 fgSizer2->Add( 10, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
38
39 m_clearX = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
40 fgSizer2->Add( m_clearX, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
41
42 m_yLabel = new wxStaticText( this, wxID_ANY, _("Offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
43 m_yLabel->Wrap( -1 );
44 fgSizer2->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
45
46 m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
47 fgSizer2->Add( m_yEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
48
49 m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
50 m_yUnit->Wrap( -1 );
51 fgSizer2->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
52
53
54 fgSizer2->Add( 10, 0, 1, wxEXPAND, 5 );
55
56 m_clearY = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
57 fgSizer2->Add( m_clearY, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
58
59
60 bMainSizer->Add( fgSizer2, 1, wxEXPAND|wxALL, 5 );
61
62 wxBoxSizer* bSizerBottom;
63 bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
64
65 m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
66 m_polarCoords->SetValue(true);
67 bSizerBottom->Add( m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
68
69
70 bSizerBottom->Add( 40, 0, 1, wxEXPAND, 5 );
71
72 m_stdButtons = new wxStdDialogButtonSizer();
73 m_stdButtonsOK = new wxButton( this, wxID_OK );
74 m_stdButtons->AddButton( m_stdButtonsOK );
75 m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
76 m_stdButtons->AddButton( m_stdButtonsCancel );
77 m_stdButtons->Realize();
78
79 bSizerBottom->Add( m_stdButtons, 0, wxBOTTOM|wxTOP, 5 );
80
81
82 bMainSizer->Add( bSizerBottom, 0, wxEXPAND|wxTOP, 5 );
83
84
85 this->SetSizer( bMainSizer );
86 this->Layout();
87 bMainSizer->Fit( this );
88
89 // Connect Events
90 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_OFFSET_ITEM_BASE::OnClose ) );
91 m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_OFFSET_ITEM_BASE::OnTextFocusLost ), NULL, this );
92 m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_OFFSET_ITEM_BASE::OnClear ), NULL, this );
93 m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_OFFSET_ITEM_BASE::OnTextFocusLost ), NULL, this );
94 m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_OFFSET_ITEM_BASE::OnClear ), NULL, this );
95 m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_OFFSET_ITEM_BASE::OnPolarChanged ), NULL, this );
96 m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_OFFSET_ITEM_BASE::OnOkClick ), NULL, this );
97}
98
100{
101 // Disconnect Events
102 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_OFFSET_ITEM_BASE::OnClose ) );
103 m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_OFFSET_ITEM_BASE::OnTextFocusLost ), NULL, this );
104 m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_OFFSET_ITEM_BASE::OnClear ), NULL, this );
105 m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_OFFSET_ITEM_BASE::OnTextFocusLost ), NULL, this );
106 m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_OFFSET_ITEM_BASE::OnClear ), NULL, this );
107 m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_OFFSET_ITEM_BASE::OnPolarChanged ), NULL, this );
108 m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_OFFSET_ITEM_BASE::OnOkClick ), NULL, this );
109
110}
wxStdDialogButtonSizer * m_stdButtons
virtual void OnClear(wxCommandEvent &event)
virtual void OnOkClick(wxCommandEvent &event)
virtual void OnPolarChanged(wxCommandEvent &event)
DIALOG_OFFSET_ITEM_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Offset Item"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnClose(wxCloseEvent &event)
virtual void OnTextFocusLost(wxFocusEvent &event)
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
#define _(s)