Separate fields from text items in FPEdit's Defaults panel.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15135
This commit is contained in:
parent
0dea03654b
commit
9bb6b11c1d
|
@ -120,7 +120,6 @@ WX_GRID::~WX_GRID()
|
|||
DestroyTable( GetTable() );
|
||||
|
||||
Disconnect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <settings/settings_manager.h>
|
||||
#include <footprint_editor_settings.h>
|
||||
#include <widgets/wx_grid.h>
|
||||
#include <widgets/paged_dialog.h>
|
||||
#include <template_fieldnames.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <grid_tricks.h>
|
||||
#include <eda_base_frame.h>
|
||||
|
@ -36,10 +36,12 @@
|
|||
|
||||
class TEXT_ITEMS_GRID_TABLE : public wxGridTableBase
|
||||
{
|
||||
bool m_forFieldProps;
|
||||
std::vector<TEXT_ITEM_INFO> m_items;
|
||||
|
||||
public:
|
||||
TEXT_ITEMS_GRID_TABLE()
|
||||
TEXT_ITEMS_GRID_TABLE( bool aForFieldProps ) :
|
||||
m_forFieldProps( aForFieldProps )
|
||||
{ }
|
||||
|
||||
int GetNumberRows() override { return m_items.size(); }
|
||||
|
@ -49,7 +51,7 @@ public:
|
|||
{
|
||||
switch( aCol )
|
||||
{
|
||||
case 0: return _( "Text Items" );
|
||||
case 0: return m_forFieldProps ? _( "Value" ) : _( "Text Items" );
|
||||
case 1: return _( "Show" );
|
||||
case 2: return _( "Layer" );
|
||||
default: return wxEmptyString;
|
||||
|
@ -174,13 +176,30 @@ PANEL_FP_EDITOR_DEFAULTS::PANEL_FP_EDITOR_DEFAULTS( wxWindow* aParent,
|
|||
UNITS_PROVIDER* aUnitsProvider ) :
|
||||
PANEL_FP_EDITOR_DEFAULTS_BASE( aParent )
|
||||
{
|
||||
m_fieldPropsGrid->SetDefaultRowSize( m_fieldPropsGrid->GetDefaultRowSize() + 4 );
|
||||
|
||||
m_fieldPropsGrid->SetTable( new TEXT_ITEMS_GRID_TABLE( true ), true );
|
||||
m_fieldPropsGrid->PushEventHandler( new GRID_TRICKS( m_fieldPropsGrid ) );
|
||||
m_fieldPropsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
|
||||
|
||||
wxGridCellAttr* attr = new wxGridCellAttr;
|
||||
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
||||
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||
m_fieldPropsGrid->SetColAttr( 1, attr );
|
||||
|
||||
attr = new wxGridCellAttr;
|
||||
attr->SetRenderer( new GRID_CELL_LAYER_RENDERER( nullptr ) );
|
||||
attr->SetEditor( new GRID_CELL_LAYER_SELECTOR( nullptr, {} ) );
|
||||
m_fieldPropsGrid->SetColAttr( 2, attr );
|
||||
|
||||
m_textItemsGrid->SetDefaultRowSize( m_textItemsGrid->GetDefaultRowSize() + 4 );
|
||||
|
||||
m_textItemsGrid->SetTable( new TEXT_ITEMS_GRID_TABLE(), true );
|
||||
m_textItemsGrid->SetTable( new TEXT_ITEMS_GRID_TABLE( false ), true );
|
||||
m_textItemsGrid->PushEventHandler( new GRID_TRICKS( m_textItemsGrid ) );
|
||||
m_textItemsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
|
||||
|
||||
wxGridCellAttr* attr = new wxGridCellAttr;
|
||||
attr = new wxGridCellAttr;
|
||||
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||
attr->SetReadOnly(); // not really; we delegate interactivity to GRID_TRICKS
|
||||
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||
|
@ -205,14 +224,13 @@ PANEL_FP_EDITOR_DEFAULTS::PANEL_FP_EDITOR_DEFAULTS( wxWindow* aParent,
|
|||
m_graphicsGrid->DeleteRows( m_graphicsGrid->GetNumberRows() - 1, 1 );
|
||||
|
||||
m_graphicsGrid->PushEventHandler( new GRID_TRICKS( m_graphicsGrid ) );
|
||||
|
||||
m_staticTextInfo->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||
}
|
||||
|
||||
|
||||
PANEL_FP_EDITOR_DEFAULTS::~PANEL_FP_EDITOR_DEFAULTS()
|
||||
{
|
||||
// destroy GRID_TRICKS before grids.
|
||||
m_fieldPropsGrid->PopEventHandler( true );
|
||||
m_textItemsGrid->PopEventHandler( true );
|
||||
m_graphicsGrid->PopEventHandler( true );
|
||||
}
|
||||
|
@ -256,16 +274,28 @@ void PANEL_FP_EDITOR_DEFAULTS::loadFPSettings( FOOTPRINT_EDITOR_SETTINGS* aCfg )
|
|||
}
|
||||
|
||||
// Footprint defaults
|
||||
m_textItemsGrid->GetTable()->DeleteRows( 0, m_textItemsGrid->GetNumberRows() );
|
||||
m_textItemsGrid->GetTable()->AppendRows( aCfg->m_DesignSettings.m_DefaultFPTextItems.size() );
|
||||
m_fieldPropsGrid->GetTable()->DeleteRows( 0, m_textItemsGrid->GetNumberRows() );
|
||||
m_fieldPropsGrid->GetTable()->AppendRows( 2 );
|
||||
|
||||
for( size_t i = 0; i < aCfg->m_DesignSettings.m_DefaultFPTextItems.size(); ++i )
|
||||
for( int i : { REFERENCE_FIELD, VALUE_FIELD } )
|
||||
{
|
||||
TEXT_ITEM_INFO item = aCfg->m_DesignSettings.m_DefaultFPTextItems[i];
|
||||
|
||||
m_textItemsGrid->GetTable()->SetValue( i, 0, item.m_Text );
|
||||
m_textItemsGrid->GetTable()->SetValueAsBool( i, 1, item.m_Visible );
|
||||
m_textItemsGrid->GetTable()->SetValueAsLong( i, 2, item.m_Layer );
|
||||
m_fieldPropsGrid->GetTable()->SetValue( i, 0, item.m_Text );
|
||||
m_fieldPropsGrid->GetTable()->SetValueAsBool( i, 1, item.m_Visible );
|
||||
m_fieldPropsGrid->GetTable()->SetValueAsLong( i, 2, item.m_Layer );
|
||||
}
|
||||
|
||||
m_textItemsGrid->GetTable()->DeleteRows( 0, m_textItemsGrid->GetNumberRows() );
|
||||
m_textItemsGrid->GetTable()->AppendRows( aCfg->m_DesignSettings.m_DefaultFPTextItems.size() - 2 );
|
||||
|
||||
for( int i = 2; i < (int) aCfg->m_DesignSettings.m_DefaultFPTextItems.size(); ++i )
|
||||
{
|
||||
TEXT_ITEM_INFO item = aCfg->m_DesignSettings.m_DefaultFPTextItems[i];
|
||||
|
||||
m_textItemsGrid->GetTable()->SetValue( i - 2, 0, item.m_Text );
|
||||
m_textItemsGrid->GetTable()->SetValueAsBool( i - 2, 1, item.m_Visible );
|
||||
m_textItemsGrid->GetTable()->SetValueAsLong( i - 2, 2, item.m_Layer );
|
||||
}
|
||||
|
||||
for( int col = 0; col < m_graphicsGrid->GetNumberCols(); col++ )
|
||||
|
@ -342,9 +372,21 @@ bool PANEL_FP_EDITOR_DEFAULTS::TransferDataFromWindow()
|
|||
}
|
||||
|
||||
// Footprint defaults
|
||||
wxGridTableBase* table = m_textItemsGrid->GetTable();
|
||||
cfg.m_DefaultFPTextItems.clear();
|
||||
|
||||
wxGridTableBase* table = m_fieldPropsGrid->GetTable();
|
||||
|
||||
for( int i : { REFERENCE_FIELD, VALUE_FIELD } )
|
||||
{
|
||||
wxString text = table->GetValue( i, 0 );
|
||||
bool visible = table->GetValueAsBool( i, 1 );
|
||||
int layer = (int) table->GetValueAsLong( i, 2 );
|
||||
|
||||
cfg.m_DefaultFPTextItems.emplace_back( text, visible, layer );
|
||||
}
|
||||
|
||||
table = m_textItemsGrid->GetTable();
|
||||
|
||||
for( int i = 0; i < m_textItemsGrid->GetNumberRows(); ++i )
|
||||
{
|
||||
wxString text = table->GetValue( i, 0 );
|
||||
|
|
|
@ -20,12 +20,62 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent,
|
|||
wxBoxSizer* bSizerMargins;
|
||||
bSizerMargins = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
defaultFieldPropertiesLabel = new wxStaticText( this, wxID_ANY, _("Default field properties for new footprints:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
defaultFieldPropertiesLabel->Wrap( -1 );
|
||||
bSizerMargins->Add( defaultFieldPropertiesLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
|
||||
|
||||
|
||||
bSizerMargins->Add( 0, 4, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* defaultFieldPropertiesSizer;
|
||||
defaultFieldPropertiesSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_fieldPropsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
|
||||
|
||||
// Grid
|
||||
m_fieldPropsGrid->CreateGrid( 2, 3 );
|
||||
m_fieldPropsGrid->EnableEditing( true );
|
||||
m_fieldPropsGrid->EnableGridLines( true );
|
||||
m_fieldPropsGrid->EnableDragGridSize( false );
|
||||
m_fieldPropsGrid->SetMargins( 0, 0 );
|
||||
|
||||
// Columns
|
||||
m_fieldPropsGrid->SetColSize( 0, 240 );
|
||||
m_fieldPropsGrid->SetColSize( 1, 60 );
|
||||
m_fieldPropsGrid->SetColSize( 2, 120 );
|
||||
m_fieldPropsGrid->EnableDragColMove( false );
|
||||
m_fieldPropsGrid->EnableDragColSize( true );
|
||||
m_fieldPropsGrid->SetColLabelValue( 0, _("Value") );
|
||||
m_fieldPropsGrid->SetColLabelValue( 1, _("Show") );
|
||||
m_fieldPropsGrid->SetColLabelValue( 2, _("Layer") );
|
||||
m_fieldPropsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
|
||||
m_fieldPropsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||
|
||||
// Rows
|
||||
m_fieldPropsGrid->EnableDragRowSize( false );
|
||||
m_fieldPropsGrid->SetRowLabelValue( 0, _("Reference designator") );
|
||||
m_fieldPropsGrid->SetRowLabelValue( 1, _("Value") );
|
||||
m_fieldPropsGrid->SetRowLabelSize( 160 );
|
||||
m_fieldPropsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
||||
|
||||
// Label Appearance
|
||||
|
||||
// Cell Defaults
|
||||
m_fieldPropsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
||||
defaultFieldPropertiesSizer->Add( m_fieldPropsGrid, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMargins->Add( defaultFieldPropertiesSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMargins->Add( 5, 25, 0, wxEXPAND, 5 );
|
||||
|
||||
defaultTextItemsLabel = new wxStaticText( this, wxID_ANY, _("Default text items for new footprints:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
defaultTextItemsLabel->Wrap( -1 );
|
||||
bSizerMargins->Add( defaultTextItemsLabel, 0, wxTOP|wxLEFT|wxEXPAND, 8 );
|
||||
|
||||
|
||||
bSizerMargins->Add( 0, 3, 0, wxEXPAND, 5 );
|
||||
bSizerMargins->Add( 0, 4, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* defaultTextItemsSizer;
|
||||
defaultTextItemsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -33,14 +83,14 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent,
|
|||
m_textItemsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
|
||||
|
||||
// Grid
|
||||
m_textItemsGrid->CreateGrid( 2, 3 );
|
||||
m_textItemsGrid->CreateGrid( 0, 3 );
|
||||
m_textItemsGrid->EnableEditing( true );
|
||||
m_textItemsGrid->EnableGridLines( true );
|
||||
m_textItemsGrid->EnableDragGridSize( false );
|
||||
m_textItemsGrid->SetMargins( 0, 0 );
|
||||
|
||||
// Columns
|
||||
m_textItemsGrid->SetColSize( 0, 268 );
|
||||
m_textItemsGrid->SetColSize( 0, 400 );
|
||||
m_textItemsGrid->SetColSize( 1, 60 );
|
||||
m_textItemsGrid->SetColSize( 2, 120 );
|
||||
m_textItemsGrid->EnableDragColMove( false );
|
||||
|
@ -53,9 +103,7 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent,
|
|||
|
||||
// Rows
|
||||
m_textItemsGrid->EnableDragRowSize( false );
|
||||
m_textItemsGrid->SetRowLabelValue( 0, _("Reference designator") );
|
||||
m_textItemsGrid->SetRowLabelValue( 1, _("Value") );
|
||||
m_textItemsGrid->SetRowLabelSize( 160 );
|
||||
m_textItemsGrid->SetRowLabelSize( 0 );
|
||||
m_textItemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
||||
|
||||
// Label Appearance
|
||||
|
@ -64,7 +112,7 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent,
|
|||
m_textItemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
||||
m_textItemsGrid->SetMinSize( wxSize( -1,140 ) );
|
||||
|
||||
defaultTextItemsSizer->Add( m_textItemsGrid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
defaultTextItemsSizer->Add( m_textItemsGrid, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bButtonSize;
|
||||
bButtonSize = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
@ -85,10 +133,6 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent,
|
|||
|
||||
bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Note: a blank reference designator or value will use the footprint name."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextInfo->Wrap( -1 );
|
||||
bButtonSize->Add( m_staticTextInfo, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 15 );
|
||||
|
||||
|
||||
defaultTextItemsSizer->Add( bButtonSize, 0, wxEXPAND, 5 );
|
||||
|
||||
|
@ -96,7 +140,7 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent,
|
|||
bSizerMargins->Add( defaultTextItemsSizer, 1, wxEXPAND, 20 );
|
||||
|
||||
|
||||
bSizerMargins->Add( 0, 15, 0, wxEXPAND, 5 );
|
||||
bSizerMargins->Add( 0, 20, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* defaultPropertiesSizer;
|
||||
defaultPropertiesSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -107,7 +151,7 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent,
|
|||
defaultPropertiesSizer->Add( defaultPropertiesLabel, 0, wxEXPAND|wxRIGHT|wxLEFT, 8 );
|
||||
|
||||
|
||||
defaultPropertiesSizer->Add( 0, 3, 0, wxEXPAND, 5 );
|
||||
defaultPropertiesSizer->Add( 0, 4, 0, wxEXPAND, 5 );
|
||||
|
||||
m_graphicsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
|
||||
|
@ -163,6 +207,7 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent,
|
|||
bSizerMain->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
m_fieldPropsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
|
||||
m_textItemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
|
||||
m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnAddTextItem ), NULL, this );
|
||||
m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnDeleteTextItem ), NULL, this );
|
||||
|
@ -171,6 +216,7 @@ PANEL_FP_EDITOR_DEFAULTS_BASE::PANEL_FP_EDITOR_DEFAULTS_BASE( wxWindow* parent,
|
|||
PANEL_FP_EDITOR_DEFAULTS_BASE::~PANEL_FP_EDITOR_DEFAULTS_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_fieldPropsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
|
||||
m_textItemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnGridSize ), NULL, this );
|
||||
m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnAddTextItem ), NULL, this );
|
||||
m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_EDITOR_DEFAULTS_BASE::OnDeleteTextItem ), NULL, this );
|
||||
|
|
|
@ -66,6 +66,187 @@
|
|||
<property name="name">bSizerMargins</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">8</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></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="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Default field properties for new footprints:</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">defaultFieldPropertiesLabel</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="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">4</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">defaultFieldPropertiesSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxGrid" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="autosize_cols">0</property>
|
||||
<property name="autosize_rows">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="cell_bg"></property>
|
||||
<property name="cell_font"></property>
|
||||
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="cell_text"></property>
|
||||
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="col_label_size">wxGRID_AUTOSIZE</property>
|
||||
<property name="col_label_values">"Value" "Show" "Layer"</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">3</property>
|
||||
<property name="column_sizes">240,60,120</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_col_move">0</property>
|
||||
<property name="drag_col_size">1</property>
|
||||
<property name="drag_grid_size">0</property>
|
||||
<property name="drag_row_size">0</property>
|
||||
<property name="editing">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="grid_line_color"></property>
|
||||
<property name="grid_lines">1</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label_bg"></property>
|
||||
<property name="label_font"></property>
|
||||
<property name="label_text"></property>
|
||||
<property name="margin_height">0</property>
|
||||
<property name="margin_width">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">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_fieldPropsGrid</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="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="row_label_size">160</property>
|
||||
<property name="row_label_values">"Reference designator" "Value"</property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">2</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnSize">OnGridSize</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">25</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">5</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">8</property>
|
||||
<property name="flag">wxTOP|wxLEFT|wxEXPAND</property>
|
||||
|
@ -132,7 +313,7 @@
|
|||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">3</property>
|
||||
<property name="height">4</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
|
@ -148,7 +329,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGrid" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -177,7 +358,7 @@
|
|||
<property name="col_label_values">"Text Items" "Show" "Layer"</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">3</property>
|
||||
<property name="column_sizes">268,60,120</property>
|
||||
<property name="column_sizes">400,60,120</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
|
@ -219,11 +400,11 @@
|
|||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="row_label_size">160</property>
|
||||
<property name="row_label_values">"Reference designator" "Value"</property>
|
||||
<property name="row_label_size">0</property>
|
||||
<property name="row_label_values"></property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">2</property>
|
||||
<property name="rows">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>
|
||||
|
@ -412,67 +593,6 @@
|
|||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">15</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></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="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Note: a blank reference designator or value will use the footprint name.</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_staticTextInfo</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="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -482,7 +602,7 @@
|
|||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">15</property>
|
||||
<property name="height">20</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
|
@ -562,7 +682,7 @@
|
|||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">3</property>
|
||||
<property name="height">4</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
|
|
|
@ -21,12 +21,12 @@ class WX_GRID;
|
|||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/grid.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -40,11 +40,12 @@ class PANEL_FP_EDITOR_DEFAULTS_BASE : public RESETTABLE_PANEL
|
|||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* defaultFieldPropertiesLabel;
|
||||
WX_GRID* m_fieldPropsGrid;
|
||||
wxStaticText* defaultTextItemsLabel;
|
||||
WX_GRID* m_textItemsGrid;
|
||||
STD_BITMAP_BUTTON* m_bpAdd;
|
||||
STD_BITMAP_BUTTON* m_bpDelete;
|
||||
wxStaticText* m_staticTextInfo;
|
||||
WX_GRID* m_graphicsGrid;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
|
Loading…
Reference in New Issue