Update EDA_REORDERABLE_LIST_DIALOG to current GUI style.

Note: while we try to omit sizing info from FBP files, the list
controls assume way too wide a minimum width if they're not set.
Furthermore, sizing the dialog ends up leaving them a certain size
and clipping other elements is the dialog itself doesn't have limits
set.  Sigh.
This commit is contained in:
Jeff Young 2023-11-10 11:15:42 +00:00
parent 2f594e441b
commit 6417c9888f
6 changed files with 332 additions and 303 deletions

View File

@ -1,7 +1,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2022-2023 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
@ -21,6 +21,7 @@
#include <bitmaps.h> #include <bitmaps.h>
#include <string_utils.h> #include <string_utils.h>
#include <dialogs/eda_reorderable_list_dialog.h> #include <dialogs/eda_reorderable_list_dialog.h>
#include <widgets/std_bitmap_button.h>
static int DEFAULT_SINGLE_COL_WIDTH = 260; static int DEFAULT_SINGLE_COL_WIDTH = 260;
@ -122,7 +123,10 @@ void EDA_REORDERABLE_LIST_DIALOG::onAddItem( wxCommandEvent& aEvent )
wxListItem info; wxListItem info;
if( !getSelectedItem( m_availableListBox, info ) ) if( !getSelectedItem( m_availableListBox, info ) )
{
wxBell();
return; return;
}
m_availableItems.erase( m_availableItems.begin() + info.m_itemId ); m_availableItems.erase( m_availableItems.begin() + info.m_itemId );
m_availableListBox->DeleteItem( m_selectedAvailable ); m_availableListBox->DeleteItem( m_selectedAvailable );
@ -134,8 +138,6 @@ void EDA_REORDERABLE_LIST_DIALOG::onAddItem( wxCommandEvent& aEvent )
m_enabledItems.insert( m_enabledItems.begin() + pos, info.m_text ); m_enabledItems.insert( m_enabledItems.begin() + pos, info.m_text );
m_enabledListBox->InsertItem( info ); m_enabledListBox->InsertItem( info );
updateButtons();
} }
@ -144,7 +146,10 @@ void EDA_REORDERABLE_LIST_DIALOG::onRemoveItem( wxCommandEvent& aEvent )
wxListItem info; wxListItem info;
if( !getSelectedItem( m_enabledListBox, info ) || info.m_itemId == 0 ) if( !getSelectedItem( m_enabledListBox, info ) || info.m_itemId == 0 )
{
wxBell();
return; return;
}
m_enabledItems.erase( m_enabledItems.begin() + info.m_itemId ); m_enabledItems.erase( m_enabledItems.begin() + info.m_itemId );
m_enabledListBox->DeleteItem( m_selectedEnabled ); m_enabledListBox->DeleteItem( m_selectedEnabled );
@ -160,8 +165,6 @@ void EDA_REORDERABLE_LIST_DIALOG::onRemoveItem( wxCommandEvent& aEvent )
m_availableItems.insert( m_availableItems.begin() + pos, info.m_text ); m_availableItems.insert( m_availableItems.begin() + pos, info.m_text );
m_availableListBox->InsertItem( info ); m_availableListBox->InsertItem( info );
updateButtons();
} }
@ -170,7 +173,10 @@ void EDA_REORDERABLE_LIST_DIALOG::onMoveUp( wxCommandEvent& aEvent )
wxListItem info; wxListItem info;
if( !getSelectedItem( m_enabledListBox, info ) || info.m_itemId == 0 ) if( !getSelectedItem( m_enabledListBox, info ) || info.m_itemId == 0 )
{
wxBell();
return; return;
}
auto current = m_enabledItems.begin() + info.m_itemId; auto current = m_enabledItems.begin() + info.m_itemId;
auto prev = m_enabledItems.begin() + info.m_itemId - 1; auto prev = m_enabledItems.begin() + info.m_itemId - 1;
@ -179,7 +185,6 @@ void EDA_REORDERABLE_LIST_DIALOG::onMoveUp( wxCommandEvent& aEvent )
m_selectedEnabled--; m_selectedEnabled--;
updateButtons();
updateItems(); updateItems();
} }
@ -191,6 +196,7 @@ void EDA_REORDERABLE_LIST_DIALOG::onMoveDown( wxCommandEvent& aEvent )
if( !getSelectedItem( m_enabledListBox, info ) if( !getSelectedItem( m_enabledListBox, info )
|| info.m_itemId == static_cast<long>( m_enabledItems.size() ) - 1 ) || info.m_itemId == static_cast<long>( m_enabledItems.size() ) - 1 )
{ {
wxBell();
return; return;
} }
@ -201,7 +207,6 @@ void EDA_REORDERABLE_LIST_DIALOG::onMoveDown( wxCommandEvent& aEvent )
m_selectedEnabled++; m_selectedEnabled++;
updateButtons();
updateItems(); updateItems();
} }
@ -235,7 +240,6 @@ void EDA_REORDERABLE_LIST_DIALOG::onEnabledListItemSelected( wxListEvent& event
} }
m_selectedEnabled = info.m_itemId; m_selectedEnabled = info.m_itemId;
updateButtons();
} }
@ -250,15 +254,5 @@ void EDA_REORDERABLE_LIST_DIALOG::onAvailableListItemSelected( wxListEvent& even
} }
m_selectedAvailable = info.m_itemId; m_selectedAvailable = info.m_itemId;
updateButtons();
} }
void EDA_REORDERABLE_LIST_DIALOG::updateButtons()
{
m_btnUp->Enable( !m_enabledItems.empty() && m_selectedEnabled > 0 );
m_btnDown->Enable( !m_enabledItems.empty() && m_selectedEnabled > 0 &&
m_selectedEnabled < static_cast<int>( m_enabledItems.size() ) - 1 );
m_btnAdd->Enable( !m_availableItems.empty() && m_selectedAvailable >= 0 );
m_btnRemove->Enable( !m_enabledItems.empty() && m_selectedEnabled > 0 );
}

