ADDED: collapse/expand for view controls in SYMBOL_FIELDS_TABLE...

... and LIB_FIELDS_TABLE.
This commit is contained in:
Jeff Young 2025-09-06 19:06:36 +01:00
parent 922699f388
commit 5489daf279
14 changed files with 2443 additions and 2226 deletions

View File

@ -260,6 +260,8 @@ DIALOG_LIB_FIELDS_TABLE::DIALOG_LIB_FIELDS_TABLE( SYMBOL_EDIT_FRAME* parent, DIA
m_removeFieldButton->SetBitmap( KiBitmapBundle( BITMAPS::small_trash ) );
m_renameFieldButton->SetBitmap( KiBitmapBundle( BITMAPS::small_edit ) );
m_sidebarButton->SetBitmap( KiBitmapBundle( BITMAPS::left ) );
m_viewControlsDataModel = new VIEW_CONTROLS_GRID_DATA_MODEL( false );
m_viewControlsGrid->UseNativeColHeader( true );
@ -319,7 +321,15 @@ DIALOG_LIB_FIELDS_TABLE::DIALOG_LIB_FIELDS_TABLE( SYMBOL_EDIT_FRAME* parent, DIA
CallAfter( [this, cfg]()
{
m_splitterMainWindow->SetSashPosition( cfg.sash_pos );
if( cfg.sidebar_collapsed )
{
m_splitterMainWindow->Unsplit( m_leftPanel );
m_sidebarButton->SetBitmap( KiBitmapBundle( BITMAPS::right ) );
}
else
{
m_splitterMainWindow->SetSashPosition( cfg.sash_pos );
}
} );
Center();
@ -337,7 +347,11 @@ DIALOG_LIB_FIELDS_TABLE::~DIALOG_LIB_FIELDS_TABLE()
SYMBOL_EDITOR_SETTINGS::PANEL_LIB_FIELDS_TABLE& cfg = m_parent->libeditconfig()->m_LibFieldEditor;
cfg.view_controls_visible_columns = m_viewControlsGrid->GetShownColumnsAsString();
cfg.sash_pos = m_splitterMainWindow->GetSashPosition();
cfg.sidebar_collapsed = ( m_splitterMainWindow->GetSashPosition() == 0 );
if( !cfg.sidebar_collapsed )
cfg.sash_pos = m_splitterMainWindow->GetSashPosition();
for( int i = 0; i < m_grid->GetNumberCols(); i++ )
{
@ -902,6 +916,27 @@ void DIALOG_LIB_FIELDS_TABLE::OnSizeViewControlsGrid( wxSizeEvent& event )
}
void DIALOG_LIB_FIELDS_TABLE::OnSidebarToggle( wxCommandEvent& event )
{
SYMBOL_EDITOR_SETTINGS::PANEL_LIB_FIELDS_TABLE& cfg = m_parent->libeditconfig()->m_LibFieldEditor;
if( cfg.sidebar_collapsed )
{
cfg.sidebar_collapsed = false;
m_splitterMainWindow->SplitVertically( m_leftPanel, m_rightPanel, cfg.sash_pos );
m_sidebarButton->SetBitmap( KiBitmapBundle( BITMAPS::left ) );
}
else
{
cfg.sash_pos = m_splitterMainWindow->GetSashPosition();
cfg.sidebar_collapsed = true;
m_splitterMainWindow->Unsplit( m_leftPanel );
m_sidebarButton->SetBitmap( KiBitmapBundle( BITMAPS::right ) );
}
}
void DIALOG_LIB_FIELDS_TABLE::OnApply(wxCommandEvent& event)
{
TransferDataFromWindow();

View File

@ -76,6 +76,7 @@ private:
void OnTableItemContextMenu( wxGridEvent& event ) override;
void OnTableColSize( wxGridSizeEvent& event ) override;
void OnSidebarToggle( wxCommandEvent& event ) override;
void OnCancel( wxCommandEvent& event ) override;
void OnOk( wxCommandEvent& event ) override;
void OnApply( wxCommandEvent& event ) override;

View File

@ -63,7 +63,7 @@ DIALOG_LIB_FIELDS_TABLE_BASE::DIALOG_LIB_FIELDS_TABLE_BASE( wxWindow* parent, wx
m_viewControlsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
m_viewControlsGrid->SetMinSize( wxSize( -1,250 ) );
bLeftSizer->Add( m_viewControlsGrid, 1, wxALL|wxEXPAND, 5 );
bLeftSizer->Add( m_viewControlsGrid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bFieldsButtons;
bFieldsButtons = new wxBoxSizer( wxHORIZONTAL );
@ -81,7 +81,7 @@ DIALOG_LIB_FIELDS_TABLE_BASE::DIALOG_LIB_FIELDS_TABLE_BASE( wxWindow* parent, wx
bFieldsButtons->Add( m_removeFieldButton, 0, wxBOTTOM|wxLEFT, 5 );
bLeftSizer->Add( bFieldsButtons, 0, wxEXPAND, 5 );
bLeftSizer->Add( bFieldsButtons, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
m_leftPanel->SetSizer( bLeftSizer );
@ -152,6 +152,29 @@ DIALOG_LIB_FIELDS_TABLE_BASE::DIALOG_LIB_FIELDS_TABLE_BASE( wxWindow* parent, wx
bRightSizer->Add( m_grid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
m_sidebarButton = new STD_BITMAP_BUTTON( m_rightPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
bButtonsSizer->Add( m_sidebarButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
bButtonsSizer->Add( 0, 0, 9, wxEXPAND, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( m_rightPanel, wxID_OK );
m_sdbSizer->AddButton( m_sdbSizerOK );
m_sdbSizerApply = new wxButton( m_rightPanel, wxID_APPLY );
m_sdbSizer->AddButton( m_sdbSizerApply );
m_sdbSizerCancel = new wxButton( m_rightPanel, wxID_CANCEL );
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bButtonsSizer->Add( m_sdbSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
bRightSizer->Add( bButtonsSizer, 0, wxEXPAND, 5 );
m_rightPanel->SetSizer( bRightSizer );
m_rightPanel->Layout();
@ -162,26 +185,6 @@ DIALOG_LIB_FIELDS_TABLE_BASE::DIALOG_LIB_FIELDS_TABLE_BASE( wxWindow* parent, wx
bMainSizer->Add( bEditSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
bButtonsSizer->Add( 0, 0, 9, wxEXPAND, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
m_sdbSizer->AddButton( m_sdbSizerOK );
m_sdbSizerApply = new wxButton( this, wxID_APPLY );
m_sdbSizer->AddButton( m_sdbSizerApply );
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bButtonsSizer->Add( m_sdbSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
bMainSizer->Add( bButtonsSizer, 0, wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout();
@ -209,6 +212,7 @@ DIALOG_LIB_FIELDS_TABLE_BASE::DIALOG_LIB_FIELDS_TABLE_BASE( wxWindow* parent, wx
m_grid->Connect( wxEVT_GRID_COL_SIZE, wxGridSizeEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnTableColSize ), NULL, this );
m_grid->Connect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnEditorShown ), NULL, this );
m_grid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnTableSelectCell ), NULL, this );
m_sidebarButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnSidebarToggle ), NULL, this );
m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnApply ), NULL, this );
m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnCancel ), NULL, this );
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnOk ), NULL, this );
@ -236,6 +240,7 @@ DIALOG_LIB_FIELDS_TABLE_BASE::~DIALOG_LIB_FIELDS_TABLE_BASE()
m_grid->Disconnect( wxEVT_GRID_COL_SIZE, wxGridSizeEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnTableColSize ), NULL, this );
m_grid->Disconnect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnEditorShown ), NULL, this );
m_grid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnTableSelectCell ), NULL, this );
m_sidebarButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnSidebarToggle ), NULL, this );
m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnApply ), NULL, this );
m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnCancel ), NULL, this );
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_FIELDS_TABLE_BASE::OnOk ), NULL, this );

