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.") );
46 bUpperSizer->Add( bSizerButtOpts, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
49 bSizer6 =
new wxBoxSizer( wxVERTICAL );
51 m_staticline2 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
55 bUpperSizer->Add( bSizer6, 0, wxEXPAND, 5 );
58 bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxALL, 5 );
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 );
66 m_xLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Offset X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
68 fgSizer2->Add(
m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
70 m_xEntry =
new wxTextCtrl(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
71 fgSizer2->Add(
m_xEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
73 m_xUnit =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
75 fgSizer2->Add(
m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxRIGHT, 5 );
78 fgSizer2->Add( 10, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
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 );
83 m_yLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
85 fgSizer2->Add(
m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
87 m_yEntry =
new wxTextCtrl(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
88 fgSizer2->Add(
m_yEntry, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
90 m_yUnit =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
92 fgSizer2->Add(
m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
95 fgSizer2->Add( 10, 0, 1, wxEXPAND, 5 );
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 );
101 bMainSizer->Add( fgSizer2, 1, wxEXPAND|wxALL, 5 );
103 wxBoxSizer* bSizerBottom;
104 bSizerBottom =
new wxBoxSizer( wxHORIZONTAL );
106 m_polarCoords =
new wxCheckBox(
this, wxID_ANY,
_(
"Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
108 bSizerBottom->Add(
m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
111 bSizerBottom->Add( 40, 0, 1, wxEXPAND, 5 );
120 bSizerBottom->Add(
m_stdButtons, 0, wxBOTTOM|wxTOP, 5 );
123 bMainSizer->Add( bSizerBottom, 0, wxEXPAND|wxTOP, 5 );
126 this->SetSizer( bMainSizer );
128 bMainSizer->Fit(
this );
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...