View File

@ -1,17 +1,19 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) // C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "widgets/std_bitmap_button.h"
#include "eda_reorderable_list_dialog_base.h" #include "eda_reorderable_list_dialog_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
EDA_REORDERABLE_LIST_DIALOG_BASE::EDA_REORDERABLE_LIST_DIALOG_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) EDA_REORDERABLE_LIST_DIALOG_BASE::EDA_REORDERABLE_LIST_DIALOG_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxSize( 320,220 ), wxDefaultSize );
wxBoxSizer* bSizerMain; wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL ); bSizerMain = new wxBoxSizer( wxVERTICAL );
@ -19,63 +21,71 @@ EDA_REORDERABLE_LIST_DIALOG_BASE::EDA_REORDERABLE_LIST_DIALOG_BASE( wxWindow* pa
wxBoxSizer* bTop; wxBoxSizer* bTop;
bTop = new wxBoxSizer( wxHORIZONTAL ); bTop = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLeftSide; wxFlexGridSizer* fgSizer1;
bLeftSide = new wxBoxSizer( wxVERTICAL ); fgSizer1 = new wxFlexGridSizer( 0, 3, 3, 0 );
fgSizer1->AddGrowableCol( 0 );
fgSizer1->AddGrowableCol( 2 );
fgSizer1->AddGrowableRow( 1 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_availableListLabel = new wxStaticText( this, wxID_ANY, _("Available:"), wxDefaultPosition, wxDefaultSize, 0 ); m_availableListLabel = new wxStaticText( this, wxID_ANY, _("Available:"), wxDefaultPosition, wxDefaultSize, 0 );
m_availableListLabel->Wrap( -1 ); m_availableListLabel->Wrap( -1 );
bLeftSide->Add( m_availableListLabel, 0, wxALL, 5 ); fgSizer1->Add( m_availableListLabel, 0, 0, 5 );
m_availableListBox = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxBORDER_SIMPLE|wxVSCROLL );
m_availableListBox->SetMinSize( wxSize( 280,150 ) );
bLeftSide->Add( m_availableListBox, 0, wxALL, 5 );
bTop->Add( bLeftSide, 1, wxEXPAND, 5 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
m_enabledListLabel = new wxStaticText( this, wxID_ANY, _("Enabled:"), wxDefaultPosition, wxDefaultSize, 0 );
m_enabledListLabel->Wrap( -1 );
fgSizer1->Add( m_enabledListLabel, 0, 0, 5 );
m_availableListBox = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxBORDER_SIMPLE|wxVSCROLL );
m_availableListBox->SetMinSize( wxSize( 140,20 ) );
fgSizer1->Add( m_availableListBox, 1, wxEXPAND, 5 );
wxBoxSizer* bMiddleButtons; wxBoxSizer* bMiddleButtons;
bMiddleButtons = new wxBoxSizer( wxVERTICAL ); bMiddleButtons = new wxBoxSizer( wxVERTICAL );
m_btnAdd = new wxButton( this, wxID_ANY, _(">>"), wxDefaultPosition, wxSize( 48,-1 ), 0 ); m_btnAdd = new wxButton( this, wxID_ANY, _(">"), wxDefaultPosition, wxSize( 24,24 ), 0 );
bMiddleButtons->Add( m_btnAdd, 0, wxALL, 5 ); bMiddleButtons->Add( m_btnAdd, 0, wxBOTTOM, 10 );
m_btnRemove = new wxButton( this, wxID_ANY, _("<<"), wxDefaultPosition, wxSize( 48,-1 ), 0 ); m_btnRemove = new wxButton( this, wxID_ANY, _("<"), wxDefaultPosition, wxSize( 24,24 ), 0 );
bMiddleButtons->Add( m_btnRemove, 0, wxALL, 5 ); bMiddleButtons->Add( m_btnRemove, 0, wxBOTTOM|wxALIGN_CENTER_HORIZONTAL, 20 );
bTop->Add( bMiddleButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); fgSizer1->Add( bMiddleButtons, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
wxBoxSizer* bRightSide; m_enabledListBox = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxBORDER_SIMPLE|wxVSCROLL );
bRightSide = new wxBoxSizer( wxVERTICAL ); m_enabledListBox->SetMinSize( wxSize( 140,20 ) );
m_enabledListLabel = new wxStaticText( this, wxID_ANY, _("Enabled:"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer1->Add( m_enabledListBox, 3, wxEXPAND, 5 );
m_enabledListLabel->Wrap( -1 );
bRightSide->Add( m_enabledListLabel, 0, wxALL, 5 );
m_enabledListBox = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxBORDER_SIMPLE|wxVSCROLL );
m_enabledListBox->SetMinSize( wxSize( 280,150 ) );
bRightSide->Add( m_enabledListBox, 3, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
wxBoxSizer* bSizer4; wxBoxSizer* bSizer4;
bSizer4 = new wxBoxSizer( wxHORIZONTAL ); bSizer4 = new wxBoxSizer( wxHORIZONTAL );
m_btnUp = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_btnUp = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_btnUp->SetToolTip( _("Move up") ); m_btnUp->SetToolTip( _("Move up") );
bSizer4->Add( m_btnUp, 0, wxALL, 5 ); bSizer4->Add( m_btnUp, 0, 0, 5 );
m_btnDown = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_btnDown = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_btnDown->SetToolTip( _("Move down") ); m_btnDown->SetToolTip( _("Move down") );
bSizer4->Add( m_btnDown, 0, wxALL, 5 ); bSizer4->Add( m_btnDown, 0, wxLEFT, 5 );
bRightSide->Add( bSizer4, 1, wxEXPAND, 5 ); fgSizer1->Add( bSizer4, 0, wxEXPAND, 5 );
bTop->Add( bRightSide, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); bTop->Add( fgSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
bSizerMain->Add( bTop, 1, wxEXPAND, 5 ); bSizerMain->Add( bTop, 1, wxEXPAND, 5 );
@ -97,7 +107,6 @@ EDA_REORDERABLE_LIST_DIALOG_BASE::EDA_REORDERABLE_LIST_DIALOG_BASE( wxWindow* pa
this->SetSizer( bSizerMain ); this->SetSizer( bSizerMain );
this->Layout(); this->Layout();
bSizerMain->Fit( this );
this->Centre( wxBOTH ); this->Centre( wxBOTH );

View File

@ -44,10 +44,10 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size">320,220</property>
<property name="name">EDA_REORDERABLE_LIST_DIALOG_BASE</property> <property name="name">EDA_REORDERABLE_LIST_DIALOG_BASE</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size">580,260</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title"></property> <property name="title"></property>
@ -71,17 +71,24 @@
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">10</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxFlexGridSizer" expanded="1">
<property name="minimum_size"></property> <property name="cols">3</property>
<property name="name">bLeftSide</property> <property name="flexible_direction">wxBOTH</property>
<property name="orient">wxVERTICAL</property> <property name="growablecols">0,2</property>
<property name="growablerows">1</property>
<property name="hgap">0</property>
<property name="minimum_size">-1,-1</property>
<property name="name">fgSizer1</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property> <property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">3</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag"></property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -142,240 +149,17 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxListCtrl" expanded="1"> <object class="spacer" expanded="1">
<property name="BottomDockable">1</property> <property name="height">0</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="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">280,150</property>
<property name="moveable">1</property>
<property name="name">m_availableListBox</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="width">0</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES</property>
<property name="subclass"></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">wxBORDER_SIMPLE|wxVSCROLL</property>
<event name="OnListItemSelected">onAvailableListItemSelected</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bMiddleButtons</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxButton" 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="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="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">&gt;&gt;</property>
<property name="margins">-1,-1</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_btnAdd</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">48,-1</property>
<property name="style"></property>
<property name="subclass">; ; 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">onAddItem</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag"></property>
<property name="proportion">0</property>
<object class="wxButton" 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="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="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">&lt;&lt;</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_btnRemove</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">48,-1</property>
<property name="style"></property>
<property name="subclass">; ; 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">onRemoveItem</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bRightSide</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -436,7 +220,229 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxListCtrl" 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="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">140,20</property>
<property name="moveable">1</property>
<property name="name">m_availableListBox</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">wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL</property>
<property name="subclass"></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">wxBORDER_SIMPLE|wxVSCROLL</property>
<event name="OnListItemSelected">onAvailableListItemSelected</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bMiddleButtons</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxButton" 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="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="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">&gt;</property>
<property name="margins">-1,-1</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_btnAdd</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">24,24</property>
<property name="style"></property>
<property name="subclass">; ; 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">onAddItem</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">20</property>
<property name="flag">wxBOTTOM|wxALIGN_CENTER_HORIZONTAL</property>
<property name="proportion">0</property>
<object class="wxButton" 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="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="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">&lt;</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_btnRemove</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">24,24</property>
<property name="style"></property>
<property name="subclass">; ; 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">onRemoveItem</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">3</property> <property name="proportion">3</property>
<object class="wxListCtrl" expanded="1"> <object class="wxListCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -471,7 +477,7 @@
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size">280,150</property> <property name="minimum_size">140,20</property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_enabledListBox</property> <property name="name">m_enabledListBox</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
@ -483,7 +489,7 @@
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES</property> <property name="style">wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
@ -501,6 +507,26 @@
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="spacer" expanded="1">
<property name="height">0</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">1</property>
<object class="spacer" expanded="1">
<property name="height">0</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"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizer4</property> <property name="name">bSizer4</property>
@ -508,7 +534,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag"></property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1"> <object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -567,7 +593,7 @@
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass">; ; forward_declare</property> <property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip">Move up</property> <property name="tooltip">Move up</property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
@ -582,7 +608,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1"> <object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -641,7 +667,7 @@
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass">; ; forward_declare</property> <property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip">Move down</property> <property name="tooltip">Move down</property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) // C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -10,6 +10,8 @@
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
class STD_BITMAP_BUTTON;
#include "dialog_shim.h" #include "dialog_shim.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
@ -18,11 +20,11 @@
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/listctrl.h> #include <wx/listctrl.h>
#include <wx/sizer.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/image.h> #include <wx/image.h>
#include <wx/icon.h> #include <wx/icon.h>
#include <wx/sizer.h>
#include <wx/bmpbuttn.h> #include <wx/bmpbuttn.h>
#include <wx/dialog.h> #include <wx/dialog.h>
@ -38,13 +40,13 @@ class EDA_REORDERABLE_LIST_DIALOG_BASE : public DIALOG_SHIM
protected: protected:
wxStaticText* m_availableListLabel; wxStaticText* m_availableListLabel;
wxStaticText* m_enabledListLabel;
wxListCtrl* m_availableListBox; wxListCtrl* m_availableListBox;
wxButton* m_btnAdd; wxButton* m_btnAdd;
wxButton* m_btnRemove; wxButton* m_btnRemove;
wxStaticText* m_enabledListLabel;
wxListCtrl* m_enabledListBox; wxListCtrl* m_enabledListBox;
wxBitmapButton* m_btnUp; STD_BITMAP_BUTTON* m_btnUp;
wxBitmapButton* m_btnDown; STD_BITMAP_BUTTON* m_btnDown;
wxStdDialogButtonSizer* m_sdbSizer; wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK; wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel; wxButton* m_sdbSizerCancel;
@ -61,7 +63,7 @@ class EDA_REORDERABLE_LIST_DIALOG_BASE : public DIALOG_SHIM
public: public:
wxBoxSizer* m_ButtonsSizer; wxBoxSizer* m_ButtonsSizer;
EDA_REORDERABLE_LIST_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); EDA_REORDERABLE_LIST_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 580,260 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~EDA_REORDERABLE_LIST_DIALOG_BASE(); ~EDA_REORDERABLE_LIST_DIALOG_BASE();

View File

@ -748,7 +748,7 @@ TOOL_ACTION ACTIONS::updatePreferences( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::selectColumns( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::selectColumns( TOOL_ACTION_ARGS()
.Name( "common.Control.selectColumns" ) .Name( "common.Control.selectColumns" )
.Scope( AS_GLOBAL ) .Scope( AS_GLOBAL )
.FriendlyName( _( "Select Columns" ) ) ); .FriendlyName( _( "Select Columns..." ) ) );
TOOL_ACTION ACTIONS::toggleUnits( TOOL_ACTION_ARGS() TOOL_ACTION ACTIONS::toggleUnits( TOOL_ACTION_ARGS()
.Name( "common.Control.toggleUnits" ) .Name( "common.Control.toggleUnits" )

View File

@ -55,8 +55,6 @@ private:
bool getSelectedItem( wxListCtrl* aList, wxListItem& aInfo ); bool getSelectedItem( wxListCtrl* aList, wxListItem& aInfo );
void updateButtons();
std::vector<wxString> m_availableItems; std::vector<wxString> m_availableItems;
std::vector<wxString> m_enabledItems; std::vector<wxString> m_enabledItems;