Move Bus Definitions to common GUI paradigm in Schematic Setup.
Also includes a change to the std::initializer_list stuff to try and fix a crash.
This commit is contained in:
parent
1f4d51ecb3
commit
b2a2d66005
|
@ -83,7 +83,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, EDA_DRAW_
|
||||||
m_isEEschema( aIsEEschema ),
|
m_isEEschema( aIsEEschema ),
|
||||||
m_netSettings( aNetSettings ),
|
m_netSettings( aNetSettings ),
|
||||||
m_netNames( aNetNames ),
|
m_netNames( aNetNames ),
|
||||||
m_hoveredCol( -1 )
|
m_hoveredCol( -1 ),
|
||||||
|
m_lastNetclassGridWidth( -1 )
|
||||||
{
|
{
|
||||||
// Clear and re-load each time. Language (or darkmode) might have changed.
|
// Clear and re-load each time. Language (or darkmode) might have changed.
|
||||||
g_lineStyleIcons.clear();
|
g_lineStyleIcons.clear();
|
||||||
|
@ -593,16 +594,21 @@ void PANEL_SETUP_NETCLASSES::OnRemoveNetclassClick( wxCommandEvent& event )
|
||||||
|
|
||||||
void PANEL_SETUP_NETCLASSES::AdjustNetclassGridColumns( int aWidth )
|
void PANEL_SETUP_NETCLASSES::AdjustNetclassGridColumns( int aWidth )
|
||||||
{
|
{
|
||||||
// Account for scroll bars
|
if( aWidth != m_lastNetclassGridWidth )
|
||||||
aWidth -= ( m_netclassGrid->GetSize().x - m_netclassGrid->GetClientSize().x );
|
|
||||||
|
|
||||||
for( int i = 1; i < m_netclassGrid->GetNumberCols(); i++ )
|
|
||||||
{
|
{
|
||||||
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
|
m_lastNetclassGridWidth = aWidth;
|
||||||
aWidth -= m_originalColWidths[ i ];
|
|
||||||
}
|
|
||||||
|
|
||||||
m_netclassGrid->SetColSize( 0, std::max( aWidth - 2, m_originalColWidths[ 0 ] ) );
|
// Account for scroll bars
|
||||||
|
aWidth -= ( m_netclassGrid->GetSize().x - m_netclassGrid->GetClientSize().x );
|
||||||
|
|
||||||
|
for( int i = 1; i < m_netclassGrid->GetNumberCols(); i++ )
|
||||||
|
{
|
||||||
|
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
|
||||||
|
aWidth -= m_originalColWidths[ i ];
|
||||||
|
}
|
||||||
|
|
||||||
|
m_netclassGrid->SetColSize( 0, std::max( aWidth - 2, m_originalColWidths[ 0 ] ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -640,14 +646,15 @@ void PANEL_SETUP_NETCLASSES::OnRemoveAssignmentClick( wxCommandEvent& event )
|
||||||
int curRow = m_assignmentGrid->GetGridCursorRow();
|
int curRow = m_assignmentGrid->GetGridCursorRow();
|
||||||
|
|
||||||
if( curRow < 0 )
|
if( curRow < 0 )
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
m_assignmentGrid->DeleteRows( curRow, 1 );
|
m_assignmentGrid->DeleteRows( curRow, 1 );
|
||||||
|
|
||||||
m_assignmentGrid->MakeCellVisible( std::max( 0, curRow-1 ), m_assignmentGrid->GetGridCursorCol() );
|
if( m_assignmentGrid->GetNumberRows() > 0 )
|
||||||
m_assignmentGrid->SetGridCursor( std::max( 0, curRow-1 ), m_assignmentGrid->GetGridCursorCol() );
|
{
|
||||||
|
m_assignmentGrid->MakeCellVisible( std::max( 0, curRow-1 ), 0 );
|
||||||
|
m_assignmentGrid->SetGridCursor( std::max( 0, curRow-1 ), 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,6 @@ set( EESCHEMA_DLGS
|
||||||
dialogs/dialog_assign_netclass_base.cpp
|
dialogs/dialog_assign_netclass_base.cpp
|
||||||
dialogs/dialog_bom.cpp
|
dialogs/dialog_bom.cpp
|
||||||
dialogs/dialog_bom_base.cpp
|
dialogs/dialog_bom_base.cpp
|
||||||
dialogs/dialog_bus_manager.cpp
|
|
||||||
dialogs/dialog_change_symbols.cpp
|
dialogs/dialog_change_symbols.cpp
|
||||||
dialogs/dialog_change_symbols_base.cpp
|
dialogs/dialog_change_symbols_base.cpp
|
||||||
dialogs/dialog_choose_symbol.cpp
|
dialogs/dialog_choose_symbol.cpp
|
||||||
|
@ -139,6 +138,8 @@ set( EESCHEMA_DLGS
|
||||||
dialogs/panel_eeschema_annotation_options_base.cpp
|
dialogs/panel_eeschema_annotation_options_base.cpp
|
||||||
dialogs/panel_eeschema_editing_options.cpp
|
dialogs/panel_eeschema_editing_options.cpp
|
||||||
dialogs/panel_eeschema_editing_options_base.cpp
|
dialogs/panel_eeschema_editing_options_base.cpp
|
||||||
|
dialogs/panel_setup_buses.cpp
|
||||||
|
dialogs/panel_setup_buses_base.cpp
|
||||||
dialogs/panel_setup_formatting.cpp
|
dialogs/panel_setup_formatting.cpp
|
||||||
dialogs/panel_setup_formatting_base.cpp
|
dialogs/panel_setup_formatting_base.cpp
|
||||||
dialogs/panel_setup_pinmap.cpp
|
dialogs/panel_setup_pinmap.cpp
|
||||||
|
|
|
@ -1,495 +0,0 @@
|
||||||
/*
|
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2018 CERN
|
|
||||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
|
||||||
* @author Jon Evans <jon@craftyjon.com>
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
* Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
* option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along
|
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <wx/tokenzr.h>
|
|
||||||
|
|
||||||
#include <invoke_sch_dialog.h>
|
|
||||||
#include <sch_sheet_path.h>
|
|
||||||
#include <schematic.h>
|
|
||||||
|
|
||||||
#include "dialog_bus_manager.h"
|
|
||||||
|
|
||||||
#include <wx/button.h>
|
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/valtext.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DIALOG_BUS_MANAGER::DIALOG_BUS_MANAGER( SCH_EDIT_FRAME* aParent )
|
|
||||||
: DIALOG_SHIM( aParent, wxID_ANY, _( "Bus Definitions" ),
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ),
|
|
||||||
m_parent( aParent )
|
|
||||||
{
|
|
||||||
auto sizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
auto buttons = new wxStdDialogButtonSizer();
|
|
||||||
wxButton* okButton = new wxButton( this, wxID_OK );
|
|
||||||
|
|
||||||
buttons->AddButton( okButton );
|
|
||||||
buttons->AddButton( new wxButton( this, wxID_CANCEL ) );
|
|
||||||
buttons->Realize();
|
|
||||||
|
|
||||||
auto top_container = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
auto left_pane = new wxBoxSizer( wxVERTICAL );
|
|
||||||
auto right_pane = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
// Left pane: alias list
|
|
||||||
auto lbl_aliases = new wxStaticText( this, wxID_ANY, _( "Bus Aliases" ),
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxALIGN_LEFT );
|
|
||||||
|
|
||||||
m_bus_list_view = new wxListView( this, wxID_ANY, wxDefaultPosition,
|
|
||||||
wxSize( 300, 300 ), wxLC_ALIGN_LEFT |
|
|
||||||
wxLC_NO_HEADER | wxLC_REPORT |
|
|
||||||
wxLC_SINGLE_SEL );
|
|
||||||
m_bus_list_view->InsertColumn( 0, "" );
|
|
||||||
|
|
||||||
auto lbl_alias_edit = new wxStaticText( this, wxID_ANY, _( "Alias Name" ),
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxALIGN_LEFT );
|
|
||||||
|
|
||||||
m_bus_edit = new wxTextCtrl( this, wxID_ANY, wxEmptyString,
|
|
||||||
wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
|
||||||
|
|
||||||
auto left_button_sizer = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
|
|
||||||
m_btn_add_bus = new wxButton( this, wxID_ANY, _( "Add" ) );
|
|
||||||
m_btn_rename_bus = new wxButton( this, wxID_ANY, _( "Rename" ) );
|
|
||||||
m_btn_remove_bus = new wxButton( this, wxID_ANY, _( "Remove" ) );
|
|
||||||
|
|
||||||
left_button_sizer->Add( m_btn_add_bus );
|
|
||||||
left_button_sizer->Add( m_btn_rename_bus );
|
|
||||||
left_button_sizer->Add( m_btn_remove_bus );
|
|
||||||
|
|
||||||
left_pane->Add( lbl_aliases, 0, wxEXPAND | wxALL, 5 );
|
|
||||||
left_pane->Add( m_bus_list_view, 1, wxEXPAND | wxALL, 5 );
|
|
||||||
left_pane->Add( lbl_alias_edit, 0, wxEXPAND | wxALL, 5 );
|
|
||||||
left_pane->Add( m_bus_edit, 0, wxEXPAND | wxALL, 5 );
|
|
||||||
left_pane->Add( left_button_sizer, 0, wxEXPAND | wxALL, 5 );
|
|
||||||
|
|
||||||
// Right pane: signal list
|
|
||||||
auto lbl_signals = new wxStaticText( this, wxID_ANY, _( "Alias Members" ),
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxALIGN_LEFT );
|
|
||||||
|
|
||||||
m_signal_list_view = new wxListView( this, wxID_ANY, wxDefaultPosition,
|
|
||||||
wxSize( 300, 300 ), wxLC_ALIGN_LEFT |
|
|
||||||
wxLC_NO_HEADER | wxLC_REPORT |
|
|
||||||
wxLC_SINGLE_SEL );
|
|
||||||
m_signal_list_view->InsertColumn( 0, "" );
|
|
||||||
|
|
||||||
auto lbl_signal_edit = new wxStaticText( this, wxID_ANY, _( "Member Name" ),
|
|
||||||
wxDefaultPosition, wxDefaultSize,
|
|
||||||
wxALIGN_LEFT );
|
|
||||||
|
|
||||||
m_signal_edit = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
|
||||||
wxDefaultSize, wxTE_PROCESS_ENTER );
|
|
||||||
|
|
||||||
auto right_button_sizer = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
|
|
||||||
m_btn_add_signal = new wxButton( this, wxID_ANY, _( "Add" ) );
|
|
||||||
m_btn_rename_signal = new wxButton( this, wxID_ANY, _( "Rename" ) );
|
|
||||||
m_btn_remove_signal = new wxButton( this, wxID_ANY, _( "Remove" ) );
|
|
||||||
|
|
||||||
right_button_sizer->Add( m_btn_add_signal );
|
|
||||||
right_button_sizer->Add( m_btn_rename_signal );
|
|
||||||
right_button_sizer->Add( m_btn_remove_signal );
|
|
||||||
|
|
||||||
right_pane->Add( lbl_signals, 0, wxEXPAND | wxALL, 5 );
|
|
||||||
right_pane->Add( m_signal_list_view, 1, wxEXPAND | wxALL, 5 );
|
|
||||||
right_pane->Add( lbl_signal_edit, 0, wxEXPAND | wxALL, 5 );
|
|
||||||
right_pane->Add( m_signal_edit, 0, wxEXPAND | wxALL, 5 );
|
|
||||||
right_pane->Add( right_button_sizer, 0, wxEXPAND | wxALL, 5 );
|
|
||||||
|
|
||||||
top_container->Add( left_pane, 1, wxEXPAND );
|
|
||||||
top_container->Add( right_pane, 1, wxEXPAND );
|
|
||||||
|
|
||||||
sizer->Add( top_container, 1, wxEXPAND | wxALL, 5 );
|
|
||||||
sizer->Add( buttons, 0, wxEXPAND | wxBOTTOM, 10 );
|
|
||||||
SetSizer( sizer );
|
|
||||||
|
|
||||||
// Setup validators
|
|
||||||
|
|
||||||
wxTextValidator validator;
|
|
||||||
validator.SetStyle( wxFILTER_EXCLUDE_CHAR_LIST );
|
|
||||||
validator.SetCharExcludes( "\r\n\t " );
|
|
||||||
m_bus_edit->SetValidator( validator );
|
|
||||||
|
|
||||||
// Allow spaces in the signal edit, so that you can type in a list of
|
|
||||||
// signals in the box and it can automatically split them when you add.
|
|
||||||
validator.SetCharExcludes( "\r\n\t" );
|
|
||||||
m_signal_edit->SetValidator( validator );
|
|
||||||
|
|
||||||
// Setup events
|
|
||||||
|
|
||||||
Bind( wxEVT_INIT_DIALOG, &DIALOG_BUS_MANAGER::OnInitDialog, this );
|
|
||||||
m_bus_list_view->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED,
|
|
||||||
wxListEventHandler( DIALOG_BUS_MANAGER::OnSelectBus ), nullptr, this );
|
|
||||||
m_bus_list_view->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED,
|
|
||||||
wxListEventHandler( DIALOG_BUS_MANAGER::OnSelectBus ), nullptr, this );
|
|
||||||
m_signal_list_view->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED,
|
|
||||||
wxListEventHandler( DIALOG_BUS_MANAGER::OnSelectSignal ), nullptr, this );
|
|
||||||
m_signal_list_view->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED,
|
|
||||||
wxListEventHandler( DIALOG_BUS_MANAGER::OnSelectSignal ), nullptr, this );
|
|
||||||
|
|
||||||
m_btn_add_bus->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_BUS_MANAGER::OnAddBus ), nullptr, this );
|
|
||||||
m_btn_rename_bus->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_BUS_MANAGER::OnRenameBus ), nullptr, this );
|
|
||||||
m_btn_remove_bus->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_BUS_MANAGER::OnRemoveBus ), nullptr, this );
|
|
||||||
m_signal_edit->Connect( wxEVT_TEXT_ENTER,
|
|
||||||
wxCommandEventHandler( DIALOG_BUS_MANAGER::OnAddSignal ), nullptr, this );
|
|
||||||
|
|
||||||
m_btn_add_signal->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_BUS_MANAGER::OnAddSignal ), nullptr, this );
|
|
||||||
m_btn_rename_signal->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_BUS_MANAGER::OnRenameSignal ), nullptr, this );
|
|
||||||
m_btn_remove_signal->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
|
||||||
wxCommandEventHandler( DIALOG_BUS_MANAGER::OnRemoveSignal ), nullptr, this );
|
|
||||||
m_bus_edit->Connect( wxEVT_TEXT_ENTER,
|
|
||||||
wxCommandEventHandler( DIALOG_BUS_MANAGER::OnAddBus ), nullptr, this );
|
|
||||||
|
|
||||||
// Set initial UI state
|
|
||||||
|
|
||||||
m_btn_rename_bus->Disable();
|
|
||||||
m_btn_remove_bus->Disable();
|
|
||||||
|
|
||||||
m_btn_add_signal->Disable();
|
|
||||||
m_btn_rename_signal->Disable();
|
|
||||||
m_btn_remove_signal->Disable();
|
|
||||||
|
|
||||||
m_bus_edit->SetHint( _( "Bus Alias Name" ) );
|
|
||||||
m_signal_edit->SetHint( _( "Net or Bus Name" ) );
|
|
||||||
|
|
||||||
SetupStandardButtons();
|
|
||||||
|
|
||||||
finishDialogSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_BUS_MANAGER::OnInitDialog( wxInitDialogEvent& aEvent )
|
|
||||||
{
|
|
||||||
TransferDataToWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_BUS_MANAGER::TransferDataToWindow()
|
|
||||||
{
|
|
||||||
m_aliases.clear();
|
|
||||||
m_screens.clear();
|
|
||||||
|
|
||||||
SCH_SCREENS screens( m_parent->Schematic().Root() );
|
|
||||||
|
|
||||||
std::vector< std::shared_ptr<BUS_ALIAS> > original_aliases;
|
|
||||||
|
|
||||||
// collect aliases from each open sheet
|
|
||||||
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() )
|
|
||||||
{
|
|
||||||
std::unordered_set<std::shared_ptr<BUS_ALIAS>> sheet_aliases = screen->GetBusAliases();
|
|
||||||
original_aliases.insert( original_aliases.end(), sheet_aliases.begin(),
|
|
||||||
sheet_aliases.end() );
|
|
||||||
}
|
|
||||||
|
|
||||||
original_aliases.erase( std::unique( original_aliases.begin(),
|
|
||||||
original_aliases.end() ),
|
|
||||||
original_aliases.end() );
|
|
||||||
|
|
||||||
// clone into a temporary working set
|
|
||||||
int idx = 0;
|
|
||||||
|
|
||||||
for( const std::shared_ptr<BUS_ALIAS>& alias : original_aliases )
|
|
||||||
{
|
|
||||||
m_screens.insert( alias->GetParent() );
|
|
||||||
m_aliases.push_back( alias->Clone() );
|
|
||||||
auto text = getAliasDisplayText( alias );
|
|
||||||
m_bus_list_view->InsertItem( idx, text );
|
|
||||||
m_bus_list_view->SetItemPtrData( idx, wxUIntPtr( m_aliases[idx].get() ) );
|
|
||||||
idx++;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_bus_list_view->SetColumnWidth( 0, -1 );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_BUS_MANAGER::TransferDataFromWindow()
|
|
||||||
{
|
|
||||||
for( SCH_SCREEN* screen : m_screens )
|
|
||||||
screen->ClearBusAliases();
|
|
||||||
|
|
||||||
for( const std::shared_ptr<BUS_ALIAS>& alias : m_aliases )
|
|
||||||
alias->GetParent()->AddBusAlias( alias );
|
|
||||||
|
|
||||||
( ( SCH_EDIT_FRAME* )GetParent() )->OnModify();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_BUS_MANAGER::OnSelectBus( wxListEvent& event )
|
|
||||||
{
|
|
||||||
if( event.GetEventType() == wxEVT_COMMAND_LIST_ITEM_SELECTED )
|
|
||||||
{
|
|
||||||
auto alias = m_aliases[ event.GetIndex() ];
|
|
||||||
|
|
||||||
if( m_active_alias != alias )
|
|
||||||
{
|
|
||||||
m_active_alias = alias;
|
|
||||||
|
|
||||||
m_bus_edit->ChangeValue( alias->GetName() );
|
|
||||||
|
|
||||||
m_btn_rename_bus->Enable();
|
|
||||||
m_btn_remove_bus->Enable();
|
|
||||||
|
|
||||||
auto members = alias->Members();
|
|
||||||
|
|
||||||
// TODO(JE) Clear() seems to be clearing the hint, contrary to
|
|
||||||
// the wx documentation.
|
|
||||||
m_signal_edit->Clear();
|
|
||||||
m_signal_list_view->DeleteAllItems();
|
|
||||||
|
|
||||||
for( unsigned i = 0; i < members.size(); i++ )
|
|
||||||
{
|
|
||||||
m_signal_list_view->InsertItem( i, members[i] );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_signal_list_view->SetColumnWidth( 0, -1 );
|
|
||||||
|
|
||||||
m_btn_add_signal->Enable();
|
|
||||||
m_btn_rename_signal->Disable();
|
|
||||||
m_btn_remove_signal->Disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_active_alias = nullptr;
|
|
||||||
m_bus_edit->Clear();
|
|
||||||
m_signal_edit->Clear();
|
|
||||||
m_signal_list_view->DeleteAllItems();
|
|
||||||
|
|
||||||
m_btn_rename_bus->Disable();
|
|
||||||
m_btn_remove_bus->Disable();
|
|
||||||
|
|
||||||
m_btn_add_signal->Disable();
|
|
||||||
m_btn_rename_signal->Disable();
|
|
||||||
m_btn_remove_signal->Disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_BUS_MANAGER::OnSelectSignal( wxListEvent& event )
|
|
||||||
{
|
|
||||||
if( event.GetEventType() == wxEVT_COMMAND_LIST_ITEM_SELECTED )
|
|
||||||
{
|
|
||||||
m_signal_edit->ChangeValue( event.GetText() );
|
|
||||||
m_btn_rename_signal->Enable();
|
|
||||||
m_btn_remove_signal->Enable();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_signal_edit->Clear();
|
|
||||||
m_btn_rename_signal->Disable();
|
|
||||||
m_btn_remove_signal->Disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_BUS_MANAGER::OnAddBus( wxCommandEvent& aEvent )
|
|
||||||
{
|
|
||||||
// If there is an active alias, then check that the user actually
|
|
||||||
// changed the text in the edit box (we can't have duplicate aliases)
|
|
||||||
|
|
||||||
auto new_name = m_bus_edit->GetValue();
|
|
||||||
|
|
||||||
if( new_name.Length() == 0 )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for( const auto& alias : m_aliases )
|
|
||||||
{
|
|
||||||
if( alias->GetName() == new_name )
|
|
||||||
{
|
|
||||||
// TODO(JE) display error?
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !m_active_alias ||
|
|
||||||
( m_active_alias && m_active_alias->GetName().Cmp( new_name ) ) )
|
|
||||||
{
|
|
||||||
// The values are different; create a new alias
|
|
||||||
auto alias = std::make_shared<BUS_ALIAS>();
|
|
||||||
alias->SetName( new_name );
|
|
||||||
|
|
||||||
// New aliases get stored on the currently visible sheet
|
|
||||||
alias->SetParent( static_cast<SCH_EDIT_FRAME*>( GetParent() )->GetScreen() );
|
|
||||||
auto text = getAliasDisplayText( alias );
|
|
||||||
|
|
||||||
m_aliases.push_back( alias );
|
|
||||||
long idx = m_bus_list_view->InsertItem( m_aliases.size() - 1, text );
|
|
||||||
m_bus_list_view->SetColumnWidth( 0, -1 );
|
|
||||||
m_bus_list_view->Select( idx );
|
|
||||||
m_bus_edit->Clear();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// TODO(JE) Check about desired result here.
|
|
||||||
// Maybe warn the user? Or just do nothing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_BUS_MANAGER::OnRenameBus( wxCommandEvent& aEvent )
|
|
||||||
{
|
|
||||||
// We should only get here if there is an active alias
|
|
||||||
wxASSERT( m_active_alias );
|
|
||||||
|
|
||||||
m_active_alias->SetName( m_bus_edit->GetValue() );
|
|
||||||
long idx = m_bus_list_view->FindItem( -1, wxUIntPtr( m_active_alias.get() ) );
|
|
||||||
|
|
||||||
wxASSERT( idx >= 0 );
|
|
||||||
|
|
||||||
m_bus_list_view->SetItemText( idx, getAliasDisplayText( m_active_alias ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_BUS_MANAGER::OnRemoveBus( wxCommandEvent& aEvent )
|
|
||||||
{
|
|
||||||
// We should only get here if there is an active alias
|
|
||||||
wxASSERT( m_active_alias );
|
|
||||||
long i = m_bus_list_view->GetFirstSelected();
|
|
||||||
wxASSERT( m_active_alias == m_aliases[ i ] );
|
|
||||||
|
|
||||||
m_bus_list_view->DeleteItem( i );
|
|
||||||
m_bus_list_view->Update();
|
|
||||||
m_aliases.erase( m_aliases.begin() + i );
|
|
||||||
m_bus_edit->Clear();
|
|
||||||
|
|
||||||
m_active_alias = nullptr;
|
|
||||||
|
|
||||||
auto evt = wxListEvent( wxEVT_COMMAND_LIST_ITEM_DESELECTED );
|
|
||||||
OnSelectBus( evt );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_BUS_MANAGER::OnAddSignal( wxCommandEvent& aEvent )
|
|
||||||
{
|
|
||||||
auto name_list = m_signal_edit->GetValue();
|
|
||||||
|
|
||||||
if( !m_active_alias || name_list.Length() == 0 )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// String collecting net names that were not added to the bus
|
|
||||||
wxString notAdded;
|
|
||||||
|
|
||||||
// Parse a space-separated list and add each one
|
|
||||||
wxStringTokenizer tok( name_list, " " );
|
|
||||||
while( tok.HasMoreTokens() )
|
|
||||||
{
|
|
||||||
auto name = tok.GetNextToken();
|
|
||||||
|
|
||||||
if( !m_active_alias->Contains( name ) )
|
|
||||||
{
|
|
||||||
m_active_alias->AddMember( name );
|
|
||||||
|
|
||||||
long idx = m_signal_list_view->InsertItem(
|
|
||||||
m_active_alias->GetMemberCount() - 1, name );
|
|
||||||
|
|
||||||
m_signal_list_view->SetColumnWidth( 0, -1 );
|
|
||||||
m_signal_list_view->Select( idx );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Some of the requested net names were not added to the list, so keep them for editing
|
|
||||||
notAdded = notAdded.IsEmpty() ? name : notAdded + " " + name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_signal_edit->SetValue( notAdded );
|
|
||||||
m_signal_edit->SetInsertionPointEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_BUS_MANAGER::OnRenameSignal( wxCommandEvent& aEvent )
|
|
||||||
{
|
|
||||||
// We should only get here if there is an active alias
|
|
||||||
wxASSERT( m_active_alias );
|
|
||||||
|
|
||||||
auto new_name = m_signal_edit->GetValue();
|
|
||||||
long idx = m_signal_list_view->GetFirstSelected();
|
|
||||||
|
|
||||||
wxASSERT( idx >= 0 );
|
|
||||||
|
|
||||||
auto old_name = m_active_alias->Members()[ idx ];
|
|
||||||
|
|
||||||
// User could have typed a space here, so check first
|
|
||||||
if( new_name.Find( " " ) != wxNOT_FOUND )
|
|
||||||
{
|
|
||||||
// TODO(JE) error feedback
|
|
||||||
m_signal_edit->ChangeValue( old_name );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_active_alias->Members()[ idx ] = new_name;
|
|
||||||
m_signal_list_view->SetItemText( idx, new_name );
|
|
||||||
m_signal_list_view->SetColumnWidth( 0, -1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_BUS_MANAGER::OnRemoveSignal( wxCommandEvent& aEvent )
|
|
||||||
{
|
|
||||||
// We should only get here if there is an active alias
|
|
||||||
wxASSERT( m_active_alias );
|
|
||||||
|
|
||||||
long idx = m_signal_list_view->GetFirstSelected();
|
|
||||||
|
|
||||||
wxASSERT( idx >= 0 );
|
|
||||||
|
|
||||||
m_active_alias->Members().erase( m_active_alias->Members().begin() + idx );
|
|
||||||
|
|
||||||
m_signal_list_view->DeleteItem( idx );
|
|
||||||
m_signal_edit->Clear();
|
|
||||||
m_btn_rename_signal->Disable();
|
|
||||||
m_btn_remove_signal->Disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
wxString DIALOG_BUS_MANAGER::getAliasDisplayText( std::shared_ptr< BUS_ALIAS > aAlias )
|
|
||||||
{
|
|
||||||
wxString name = aAlias->GetName();
|
|
||||||
wxFileName sheet_name( aAlias->GetParent()->GetFileName() );
|
|
||||||
|
|
||||||
name += _T( " (" ) + sheet_name.GetFullName() + _T( ")" );
|
|
||||||
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// see invoke_sch_dialog.h
|
|
||||||
void InvokeDialogBusManager( SCH_EDIT_FRAME* aCaller )
|
|
||||||
{
|
|
||||||
DIALOG_BUS_MANAGER dlg( aCaller );
|
|
||||||
dlg.ShowModal();
|
|
||||||
}
|
|
|
@ -1,84 +0,0 @@
|
||||||
/*
|
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2018 CERN
|
|
||||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
|
||||||
* @author Jon Evans <jon@craftyjon.com>
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
* Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
* option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along
|
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _DIALOG_BUS_MANAGER_H_
|
|
||||||
#define _DIALOG_BUS_MANAGER_H_
|
|
||||||
|
|
||||||
#include "dialog_shim.h"
|
|
||||||
|
|
||||||
#include <sch_edit_frame.h>
|
|
||||||
#include <wx/listctrl.h>
|
|
||||||
|
|
||||||
#include <bus_alias.h>
|
|
||||||
|
|
||||||
class DIALOG_BUS_MANAGER : public DIALOG_SHIM
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
DIALOG_BUS_MANAGER( SCH_EDIT_FRAME* aParent );
|
|
||||||
|
|
||||||
~DIALOG_BUS_MANAGER() {}
|
|
||||||
|
|
||||||
bool TransferDataFromWindow() override;
|
|
||||||
|
|
||||||
bool TransferDataToWindow() override;
|
|
||||||
|
|
||||||
void OnAddBus( wxCommandEvent& aEvent );
|
|
||||||
void OnRenameBus( wxCommandEvent& aEvent );
|
|
||||||
void OnRemoveBus( wxCommandEvent& aEvent );
|
|
||||||
|
|
||||||
void OnAddSignal( wxCommandEvent& aEvent );
|
|
||||||
void OnRenameSignal( wxCommandEvent& aEvent );
|
|
||||||
void OnRemoveSignal( wxCommandEvent& aEvent );
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void OnInitDialog( wxInitDialogEvent& aEvent );
|
|
||||||
void OnSelectBus( wxListEvent& event );
|
|
||||||
void OnSelectSignal( wxListEvent& event );
|
|
||||||
|
|
||||||
private:
|
|
||||||
wxString getAliasDisplayText( std::shared_ptr< BUS_ALIAS > aAlias );
|
|
||||||
|
|
||||||
protected:
|
|
||||||
SCH_EDIT_FRAME* m_parent;
|
|
||||||
|
|
||||||
wxListView* m_bus_list_view;
|
|
||||||
wxListView* m_signal_list_view;
|
|
||||||
wxTextCtrl* m_bus_edit;
|
|
||||||
wxTextCtrl* m_signal_edit;
|
|
||||||
|
|
||||||
wxButton* m_btn_add_bus;
|
|
||||||
wxButton* m_btn_rename_bus;
|
|
||||||
wxButton* m_btn_remove_bus;
|
|
||||||
|
|
||||||
wxButton* m_btn_add_signal;
|
|
||||||
wxButton* m_btn_rename_signal;
|
|
||||||
wxButton* m_btn_remove_signal;
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::vector< std::shared_ptr< BUS_ALIAS > > m_aliases;
|
|
||||||
std::unordered_set<SCH_SCREEN*> m_screens;
|
|
||||||
std::shared_ptr< BUS_ALIAS > m_active_alias;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// _DIALOG_BUS_MANAGER_H_
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <dialog_sch_import_settings.h>
|
#include <dialog_sch_import_settings.h>
|
||||||
#include <dialogs/panel_setup_netclasses.h>
|
#include <dialogs/panel_setup_netclasses.h>
|
||||||
#include <dialogs/panel_setup_severities.h>
|
#include <dialogs/panel_setup_severities.h>
|
||||||
|
#include <dialogs/panel_setup_buses.h>
|
||||||
#include <panel_setup_formatting.h>
|
#include <panel_setup_formatting.h>
|
||||||
#include <panel_setup_pinmap.h>
|
#include <panel_setup_pinmap.h>
|
||||||
#include <erc_item.h>
|
#include <erc_item.h>
|
||||||
|
@ -63,6 +64,8 @@ DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
||||||
m_netclasses = new PANEL_SETUP_NETCLASSES( this, aFrame, project.NetSettings(),
|
m_netclasses = new PANEL_SETUP_NETCLASSES( this, aFrame, project.NetSettings(),
|
||||||
schematic.GetNetClassAssignmentCandidates(), true );
|
schematic.GetNetClassAssignmentCandidates(), true );
|
||||||
|
|
||||||
|
m_buses = new PANEL_SETUP_BUSES( m_treebook, aFrame );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* WARNING: If you change page names you MUST update calls to ShowSchematicSetupDialog().
|
* WARNING: If you change page names you MUST update calls to ShowSchematicSetupDialog().
|
||||||
*/
|
*/
|
||||||
|
@ -77,6 +80,7 @@ DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
||||||
|
|
||||||
m_treebook->AddPage( new wxPanel( GetTreebook() ), _( "Project" ) );
|
m_treebook->AddPage( new wxPanel( GetTreebook() ), _( "Project" ) );
|
||||||
m_treebook->AddSubPage( m_netclasses, _( "Net Classes" ) );
|
m_treebook->AddSubPage( m_netclasses, _( "Net Classes" ) );
|
||||||
|
m_treebook->AddSubPage( m_buses, _( "Bus Alias Definitions" ) );
|
||||||
m_treebook->AddSubPage( m_textVars, _( "Text Variables" ) );
|
m_treebook->AddSubPage( m_textVars, _( "Text Variables" ) );
|
||||||
|
|
||||||
for( size_t i = 0; i < m_treebook->GetPageCount(); ++i )
|
for( size_t i = 0; i < m_treebook->GetPageCount(); ++i )
|
||||||
|
|
|
@ -30,6 +30,7 @@ class PANEL_SETUP_FORMATTING;
|
||||||
class PANEL_SETUP_PINMAP;
|
class PANEL_SETUP_PINMAP;
|
||||||
class PANEL_TEXT_VARIABLES;
|
class PANEL_TEXT_VARIABLES;
|
||||||
class PANEL_SETUP_NETCLASSES;
|
class PANEL_SETUP_NETCLASSES;
|
||||||
|
class PANEL_SETUP_BUSES;
|
||||||
class ERC_ITEM;
|
class ERC_ITEM;
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,6 +52,7 @@ protected:
|
||||||
PANEL_SETUP_PINMAP* m_pinMap;
|
PANEL_SETUP_PINMAP* m_pinMap;
|
||||||
PANEL_SETUP_SEVERITIES* m_severities;
|
PANEL_SETUP_SEVERITIES* m_severities;
|
||||||
PANEL_SETUP_NETCLASSES* m_netclasses;
|
PANEL_SETUP_NETCLASSES* m_netclasses;
|
||||||
|
PANEL_SETUP_BUSES* m_buses;
|
||||||
PANEL_TEXT_VARIABLES* m_textVars;
|
PANEL_TEXT_VARIABLES* m_textVars;
|
||||||
std::shared_ptr<ERC_ITEM> m_pinToPinError;
|
std::shared_ptr<ERC_ITEM> m_pinToPinError;
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,403 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018 CERN
|
||||||
|
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
|
* @author Jon Evans <jon@craftyjon.com>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <widgets/wx_grid.h>
|
||||||
|
#include <confirm.h>
|
||||||
|
#include <sch_edit_frame.h>
|
||||||
|
#include <schematic.h>
|
||||||
|
#include <dialogs/panel_setup_buses.h>
|
||||||
|
|
||||||
|
PANEL_SETUP_BUSES::PANEL_SETUP_BUSES( wxWindow* aWindow, SCH_EDIT_FRAME* aFrame ) :
|
||||||
|
PANEL_SETUP_BUSES_BASE( aWindow ),
|
||||||
|
m_frame( aFrame )
|
||||||
|
{
|
||||||
|
m_membersLabelTemplate = m_membersLabel->GetLabel();
|
||||||
|
|
||||||
|
m_addAlias->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
||||||
|
m_deleteAlias->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
||||||
|
m_addMember->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
||||||
|
m_removeMember->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
||||||
|
|
||||||
|
m_source->SetFont( KIUI::GetInfoFont( aWindow ) );
|
||||||
|
|
||||||
|
// wxFormBuilder doesn't include this event...
|
||||||
|
m_aliasesGrid->Connect( wxEVT_GRID_CELL_CHANGING,
|
||||||
|
wxGridEventHandler( PANEL_SETUP_BUSES::OnAliasesGridCellChanging ),
|
||||||
|
nullptr, this );
|
||||||
|
m_membersGrid->Connect( wxEVT_GRID_CELL_CHANGING,
|
||||||
|
wxGridEventHandler( PANEL_SETUP_BUSES::OnMemberGridCellChanging ),
|
||||||
|
nullptr, this );
|
||||||
|
|
||||||
|
Layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool PANEL_SETUP_BUSES::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
auto contains =
|
||||||
|
[&]( const std::shared_ptr<BUS_ALIAS>& alias ) -> bool
|
||||||
|
{
|
||||||
|
wxString aName = alias->GetName();
|
||||||
|
wxArrayString aMembers = alias->Members();
|
||||||
|
|
||||||
|
aMembers.Sort();
|
||||||
|
|
||||||
|
for( const std::shared_ptr<BUS_ALIAS>& candidate : m_aliases )
|
||||||
|
{
|
||||||
|
wxString bName = candidate->GetName();
|
||||||
|
wxArrayString bMembers = candidate->Members();
|
||||||
|
|
||||||
|
bMembers.Sort();
|
||||||
|
|
||||||
|
if( aName == bName && aMembers == bMembers )
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
SCH_SCREENS screens( m_frame->Schematic().Root() );
|
||||||
|
|
||||||
|
// collect aliases from each open sheet
|
||||||
|
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() )
|
||||||
|
{
|
||||||
|
for( const std::shared_ptr<BUS_ALIAS>& alias : screen->GetBusAliases() )
|
||||||
|
{
|
||||||
|
if( !contains( alias ) )
|
||||||
|
m_aliases.push_back( alias->Clone() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int ii = 0;
|
||||||
|
|
||||||
|
m_aliasesGrid->ClearRows();
|
||||||
|
m_aliasesGrid->AppendRows( m_aliases.size() );
|
||||||
|
|
||||||
|
for( const std::shared_ptr<BUS_ALIAS>& alias : m_aliases )
|
||||||
|
m_aliasesGrid->SetCellValue( ii++, 0, alias->GetName() );
|
||||||
|
|
||||||
|
m_membersBook->SetSelection( 1 );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool PANEL_SETUP_BUSES::TransferDataFromWindow()
|
||||||
|
{
|
||||||
|
if( !m_aliasesGrid->CommitPendingChanges() || !m_membersGrid->CommitPendingChanges() )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Copy names back just in case they didn't get caught on the GridCellChanging event
|
||||||
|
for( int ii = 0; ii < m_aliasesGrid->GetNumberRows(); ++ii )
|
||||||
|
m_aliases[ii]->SetName( m_aliasesGrid->GetCellValue( ii, 0 ) );
|
||||||
|
|
||||||
|
SCH_SCREENS screens( m_frame->Schematic().Root() );
|
||||||
|
|
||||||
|
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() )
|
||||||
|
screen->ClearBusAliases();
|
||||||
|
|
||||||
|
for( const std::shared_ptr<BUS_ALIAS>& alias : m_aliases )
|
||||||
|
alias->GetParent()->AddBusAlias( alias );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_SETUP_BUSES::OnAddAlias( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
if( !m_aliasesGrid->CommitPendingChanges() || !m_membersGrid->CommitPendingChanges() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// New aliases get stored on the currently visible sheet
|
||||||
|
m_aliases.push_back( std::make_shared<BUS_ALIAS>( m_frame->GetScreen() ) );
|
||||||
|
|
||||||
|
int row = m_aliasesGrid->GetNumberRows();
|
||||||
|
m_aliasesGrid->AppendRows();
|
||||||
|
|
||||||
|
m_aliasesGrid->MakeCellVisible( row, 0 );
|
||||||
|
m_aliasesGrid->SetGridCursor( row, 0 );
|
||||||
|
|
||||||
|
m_aliasesGrid->EnableCellEditControl( true );
|
||||||
|
m_aliasesGrid->ShowCellEditControl();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_SETUP_BUSES::OnDeleteAlias( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
if( !m_aliasesGrid->CommitPendingChanges() || !m_membersGrid->CommitPendingChanges() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
int curRow = m_aliasesGrid->GetGridCursorRow();
|
||||||
|
|
||||||
|
if( curRow < 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Clear the members grid first so we don't try to write it back to a deleted alias
|
||||||
|
m_membersGrid->ClearRows();
|
||||||
|
m_lastAlias = -1;
|
||||||
|
m_lastAliasName = wxEmptyString;
|
||||||
|
|
||||||
|
m_aliases.erase( m_aliases.begin() + curRow );
|
||||||
|
|
||||||
|
m_aliasesGrid->DeleteRows( curRow, 1 );
|
||||||
|
|
||||||
|
if( m_aliasesGrid->GetNumberRows() > 0 )
|
||||||
|
{
|
||||||
|
m_aliasesGrid->MakeCellVisible( std::max( 0, curRow-1 ), 0 );
|
||||||
|
m_aliasesGrid->SetGridCursor( std::max( 0, curRow-1 ), 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_SETUP_BUSES::OnAddMember( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
if( !m_membersGrid->CommitPendingChanges() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
int row = m_aliasesGrid->GetNumberRows();
|
||||||
|
m_membersGrid->AppendRows();
|
||||||
|
|
||||||
|
m_membersGrid->MakeCellVisible( row, 0 );
|
||||||
|
m_membersGrid->SetGridCursor( row, 0 );
|
||||||
|
|
||||||
|
m_membersGrid->EnableCellEditControl( true );
|
||||||
|
m_membersGrid->ShowCellEditControl();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_SETUP_BUSES::OnRemoveMember( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
if( !m_membersGrid->CommitPendingChanges() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
int curRow = m_membersGrid->GetGridCursorRow();
|
||||||
|
|
||||||
|
if( curRow < 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_membersGrid->DeleteRows( curRow, 1 );
|
||||||
|
|
||||||
|
if( m_membersGrid->GetNumberRows() > 0 )
|
||||||
|
{
|
||||||
|
m_membersGrid->MakeCellVisible( std::max( 0, curRow-1 ), 0 );
|
||||||
|
m_membersGrid->SetGridCursor( std::max( 0, curRow-1 ), 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_SETUP_BUSES::OnAliasesGridCellChanging( wxGridEvent& event )
|
||||||
|
{
|
||||||
|
int row = event.GetRow();
|
||||||
|
|
||||||
|
if( row >= 0 )
|
||||||
|
{
|
||||||
|
wxString name = event.GetString();
|
||||||
|
|
||||||
|
for( int ii = 0; ii < m_aliasesGrid->GetNumberRows(); ++ii )
|
||||||
|
{
|
||||||
|
if( ii == event.GetRow() )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if( name == m_aliasesGrid->GetCellValue( ii, 0 )
|
||||||
|
&& m_aliases[ row ]->GetParent() == m_aliases[ ii ]->GetParent() )
|
||||||
|
{
|
||||||
|
m_errorMsg = wxString::Format( _( "Alias name '%s' already in use." ), name );
|
||||||
|
m_errorGrid = m_aliasesGrid;
|
||||||
|
m_errorRow = row;
|
||||||
|
|
||||||
|
event.Veto();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_aliases[ row ]->SetName( name );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_SETUP_BUSES::OnMemberGridCellChanging( wxGridEvent& event )
|
||||||
|
{
|
||||||
|
int row = event.GetRow();
|
||||||
|
|
||||||
|
if( row >= 0 )
|
||||||
|
{
|
||||||
|
wxString name = event.GetString();
|
||||||
|
|
||||||
|
if( name.IsEmpty() )
|
||||||
|
{
|
||||||
|
m_errorMsg = _( "Member net/alias name cannot be empty." );
|
||||||
|
m_errorGrid = m_membersGrid;
|
||||||
|
m_errorRow = event.GetRow();
|
||||||
|
|
||||||
|
event.Veto();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::shared_ptr<BUS_ALIAS>& alias = m_aliases[ m_lastAlias ];
|
||||||
|
|
||||||
|
alias->ClearMembers();
|
||||||
|
|
||||||
|
for( int ii = 0; ii < m_membersGrid->GetNumberRows(); ++ii )
|
||||||
|
{
|
||||||
|
if( ii == row )
|
||||||
|
{
|
||||||
|
// Parse a space-separated list and add each one
|
||||||
|
wxStringTokenizer tok( name, " " );
|
||||||
|
|
||||||
|
while( tok.HasMoreTokens() )
|
||||||
|
alias->AddMember( tok.GetNextToken() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alias->AddMember( m_membersGrid->GetCellValue( ii, 0 ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Bind( wxEVT_IDLE, &PANEL_SETUP_BUSES::reloadMembers, this );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_SETUP_BUSES::reloadMembers( wxIdleEvent& aEvent )
|
||||||
|
{
|
||||||
|
if( m_lastAlias >= 0 && m_lastAlias < m_aliasesGrid->GetNumberRows() )
|
||||||
|
{
|
||||||
|
const std::shared_ptr<BUS_ALIAS>& alias = m_aliases[ m_lastAlias ];
|
||||||
|
|
||||||
|
m_membersGrid->ClearRows();
|
||||||
|
m_membersGrid->AppendRows( alias->GetMemberCount() );
|
||||||
|
|
||||||
|
for( int ii = 0; ii < alias->GetMemberCount(); ++ii )
|
||||||
|
m_membersGrid->SetCellValue( ii, 0, alias->Members()[ii] );
|
||||||
|
}
|
||||||
|
|
||||||
|
Unbind( wxEVT_IDLE, &PANEL_SETUP_BUSES::reloadMembers, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_SETUP_BUSES::OnSizeGrid( wxSizeEvent& event )
|
||||||
|
{
|
||||||
|
auto setColSize =
|
||||||
|
[]( WX_GRID* grid )
|
||||||
|
{
|
||||||
|
int colSize = std::max( grid->GetClientSize().x, grid->GetVisibleWidth( 0 ) );
|
||||||
|
|
||||||
|
if( grid->GetColSize( 0 ) != colSize )
|
||||||
|
grid->SetColSize( 0, colSize );
|
||||||
|
};
|
||||||
|
|
||||||
|
setColSize( m_aliasesGrid );
|
||||||
|
setColSize( m_membersGrid );
|
||||||
|
|
||||||
|
// Always propagate for a grid repaint (needed if the height changes, as well as width)
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PANEL_SETUP_BUSES::OnUpdateUI( wxUpdateUIEvent& event )
|
||||||
|
{
|
||||||
|
// Handle a grid error. This is delayed to OnUpdateUI so that we can change focus
|
||||||
|
// even when the original validation was triggered from a killFocus event.
|
||||||
|
if( !m_errorMsg.IsEmpty() )
|
||||||
|
{
|
||||||
|
// We will re-enter this routine when the error dialog is displayed, so make
|
||||||
|
// sure we don't keep putting up more dialogs.
|
||||||
|
wxString errorMsg = m_errorMsg;
|
||||||
|
m_errorMsg = wxEmptyString;
|
||||||
|
|
||||||
|
DisplayErrorMessage( this, errorMsg );
|
||||||
|
|
||||||
|
m_errorGrid->SetFocus();
|
||||||
|
m_errorGrid->MakeCellVisible( m_errorRow, 0 );
|
||||||
|
m_errorGrid->SetGridCursor( m_errorRow, 0 );
|
||||||
|
|
||||||
|
m_errorGrid->EnableCellEditControl( true );
|
||||||
|
m_errorGrid->ShowCellEditControl();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !m_membersGrid->IsCellEditControlShown() )
|
||||||
|
{
|
||||||
|
int row = -1;
|
||||||
|
wxString aliasName;
|
||||||
|
|
||||||
|
if( m_aliasesGrid->IsCellEditControlShown() )
|
||||||
|
{
|
||||||
|
row = m_aliasesGrid->GetGridCursorRow();
|
||||||
|
wxGridCellEditor* cellEditor = m_aliasesGrid->GetCellEditor( row, 0 );
|
||||||
|
|
||||||
|
if( wxTextEntry* txt = dynamic_cast<wxTextEntry*>( cellEditor->GetControl() ) )
|
||||||
|
aliasName = txt->GetValue();
|
||||||
|
|
||||||
|
cellEditor->DecRef();
|
||||||
|
}
|
||||||
|
else if( m_aliasesGrid->GetGridCursorRow() >= 0 )
|
||||||
|
{
|
||||||
|
row = m_aliasesGrid->GetGridCursorRow();
|
||||||
|
aliasName = m_aliasesGrid->GetCellValue( row, 0 );
|
||||||
|
}
|
||||||
|
else if( m_lastAlias >= 0 && m_lastAlias < m_aliasesGrid->GetNumberRows() )
|
||||||
|
{
|
||||||
|
row = m_lastAlias;
|
||||||
|
aliasName = m_lastAliasName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( row < 0 )
|
||||||
|
{
|
||||||
|
m_membersBook->SetSelection( 1 );
|
||||||
|
}
|
||||||
|
else if( row != m_lastAlias || aliasName != m_lastAliasName )
|
||||||
|
{
|
||||||
|
if( m_membersBook->GetSelection() != 0 )
|
||||||
|
{
|
||||||
|
m_membersBook->SetSelection( 0 );
|
||||||
|
m_membersBook->GetPage( 0 )->Layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::shared_ptr<BUS_ALIAS>& alias = m_aliases[ row ];
|
||||||
|
alias->SetName( aliasName );
|
||||||
|
m_membersLabel->SetLabel( wxString::Format( m_membersLabelTemplate, aliasName ) );
|
||||||
|
|
||||||
|
if( alias->GetParent() )
|
||||||
|
{
|
||||||
|
wxFileName sheet_name( alias->GetParent()->GetFileName() );
|
||||||
|
m_source->SetLabel( wxS( "(" ) + sheet_name.GetFullName() + wxS( ")" ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_source->SetLabel( wxEmptyString );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_membersGrid->ClearRows();
|
||||||
|
m_membersGrid->AppendRows( alias->GetMemberCount() );
|
||||||
|
|
||||||
|
for( int ii = 0; ii < alias->GetMemberCount(); ++ii )
|
||||||
|
m_membersGrid->SetCellValue( ii, 0, alias->Members()[ii] );
|
||||||
|
|
||||||
|
m_lastAlias = row;
|
||||||
|
m_lastAliasName = aliasName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018 CERN
|
||||||
|
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
|
* @author Jon Evans <jon@craftyjon.com>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PANEL_SETUP_BUSES_H
|
||||||
|
#define PANEL_SETUP_BUSES_H
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <dialogs/panel_setup_buses_base.h>
|
||||||
|
#include <bus_alias.h>
|
||||||
|
|
||||||
|
class SCH_EDIT_FRAME;
|
||||||
|
class SCH_SCREEN;
|
||||||
|
class BUS_ALIAS;
|
||||||
|
|
||||||
|
class PANEL_SETUP_BUSES : public PANEL_SETUP_BUSES_BASE
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PANEL_SETUP_BUSES( wxWindow* aWindow, SCH_EDIT_FRAME* aFrame );
|
||||||
|
|
||||||
|
~PANEL_SETUP_BUSES() {}
|
||||||
|
|
||||||
|
bool TransferDataFromWindow() override;
|
||||||
|
bool TransferDataToWindow() override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void OnAddAlias( wxCommandEvent& aEvent ) override;
|
||||||
|
void OnDeleteAlias( wxCommandEvent& aEvent ) override;
|
||||||
|
void OnAddMember( wxCommandEvent& aEvent ) override;
|
||||||
|
void OnRemoveMember( wxCommandEvent& aEvent ) override;
|
||||||
|
void OnAliasesGridCellChanging( wxGridEvent& event );
|
||||||
|
void OnMemberGridCellChanging( wxGridEvent& event );
|
||||||
|
void OnSizeGrid( wxSizeEvent& event ) override;
|
||||||
|
void OnUpdateUI( wxUpdateUIEvent& event ) override;
|
||||||
|
|
||||||
|
void reloadMembers( wxIdleEvent& aEvent );
|
||||||
|
|
||||||
|
private:
|
||||||
|
SCH_EDIT_FRAME* m_frame;
|
||||||
|
wxString m_membersLabelTemplate;
|
||||||
|
|
||||||
|
std::vector< std::shared_ptr<BUS_ALIAS> > m_aliases;
|
||||||
|
int m_lastAlias;
|
||||||
|
wxString m_lastAliasName;
|
||||||
|
|
||||||
|
wxString m_errorMsg;
|
||||||
|
WX_GRID* m_errorGrid;
|
||||||
|
int m_errorRow;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // PANEL_SETUP_BUSES_H
|
|
@ -0,0 +1,183 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "widgets/wx_grid.h"
|
||||||
|
|
||||||
|
#include "panel_setup_buses_base.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
PANEL_SETUP_BUSES_BASE::PANEL_SETUP_BUSES_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||||
|
{
|
||||||
|
wxBoxSizer* bPanelSizer;
|
||||||
|
bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
bMargins = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
bLeftCol = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_busesLabel = new wxStaticText( this, wxID_ANY, _("Bus definitions:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_busesLabel->Wrap( -1 );
|
||||||
|
bLeftCol->Add( m_busesLabel, 0, wxTOP|wxBOTTOM, 5 );
|
||||||
|
|
||||||
|
m_aliasesGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
|
// Grid
|
||||||
|
m_aliasesGrid->CreateGrid( 0, 1 );
|
||||||
|
m_aliasesGrid->EnableEditing( true );
|
||||||
|
m_aliasesGrid->EnableGridLines( true );
|
||||||
|
m_aliasesGrid->EnableDragGridSize( false );
|
||||||
|
m_aliasesGrid->SetMargins( 0, 0 );
|
||||||
|
|
||||||
|
// Columns
|
||||||
|
m_aliasesGrid->SetColSize( 0, 300 );
|
||||||
|
m_aliasesGrid->EnableDragColMove( false );
|
||||||
|
m_aliasesGrid->EnableDragColSize( true );
|
||||||
|
m_aliasesGrid->SetColLabelValue( 0, _("Alias") );
|
||||||
|
m_aliasesGrid->SetColLabelSize( 22 );
|
||||||
|
m_aliasesGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
|
|
||||||
|
// Rows
|
||||||
|
m_aliasesGrid->EnableDragRowSize( true );
|
||||||
|
m_aliasesGrid->SetRowLabelSize( 0 );
|
||||||
|
m_aliasesGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
|
|
||||||
|
// Label Appearance
|
||||||
|
|
||||||
|
// Cell Defaults
|
||||||
|
m_aliasesGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
||||||
|
m_aliasesGrid->SetMinSize( wxSize( -1,180 ) );
|
||||||
|
|
||||||
|
bLeftCol->Add( m_aliasesGrid, 1, wxEXPAND, 10 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizer10;
|
||||||
|
bSizer10 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
m_addAlias = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||||
|
bSizer10->Add( m_addAlias, 0, wxTOP, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizer10->Add( 20, 0, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_deleteAlias = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||||
|
bSizer10->Add( m_deleteAlias, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizer10->Add( 15, 0, 0, 0, 5 );
|
||||||
|
|
||||||
|
m_source = new wxStaticText( this, wxID_ANY, _("(source)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_source->Wrap( -1 );
|
||||||
|
bSizer10->Add( m_source, 1, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bLeftCol->Add( bSizer10, 0, wxEXPAND, 10 );
|
||||||
|
|
||||||
|
|
||||||
|
bMargins->Add( bLeftCol, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
||||||
|
|
||||||
|
wxBoxSizer* bRightColumn;
|
||||||
|
bRightColumn = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_membersBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
membersPanel = new wxPanel( m_membersBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
|
wxBoxSizer* bSizer7;
|
||||||
|
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_membersLabel = new wxStaticText( membersPanel, wxID_ANY, _("Members of '%s':"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_membersLabel->Wrap( -1 );
|
||||||
|
bSizer7->Add( m_membersLabel, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_membersGrid = new WX_GRID( membersPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
||||||
|
// Grid
|
||||||
|
m_membersGrid->CreateGrid( 0, 1 );
|
||||||
|
m_membersGrid->EnableEditing( true );
|
||||||
|
m_membersGrid->EnableGridLines( true );
|
||||||
|
m_membersGrid->EnableDragGridSize( false );
|
||||||
|
m_membersGrid->SetMargins( 0, 0 );
|
||||||
|
|
||||||
|
// Columns
|
||||||
|
m_membersGrid->SetColSize( 0, 300 );
|
||||||
|
m_membersGrid->EnableDragColMove( false );
|
||||||
|
m_membersGrid->EnableDragColSize( true );
|
||||||
|
m_membersGrid->SetColLabelValue( 0, _("Net / Nested Bus Name") );
|
||||||
|
m_membersGrid->SetColLabelSize( 22 );
|
||||||
|
m_membersGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
|
|
||||||
|
// Rows
|
||||||
|
m_membersGrid->EnableDragRowSize( true );
|
||||||
|
m_membersGrid->SetRowLabelSize( 0 );
|
||||||
|
m_membersGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
|
|
||||||
|
// Label Appearance
|
||||||
|
|
||||||
|
// Cell Defaults
|
||||||
|
m_membersGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
||||||
|
m_membersGrid->SetMinSize( wxSize( -1,180 ) );
|
||||||
|
|
||||||
|
bSizer7->Add( m_membersGrid, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizer101;
|
||||||
|
bSizer101 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
m_addMember = new wxBitmapButton( membersPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||||
|
bSizer101->Add( m_addMember, 0, wxTOP, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizer101->Add( 20, 0, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_removeMember = new wxBitmapButton( membersPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||||
|
bSizer101->Add( m_removeMember, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bSizer7->Add( bSizer101, 0, wxEXPAND|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
membersPanel->SetSizer( bSizer7 );
|
||||||
|
membersPanel->Layout();
|
||||||
|
bSizer7->Fit( membersPanel );
|
||||||
|
m_membersBook->AddPage( membersPanel, _("a page"), false );
|
||||||
|
emptyPanel = new wxPanel( m_membersBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
|
emptyPanel->Enable( false );
|
||||||
|
|
||||||
|
m_membersBook->AddPage( emptyPanel, _("a page"), false );
|
||||||
|
|
||||||
|
bRightColumn->Add( m_membersBook, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bMargins->Add( bRightColumn, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
bPanelSizer->Add( bMargins, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
this->SetSizer( bPanelSizer );
|
||||||
|
this->Layout();
|
||||||
|
bPanelSizer->Fit( this );
|
||||||
|
|
||||||
|
// Connect Events
|
||||||
|
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BUSES_BASE::OnUpdateUI ) );
|
||||||
|
m_aliasesGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_BUSES_BASE::OnSizeGrid ), NULL, this );
|
||||||
|
m_addAlias->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnAddAlias ), NULL, this );
|
||||||
|
m_deleteAlias->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnDeleteAlias ), NULL, this );
|
||||||
|
m_membersGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_BUSES_BASE::OnSizeGrid ), NULL, this );
|
||||||
|
m_addMember->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnAddMember ), NULL, this );
|
||||||
|
m_removeMember->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnRemoveMember ), NULL, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
PANEL_SETUP_BUSES_BASE::~PANEL_SETUP_BUSES_BASE()
|
||||||
|
{
|
||||||
|
// Disconnect Events
|
||||||
|
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BUSES_BASE::OnUpdateUI ) );
|
||||||
|
m_aliasesGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_BUSES_BASE::OnSizeGrid ), NULL, this );
|
||||||
|
m_addAlias->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnAddAlias ), NULL, this );
|
||||||
|
m_deleteAlias->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnDeleteAlias ), NULL, this );
|
||||||
|
m_membersGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_BUSES_BASE::OnSizeGrid ), NULL, this );
|
||||||
|
m_addMember->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnAddMember ), NULL, this );
|
||||||
|
m_removeMember->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnRemoveMember ), NULL, this );
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,981 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<wxFormBuilder_Project>
|
||||||
|
<FileVersion major="1" minor="16" />
|
||||||
|
<object class="Project" expanded="1">
|
||||||
|
<property name="class_decoration"></property>
|
||||||
|
<property name="code_generation">C++</property>
|
||||||
|
<property name="disconnect_events">1</property>
|
||||||
|
<property name="disconnect_mode">source_name</property>
|
||||||
|
<property name="disconnect_php_events">0</property>
|
||||||
|
<property name="disconnect_python_events">0</property>
|
||||||
|
<property name="embedded_files_path">res</property>
|
||||||
|
<property name="encoding">UTF-8</property>
|
||||||
|
<property name="event_generation">connect</property>
|
||||||
|
<property name="file">panel_setup_buses_base</property>
|
||||||
|
<property name="first_id">1000</property>
|
||||||
|
<property name="help_provider">none</property>
|
||||||
|
<property name="image_path_wrapper_function_name"></property>
|
||||||
|
<property name="indent_with_spaces"></property>
|
||||||
|
<property name="internationalize">1</property>
|
||||||
|
<property name="name">PanelSetupBuses</property>
|
||||||
|
<property name="namespace"></property>
|
||||||
|
<property name="path">.</property>
|
||||||
|
<property name="precompiled_header"></property>
|
||||||
|
<property name="relative_path">1</property>
|
||||||
|
<property name="skip_lua_events">1</property>
|
||||||
|
<property name="skip_php_events">1</property>
|
||||||
|
<property name="skip_python_events">1</property>
|
||||||
|
<property name="ui_table">UI</property>
|
||||||
|
<property name="use_array_enum">0</property>
|
||||||
|
<property name="use_enum">1</property>
|
||||||
|
<property name="use_microsoft_bom">0</property>
|
||||||
|
<object class="Panel" expanded="1">
|
||||||
|
<property name="aui_managed">0</property>
|
||||||
|
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="event_handler">impl_virtual</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">PANEL_SETUP_BUSES_BASE</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="size">-1,-1</property>
|
||||||
|
<property name="subclass">; forward_declare</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="two_step_creation">0</property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||||
|
<event name="OnUpdateUI">OnUpdateUI</event>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bPanelSizer</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bMargins</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">10</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">bLeftCol</property>
|
||||||
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxTOP|wxBOTTOM</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">Bus definitions:</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_busesLabel</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="0">
|
||||||
|
<property name="border">10</property>
|
||||||
|
<property name="flag">wxEXPAND</property>
|
||||||
|
<property name="proportion">1</property>
|
||||||
|
<object class="wxGrid" 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="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_TOP</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">22</property>
|
||||||
|
<property name="col_label_values">"Alias"</property>
|
||||||
|
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||||
|
<property name="cols">1</property>
|
||||||
|
<property name="column_sizes">300</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">1</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">-1,-1</property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size">-1,180</property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_aliasesGrid</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_CENTER</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">0</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></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"></property>
|
||||||
|
<event name="OnSize">OnSizeGrid</event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">10</property>
|
||||||
|
<property name="flag">wxEXPAND</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizer10</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxTOP</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBitmapButton" 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">Add Bus</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">-1,-1</property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_addAlias</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">; 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">OnAddAlias</event>
|
||||||
|
</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">0</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="width">20</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBitmapButton" 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">Delete Bus</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">-1,-1</property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_deleteAlias</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">; 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">OnDeleteAlias</event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag"></property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="spacer" expanded="1">
|
||||||
|
<property name="height">0</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="width">15</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">1</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">(source)</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_source</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>
|
||||||
|
</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">bRightColumn</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">1</property>
|
||||||
|
<object class="wxSimplebook" 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"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_membersBook</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="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>
|
||||||
|
<object class="simplebookpage" expanded="1">
|
||||||
|
<property name="label">a page</property>
|
||||||
|
<property name="select">0</property>
|
||||||
|
<object class="wxPanel" 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"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">membersPanel</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="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">wxTAB_TRAVERSAL</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizer7</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|wxEXPAND</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">Members of '%s':</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_membersLabel</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|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">1</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_TOP</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">22</property>
|
||||||
|
<property name="col_label_values">"Net / Nested Bus Name"</property>
|
||||||
|
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||||
|
<property name="cols">1</property>
|
||||||
|
<property name="column_sizes">300</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">1</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">-1,-1</property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size">-1,180</property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_membersGrid</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_CENTER</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">0</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></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"></property>
|
||||||
|
<event name="OnSize">OnSizeGrid</event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBoxSizer" expanded="1">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizer101</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxTOP</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBitmapButton" 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">Add Member</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">-1,-1</property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_addMember</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">; 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">OnAddMember</event>
|
||||||
|
</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">0</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="width">20</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBitmapButton" 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">Remove Member</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">-1,-1</property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_removeMember</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">; 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">OnRemoveMember</event>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="simplebookpage" expanded="1">
|
||||||
|
<property name="label">a page</property>
|
||||||
|
<property name="select">0</property>
|
||||||
|
<object class="wxPanel" 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">0</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"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">emptyPanel</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="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">wxTAB_TRAVERSAL</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</wxFormBuilder_Project>
|
|
@ -0,0 +1,72 @@
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||||
|
// http://www.wxformbuilder.org/
|
||||||
|
//
|
||||||
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <wx/artprov.h>
|
||||||
|
#include <wx/xrc/xmlres.h>
|
||||||
|
#include <wx/intl.h>
|
||||||
|
class WX_GRID;
|
||||||
|
|
||||||
|
#include <wx/string.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
#include <wx/gdicmn.h>
|
||||||
|
#include <wx/font.h>
|
||||||
|
#include <wx/colour.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
#include <wx/grid.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>
|
||||||
|
#include <wx/simplebook.h>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// Class PANEL_SETUP_BUSES_BASE
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
class PANEL_SETUP_BUSES_BASE : public wxPanel
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxBoxSizer* bMargins;
|
||||||
|
wxBoxSizer* bLeftCol;
|
||||||
|
wxStaticText* m_busesLabel;
|
||||||
|
WX_GRID* m_aliasesGrid;
|
||||||
|
wxBitmapButton* m_addAlias;
|
||||||
|
wxBitmapButton* m_deleteAlias;
|
||||||
|
wxStaticText* m_source;
|
||||||
|
wxSimplebook* m_membersBook;
|
||||||
|
wxPanel* membersPanel;
|
||||||
|
wxStaticText* m_membersLabel;
|
||||||
|
WX_GRID* m_membersGrid;
|
||||||
|
wxBitmapButton* m_addMember;
|
||||||
|
wxBitmapButton* m_removeMember;
|
||||||
|
wxPanel* emptyPanel;
|
||||||
|
|
||||||
|
// Virtual event handlers, override them in your derived class
|
||||||
|
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnSizeGrid( wxSizeEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnAddAlias( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnDeleteAlias( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnAddMember( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnRemoveMember( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
PANEL_SETUP_BUSES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||||
|
|
||||||
|
~PANEL_SETUP_BUSES_BASE();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
|
@ -49,7 +49,9 @@ void PANEL_SETUP_FORMATTING::onCheckBoxIref( wxCommandEvent& event )
|
||||||
|
|
||||||
m_radioFormatStandard->Enable( enabled );
|
m_radioFormatStandard->Enable( enabled );
|
||||||
m_radioFormatAbbreviated->Enable( enabled );
|
m_radioFormatAbbreviated->Enable( enabled );
|
||||||
|
m_prefixLabel->Enable( enabled );
|
||||||
m_prefixCtrl->Enable( enabled );
|
m_prefixCtrl->Enable( enabled );
|
||||||
|
m_suffixLabel->Enable( enabled );
|
||||||
m_suffixCtrl->Enable( enabled );
|
m_suffixCtrl->Enable( enabled );
|
||||||
m_listOwnPage->Enable( enabled );
|
m_listOwnPage->Enable( enabled );
|
||||||
}
|
}
|
||||||
|
@ -86,7 +88,9 @@ bool PANEL_SETUP_FORMATTING::TransferDataToWindow()
|
||||||
|
|
||||||
m_radioFormatStandard->Enable( settings.m_IntersheetRefsShow );
|
m_radioFormatStandard->Enable( settings.m_IntersheetRefsShow );
|
||||||
m_radioFormatAbbreviated->Enable( settings.m_IntersheetRefsShow );
|
m_radioFormatAbbreviated->Enable( settings.m_IntersheetRefsShow );
|
||||||
|
m_prefixLabel->Enable( settings.m_IntersheetRefsShow );
|
||||||
m_prefixCtrl->Enable( settings.m_IntersheetRefsShow );
|
m_prefixCtrl->Enable( settings.m_IntersheetRefsShow );
|
||||||
|
m_suffixLabel->Enable( settings.m_IntersheetRefsShow );
|
||||||
m_suffixCtrl->Enable( settings.m_IntersheetRefsShow );
|
m_suffixCtrl->Enable( settings.m_IntersheetRefsShow );
|
||||||
m_listOwnPage->Enable( settings.m_IntersheetRefsShow );
|
m_listOwnPage->Enable( settings.m_IntersheetRefsShow );
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
// 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!
|
||||||
|
@ -90,7 +90,7 @@ PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWi
|
||||||
fgSizer2->Add( m_labelSizeRatioUnits, 0, wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 5 );
|
fgSizer2->Add( m_labelSizeRatioUnits, 0, wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 5 );
|
||||||
|
|
||||||
|
|
||||||
sbSizer4->Add( fgSizer2, 1, wxALL|wxEXPAND, 5 );
|
sbSizer4->Add( fgSizer2, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bLeftColumn->Add( sbSizer4, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
bLeftColumn->Add( sbSizer4, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
<wxFormBuilder_Project>
|
<wxFormBuilder_Project>
|
||||||
<FileVersion major="1" minor="15" />
|
<FileVersion major="1" minor="16" />
|
||||||
<object class="Project" expanded="1">
|
<object class="Project" expanded="1">
|
||||||
<property name="class_decoration"></property>
|
<property name="class_decoration"></property>
|
||||||
<property name="code_generation">C++</property>
|
<property name="code_generation">C++</property>
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
<property name="file">panel_setup_formatting_base</property>
|
<property name="file">panel_setup_formatting_base</property>
|
||||||
<property name="first_id">1000</property>
|
<property name="first_id">1000</property>
|
||||||
<property name="help_provider">none</property>
|
<property name="help_provider">none</property>
|
||||||
|
<property name="image_path_wrapper_function_name"></property>
|
||||||
<property name="indent_with_spaces"></property>
|
<property name="indent_with_spaces"></property>
|
||||||
<property name="internationalize">1</property>
|
<property name="internationalize">1</property>
|
||||||
<property name="name">PanelSetupFormatting</property>
|
<property name="name">PanelSetupFormatting</property>
|
||||||
|
@ -25,6 +26,7 @@
|
||||||
<property name="skip_php_events">1</property>
|
<property name="skip_php_events">1</property>
|
||||||
<property name="skip_python_events">1</property>
|
<property name="skip_python_events">1</property>
|
||||||
<property name="ui_table">UI</property>
|
<property name="ui_table">UI</property>
|
||||||
|
<property name="use_array_enum">0</property>
|
||||||
<property name="use_enum">1</property>
|
<property name="use_enum">1</property>
|
||||||
<property name="use_microsoft_bom">0</property>
|
<property name="use_microsoft_bom">0</property>
|
||||||
<object class="Panel" expanded="1">
|
<object class="Panel" expanded="1">
|
||||||
|
@ -46,6 +48,7 @@
|
||||||
<property name="size">-1,-1</property>
|
<property name="size">-1,-1</property>
|
||||||
<property name="subclass">; forward_declare</property>
|
<property name="subclass">; forward_declare</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
|
<property name="two_step_creation">0</property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||||
|
@ -227,7 +230,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|wxEXPAND</property>
|
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxFlexGridSizer" expanded="1">
|
<object class="wxFlexGridSizer" expanded="1">
|
||||||
<property name="cols">3</property>
|
<property name="cols">3</property>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
// 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!
|
||||||
|
@ -72,13 +72,14 @@ class PANEL_SETUP_FORMATTING_BASE : public wxPanel
|
||||||
wxTextCtrl* m_gapLengthCtrl;
|
wxTextCtrl* m_gapLengthCtrl;
|
||||||
wxStaticText* m_dashedLineHelp;
|
wxStaticText* m_dashedLineHelp;
|
||||||
|
|
||||||
// Virtual event handlers, overide them in your derived class
|
// Virtual event handlers, override them in your derived class
|
||||||
virtual void onCheckBoxIref( wxCommandEvent& event ) { event.Skip(); }
|
virtual void onCheckBoxIref( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||||
|
|
||||||
~PANEL_SETUP_FORMATTING_BASE();
|
~PANEL_SETUP_FORMATTING_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -69,8 +69,6 @@ int InvokeDialogPrintUsingPrinter( SCH_EDIT_FRAME* aCaller );
|
||||||
/// DIALOG_BOM::ShowModal() returns.
|
/// DIALOG_BOM::ShowModal() returns.
|
||||||
int InvokeDialogCreateBOM( SCH_EDIT_FRAME* aCaller );
|
int InvokeDialogCreateBOM( SCH_EDIT_FRAME* aCaller );
|
||||||
|
|
||||||
/// Create and show DIALOG_BUS_MANAGER
|
|
||||||
void InvokeDialogBusManager( SCH_EDIT_FRAME* aCaller );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create and shows NETLIST_DIALOG and returns whatever
|
* Create and shows NETLIST_DIALOG and returns whatever
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||||
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@gmail.com>
|
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@gmail.com>
|
||||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
* Copyright (C) 2019 CERN
|
* Copyright (C) 2019 CERN
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -281,7 +281,6 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
|
||||||
|
|
||||||
toolsMenu->AppendSeparator();
|
toolsMenu->AppendSeparator();
|
||||||
toolsMenu->Add( EE_ACTIONS::annotate );
|
toolsMenu->Add( EE_ACTIONS::annotate );
|
||||||
toolsMenu->Add( EE_ACTIONS::showBusManager );
|
|
||||||
|
|
||||||
toolsMenu->AppendSeparator();
|
toolsMenu->AppendSeparator();
|
||||||
toolsMenu->Add( EE_ACTIONS::assignFootprints );
|
toolsMenu->Add( EE_ACTIONS::assignFootprints );
|
||||||
|
|
|
@ -638,11 +638,6 @@ TOOL_ACTION EE_ACTIONS::remapSymbols( "eeschema.EditorControl.remapSymbols",
|
||||||
_( "Remap library symbol references in legacy schematics to the symbol library table" ),
|
_( "Remap library symbol references in legacy schematics to the symbol library table" ),
|
||||||
BITMAPS::rescue );
|
BITMAPS::rescue );
|
||||||
|
|
||||||
TOOL_ACTION EE_ACTIONS::showBusManager( "eeschema.EditorControl.showBusManager",
|
|
||||||
AS_GLOBAL, 0, "",
|
|
||||||
_( "Bus Definitions..." ), _( "Manage bus definitions" ),
|
|
||||||
BITMAPS::bus_definition_tool );
|
|
||||||
|
|
||||||
TOOL_ACTION EE_ACTIONS::drawSheetOnClipboard( "eeschema.EditorControl.drawSheetOnClipboard",
|
TOOL_ACTION EE_ACTIONS::drawSheetOnClipboard( "eeschema.EditorControl.drawSheetOnClipboard",
|
||||||
AS_GLOBAL, 0, "",
|
AS_GLOBAL, 0, "",
|
||||||
_( "Export Drawing to Clipboard" ), _( "Export drawing of current sheet to clipboard" ),
|
_( "Export Drawing to Clipboard" ), _( "Export drawing of current sheet to clipboard" ),
|
||||||
|
|
|
@ -158,7 +158,6 @@ public:
|
||||||
static TOOL_ACTION updateSymbol;
|
static TOOL_ACTION updateSymbol;
|
||||||
static TOOL_ACTION assignFootprints;
|
static TOOL_ACTION assignFootprints;
|
||||||
static TOOL_ACTION assignNetclass;
|
static TOOL_ACTION assignNetclass;
|
||||||
static TOOL_ACTION showBusManager;
|
|
||||||
static TOOL_ACTION schematicSetup;
|
static TOOL_ACTION schematicSetup;
|
||||||
static TOOL_ACTION editPageNumber;
|
static TOOL_ACTION editPageNumber;
|
||||||
static TOOL_ACTION checkSymbol;
|
static TOOL_ACTION checkSymbol;
|
||||||
|
|
|
@ -1310,22 +1310,20 @@ void SCH_EDIT_TOOL::editFieldText( SCH_FIELD* aField )
|
||||||
|
|
||||||
int SCH_EDIT_TOOL::EditField( const TOOL_EVENT& aEvent )
|
int SCH_EDIT_TOOL::EditField( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
std::initializer_list<KICAD_T> filter = {};
|
EE_SELECTION sel;
|
||||||
|
|
||||||
if( aEvent.IsAction( &EE_ACTIONS::editReference ) )
|
if( aEvent.IsAction( &EE_ACTIONS::editReference ) )
|
||||||
filter = { SCH_FIELD_LOCATE_REFERENCE_T, SCH_SYMBOL_T };
|
sel = m_selectionTool->RequestSelection( { SCH_FIELD_LOCATE_REFERENCE_T, SCH_SYMBOL_T } );
|
||||||
else if( aEvent.IsAction( &EE_ACTIONS::editValue ) )
|
else if( aEvent.IsAction( &EE_ACTIONS::editValue ) )
|
||||||
filter = { SCH_FIELD_LOCATE_VALUE_T, SCH_SYMBOL_T };
|
sel = m_selectionTool->RequestSelection( { SCH_FIELD_LOCATE_VALUE_T, SCH_SYMBOL_T } );
|
||||||
else if( aEvent.IsAction( &EE_ACTIONS::editFootprint ) )
|
else if( aEvent.IsAction( &EE_ACTIONS::editFootprint ) )
|
||||||
filter = { SCH_FIELD_LOCATE_FOOTPRINT_T, SCH_SYMBOL_T };
|
sel = m_selectionTool->RequestSelection( { SCH_FIELD_LOCATE_FOOTPRINT_T, SCH_SYMBOL_T } );
|
||||||
|
|
||||||
EE_SELECTION& selection = m_selectionTool->RequestSelection( filter );
|
if( sel.Size() != 1 )
|
||||||
|
|
||||||
if( selection.Size() != 1 )
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
bool clearSelection = selection.IsHover();
|
bool clearSelection = sel.IsHover();
|
||||||
EDA_ITEM* item = selection.Front();
|
EDA_ITEM* item = sel.Front();
|
||||||
|
|
||||||
if( item->Type() == SCH_SYMBOL_T )
|
if( item->Type() == SCH_SYMBOL_T )
|
||||||
{
|
{
|
||||||
|
|
|
@ -2119,13 +2119,6 @@ int SCH_EDITOR_CONTROL::DrawSheetOnClipboard( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int SCH_EDITOR_CONTROL::ShowBusManager( const TOOL_EVENT& aEvent )
|
|
||||||
{
|
|
||||||
InvokeDialogBusManager( m_frame );
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int SCH_EDITOR_CONTROL::ShowHierarchy( const TOOL_EVENT& aEvent )
|
int SCH_EDITOR_CONTROL::ShowHierarchy( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
getEditFrame<SCH_EDIT_FRAME>()->ToggleSchematicHierarchy();
|
getEditFrame<SCH_EDIT_FRAME>()->ToggleSchematicHierarchy();
|
||||||
|
@ -2388,7 +2381,6 @@ void SCH_EDITOR_CONTROL::setTransitions()
|
||||||
Go( &SCH_EDITOR_CONTROL::GenerateBOM, EE_ACTIONS::generateBOM.MakeEvent() );
|
Go( &SCH_EDITOR_CONTROL::GenerateBOM, EE_ACTIONS::generateBOM.MakeEvent() );
|
||||||
Go( &SCH_EDITOR_CONTROL::DrawSheetOnClipboard, EE_ACTIONS::drawSheetOnClipboard.MakeEvent() );
|
Go( &SCH_EDITOR_CONTROL::DrawSheetOnClipboard, EE_ACTIONS::drawSheetOnClipboard.MakeEvent() );
|
||||||
|
|
||||||
Go( &SCH_EDITOR_CONTROL::ShowBusManager, EE_ACTIONS::showBusManager.MakeEvent() );
|
|
||||||
Go( &SCH_EDITOR_CONTROL::ShowHierarchy, EE_ACTIONS::showHierarchy.MakeEvent() );
|
Go( &SCH_EDITOR_CONTROL::ShowHierarchy, EE_ACTIONS::showHierarchy.MakeEvent() );
|
||||||
|
|
||||||
Go( &SCH_EDITOR_CONTROL::ToggleHiddenPins, EE_ACTIONS::toggleHiddenPins.MakeEvent() );
|
Go( &SCH_EDITOR_CONTROL::ToggleHiddenPins, EE_ACTIONS::toggleHiddenPins.MakeEvent() );
|
||||||
|
|
|
@ -131,7 +131,6 @@ public:
|
||||||
int GenerateBOM( const TOOL_EVENT& aEvent );
|
int GenerateBOM( const TOOL_EVENT& aEvent );
|
||||||
int DrawSheetOnClipboard( const TOOL_EVENT& aEvent );
|
int DrawSheetOnClipboard( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
int ShowBusManager( const TOOL_EVENT& aEvent );
|
|
||||||
int ShowHierarchy( const TOOL_EVENT& aEvent );
|
int ShowHierarchy( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
int ToggleHiddenPins( const TOOL_EVENT& aEvent );
|
int ToggleHiddenPins( const TOOL_EVENT& aEvent );
|
||||||
|
|
|
@ -78,6 +78,8 @@ private:
|
||||||
bool m_netclassesDirty; // The netclass drop-down menus need rebuilding
|
bool m_netclassesDirty; // The netclass drop-down menus need rebuilding
|
||||||
int m_hoveredCol; // Column being hovered over, for tooltips
|
int m_hoveredCol; // Column being hovered over, for tooltips
|
||||||
wxString m_lastPattern;
|
wxString m_lastPattern;
|
||||||
|
|
||||||
|
int m_lastNetclassGridWidth;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //PANEL_SETUP_NETCLASSES_H
|
#endif //PANEL_SETUP_NETCLASSES_H
|
||||||
|
|
Loading…
Reference in New Issue