KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_position_relative_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_POSITION_RELATIVE_BASE::DIALOG_POSITION_RELATIVE_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 wxBoxSizer* bUpperSizer;
20 bUpperSizer = new wxBoxSizer( wxVERTICAL );
21
22 m_referenceInfo = new wxStaticText( this, wxID_ANY, _("Reference item: <none selected>"), wxDefaultPosition, wxDefaultSize, 0 );
23 m_referenceInfo->Wrap( -1 );
24 m_referenceInfo->SetMinSize( wxSize( 340,-1 ) );
25
26 bUpperSizer->Add( m_referenceInfo, 0, wxALL|wxEXPAND, 5 );
27
28
29 bUpperSizer->Add( 0, 0, 0, wxEXPAND, 5 );
30
31 wxBoxSizer* bSizerButtOpts;
32 bSizerButtOpts = new wxBoxSizer( wxHORIZONTAL );
33
34 m_user_origin_button = new wxButton( this, wxID_ANY, _("Use Local Origin"), wxDefaultPosition, wxDefaultSize, 0 );
35 bSizerButtOpts->Add( m_user_origin_button, 1, wxALL|wxEXPAND, 5 );
36
37 m_grid_origin_button = new wxButton( this, wxID_ANY, _("Use Grid Origin"), wxDefaultPosition, wxDefaultSize, 0 );
38 bSizerButtOpts->Add( m_grid_origin_button, 1, wxALL|wxEXPAND, 5 );
39
40 m_select_anchor_button = new wxButton( this, wxID_ANY, _("Select Item..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
41 m_select_anchor_button->SetToolTip( _("Click and select a board item.\nThe anchor position will be the position of the selected item.") );
42
43 bSizerButtOpts->Add( m_select_anchor_button, 1, wxALL|wxEXPAND, 5 );
44
45 m_select_point_button = new wxButton( this, wxID_ANY, _("Select Point..."), wxDefaultPosition, wxDefaultSize, 0 );
46 bSizerButtOpts->Add( m_select_point_button, 1, wxALL, 5 );
47
48
49 bUpperSizer->Add( bSizerButtOpts, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
50
51 wxBoxSizer* bSizer6;
52 bSizer6 = new wxBoxSizer( wxVERTICAL );
53
54 m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
55 bSizer6->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM, 10 );
56
57
58 bUpperSizer->Add( bSizer6, 0, wxEXPAND, 5 );
59
60
61 bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxALL, 5 );
62
63 wxFlexGridSizer* fgSizer2;
64 fgSizer2 = new wxFlexGridSizer( 0, 5, 5, 0 );
65 fgSizer2->AddGrowableCol( 1 );
66 fgSizer2->SetFlexibleDirection( wxBOTH );
67 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
68
69 m_xLabel = new wxStaticText( this, wxID_ANY, _("Offset X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
70 m_xLabel->Wrap( -1 );
71 fgSizer2->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
72
73 m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
74 fgSizer2->Add( m_xEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
75
76 m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
77 m_xUnit->Wrap( -1 );
78 fgSizer2->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxRIGHT, 5 );
79
80
81 fgSizer2->Add( 10, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
82
83 m_clearX = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
84 fgSizer2->Add( m_clearX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
85
86 m_yLabel = new wxStaticText( this, wxID_ANY, _("Offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
87 m_yLabel->Wrap( -1 );
88 fgSizer2->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
89
90 m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
91 fgSizer2->Add( m_yEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
92
93 m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
94 m_yUnit->Wrap( -1 );
95 fgSizer2->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
96
97
98 fgSizer2->Add( 10, 0, 1, wxEXPAND, 5 );
99
100 m_clearY = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
101 fgSizer2->Add( m_clearY, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
102
103
104 bMainSizer->Add( fgSizer2, 1, wxEXPAND|wxALL, 5 );
105
106 wxBoxSizer* bSizerBottom;
107 bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
108
109 m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
110 m_polarCoords->SetValue(true);
111 bSizerBottom->Add( m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
112
113
114 bSizerBottom->Add( 40, 0, 1, wxEXPAND, 5 );
115
116 m_stdButtons = new wxStdDialogButtonSizer();
117 m_stdButtonsOK = new wxButton( this, wxID_OK );
118 m_stdButtons->AddButton( m_stdButtonsOK );
119 m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
120 m_stdButtons->AddButton( m_stdButtonsCancel );
121 m_stdButtons->Realize();
122
123 bSizerBottom->Add( m_stdButtons, 0, wxBOTTOM|wxTOP, 5 );
124
125
126 bMainSizer->Add( bSizerBottom, 0, wxEXPAND|wxTOP, 5 );
127
128
129 this->SetSizer( bMainSizer );
130 this->Layout();
131 bMainSizer->Fit( this );
132
133 // Connect Events
134 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClose ) );
135 m_user_origin_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseUserOriginClick ), NULL, this );
136 m_grid_origin_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseGridOriginClick ), NULL, this );
137 m_select_anchor_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectItemClick ), NULL, this );
138 m_select_point_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectPointClick ), NULL, this );
139 m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
140 m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
141 m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
142 m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
143 m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnPolarChanged ), NULL, this );
144 m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnOkClick ), NULL, this );
145}
146
148{
149 // Disconnect Events
150 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClose ) );
151 m_user_origin_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseUserOriginClick ), NULL, this );
152 m_grid_origin_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseGridOriginClick ), NULL, this );
153 m_select_anchor_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectItemClick ), NULL, this );
154 m_select_point_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectPointClick ), NULL, this );
155 m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
156 m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
157 m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
158 m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
159 m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnPolarChanged ), NULL, this );
160 m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnOkClick ), NULL, this );
161
162}
virtual void OnSelectPointClick(wxCommandEvent &event)
virtual void OnPolarChanged(wxCommandEvent &event)
virtual void OnTextFocusLost(wxFocusEvent &event)
virtual void OnOkClick(wxCommandEvent &event)
virtual void OnSelectItemClick(wxCommandEvent &event)
virtual void OnUseGridOriginClick(wxCommandEvent &event)
virtual void OnUseUserOriginClick(wxCommandEvent &event)
DIALOG_POSITION_RELATIVE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Position Relative To Reference 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 OnClear(wxCommandEvent &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)