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 )
14 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
16 wxBoxSizer* bMainSizer;
17 bMainSizer =
new wxBoxSizer( wxVERTICAL );
19 wxBoxSizer* bUpperSizer;
20 bUpperSizer =
new wxBoxSizer( wxVERTICAL );
22 m_referenceInfo =
new wxStaticText(
this, wxID_ANY,
_(
"Reference item: <none selected>"), wxDefaultPosition, wxDefaultSize, 0 );
29 bUpperSizer->Add( 0, 0, 0, wxEXPAND, 5 );
31 wxBoxSizer* bSizerButtOpts;
32 bSizerButtOpts =
new wxBoxSizer( wxHORIZONTAL );
34 m_user_origin_button =
new wxButton(
this, wxID_ANY,
_(
"Use Local Origin"), wxDefaultPosition, wxDefaultSize, 0 );
37 m_grid_origin_button =
new wxButton(
this, wxID_ANY,
_(
"Use Grid Origin"), wxDefaultPosition, wxDefaultSize, 0 );
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.") );
45 m_select_point_button =
new wxButton(
this, wxID_ANY,
_(
"Select Point..."), wxDefaultPosition, wxDefaultSize, 0 );
49 bUpperSizer->Add( bSizerButtOpts, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
52 bSizer6 =
new wxBoxSizer( wxVERTICAL );
54 m_staticline2 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
58 bUpperSizer->Add( bSizer6, 0, wxEXPAND, 5 );
61 bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxALL, 5 );
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 );
69 m_xLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Offset X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
71 fgSizer2->Add(
m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
73 m_xEntry =
new wxTextCtrl(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
74 fgSizer2->Add(
m_xEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
76 m_xUnit =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
78 fgSizer2->Add(
m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxRIGHT, 5 );
81 fgSizer2->Add( 10, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
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 );
86 m_yLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
88 fgSizer2->Add(
m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
90 m_yEntry =
new wxTextCtrl(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
91 fgSizer2->Add(
m_yEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
93 m_yUnit =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
95 fgSizer2->Add(
m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
98 fgSizer2->Add( 10, 0, 1, wxEXPAND, 5 );
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 );
104 bMainSizer->Add( fgSizer2, 1, wxEXPAND|wxALL, 5 );
106 wxBoxSizer* bSizerBottom;
107 bSizerBottom =
new wxBoxSizer( wxHORIZONTAL );
109 m_polarCoords =
new wxCheckBox(
this, wxID_ANY,
_(
"Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
111 bSizerBottom->Add(
m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
114 bSizerBottom->Add( 40, 0, 1, wxEXPAND, 5 );
123 bSizerBottom->Add(
m_stdButtons, 0, wxBOTTOM|wxTOP, 5 );
126 bMainSizer->Add( bSizerBottom, 0, wxEXPAND|wxTOP, 5 );
129 this->SetSizer( bMainSizer );
131 bMainSizer->Fit(
this );
wxButton * m_select_point_button
virtual void OnSelectPointClick(wxCommandEvent &event)
wxButton * m_user_origin_button
virtual void OnPolarChanged(wxCommandEvent &event)
virtual void OnTextFocusLost(wxFocusEvent &event)
wxStaticText * m_referenceInfo
virtual void OnOkClick(wxCommandEvent &event)
virtual void OnSelectItemClick(wxCommandEvent &event)
wxButton * m_stdButtonsOK
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)
wxCheckBox * m_polarCoords
wxButton * m_select_anchor_button
wxButton * m_stdButtonsCancel
virtual void OnClose(wxCloseEvent &event)
wxStaticLine * m_staticline2
~DIALOG_POSITION_RELATIVE_BASE()
wxStdDialogButtonSizer * m_stdButtons
virtual void OnClear(wxCommandEvent &event)
wxButton * m_grid_origin_button
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...