15DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
DIALOG_SHIM( parent, id, title, pos, size, style )
17 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
19 wxBoxSizer* bMainSizer;
20 bMainSizer =
new wxBoxSizer( wxVERTICAL );
22 m_nbPages =
new wxNotebook(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
23 m_panelEdit =
new wxPanel(
m_nbPages, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
24 wxBoxSizer* bEditSizer;
25 bEditSizer =
new wxBoxSizer( wxVERTICAL );
31 wxBoxSizer* bLeftSizer;
32 bLeftSizer =
new wxBoxSizer( wxVERTICAL );
37 bLeftSizer->Add(
m_fieldsCtrl, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
39 wxBoxSizer* bFieldsButtons;
40 bFieldsButtons =
new wxBoxSizer( wxHORIZONTAL );
49 bFieldsButtons->Add( 15, 0, 0, wxEXPAND, 5 );
55 bLeftSizer->Add( bFieldsButtons, 0, wxEXPAND, 5 );
58 bPresets =
new wxBoxSizer( wxVERTICAL );
61 bPresets->Add(
m_staticline1, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
67 wxString m_cbBomPresetsChoices[] = {
_(
"Default"),
_(
"(unsaved)") };
68 int m_cbBomPresetsNChoices =
sizeof( m_cbBomPresetsChoices ) /
sizeof( wxString );
69 m_cbBomPresets =
new wxChoice(
m_leftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cbBomPresetsNChoices, m_cbBomPresetsChoices, 0 );
71 bPresets->Add(
m_cbBomPresets, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 4 );
74 bLeftSizer->Add( bPresets, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
81 wxBoxSizer* bRightSizer;
82 bRightSizer =
new wxBoxSizer( wxVERTICAL );
84 wxBoxSizer* bControls;
85 bControls =
new wxBoxSizer( wxHORIZONTAL );
87 m_filter =
new wxSearchCtrl(
m_rightPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
92 m_filter->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false, wxEmptyString ) );
93 m_filter->SetMinSize( wxSize( 140,-1 ) );
95 bControls->Add(
m_filter, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
112 m_groupSymbolsBox->SetToolTip(
_(
"Group symbols together based on common properties") );
122 bControls->Add(
m_bRefresh, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
125 bRightSizer->Add( bControls, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
130 m_grid->CreateGrid( 5, 5 );
131 m_grid->EnableEditing(
true );
132 m_grid->EnableGridLines(
true );
133 m_grid->EnableDragGridSize(
false );
134 m_grid->SetMargins( 0, 0 );
137 m_grid->EnableDragColMove(
true );
138 m_grid->EnableDragColSize(
true );
140 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
143 m_grid->EnableDragRowSize(
false );
144 m_grid->SetRowLabelSize( 0 );
145 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
150 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
151 m_grid->SetMinSize( wxSize( 400,200 ) );
153 bRightSizer->Add(
m_grid, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
156 bRightSizer->Add(
m_staticline7, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
158 wxFlexGridSizer* fgSizer1;
159 fgSizer1 =
new wxFlexGridSizer( 0, 4, 0, 0 );
160 fgSizer1->SetFlexibleDirection( wxBOTH );
161 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
165 fgSizer1->Add(
m_scopeLabel, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
168 fgSizer1->Add(
m_radioProject, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
181 fgSizer1->Add(
m_radioHighlight, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
184 fgSizer1->Add(
m_radioSelect, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
187 fgSizer1->Add(
m_radioOff, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
190 bRightSizer->Add( fgSizer1, 0, 0, 5 );
205 wxGridBagSizer* gbExport;
206 gbExport =
new wxGridBagSizer( 0, 5 );
207 gbExport->SetFlexibleDirection( wxBOTH );
208 gbExport->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
210 wxGridBagSizer* gbExportOptions;
211 gbExportOptions =
new wxGridBagSizer( 4, 5 );
212 gbExportOptions->SetFlexibleDirection( wxBOTH );
213 gbExportOptions->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
217 gbExportOptions->Add(
m_labelFieldDelimiter, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
222 gbExportOptions->Add(
m_textFieldDelimiter, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
226 gbExportOptions->Add(
m_labelStringDelimiter, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
231 gbExportOptions->Add(
m_textStringDelimiter, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
235 gbExportOptions->Add(
m_labelRefDelimiter, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
240 gbExportOptions->Add(
m_textRefDelimiter, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
244 gbExportOptions->Add(
m_labelRefRangeDelimiter, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
250 gbExportOptions->Add(
m_textRefRangeDelimiter, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
253 gbExportOptions->Add(
m_checkKeepTabs, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
256 gbExportOptions->Add(
m_checkKeepLineBreaks, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
259 gbExportOptions->Add(
m_staticline2, wxGBPosition( 7, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxTOP|wxBOTTOM, 5 );
265 wxString m_cbBomFmtPresetsChoices[] = {
_(
"Default"),
_(
"(unsaved)") };
266 int m_cbBomFmtPresetsNChoices =
sizeof( m_cbBomFmtPresetsChoices ) /
sizeof( wxString );
267 m_cbBomFmtPresets =
new wxChoice(
m_panelExport, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cbBomFmtPresetsNChoices, m_cbBomFmtPresetsChoices, 0 );
269 gbExportOptions->Add(
m_cbBomFmtPresets, wxGBPosition( 9, 0 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
272 gbExport->Add( gbExportOptions, wxGBPosition( 0, 0 ), wxGBSpan( 3, 1 ), wxEXPAND|wxALL, 5 );
274 wxBoxSizer* bOutputDirectory;
275 bOutputDirectory =
new wxBoxSizer( wxHORIZONTAL );
282 bOutputDirectory->Add(
m_outputFileName, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
287 bOutputDirectory->Add(
m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
290 gbExport->Add( bOutputDirectory, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM, 10 );
292 wxBoxSizer* bPreview;
293 bPreview =
new wxBoxSizer( wxHORIZONTAL );
297 bPreview->Add(
m_labelPreview, 0, wxALIGN_BOTTOM|wxTOP|wxRIGHT|wxLEFT, 5 );
300 bPreview->Add( 0, 0, 1, wxEXPAND, 5 );
308 gbExport->Add( bPreview, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM, 3 );
310 m_textOutput =
new wxTextCtrl(
m_panelExport, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY );
311 m_textOutput->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false, wxEmptyString ) );
313 gbExport->Add(
m_textOutput, wxGBPosition( 2, 1 ), wxGBSpan( 2, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
316 gbExport->AddGrowableCol( 1 );
317 gbExport->AddGrowableRow( 3 );
324 bMainSizer->Add(
m_nbPages, 1, wxEXPAND | wxALL, 5 );
326 wxBoxSizer* bButtonsSizer;
327 bButtonsSizer =
new wxBoxSizer( wxHORIZONTAL );
330 bButtonsSizer->Add( 0, 0, 9, wxEXPAND, 5 );
332 m_buttonExport =
new wxButton(
this, wxID_ANY,
_(
"Export"), wxDefaultPosition, wxDefaultSize, 0 );
333 bButtonsSizer->Add(
m_buttonExport, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
335 m_buttonApply =
new wxButton(
this, wxID_ANY,
_(
"Apply, Save Schematic && Continue"), wxDefaultPosition, wxDefaultSize, 0 );
336 bButtonsSizer->Add(
m_buttonApply, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
345 bButtonsSizer->Add(
m_sdbSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
348 bMainSizer->Add( bButtonsSizer, 0, wxEXPAND, 5 );
351 this->SetSizer( bMainSizer );
353 bMainSizer->Fit(
this );
355 this->Centre( wxBOTH );
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
wxRadioButton * m_radioRecursive
virtual void OnCancel(wxCommandEvent &event)
virtual void OnTableValueChanged(wxGridEvent &event)
wxStaticText * m_labelRefDelimiter
wxCheckBox * m_checkShowExcluded
wxCheckBox * m_checkKeepLineBreaks
wxStaticLine * m_staticline1
wxStdDialogButtonSizer * m_sdbSizer
STD_BITMAP_BUTTON * m_bRefreshPreview
wxButton * m_sdbSizerCancel
virtual void OnPageChanged(wxNotebookEvent &event)
virtual void OnRegroupSymbols(wxCommandEvent &event)
virtual void OnScopeChanged(wxCommandEvent &event)
wxRadioButton * m_radioOff
virtual void OnFilterMouseMoved(wxMouseEvent &event)
wxStaticText * m_labelOutputDirectory
wxStaticText * m_scopeLabel
virtual void OnFieldsCtrlSelectionChanged(wxDataViewEvent &event)
wxStaticText * m_bomPresetsLabel
DIALOG_SYMBOL_FIELDS_TABLE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Symbol Fields Table"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER)
wxCheckBox * m_checkKeepTabs
wxStaticLine * m_staticline3
wxStaticLine * m_staticline31
wxStaticText * m_labelFieldDelimiter
wxButton * m_buttonExport
STD_BITMAP_BUTTON * m_removeFieldButton
virtual void OnClose(wxCloseEvent &event)
wxStaticLine * m_staticline2
STD_BITMAP_BUTTON * m_browseButton
wxRadioButton * m_radioSelect
wxTextCtrl * m_textOutput
wxStaticText * m_labelStringDelimiter
wxStaticText * m_crossProbeLabel
virtual void OnTableCellClick(wxGridEvent &event)
virtual void OnColumnItemToggled(wxDataViewEvent &event)
STD_BITMAP_BUTTON * m_bRefresh
virtual void OnOutputFileBrowseClicked(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_renameFieldButton
STD_BITMAP_BUTTON * m_addFieldButton
wxTextCtrl * m_textStringDelimiter
virtual void OnGroupSymbolsToggled(wxCommandEvent &event)
wxChoice * m_cbBomPresets
wxTextCtrl * m_outputFileName
wxSplitterWindow * m_splitterMainWindow
virtual void OnExport(wxCommandEvent &event)
~DIALOG_SYMBOL_FIELDS_TABLE_BASE()
wxDataViewListCtrl * m_fieldsCtrl
wxCheckBox * m_checkExcludeDNP
virtual void OnSizeFieldList(wxSizeEvent &event)
wxRadioButton * m_radioCurrentSheet
wxTextCtrl * m_textFieldDelimiter
wxCheckBox * m_groupSymbolsBox
virtual void OnTableItemContextMenu(wxGridEvent &event)
virtual void OnExcludeDNPToggled(wxCommandEvent &event)
virtual void OnOk(wxCommandEvent &event)
virtual void OnShowExcludedToggled(wxCommandEvent &event)
virtual void OnRenameField(wxCommandEvent &event)
virtual void OnPreviewRefresh(wxCommandEvent &event)
wxRadioButton * m_radioHighlight
wxStaticText * m_labelPreview
wxStaticText * m_labelBomExportPresets
wxTextCtrl * m_textRefRangeDelimiter
wxRadioButton * m_radioProject
wxStaticLine * m_staticline7
virtual void OnTableColSize(wxGridSizeEvent &event)
virtual void OnAddField(wxCommandEvent &event)
virtual void OnFilterText(wxCommandEvent &event)
wxStaticLine * m_staticline32
virtual void OnSaveAndContinue(wxCommandEvent &event)
virtual void OnRemoveField(wxCommandEvent &event)
wxStaticText * m_labelRefRangeDelimiter
wxChoice * m_cbBomFmtPresets
wxTextCtrl * m_textRefDelimiter
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
#define OPT_GROUP_COMPONENTS