View File

@ -196,7 +196,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxGrid" expanded="true">
<property name="BottomDockable">1</property>
@ -286,8 +286,8 @@
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="border">2</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
@ -1028,6 +1028,123 @@
<event name="OnGridSelectCell">OnTableSelectCell</event>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bButtonsSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Remove Field...</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_sidebarButton</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnSidebarToggle</event>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">9</property>
<object class="spacer" expanded="false">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="false">
<property name="Apply">1</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick">OnApply</event>
<event name="OnCancelButtonClick">OnCancel</event>
<event name="OnOKButtonClick">OnOk</event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
@ -1035,48 +1152,6 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bButtonsSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">9</property>
<object class="spacer" expanded="false">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="false">
<property name="Apply">1</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick">OnApply</event>
<event name="OnCancelButtonClick">OnCancel</event>
<event name="OnOKButtonClick">OnOk</event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>

View File

@ -56,6 +56,7 @@ class DIALOG_LIB_FIELDS_TABLE_BASE : public DIALOG_SHIM
wxStaticLine* m_staticline311;
STD_BITMAP_BUTTON* m_bRefresh;
WX_GRID* m_grid;
STD_BITMAP_BUTTON* m_sidebarButton;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerApply;
@ -79,6 +80,7 @@ class DIALOG_LIB_FIELDS_TABLE_BASE : public DIALOG_SHIM
virtual void OnTableColSize( wxGridSizeEvent& event ) { event.Skip(); }
virtual void OnEditorShown( wxGridEvent& event ) { event.Skip(); }
virtual void OnTableSelectCell( wxGridEvent& event ) { event.Skip(); }
virtual void OnSidebarToggle( wxCommandEvent& event ) { event.Skip(); }
virtual void OnApply( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOk( wxCommandEvent& event ) { event.Skip(); }

View File

@ -208,6 +208,8 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent,
m_removeFieldButton->SetBitmap( KiBitmapBundle( BITMAPS::small_trash ) );
m_renameFieldButton->SetBitmap( KiBitmapBundle( BITMAPS::small_edit ) );
m_sidebarButton->SetBitmap( KiBitmapBundle( BITMAPS::left ) );
m_viewControlsDataModel = new VIEW_CONTROLS_GRID_DATA_MODEL( true );
m_viewControlsGrid->UseNativeColHeader( true );
@ -345,7 +347,15 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent,
CallAfter( [this, cfg]()
{
m_splitterMainWindow->SetSashPosition( cfg.sash_pos );
if( cfg.sidebar_collapsed )
{
m_splitterMainWindow->Unsplit( m_leftPanel );
m_sidebarButton->SetBitmap( KiBitmapBundle( BITMAPS::right ) );
}
else
{
m_splitterMainWindow->SetSashPosition( cfg.sash_pos );
}
} );
if( m_job )
@ -386,7 +396,11 @@ DIALOG_SYMBOL_FIELDS_TABLE::~DIALOG_SYMBOL_FIELDS_TABLE()
cfg.page = m_nbPages->GetSelection();
cfg.view_controls_visible_columns = m_viewControlsGrid->GetShownColumnsAsString();
cfg.sash_pos = m_splitterMainWindow->GetSashPosition();
cfg.sidebar_collapsed = ( m_splitterMainWindow->GetSashPosition() == 0 );
if( !cfg.sidebar_collapsed )
cfg.sash_pos = m_splitterMainWindow->GetSashPosition();
for( int i = 0; i < m_grid->GetNumberCols(); i++ )
{
@ -1039,7 +1053,12 @@ void DIALOG_SYMBOL_FIELDS_TABLE::ShowHideColumn( int aCol, bool aShow )
m_dataModel->SetShowColumn( aCol, aShow );
syncBomPresetSelection();
m_grid->ForceRefresh();
if( m_nbPages->GetSelection() == 1 )
PreviewRefresh();
else
m_grid->ForceRefresh();
OnModify();
}
@ -1063,8 +1082,12 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnViewControlsCellChanged( wxGridEvent& aEvent
m_dataModel->SetColLabelValue( dataCol, label );
m_grid->SetColLabelValue( dataCol, label );
if( m_nbPages->GetSelection() == 1 )
PreviewRefresh();
else
m_grid->ForceRefresh();
syncBomPresetSelection();
m_grid->ForceRefresh();
OnModify();
}
@ -1110,8 +1133,12 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnViewControlsCellChanged( wxGridEvent& aEvent
m_dataModel->SetGroupColumn( dataCol, value );
m_dataModel->RebuildRows();
if( m_nbPages->GetSelection() == 1 )
PreviewRefresh();
else
m_grid->ForceRefresh();
syncBomPresetSelection();
m_grid->ForceRefresh();
OnModify();
break;
}
@ -1338,6 +1365,27 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnOutputFileBrowseClicked( wxCommandEvent& even
}
void DIALOG_SYMBOL_FIELDS_TABLE::OnSidebarToggle( wxCommandEvent& event )
{
EESCHEMA_SETTINGS::PANEL_SYMBOL_FIELDS_TABLE& cfg = m_parent->eeconfig()->m_FieldEditorPanel;
if( cfg.sidebar_collapsed )
{
cfg.sidebar_collapsed = false;
m_splitterMainWindow->SplitVertically( m_leftPanel, m_rightPanel, cfg.sash_pos );
m_sidebarButton->SetBitmap( KiBitmapBundle( BITMAPS::left ) );
}
else
{
cfg.sash_pos = m_splitterMainWindow->GetSashPosition();
cfg.sidebar_collapsed = true;
m_splitterMainWindow->Unsplit( m_leftPanel );
m_sidebarButton->SetBitmap( KiBitmapBundle( BITMAPS::right ) );
}
}
void DIALOG_SYMBOL_FIELDS_TABLE::OnExport( wxCommandEvent& aEvent )
{
if( m_dataModel->IsEdited() )
@ -1937,7 +1985,11 @@ void DIALOG_SYMBOL_FIELDS_TABLE::doApplyBomPreset( const BOM_PRESET& aPreset )
// and labels are right, then we refresh the shown grid data to match
m_dataModel->EnableRebuilds();
m_dataModel->RebuildRows();
m_grid->ForceRefresh();
if( m_nbPages->GetSelection() == 1 )
PreviewRefresh();
else
m_grid->ForceRefresh();
}

View File

@ -82,6 +82,8 @@ private:
void OnTableValueChanged( wxGridEvent& event ) override;
void OnTableCellClick( wxGridEvent& event ) override;
void OnTableColSize( wxGridSizeEvent& event ) override;
void OnSidebarToggle( wxCommandEvent& event ) override;
void OnExport( wxCommandEvent& aEvent ) override;
void OnSaveAndContinue( wxCommandEvent& aEvent ) override;
void OnCancel( wxCommandEvent& aEvent ) override;

View File

@ -19,18 +19,16 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
m_nbPages = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_panelEdit = new wxPanel( m_nbPages, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bEditSizer;
bEditSizer = new wxBoxSizer( wxVERTICAL );
m_splitterMainWindow = new wxSplitterWindow( m_panelEdit, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME );
m_splitterMainWindow = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME );
m_splitterMainWindow->SetMinimumPaneSize( 120 );
m_leftPanel = new wxPanel( m_splitterMainWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bMargins;
bMargins = new wxBoxSizer( wxVERTICAL );
m_viewControlsGrid = new WX_GRID( m_leftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
@ -65,7 +63,7 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
m_viewControlsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
m_viewControlsGrid->SetMinSize( wxSize( -1,250 ) );
bLeftSizer->Add( m_viewControlsGrid, 1, wxALL|wxEXPAND, 5 );
bMargins->Add( m_viewControlsGrid, 1, wxEXPAND|wxTOP|wxLEFT, 5 );
wxBoxSizer* bFieldsButtons;
bFieldsButtons = new wxBoxSizer( wxHORIZONTAL );
@ -89,17 +87,17 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
bFieldsButtons->Add( m_removeFieldButton, 0, wxBOTTOM|wxLEFT, 5 );
bLeftSizer->Add( bFieldsButtons, 0, wxEXPAND, 5 );
bMargins->Add( bFieldsButtons, 0, wxEXPAND|wxTOP, 5 );
wxBoxSizer* bPresets;
bPresets = new wxBoxSizer( wxVERTICAL );
m_staticline1 = new wxStaticLine( m_leftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bPresets->Add( m_staticline1, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_staticline11 = new wxStaticLine( m_leftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bPresets->Add( m_staticline11, 0, wxEXPAND|wxBOTTOM, 5 );
m_bomPresetsLabel = new wxStaticText( m_leftPanel, wxID_ANY, _("View presets:"), wxDefaultPosition, wxDefaultSize, 0 );
m_bomPresetsLabel->Wrap( -1 );
bPresets->Add( m_bomPresetsLabel, 0, wxRIGHT|wxLEFT, 5 );
bPresets->Add( m_bomPresetsLabel, 0, 0, 5 );
bPresets->Add( 0, 2, 0, 0, 5 );
@ -108,10 +106,13 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
int m_cbBomPresetsNChoices = sizeof( m_cbBomPresetsChoices ) / sizeof( wxString );
m_cbBomPresets = new wxChoice( m_leftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cbBomPresetsNChoices, m_cbBomPresetsChoices, 0 );
m_cbBomPresets->SetSelection( 0 );
bPresets->Add( m_cbBomPresets, 0, wxEXPAND|wxRIGHT|wxLEFT, 4 );
bPresets->Add( m_cbBomPresets, 0, wxEXPAND|wxBOTTOM, 2 );
bLeftSizer->Add( bPresets, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
bMargins->Add( bPresets, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
bLeftSizer->Add( bMargins, 1, wxEXPAND|wxALL, 5 );
m_leftPanel->SetSizer( bLeftSizer );
@ -121,10 +122,15 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL );
m_nbPages = new wxNotebook( m_rightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_panelEdit = new wxPanel( m_nbPages, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bEditSizer;
bEditSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bControls;
bControls = new wxBoxSizer( wxHORIZONTAL );
m_filter = new wxSearchCtrl( m_rightPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_filter = new wxSearchCtrl( m_panelEdit, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
#ifndef __WXMAC__
m_filter->ShowSearchButton( true );
#endif
@ -134,41 +140,41 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
bControls->Add( m_filter, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_staticline31 = new wxStaticLine( m_rightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
m_staticline31 = new wxStaticLine( m_panelEdit, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
bControls->Add( m_staticline31, 0, wxEXPAND | wxALL, 3 );
wxString m_scopeChoices[] = { _("Entire Project"), _("Current Sheet Only"), _("Current Sheet and Down") };
int m_scopeNChoices = sizeof( m_scopeChoices ) / sizeof( wxString );
m_scope = new wxChoice( m_rightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_scopeNChoices, m_scopeChoices, 0 );
m_scope = new wxChoice( m_panelEdit, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_scopeNChoices, m_scopeChoices, 0 );
m_scope->SetSelection( 0 );
bControls->Add( m_scope, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_staticline311 = new wxStaticLine( m_rightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
m_staticline311 = new wxStaticLine( m_panelEdit, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
bControls->Add( m_staticline311, 0, wxEXPAND | wxALL, 5 );
m_groupSymbolsBox = new wxCheckBox( m_rightPanel, wxID_ANY, _("Group symbols"), wxDefaultPosition, wxDefaultSize, 0 );
m_groupSymbolsBox = new wxCheckBox( m_panelEdit, wxID_ANY, _("Group symbols"), wxDefaultPosition, wxDefaultSize, 0 );
m_groupSymbolsBox->SetValue(true);
m_groupSymbolsBox->SetToolTip( _("Group symbols together based on common properties") );
bControls->Add( m_groupSymbolsBox, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 8 );
m_staticline3 = new wxStaticLine( m_rightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
m_staticline3 = new wxStaticLine( m_panelEdit, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
bControls->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 3 );
m_bRefresh = new STD_BITMAP_BUTTON( m_rightPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_bRefresh = new STD_BITMAP_BUTTON( m_panelEdit, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_bRefresh->SetMinSize( wxSize( 30,30 ) );
bControls->Add( m_bRefresh, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_bMenu = new STD_BITMAP_BUTTON( m_rightPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_bMenu = new STD_BITMAP_BUTTON( m_panelEdit, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_bMenu->SetMinSize( wxSize( 30,30 ) );
bControls->Add( m_bMenu, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
bControls->Add( m_bMenu, 0, wxRIGHT, 5 );
bRightSizer->Add( bControls, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
bEditSizer->Add( bControls, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
m_grid = new WX_GRID( m_rightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_grid = new WX_GRID( m_panelEdit, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
// Grid
m_grid->CreateGrid( 5, 5 );
@ -194,17 +200,7 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
m_grid->SetMinSize( wxSize( 400,200 ) );
bRightSizer->Add( m_grid, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_staticline7 = new wxStaticLine( m_rightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bRightSizer->Add( m_staticline7, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_rightPanel->SetSizer( bRightSizer );
m_rightPanel->Layout();
bRightSizer->Fit( m_rightPanel );
m_splitterMainWindow->SplitVertically( m_leftPanel, m_rightPanel, -1 );
bEditSizer->Add( m_splitterMainWindow, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
bEditSizer->Add( m_grid, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_panelEdit->SetSizer( bEditSizer );
@ -331,31 +327,43 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
gbExport->Fit( m_panelExport );
m_nbPages->AddPage( m_panelExport, _("Export"), false );
bMainSizer->Add( m_nbPages, 1, wxEXPAND | wxALL, 5 );
bRightSizer->Add( m_nbPages, 1, wxEXPAND|wxALL, 5 );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
m_sidebarButton = new STD_BITMAP_BUTTON( m_rightPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_sidebarButton->SetToolTip( _("Add a new field") );
bButtonsSizer->Add( m_sidebarButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
bButtonsSizer->Add( 0, 0, 9, wxEXPAND, 5 );
m_buttonExport = new wxButton( this, wxID_ANY, _("Export"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonExport = new wxButton( m_rightPanel, wxID_ANY, _("Export"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonExport, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
m_buttonApply = new wxButton( this, wxID_ANY, _("Apply, Save Schematic && Continue"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonApply = new wxButton( m_rightPanel, wxID_ANY, _("Apply, Save Schematic && Continue"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonApply, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
m_sdbSizerOK = new wxButton( m_rightPanel, wxID_OK );
m_sdbSizer->AddButton( m_sdbSizerOK );
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizerCancel = new wxButton( m_rightPanel, wxID_CANCEL );
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bButtonsSizer->Add( m_sdbSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
bMainSizer->Add( bButtonsSizer, 0, wxEXPAND, 5 );
bRightSizer->Add( bButtonsSizer, 0, wxEXPAND, 5 );
m_rightPanel->SetSizer( bRightSizer );
m_rightPanel->Layout();
bRightSizer->Fit( m_rightPanel );
m_splitterMainWindow->SplitVertically( m_leftPanel, m_rightPanel, -1 );
bMainSizer->Add( m_splitterMainWindow, 1, wxEXPAND, 5 );
this->SetSizer( bMainSizer );
@ -366,12 +374,12 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnClose ) );
m_nbPages->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnPageChanged ), NULL, this );
m_viewControlsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnViewControlsCellChanged ), NULL, this );
m_viewControlsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSizeViewControlsGrid ), NULL, this );
m_addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnAddField ), NULL, this );
m_renameFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRenameField ), NULL, this );
m_removeFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRemoveField ), NULL, this );
m_nbPages->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnPageChanged ), NULL, this );
m_filter->Connect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterMouseMoved ), NULL, this );
m_filter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterText ), NULL, this );
m_scope->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnScope ), NULL, this );
@ -390,6 +398,7 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare
m_checkKeepLineBreaks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnPreviewRefresh ), NULL, this );
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnOutputFileBrowseClicked ), NULL, this );
m_bRefreshPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnPreviewRefresh ), NULL, this );
m_sidebarButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSidebarToggle ), NULL, this );
m_buttonExport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnExport ), NULL, this );
m_buttonApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSaveAndContinue ), NULL, this );
m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnCancel ), NULL, this );
@ -400,12 +409,12 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::~DIALOG_SYMBOL_FIELDS_TABLE_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnClose ) );
m_nbPages->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnPageChanged ), NULL, this );
m_viewControlsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnViewControlsCellChanged ), NULL, this );
m_viewControlsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSizeViewControlsGrid ), NULL, this );
m_addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnAddField ), NULL, this );
m_renameFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRenameField ), NULL, this );
m_removeFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRemoveField ), NULL, this );
m_nbPages->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnPageChanged ), NULL, this );
m_filter->Disconnect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterMouseMoved ), NULL, this );
m_filter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterText ), NULL, this );
m_scope->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnScope ), NULL, this );
@ -424,6 +433,7 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::~DIALOG_SYMBOL_FIELDS_TABLE_BASE()
m_checkKeepLineBreaks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnPreviewRefresh ), NULL, this );
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnOutputFileBrowseClicked ), NULL, this );
m_bRefreshPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnPreviewRefresh ), NULL, this );
m_sidebarButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSidebarToggle ), NULL, this );
m_buttonExport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnExport ), NULL, this );
m_buttonApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSaveAndContinue ), NULL, this );
m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnCancel ), NULL, this );

