12 DIALOG_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 )
14 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
18 wxFlexGridSizer* fgInputSizer;
19 fgInputSizer =
new wxFlexGridSizer( 0, 4, 0, 5 );
20 fgInputSizer->AddGrowableCol( 1 );
21 fgInputSizer->SetFlexibleDirection( wxBOTH );
22 fgInputSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
24 m_xLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Move X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
26 fgInputSizer->Add(
m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
28 m_xEntry =
new wxTextCtrl(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
29 fgInputSizer->Add(
m_xEntry, 0, wxEXPAND|wxTOP, 5 );
31 m_xUnit =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
33 fgInputSizer->Add(
m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP|wxRIGHT, 5 );
35 m_clearX =
new wxButton(
this, wxID_ANY,
_(
"Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
36 fgInputSizer->Add(
m_clearX, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
38 m_yLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Move Y:"), wxDefaultPosition, wxDefaultSize, 0 );
40 fgInputSizer->Add(
m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
42 m_yEntry =
new wxTextCtrl(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
43 fgInputSizer->Add(
m_yEntry, 0, wxEXPAND|wxTOP, 5 );
45 m_yUnit =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
47 fgInputSizer->Add(
m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
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 );
52 m_rotLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Rotate:"), wxDefaultPosition, wxDefaultSize, 0 );
54 fgInputSizer->Add(
m_rotLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
56 m_rotEntry =
new wxTextCtrl(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
57 fgInputSizer->Add(
m_rotEntry, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
59 m_rotUnit =
new wxStaticText(
this, wxID_ANY,
_(
"deg"), wxDefaultPosition, wxDefaultSize, 0 );
61 fgInputSizer->Add(
m_rotUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
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 );
67 fgInputSizer->Add( 0, 0, 1, wxEXPAND, 5 );
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 );
76 bMainSizer->Add( fgInputSizer, 0, wxEXPAND|wxALL, 10 );
78 m_staticline1 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
81 wxBoxSizer* bBottomSizer;
82 bBottomSizer =
new wxBoxSizer( wxHORIZONTAL );
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 );
97 bMainSizer->Add( bBottomSizer, 0, wxEXPAND, 5 );
wxStaticText * m_rotLabel
wxCheckBox * m_polarCoords
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
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 OnClear(wxCommandEvent &event)
~DIALOG_MOVE_EXACT_BASE()
wxStaticLine * m_staticline1
wxButton * m_stdButtonsCancel
virtual void OnTextFocusLost(wxFocusEvent &event)
virtual void OnPolarChanged(wxCommandEvent &event)
wxChoice * m_anchorOptions
virtual void OnTextChanged(wxCommandEvent &event)
wxButton * m_stdButtonsOK
wxStdDialogButtonSizer * m_stdButtons