12DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE::DIALOG_NONCOPPER_ZONES_PROPERTIES_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( wxDefaultSize, wxDefaultSize );
16 wxBoxSizer* m_MainSizer;
17 m_MainSizer =
new wxBoxSizer( wxVERTICAL );
19 wxBoxSizer* m_UpperSizer;
20 m_UpperSizer =
new wxBoxSizer( wxHORIZONTAL );
22 wxBoxSizer* bSizerLeft;
23 bSizerLeft =
new wxBoxSizer( wxVERTICAL );
29 m_layers =
new wxDataViewListCtrl(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER|wxBORDER_SIMPLE );
30 m_layers->SetMinSize( wxSize( 100,-1 ) );
32 bSizerLeft->Add(
m_layers, 1, wxALL|wxEXPAND, 5 );
35 bSizerLeft->Add( 0, 5, 0, wxEXPAND, 5 );
38 m_UpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
40 wxBoxSizer* bSizerMiddle;
41 bSizerMiddle =
new wxBoxSizer( wxVERTICAL );
43 wxStaticBoxSizer* sbShape;
44 sbShape =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Shape") ), wxVERTICAL );
46 wxGridBagSizer* gbSizer1;
47 gbSizer1 =
new wxGridBagSizer( 0, 0 );
48 gbSizer1->SetFlexibleDirection( wxBOTH );
49 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
50 gbSizer1->SetEmptyCellSize( wxSize( -1,6 ) );
52 m_cbLocked =
new wxCheckBox( sbShape->GetStaticBox(), wxID_ANY,
_(
"Locked"), wxDefaultPosition, wxDefaultSize, 0 );
53 gbSizer1->Add(
m_cbLocked, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
55 m_staticTextStyle =
new wxStaticText( sbShape->GetStaticBox(), wxID_ANY,
_(
"Outline style:"), wxDefaultPosition, wxDefaultSize, 0 );
57 gbSizer1->Add(
m_staticTextStyle, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
59 wxString m_OutlineDisplayCtrlChoices[] = {
_(
"Line"),
_(
"Hatched"),
_(
"Fully hatched") };
60 int m_OutlineDisplayCtrlNChoices =
sizeof( m_OutlineDisplayCtrlChoices ) /
sizeof( wxString );
61 m_OutlineDisplayCtrl =
new wxChoice( sbShape->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_OutlineDisplayCtrlNChoices, m_OutlineDisplayCtrlChoices, 0 );
63 gbSizer1->Add(
m_OutlineDisplayCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
65 m_stBorderHatchPitchText =
new wxStaticText( sbShape->GetStaticBox(), wxID_ANY,
_(
"Outline hatch pitch:"), wxDefaultPosition, wxDefaultSize, 0 );
69 m_outlineHatchPitchCtrl =
new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
70 gbSizer1->Add(
m_outlineHatchPitchCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
72 m_outlineHatchUnits =
new wxStaticText( sbShape->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
74 gbSizer1->Add(
m_outlineHatchUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
76 m_MinWidthLabel =
new wxStaticText( sbShape->GetStaticBox(), wxID_ANY,
_(
"Minimum width:"), wxDefaultPosition, wxDefaultSize, 0 );
78 gbSizer1->Add(
m_MinWidthLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
80 m_MinWidthCtrl =
new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
81 gbSizer1->Add(
m_MinWidthCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
83 m_MinWidthUnits =
new wxStaticText( sbShape->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
85 gbSizer1->Add(
m_MinWidthUnits, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
87 m_staticTextSmoothing =
new wxStaticText( sbShape->GetStaticBox(), wxID_ANY,
_(
"Corner smoothing:"), wxDefaultPosition, wxDefaultSize, 0 );
89 gbSizer1->Add(
m_staticTextSmoothing, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
91 wxString m_cornerSmoothingChoiceChoices[] = {
_(
"None"),
_(
"Chamfer"),
_(
"Fillet") };
92 int m_cornerSmoothingChoiceNChoices =
sizeof( m_cornerSmoothingChoiceChoices ) /
sizeof( wxString );
93 m_cornerSmoothingChoice =
new wxChoice( sbShape->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerSmoothingChoiceNChoices, m_cornerSmoothingChoiceChoices, 0 );
95 gbSizer1->Add(
m_cornerSmoothingChoice, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
97 m_cornerRadiusLabel =
new wxStaticText( sbShape->GetStaticBox(), wxID_ANY,
_(
"Chamfer distance:"), wxDefaultPosition, wxDefaultSize, 0 );
99 gbSizer1->Add(
m_cornerRadiusLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
101 m_cornerRadiusCtrl =
new wxTextCtrl( sbShape->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
102 gbSizer1->Add(
m_cornerRadiusCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
104 m_cornerRadiusUnits =
new wxStaticText( sbShape->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
106 gbSizer1->Add(
m_cornerRadiusUnits, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
109 gbSizer1->AddGrowableCol( 1 );
111 sbShape->Add( gbSizer1, 0, wxEXPAND, 5 );
114 bSizerMiddle->Add( sbShape, 0, wxEXPAND|wxBOTTOM, 5 );
116 wxStaticBoxSizer* sbFill;
117 sbFill =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Fill") ), wxVERTICAL );
119 wxFlexGridSizer* fgSizer1;
120 fgSizer1 =
new wxFlexGridSizer( 0, 3, 0, 0 );
121 fgSizer1->AddGrowableCol( 1 );
122 fgSizer1->SetFlexibleDirection( wxBOTH );
123 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
125 m_staticTextGridFillType =
new wxStaticText( sbFill->GetStaticBox(), wxID_ANY,
_(
"Fill type:"), wxDefaultPosition, wxDefaultSize, 0 );
129 wxString m_GridStyleCtrlChoices[] = {
_(
"Solid fill"),
_(
"Hatch pattern") };
130 int m_GridStyleCtrlNChoices =
sizeof( m_GridStyleCtrlChoices ) /
sizeof( wxString );
131 m_GridStyleCtrl =
new wxChoice( sbFill->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_GridStyleCtrlNChoices, m_GridStyleCtrlChoices, 0 );
133 fgSizer1->Add(
m_GridStyleCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
136 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
138 m_hatchOrientLabel =
new wxStaticText( sbFill->GetStaticBox(), wxID_ANY,
_(
"Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
140 fgSizer1->Add(
m_hatchOrientLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
142 m_hatchOrientCtrl =
new wxTextCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
143 fgSizer1->Add(
m_hatchOrientCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
145 m_hatchOrientUnits =
new wxStaticText( sbFill->GetStaticBox(), wxID_ANY,
_(
"degree"), wxDefaultPosition, wxDefaultSize, 0 );
149 m_hatchWidthLabel =
new wxStaticText( sbFill->GetStaticBox(), wxID_ANY,
_(
"Hatch width:"), wxDefaultPosition, wxDefaultSize, 0 );
151 fgSizer1->Add(
m_hatchWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
153 m_hatchWidthCtrl =
new wxTextCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
154 fgSizer1->Add(
m_hatchWidthCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
156 m_hatchWidthUnits =
new wxStaticText( sbFill->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
158 fgSizer1->Add(
m_hatchWidthUnits, 0, wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
160 m_hatchGapLabel =
new wxStaticText( sbFill->GetStaticBox(), wxID_ANY,
_(
"Hatch gap:"), wxDefaultPosition, wxDefaultSize, 0 );
162 fgSizer1->Add(
m_hatchGapLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
164 m_hatchGapCtrl =
new wxTextCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
165 fgSizer1->Add(
m_hatchGapCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
167 m_hatchGapUnits =
new wxStaticText( sbFill->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
169 fgSizer1->Add(
m_hatchGapUnits, 0, wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
171 m_smoothLevelLabel =
new wxStaticText( sbFill->GetStaticBox(), wxID_ANY,
_(
"Smoothing effort:"), wxDefaultPosition, wxDefaultSize, 0 );
173 m_smoothLevelLabel->SetToolTip(
_(
"Value of smoothing effort\n0 = no smoothing\n1 = chamfer\n2 = round corners\n3 = round corners (finer shape)") );
175 fgSizer1->Add(
m_smoothLevelLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
177 m_spinCtrlSmoothLevel =
new wxSpinCtrl( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 3, 0 );
178 fgSizer1->Add(
m_spinCtrlSmoothLevel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
181 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
183 m_smoothValueLabel =
new wxStaticText( sbFill->GetStaticBox(), wxID_ANY,
_(
"Smoothing amount:"), wxDefaultPosition, wxDefaultSize, 0 );
185 m_smoothValueLabel->SetToolTip(
_(
"Ratio between smoothed corners size and the gap between lines\n0 = no smoothing\n1.0 = max radius/chamfer size (half gap value)") );
189 m_spinCtrlSmoothValue =
new wxSpinCtrlDouble( sbFill->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1, 0.1, 0.1 );
191 fgSizer1->Add(
m_spinCtrlSmoothValue, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
194 sbFill->Add( fgSizer1, 0, wxEXPAND, 5 );
197 bSizerMiddle->Add( sbFill, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
200 m_UpperSizer->Add( bSizerMiddle, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
203 m_MainSizer->Add( m_UpperSizer, 1, wxEXPAND|wxALL, 5 );
215 this->SetSizer( m_MainSizer );
217 m_MainSizer->Fit(
this );
219 this->Centre( wxBOTH );
wxStaticText * m_smoothValueLabel
wxTextCtrl * m_hatchGapCtrl
wxStdDialogButtonSizer * m_sdbSizerButtons
wxStaticText * m_cornerRadiusUnits
wxStaticText * m_staticTextSmoothing
virtual void OnLayerSelection(wxDataViewEvent &event)
wxButton * m_sdbSizerButtonsCancel
wxStaticText * m_MinWidthUnits
wxStaticText * m_hatchWidthUnits
wxStaticText * m_staticTextStyle
wxStaticText * m_MinWidthLabel
wxStaticText * m_cornerRadiusLabel
wxStaticText * m_smoothLevelLabel
wxTextCtrl * m_hatchWidthCtrl
wxTextCtrl * m_MinWidthCtrl
wxStaticText * m_staticTextLayerSelection
wxSpinCtrl * m_spinCtrlSmoothLevel
wxSpinCtrlDouble * m_spinCtrlSmoothValue
wxStaticText * m_hatchGapUnits
wxChoice * m_cornerSmoothingChoice
wxTextCtrl * m_cornerRadiusCtrl
wxButton * m_sdbSizerButtonsOK
wxChoice * m_OutlineDisplayCtrl
wxDataViewListCtrl * m_layers
wxChoice * m_GridStyleCtrl
virtual void OnStyleSelection(wxCommandEvent &event)
wxTextCtrl * m_hatchOrientCtrl
wxStaticText * m_hatchOrientLabel
wxStaticText * m_staticTextGridFillType
wxStaticText * m_hatchGapLabel
virtual void OnUpdateUI(wxUpdateUIEvent &event)
wxStaticText * m_outlineHatchUnits
~DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE()
wxStaticText * m_stBorderHatchPitchText
wxStaticText * m_hatchOrientUnits
DIALOG_NONCOPPER_ZONES_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Non Copper Zone Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxBORDER_SUNKEN)
wxStaticText * m_hatchWidthLabel
wxTextCtrl * m_outlineHatchPitchCtrl
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...