16DIALOG_SHEET_PROPERTIES_BASE::DIALOG_SHEET_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 )
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
20 wxBoxSizer* mainSizer;
21 mainSizer =
new wxBoxSizer( wxVERTICAL );
24 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
28 mainSizer->Add(
m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
32 wxStaticBoxSizer* sbFields;
33 sbFields =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Fields") ), wxVERTICAL );
35 m_grid =
new WX_GRID( sbFields->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
38 m_grid->CreateGrid( 4, 13 );
39 m_grid->EnableEditing(
true );
40 m_grid->EnableGridLines(
true );
41 m_grid->EnableDragGridSize(
false );
42 m_grid->SetMargins( 0, 0 );
45 m_grid->SetColSize( 0, 72 );
46 m_grid->SetColSize( 1, 120 );
47 m_grid->SetColSize( 2, 48 );
48 m_grid->SetColSize( 3, 72 );
49 m_grid->SetColSize( 4, 72 );
50 m_grid->SetColSize( 5, 48 );
51 m_grid->SetColSize( 6, 48 );
52 m_grid->SetColSize( 7, 84 );
53 m_grid->SetColSize( 8, 84 );
54 m_grid->SetColSize( 9, 84 );
55 m_grid->SetColSize( 10, 84 );
56 m_grid->SetColSize( 11, 140 );
57 m_grid->SetColSize( 12, 48 );
58 m_grid->EnableDragColMove(
false );
59 m_grid->EnableDragColSize(
true );
60 m_grid->SetColLabelValue( 0,
_(
"Name") );
61 m_grid->SetColLabelValue( 1,
_(
"Value") );
62 m_grid->SetColLabelValue( 2,
_(
"Show") );
63 m_grid->SetColLabelValue( 3,
_(
"H Align") );
64 m_grid->SetColLabelValue( 4,
_(
"V Align") );
65 m_grid->SetColLabelValue( 5,
_(
"Italic") );
66 m_grid->SetColLabelValue( 6,
_(
"Bold") );
67 m_grid->SetColLabelValue( 7,
_(
"Text Size") );
68 m_grid->SetColLabelValue( 8,
_(
"Orientation") );
69 m_grid->SetColLabelValue( 9,
_(
"X Position") );
70 m_grid->SetColLabelValue( 10,
_(
"Y Position") );
71 m_grid->SetColLabelValue( 11,
_(
"Font") );
72 m_grid->SetColLabelValue( 12,
_(
"Color") );
74 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
77 m_grid->EnableDragRowSize(
true );
78 m_grid->SetRowLabelSize( 0 );
79 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
84 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
85 m_grid->SetMinSize( wxSize( -1,120 ) );
87 sbFields->Add(
m_grid, 1, wxALL|wxEXPAND, 5 );
89 wxBoxSizer* bButtonSize;
90 bButtonSize =
new wxBoxSizer( wxHORIZONTAL );
92 m_bpAdd =
new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
93 m_bpAdd->SetToolTip(
_(
"Add field") );
95 bButtonSize->Add(
m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
97 m_bpMoveUp =
new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
100 bButtonSize->Add(
m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
105 bButtonSize->Add(
m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
108 bButtonSize->Add( 20, 0, 0, wxEXPAND, 10 );
110 m_bpDelete =
new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
113 bButtonSize->Add(
m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
116 bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
119 sbFields->Add( bButtonSize, 0, wxALL|wxEXPAND, 5 );
122 m_longForm->Add( sbFields, 1, wxALL|wxEXPAND, 5 );
125 bSizer5 =
new wxBoxSizer( wxHORIZONTAL );
127 wxStaticBoxSizer* sbAttributes;
128 sbAttributes =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Attributes") ), wxVERTICAL );
131 bSizer6 =
new wxBoxSizer( wxHORIZONTAL );
133 m_pageNumberStaticText =
new wxStaticText( sbAttributes->GetStaticBox(), wxID_ANY,
_(
"Page number:"), wxDefaultPosition, wxDefaultSize, 0 );
137 m_pageNumberTextCtrl =
new wxTextCtrl( sbAttributes->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
141 bSizer6->Add( 0, 0, 3, wxEXPAND, 5 );
144 sbAttributes->Add( bSizer6, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 10 );
146 m_cbExcludeFromSim =
new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from simulation"), wxDefaultPosition, wxDefaultSize, 0 );
150 sbAttributes->Add( 0, 10, 0, wxEXPAND, 5 );
152 m_cbExcludeFromBom =
new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
153 m_cbExcludeFromBom->SetToolTip(
_(
"This is useful for adding symbols for board footprints such as fiducials\nand logos that you do not want to appear in the bill of materials export") );
157 m_cbExcludeFromBoard =
new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
158 m_cbExcludeFromBoard->SetToolTip(
_(
"This is useful for adding symbols that only get exported to the bill of materials but\nnot required to layout the board such as mechanical fasteners and enclosures") );
162 m_cbDNP =
new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY,
_(
"Do not populate"), wxDefaultPosition, wxDefaultSize, 0 );
163 sbAttributes->Add(
m_cbDNP, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
166 bSizer5->Add( sbAttributes, 0, wxEXPAND|wxRIGHT, 5 );
168 wxStaticBoxSizer* sbSizer2;
169 sbSizer2 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Style") ), wxVERTICAL );
171 wxBoxSizer* bStyleColumns;
172 bStyleColumns =
new wxBoxSizer( wxHORIZONTAL );
174 wxBoxSizer* bBorderSizer;
175 bBorderSizer =
new wxBoxSizer( wxVERTICAL );
177 m_borderLabel =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Border"), wxDefaultPosition, wxDefaultSize, 0 );
181 wxBoxSizer* bSizer10;
182 bSizer10 =
new wxBoxSizer( wxHORIZONTAL );
184 m_borderWidthLabel =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Width:"), wxDefaultPosition, wxDefaultSize, 0 );
188 m_borderWidthCtrl =
new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
189 bSizer10->Add(
m_borderWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
191 m_borderWidthUnits =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
196 bSizer10->Add( 20, 0, 0, wxEXPAND, 5 );
198 m_borderColorLabel =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Color:"), wxDefaultPosition, wxDefaultSize, 0 );
203 m_borderSwatch->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
209 bBorderSizer->Add( bSizer10, 1, wxEXPAND, 5 );
212 bStyleColumns->Add( bBorderSizer, 2, wxEXPAND, 5 );
214 wxBoxSizer* bFillSizer;
215 bFillSizer =
new wxBoxSizer( wxVERTICAL );
217 m_fillLabel =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Fill"), wxDefaultPosition, wxDefaultSize, 0 );
221 wxBoxSizer* bSizer11;
222 bSizer11 =
new wxBoxSizer( wxHORIZONTAL );
224 m_backgroundColorLabel =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Color:"), wxDefaultPosition, wxDefaultSize, 0 );
234 bFillSizer->Add( bSizer11, 1, wxEXPAND, 5 );
237 bStyleColumns->Add( bFillSizer, 1, wxEXPAND, 5 );
240 sbSizer2->Add( bStyleColumns, 0, wxEXPAND, 5 );
243 bSizer5->Add( sbSizer2, 1, wxEXPAND|wxLEFT, 10 );
246 m_longForm->Add( bSizer5, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
249 mainSizer->Add(
m_longForm, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
253 m_hierarchicalPathLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Hierarchical path:"), wxDefaultPosition, wxDefaultSize, 0 );
257 m_hierarchicalPath =
new wxStaticText(
this, wxID_ANY,
_(
"path"), wxDefaultPosition, wxDefaultSize, 0 );
274 this->SetSizer( mainSizer );
276 mainSizer->Fit(
this );
A simple color swatch of the kind used to set layer colors.
wxCheckBox * m_cbExcludeFromSim
wxStaticText * m_borderWidthLabel
virtual void OnDeleteField(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
STD_BITMAP_BUTTON * m_bpMoveUp
wxTextCtrl * m_pageNumberTextCtrl
wxTextCtrl * m_borderWidthCtrl
~DIALOG_SHEET_PROPERTIES_BASE()
wxStaticText * m_fillLabel
wxCheckBox * m_cbExcludeFromBom
wxStaticText * m_borderWidthUnits
COLOR_SWATCH * m_backgroundSwatch
wxStaticText * m_hierarchicalPath
wxStaticText * m_borderLabel
virtual void OnAddField(wxCommandEvent &event)
virtual void OnMoveUp(wxCommandEvent &event)
wxStaticText * m_pageNumberStaticText
wxButton * m_stdDialogButtonSizerOK
wxCheckBox * m_cbExcludeFromBoard
STD_BITMAP_BUTTON * m_bpAdd
virtual void OnMoveDown(wxCommandEvent &event)
wxStdDialogButtonSizer * m_stdDialogButtonSizer
wxBoxSizer * m_sizerBottom
wxButton * m_stdDialogButtonSizerCancel
virtual void OnCheckBox(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_bpDelete
wxStaticText * m_backgroundColorLabel
COLOR_SWATCH * m_borderSwatch
virtual void OnInitDlg(wxInitDialogEvent &event)
wxStaticText * m_borderColorLabel
DIALOG_SHEET_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Sheet Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU)
virtual void OnSizeGrid(wxSizeEvent &event)
wxStaticText * m_hierarchicalPathLabel
STD_BITMAP_BUTTON * m_bpMoveDown
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
A modified version of the wxInfoBar class that allows us to: