14PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow* parent, wxWindowID
id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString&
name ) : wxPanel( parent, id, pos, size, style,
name )
16 wxBoxSizer* mainSizer;
17 mainSizer =
new wxBoxSizer( wxVERTICAL );
21 m_staticTextDefProp =
new wxStaticText(
this, wxID_ANY,
_(
"Default properties for new graphics and text:"), wxDefaultPosition, wxDefaultSize, 0 );
25 m_staticline11 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
31 m_grid =
new WX_GRID(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
34 m_grid->CreateGrid( 6, 6 );
35 m_grid->EnableEditing(
true );
36 m_grid->EnableGridLines(
true );
37 m_grid->EnableDragGridSize(
false );
38 m_grid->SetMargins( 0, 0 );
41 m_grid->SetColSize( 0, 140 );
42 m_grid->SetColSize( 1, 140 );
43 m_grid->SetColSize( 2, 140 );
44 m_grid->SetColSize( 3, 140 );
45 m_grid->SetColSize( 4, 80 );
46 m_grid->SetColSize( 5, 120 );
47 m_grid->EnableDragColMove(
false );
48 m_grid->EnableDragColSize(
true );
49 m_grid->SetColLabelValue( 0,
_(
"Line Thickness") );
50 m_grid->SetColLabelValue( 1,
_(
"Text Width") );
51 m_grid->SetColLabelValue( 2,
_(
"Text Height") );
52 m_grid->SetColLabelValue( 3,
_(
"Text Thickness") );
53 m_grid->SetColLabelValue( 4,
_(
"Italic") );
54 m_grid->SetColLabelValue( 5,
_(
"Keep Upright") );
56 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
59 m_grid->EnableDragRowSize(
false );
60 m_grid->SetRowLabelValue( 0,
_(
"Silk Layers") );
61 m_grid->SetRowLabelValue( 1,
_(
"Copper Layers") );
62 m_grid->SetRowLabelValue( 2,
_(
"Edge Cuts") );
63 m_grid->SetRowLabelValue( 3,
_(
"Courtyards") );
64 m_grid->SetRowLabelValue( 4,
_(
"Fab Layers") );
65 m_grid->SetRowLabelValue( 5,
_(
"Other Layers") );
66 m_grid->SetRowLabelSize( 132 );
67 m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
72 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
76 m_gridSizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
78 m_staticTextDefPropDim =
new wxStaticText(
this, wxID_ANY,
_(
"Default properties for new dimension objects:"), wxDefaultPosition, wxDefaultSize, 0 );
82 m_staticline1 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
85 wxGridBagSizer* gbSizer1;
86 gbSizer1 =
new wxGridBagSizer( 0, 5 );
87 gbSizer1->SetFlexibleDirection( wxVERTICAL );
88 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
90 m_lblDimensionUnits =
new wxStaticText(
this, wxID_ANY,
_(
"Units:"), wxDefaultPosition, wxDefaultSize, 0 );
92 gbSizer1->Add(
m_lblDimensionUnits, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
94 wxString m_dimensionUnitsChoices[] = {
_(
"Inches"),
_(
"Mils"),
_(
"Millimeters"),
_(
"Automatic") };
95 int m_dimensionUnitsNChoices =
sizeof( m_dimensionUnitsChoices ) /
sizeof( wxString );
96 m_dimensionUnits =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionUnitsNChoices, m_dimensionUnitsChoices, 0 );
98 m_dimensionUnits->SetToolTip(
_(
"Default units for dimensions (\"automatic\" to follow the chosen UI units)") );
100 gbSizer1->Add(
m_dimensionUnits, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
103 gbSizer1->Add( 0, 0, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
105 m_lblTextPositionMode =
new wxStaticText(
this, wxID_ANY,
_(
"Text position:"), wxDefaultPosition, wxDefaultSize, 0 );
107 gbSizer1->Add(
m_lblTextPositionMode, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 4 );
109 wxString m_dimensionTextPositionModeChoices[] = {
_(
"Outside"),
_(
"Inline") };
110 int m_dimensionTextPositionModeNChoices =
sizeof( m_dimensionTextPositionModeChoices ) /
sizeof( wxString );
111 m_dimensionTextPositionMode =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionTextPositionModeNChoices, m_dimensionTextPositionModeChoices, 0 );
115 gbSizer1->Add(
m_dimensionTextPositionMode, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
119 gbSizer1->Add(
m_lblDimensionUnitsFormat, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
121 wxString m_dimensionUnitsFormatChoices[] = {
_(
"1234"),
_(
"1234 mm"),
_(
"1234 (mm)") };
122 int m_dimensionUnitsFormatNChoices =
sizeof( m_dimensionUnitsFormatChoices ) /
sizeof( wxString );
123 m_dimensionUnitsFormat =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionUnitsFormatNChoices, m_dimensionUnitsFormatChoices, 0 );
125 gbSizer1->Add(
m_dimensionUnitsFormat, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
130 gbSizer1->Add(
m_dimensionTextKeepAligned, wxGBPosition( 1, 3 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT, 5 );
134 gbSizer1->Add(
m_lblDimensionPrecision, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
136 wxString m_dimensionPrecisionChoices[] = {
_(
"0"),
_(
"0.0"),
_(
"0.00"),
_(
"0.000"),
_(
"0.0000"),
_(
"0.00000") };
137 int m_dimensionPrecisionNChoices =
sizeof( m_dimensionPrecisionChoices ) /
sizeof( wxString );
138 m_dimensionPrecision =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionPrecisionNChoices, m_dimensionPrecisionChoices, 0 );
142 gbSizer1->Add(
m_dimensionPrecision, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
144 m_lblArrowLength =
new wxStaticText(
this, wxID_ANY,
_(
"Arrow length:"), wxDefaultPosition, wxDefaultSize, 0 );
146 gbSizer1->Add(
m_lblArrowLength, wxGBPosition( 2, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
148 m_dimensionArrowLength =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
149 gbSizer1->Add(
m_dimensionArrowLength, wxGBPosition( 2, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
151 m_arrowLengthUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
153 gbSizer1->Add(
m_arrowLengthUnits, wxGBPosition( 2, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
155 m_dimensionSuppressZeroes =
new wxCheckBox(
this, wxID_ANY,
_(
"Suppress trailing zeroes"), wxDefaultPosition, wxDefaultSize, 0 );
156 m_dimensionSuppressZeroes->SetToolTip(
_(
"When checked, \"1.2300\" will be rendered as \"1.23\" even if precision is set to show more digits") );
158 gbSizer1->Add(
m_dimensionSuppressZeroes, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
160 m_lblExtensionOffset =
new wxStaticText(
this, wxID_ANY,
_(
"Extension line offset:"), wxDefaultPosition, wxDefaultSize, 0 );
162 gbSizer1->Add(
m_lblExtensionOffset, wxGBPosition( 3, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
165 gbSizer1->Add(
m_dimensionExtensionOffset, wxGBPosition( 3, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
172 m_gridSizer->Add( gbSizer1, 1, wxEXPAND|wxTOP, 5 );
178 this->SetSizer( mainSizer );
180 mainSizer->Fit(
this );
wxChoice * m_dimensionUnitsFormat
wxStaticText * m_staticTextDefPropDim
wxStaticText * m_lblDimensionPrecision
wxChoice * m_dimensionUnits
wxCheckBox * m_dimensionSuppressZeroes
wxStaticText * m_lblDimensionUnits
wxStaticText * m_arrowLengthUnits
wxTextCtrl * m_dimensionExtensionOffset
PANEL_SETUP_TEXT_AND_GRAPHICS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
wxCheckBox * m_dimensionTextKeepAligned
wxChoice * m_dimensionTextPositionMode
wxStaticText * m_lblExtensionOffset
wxStaticText * m_dimensionExtensionOffsetUnits
wxChoice * m_dimensionPrecision
wxStaticLine * m_staticline11
wxStaticText * m_lblArrowLength
~PANEL_SETUP_TEXT_AND_GRAPHICS_BASE()
wxStaticText * m_lblDimensionUnitsFormat
wxStaticText * m_lblTextPositionMode
wxStaticLine * m_staticline1
wxStaticText * m_staticTextDefProp
wxTextCtrl * m_dimensionArrowLength
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...