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 3.10.1-0-g8feb16b)
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, 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
46 bUpperSizer->Add( bSizerButtOpts, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
47
48 wxBoxSizer* bSizer6;
49 bSizer6 = new wxBoxSizer( wxVERTICAL );
50
51 m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
52 bSizer6->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM, 10 );
53
54
55 bUpperSizer->Add( bSizer6, 0, wxEXPAND, 5 );
56
57
58 bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxALL, 5 );
59
60 wxFlexGridSizer* fgSizer2;
61 fgSizer2 = new wxFlexGridSizer( 0, 5, 5, 0 );
62 fgSizer2->AddGrowableCol( 1 );
63 fgSizer2->SetFlexibleDirection( wxBOTH );
64 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
65
66 m_xLabel = new wxStaticText( this, wxID_ANY, _("Offset X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
67 m_xLabel->Wrap( -1 );
68 fgSizer2->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
69
70 m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
71 fgSizer2->Add( m_xEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
72
73 m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
74 m_xUnit->Wrap( -1 );
75 fgSizer2->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxRIGHT, 5 );
76
77
78 fgSizer2->Add( 10, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
79
80 m_clearX = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
81 fgSizer2->Add( m_clearX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
82
83 m_yLabel = new wxStaticText( this, wxID_ANY, _("Offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
84 m_yLabel->Wrap( -1 );
85 fgSizer2->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
86
87 m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
88 fgSizer2->Add( m_yEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
89
90 m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
91 m_yUnit->Wrap( -1 );
92 fgSizer2->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
93
94
95 fgSizer2->Add( 10, 0, 1, wxEXPAND, 5 );
96
97 m_clearY = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
98 fgSizer2->Add( m_clearY, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
99
100
101 bMainSizer->Add( fgSizer2, 1, wxEXPAND|wxALL, 5 );
102
103 wxBoxSizer* bSizerBottom;
104 bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
105
106 m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
107 m_polarCoords->SetValue(true);
108 bSizerBottom->Add( m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
109
110
111 bSizerBottom->Add( 40, 0, 1, wxEXPAND, 5 );
112
113 m_stdButtons = new wxStdDialogButtonSizer();
114 m_stdButtonsOK = new wxButton( this, wxID_OK );
115 m_stdButtons->AddButton( m_stdButtonsOK );
116 m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
117 m_stdButtons->AddButton( m_stdButtonsCancel );
118 m_stdButtons->Realize();
119
120 bSizerBottom->Add( m_stdButtons, 0, wxBOTTOM|wxTOP, 5 );
121
122
123 bMainSizer->Add( bSizerBottom, 0, wxEXPAND|wxTOP, 5 );
124
125
126 this->SetSizer( bMainSizer );
127 this->Layout();
128 bMainSizer->Fit( this );
129
130 // Connect Events
131 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClose ) );
132 m_user_origin_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseUserOriginClick ), NULL, this );
133 m_grid_origin_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseGridOriginClick ), NULL, this );
134 m_select_anchor_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectItemClick ), NULL, this );
135 m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
136 m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
137 m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
138 m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
139 m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnPolarChanged ), NULL, this );
140 m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnOkClick ), NULL, this );
141}
142
144{
145 // Disconnect Events
146 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClose ) );
147 m_user_origin_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseUserOriginClick ), NULL, this );
148 m_grid_origin_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseGridOriginClick ), NULL, this );
149 m_select_anchor_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectItemClick ), NULL, this );
150 m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
151 m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
152 m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
153 m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
154 m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnPolarChanged ), NULL, this );
155 m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnOkClick ), NULL, this );
156
157}
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:84
#define _(s)