File diff suppressed because it is too large Load Diff

View File

@ -32,10 +32,10 @@ class WX_GRID;
#include <wx/panel.h>
#include <wx/srchctrl.h>
#include <wx/checkbox.h>
#include <wx/splitter.h>
#include <wx/textctrl.h>
#include <wx/gbsizer.h>
#include <wx/notebook.h>
#include <wx/splitter.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
@ -48,18 +48,18 @@ class DIALOG_SYMBOL_FIELDS_TABLE_BASE : public DIALOG_SHIM
private:
protected:
wxNotebook* m_nbPages;
wxPanel* m_panelEdit;
wxSplitterWindow* m_splitterMainWindow;
wxPanel* m_leftPanel;
WX_GRID* m_viewControlsGrid;
STD_BITMAP_BUTTON* m_addFieldButton;
STD_BITMAP_BUTTON* m_renameFieldButton;
STD_BITMAP_BUTTON* m_removeFieldButton;
wxStaticLine* m_staticline1;
wxStaticLine* m_staticline11;
wxStaticText* m_bomPresetsLabel;
wxChoice* m_cbBomPresets;
wxPanel* m_rightPanel;
wxNotebook* m_nbPages;
wxPanel* m_panelEdit;
wxSearchCtrl* m_filter;
wxStaticLine* m_staticline31;
wxChoice* m_scope;
@ -69,7 +69,6 @@ class DIALOG_SYMBOL_FIELDS_TABLE_BASE : public DIALOG_SHIM
STD_BITMAP_BUTTON* m_bRefresh;
STD_BITMAP_BUTTON* m_bMenu;
WX_GRID* m_grid;
wxStaticLine* m_staticline7;
wxPanel* m_panelExport;
wxStaticText* m_labelFieldDelimiter;
wxTextCtrl* m_textFieldDelimiter;
@ -90,6 +89,7 @@ class DIALOG_SYMBOL_FIELDS_TABLE_BASE : public DIALOG_SHIM
wxStaticText* m_labelPreview;
STD_BITMAP_BUTTON* m_bRefreshPreview;
wxTextCtrl* m_textOutput;
STD_BITMAP_BUTTON* m_sidebarButton;
wxButton* m_buttonExport;
wxButton* m_buttonApply;
wxStdDialogButtonSizer* m_sdbSizer;
@ -98,12 +98,12 @@ class DIALOG_SYMBOL_FIELDS_TABLE_BASE : public DIALOG_SHIM
// Virtual event handlers, override them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnPageChanged( wxNotebookEvent& event ) { event.Skip(); }
virtual void OnViewControlsCellChanged( wxGridEvent& event ) { event.Skip(); }
virtual void OnSizeViewControlsGrid( wxSizeEvent& event ) { event.Skip(); }
virtual void OnAddField( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRenameField( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRemoveField( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPageChanged( wxNotebookEvent& event ) { event.Skip(); }
virtual void OnFilterMouseMoved( wxMouseEvent& event ) { event.Skip(); }
virtual void OnFilterText( wxCommandEvent& event ) { event.Skip(); }
virtual void OnScope( wxCommandEvent& event ) { event.Skip(); }
@ -115,6 +115,7 @@ class DIALOG_SYMBOL_FIELDS_TABLE_BASE : public DIALOG_SHIM
virtual void OnTableColSize( wxGridSizeEvent& event ) { event.Skip(); }
virtual void OnPreviewRefresh( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOutputFileBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSidebarToggle( wxCommandEvent& event ) { event.Skip(); }
virtual void OnExport( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSaveAndContinue( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }

View File

@ -529,6 +529,9 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
m_params.emplace_back( new PARAM<int>( "field_editor.sash_pos",
&m_FieldEditorPanel.sash_pos, 400 ) );
m_params.emplace_back( new PARAM<bool>( "field_editor.sidebar_collapsed",
&m_FieldEditorPanel.sidebar_collapsed, false ) );
addParamsForWindow( &m_Simulator.window, "simulator.window", 500, 400 );
m_params.emplace_back( new PARAM<int>( "simulator.plot_panel_width",

View File

@ -239,6 +239,7 @@ public:
int scope;
wxString view_controls_visible_columns;
int sash_pos;
bool sidebar_collapsed;
};
struct PANEL_LIB_VIEW

View File

@ -139,6 +139,8 @@ SYMBOL_EDITOR_SETTINGS::SYMBOL_EDITOR_SETTINGS() :
m_params.emplace_back( new PARAM<int>( "lib_field_editor.sash_pos",
&m_LibFieldEditor.sash_pos, 400 ) );
m_params.emplace_back( new PARAM<bool>( "lib_field_editor.sidebar_collapsed",
&m_LibFieldEditor.sidebar_collapsed, false ) );
m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "selection_filter",
[&]() -> nlohmann::json

View File

@ -70,6 +70,7 @@ public:
std::map<std::string, int> field_widths;
wxString view_controls_visible_columns;
int sash_pos;
bool sidebar_collapsed;
};
SYMBOL_EDITOR_SETTINGS();