KiCad PCB EDA Suite
dialog_move_exact_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12DIALOG_MOVE_EXACT_BASE::DIALOG_MOVE_EXACT_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 bMainSizer = new wxBoxSizer( wxVERTICAL );
17
18 wxFlexGridSizer* fgInputSizer;
19 fgInputSizer = new wxFlexGridSizer( 0, 4, 5, 5 );
20 fgInputSizer->AddGrowableCol( 1 );
21 fgInputSizer->SetFlexibleDirection( wxBOTH );
22 fgInputSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
23
24 m_xLabel = new wxStaticText( this, wxID_ANY, _("Move X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
25 m_xLabel->Wrap( -1 );
26 fgInputSizer->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
27
28 m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
29 fgInputSizer->Add( m_xEntry, 0, wxEXPAND, 5 );
30
31 m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
32 m_xUnit->Wrap( -1 );
33 fgInputSizer->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
34
35 m_clearX = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
36 fgInputSizer->Add( m_clearX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
37
38 m_yLabel = new wxStaticText( this, wxID_ANY, _("Move Y:"), wxDefaultPosition, wxDefaultSize, 0 );
39 m_yLabel->Wrap( -1 );
40 fgInputSizer->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
41
42 m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
43 fgInputSizer->Add( m_yEntry, 0, wxEXPAND, 5 );
44
45 m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
46 m_yUnit->Wrap( -1 );
47 fgInputSizer->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
48
49 m_clearY = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
50 fgInputSizer->Add( m_clearY, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
51
52 m_rotLabel = new wxStaticText( this, wxID_ANY, _("Rotate:"), wxDefaultPosition, wxDefaultSize, 0 );
53 m_rotLabel->Wrap( -1 );
54 fgInputSizer->Add( m_rotLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
55
56 m_rotEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
57 fgInputSizer->Add( m_rotEntry, 0, wxEXPAND, 5 );
58
59 m_rotUnit = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
60 m_rotUnit->Wrap( -1 );
61 fgInputSizer->Add( m_rotUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
62
63 m_clearRot = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
64 fgInputSizer->Add( m_clearRot, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
65
66
67 fgInputSizer->Add( 0, 0, 1, wxEXPAND, 5 );
68
69 wxString m_anchorOptionsChoices[] = { _("Rotate around center of selection"), _("Rotate around local coordinates origin"), _("Rotate around drill/place origin") };
70 int m_anchorOptionsNChoices = sizeof( m_anchorOptionsChoices ) / sizeof( wxString );
71 m_anchorOptions = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_anchorOptionsNChoices, m_anchorOptionsChoices, 0 );
72 m_anchorOptions->SetSelection( 0 );
73 fgInputSizer->Add( m_anchorOptions, 0, wxEXPAND, 5 );
74
75
76 bMainSizer->Add( fgInputSizer, 0, wxEXPAND|wxALL, 5 );
77
78 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
79 bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
80
81 wxBoxSizer* bBottomSizer;
82 bBottomSizer = new wxBoxSizer( wxHORIZONTAL );
83
84 m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
85 bBottomSizer->Add( m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
86
87 m_stdButtons = new wxStdDialogButtonSizer();
88 m_stdButtonsOK = new wxButton( this, wxID_OK );
89 m_stdButtons->AddButton( m_stdButtonsOK );
90 m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
91 m_stdButtons->AddButton( m_stdButtonsCancel );
92 m_stdButtons->Realize();
93
94 bBottomSizer->Add( m_stdButtons, 1, wxALL|wxEXPAND, 5 );
95
96
97 bMainSizer->Add( bBottomSizer, 0, wxEXPAND, 5 );
98
99
100 this->SetSizer( bMainSizer );
101 this->Layout();
102 bMainSizer->Fit( this );
103
104 // Connect Events
105 m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
106 m_xEntry->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextChanged ), NULL, this );
107 m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
108 m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
109 m_yEntry->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextChanged ), NULL, this );
110 m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
111 m_rotEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
112 m_clearRot->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
113 m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnPolarChanged ), NULL, this );
114}
115
117{
118 // Disconnect Events
119 m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
120 m_xEntry->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextChanged ), NULL, this );
121 m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
122 m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
123 m_yEntry->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextChanged ), NULL, this );
124 m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
125 m_rotEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
126 m_clearRot->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
127 m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnPolarChanged ), NULL, this );
128
129}
DIALOG_MOVE_EXACT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Move Item"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnTextChanged(wxCommandEvent &event)
wxStdDialogButtonSizer * m_stdButtons
virtual void OnClear(wxCommandEvent &event)
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:83
#define _(s)