Switch appearance panel to custom collapsible pane widget

The new widget looks the same on all platforms and fixes a few
bugs with the wxWidgets version
This commit is contained in:
Jon Evans 2020-09-04 21:45:33 -04:00
parent 7e2a6a9b64
commit 758a4c26d5
12 changed files with 755 additions and 955 deletions

View File

@ -100,6 +100,8 @@ set( BMAPS_SMALL
trash trash
tree_nosel tree_nosel
tree_sel tree_sel
triangle_down
triangle_right
visibility visibility
visibility_off visibility_off
www www

View File

@ -0,0 +1,19 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps_png/bitmaps_list.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0xb5, 0xfa, 0x37,
0xea, 0x00, 0x00, 0x00, 0x24, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x63, 0x60, 0x18, 0x05, 0xc8,
0xa0, 0x9c, 0xe1, 0x3f, 0x1a, 0xac, 0xc7, 0xaf, 0xa4, 0x1e, 0xbf, 0x29, 0xf5, 0xf8, 0x2d, 0xaa,
0xc7, 0xe7, 0x96, 0x06, 0x20, 0xa4, 0x37, 0x00, 0x00, 0x13, 0xe8, 0x18, 0xc5, 0xba, 0x45, 0x45,
0xda, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE triangle_down_xpm[1] = {{ png, sizeof( png ), "triangle_down_xpm" }};
//EOF

View File

@ -0,0 +1,20 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps_png/bitmaps_list.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0xb5, 0xfa, 0x37,
0xea, 0x00, 0x00, 0x00, 0x30, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x63, 0x60, 0x18, 0x00, 0xd0,
0x41, 0x48, 0xc1, 0x7f, 0x42, 0x4a, 0xfe, 0x13, 0x52, 0xf2, 0x9f, 0x90, 0x92, 0xff, 0x84, 0x94,
0xc0, 0x14, 0xd4, 0xe3, 0x57, 0x50, 0x8f, 0xdf, 0x8a, 0x7a, 0xfc, 0x8e, 0xac, 0xc7, 0xef, 0xcd,
0x06, 0xba, 0x47, 0x0d, 0x00, 0x87, 0xf7, 0x19, 0x11, 0xb1, 0x1b, 0x8d, 0xb6, 0x00, 0x00, 0x00,
0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE triangle_right_xpm[1] = {{ png, sizeof( png ), "triangle_right_xpm" }};
//EOF

View File

@ -456,6 +456,8 @@ EXTERN_BITMAP( track_unlocked_xpm )
EXTERN_BITMAP( trash_xpm ) EXTERN_BITMAP( trash_xpm )
EXTERN_BITMAP( tree_nosel_xpm ) EXTERN_BITMAP( tree_nosel_xpm )
EXTERN_BITMAP( tree_sel_xpm ) EXTERN_BITMAP( tree_sel_xpm )
EXTERN_BITMAP( triangle_right_xpm )
EXTERN_BITMAP( triangle_down_xpm )
EXTERN_BITMAP( undelete_xpm ) EXTERN_BITMAP( undelete_xpm )
EXTERN_BITMAP( undo_xpm ) EXTERN_BITMAP( undo_xpm )
EXTERN_BITMAP( unit_inch_xpm ) EXTERN_BITMAP( unit_inch_xpm )

View File

@ -203,6 +203,7 @@ set( COMMON_WIDGET_SRCS
widgets/app_progress_dialog.cpp widgets/app_progress_dialog.cpp
widgets/bitmap_toggle.cpp widgets/bitmap_toggle.cpp
widgets/button_row_panel.cpp widgets/button_row_panel.cpp
widgets/collapsible_pane.cpp
widgets/color_swatch.cpp widgets/color_swatch.cpp
widgets/footprint_choice.cpp widgets/footprint_choice.cpp
widgets/footprint_preview_widget.cpp widgets/footprint_preview_widget.cpp

View File

@ -0,0 +1,364 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* 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 <bitmaps.h>
#include <widgets/collapsible_pane.h>
#include <wx/collpane.h>
#include <wx/renderer.h>
wxDEFINE_EVENT( WX_COLLAPSIBLE_PANE_HEADER_CHANGED, wxCommandEvent );
wxDEFINE_EVENT( WX_COLLAPSIBLE_PANE_CHANGED, wxCommandEvent );
bool WX_COLLAPSIBLE_PANE:: Create( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
const wxPoint& aPos, const wxSize& aSize, long aStyle,
const wxValidator& aValidator, const wxString& aName )
{
if( !wxControl::Create( aParent, aId, aPos, aSize, aStyle, aValidator, aName ) )
return false;
m_sizer = new wxBoxSizer( wxVERTICAL );
m_header = new WX_COLLAPSIBLE_PANE_HEADER( this, wxID_ANY, aLabel, wxPoint( 0, 0 ),
wxDefaultSize );
m_sizer->Add( m_header, wxSizerFlags().Border( wxBOTTOM, getBorder() ) );
m_pane = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxTAB_TRAVERSAL | wxNO_BORDER, wxT( "COLLAPSIBLE_PANE_PANE" ) );
m_pane->Hide();
Bind( wxEVT_SIZE, &WX_COLLAPSIBLE_PANE::onSize, this );
Bind( WX_COLLAPSIBLE_PANE_HEADER_CHANGED, &WX_COLLAPSIBLE_PANE::onHeaderClicked, this );
return true;
}
void WX_COLLAPSIBLE_PANE::init()
{
m_pane = nullptr;
m_sizer = nullptr;
m_header = nullptr;
}
WX_COLLAPSIBLE_PANE::~WX_COLLAPSIBLE_PANE()
{
if( m_sizer )
m_sizer->SetContainingWindow( nullptr );
// Not owned by wxWindow
delete m_sizer;
}
void WX_COLLAPSIBLE_PANE::Collapse( bool aCollapse )
{
if( IsCollapsed() == aCollapse )
return;
InvalidateBestSize();
m_pane->Show( !aCollapse );
m_header->SetCollapsed( aCollapse );
SetSize( GetBestSize() );
}
bool WX_COLLAPSIBLE_PANE::IsCollapsed() const
{
return !m_pane || !m_pane->IsShown();
}
void WX_COLLAPSIBLE_PANE::SetLabel( const wxString& aLabel )
{
m_header->SetLabel( aLabel );
m_header->SetInitialSize();
Layout();
}
bool WX_COLLAPSIBLE_PANE::SetBackgroundColour( const wxColour& aColor )
{
m_header->SetBackgroundColour( aColor );
return wxWindow::SetBackgroundColour( aColor );
}
bool WX_COLLAPSIBLE_PANE::InformFirstDirection( int aDirection, int aSize, int aAvailableOtherDir )
{
wxWindow* const pane = GetPane();
if( !pane )
return false;
if( !pane->InformFirstDirection( aDirection, aSize, aAvailableOtherDir ) )
return false;
InvalidateBestSize();
return true;
}
wxSize WX_COLLAPSIBLE_PANE::DoGetBestClientSize() const
{
wxSize size = m_sizer->GetMinSize();
if( IsExpanded() )
{
wxSize paneSize = m_pane->GetBestSize();
size.SetWidth( std::max( size.GetWidth(), paneSize.x ) );
size.SetHeight( size.y + getBorder() + paneSize.y );
}
return size;
}
bool WX_COLLAPSIBLE_PANE::Layout()
{
if( !m_sizer || !m_pane || !m_header )
return false;
wxSize size( GetSize() );
m_sizer->SetDimension( 0, 0, size.x, m_sizer->GetMinSize().y );
m_sizer->Layout();
if( IsExpanded() )
{
int yoffset = m_sizer->GetSize().y + getBorder();
m_pane->SetSize( 0, yoffset, size.x, size.y - yoffset );
m_pane->Layout();
}
return true;
}
int WX_COLLAPSIBLE_PANE::getBorder() const
{
#if defined( __WXMSW__ )
wxASSERT( m_header );
return m_header->ConvertDialogToPixels( wxSize( 2, 0 ) ).x;
#else
return 3;
#endif
}
void WX_COLLAPSIBLE_PANE::onSize( wxSizeEvent& aEvent )
{
Layout();
aEvent.Skip();
}
void WX_COLLAPSIBLE_PANE::onHeaderClicked( wxCommandEvent& aEvent )
{
if( aEvent.GetEventObject() != m_header )
{
aEvent.Skip();
return;
}
Collapse( !IsCollapsed() );
wxCommandEvent evt( WX_COLLAPSIBLE_PANE_CHANGED, GetId() );
evt.SetEventObject( this );
ProcessEvent( evt );
}
// WX_COLLAPSIBLE_PANE_HEADER implementation
void WX_COLLAPSIBLE_PANE_HEADER::init()
{
m_collapsed = true;
m_inWindow = false;
}
bool WX_COLLAPSIBLE_PANE_HEADER::Create( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
const wxPoint& aPos, const wxSize& aSize, long aStyle,
const wxValidator& aValidator, const wxString& aName )
{
if ( !wxControl::Create( aParent, aId, aPos, aSize, aStyle, aValidator, aName ) )
return false;
m_iconRight = KiBitmap( triangle_right_xpm );
m_iconDown = KiBitmap( triangle_down_xpm );
SetLabel( aLabel );
Bind( wxEVT_PAINT, &WX_COLLAPSIBLE_PANE_HEADER::onPaint, this );
Bind( wxEVT_SET_FOCUS, &WX_COLLAPSIBLE_PANE_HEADER::onFocus, this );
Bind( wxEVT_KILL_FOCUS, &WX_COLLAPSIBLE_PANE_HEADER::onFocus, this );
Bind( wxEVT_ENTER_WINDOW, &WX_COLLAPSIBLE_PANE_HEADER::onEnterWindow, this);
Bind( wxEVT_LEAVE_WINDOW, &WX_COLLAPSIBLE_PANE_HEADER::onLeaveWindow, this);
Bind( wxEVT_LEFT_UP, &WX_COLLAPSIBLE_PANE_HEADER::onLeftUp, this );
Bind( wxEVT_CHAR, &WX_COLLAPSIBLE_PANE_HEADER::onChar, this );
return true;
}
void WX_COLLAPSIBLE_PANE_HEADER::SetCollapsed( bool aCollapsed )
{
m_collapsed = aCollapsed;
Refresh();
}
void WX_COLLAPSIBLE_PANE_HEADER::doSetCollapsed( bool aCollapsed )
{
SetCollapsed( aCollapsed );
wxCommandEvent evt( WX_COLLAPSIBLE_PANE_HEADER_CHANGED, GetId() );
evt.SetEventObject( this );
ProcessEvent( evt );
}
wxSize WX_COLLAPSIBLE_PANE_HEADER::DoGetBestClientSize() const
{
WX_COLLAPSIBLE_PANE_HEADER* self = const_cast<WX_COLLAPSIBLE_PANE_HEADER*>( this );
// The code here parallels that of OnPaint() -- except without drawing.
wxClientDC dc( self );
wxString text;
wxControl::FindAccelIndex( GetLabel(), &text );
wxSize size = dc.GetTextExtent( text );
// Reserve space for icon
size.x += m_iconRight.GetWidth();
size.y = std::max( size.y, m_iconRight.GetHeight() );
#ifdef __WXMSW__
size.IncBy( GetSystemMetrics( SM_CXFOCUSBORDER ),
GetSystemMetrics( SM_CYFOCUSBORDER ) );
#endif // __WXMSW__
return size;
}
void WX_COLLAPSIBLE_PANE_HEADER::onPaint( wxPaintEvent& aEvent )
{
wxPaintDC dc( this );
wxRect rect( wxPoint( 0, 0 ), GetClientSize() );
#ifdef __WXMSW__
wxBrush brush = dc.GetBrush();
brush.SetColour( GetParent()->GetBackgroundColour() );
dc.SetBrush( brush );
dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle( rect );
#endif
wxString text;
int indexAccel = wxControl::FindAccelIndex( GetLabel(), &text );
wxSize textSize = dc.GetTextExtent( text );
wxRect textRect( wxPoint( m_iconRight.GetWidth(), 0 ), textSize );
textRect = textRect.CenterIn( rect, wxVERTICAL );
wxBitmap* icon = m_collapsed ? &m_iconRight : &m_iconDown;
if( m_inWindow )
{
dc.SetTextForeground( wxSystemColour::wxSYS_COLOUR_HOTLIGHT );
dc.DrawBitmap( icon->ConvertToDisabled( 200 ), wxPoint( 0, 0 ) );
}
else
{
dc.DrawBitmap( *icon, wxPoint( 0, 0 ) );
}
dc.DrawLabel( text, textRect, wxALIGN_CENTER_VERTICAL, indexAccel );
#ifdef __WXMSW__
int flags = 0;
if( m_inWindow )
flags |= wxCONTROL_CURRENT;
int focusSize = GetSystemMetrics( SM_CXFOCUSBORDER );
if( HasFocus() )
wxRendererNative::Get().DrawFocusRect( this, dc, textRect.Inflate( focusSize ), flags );
#endif
}
void WX_COLLAPSIBLE_PANE_HEADER::onFocus( wxFocusEvent& aEvent )
{
Refresh();
aEvent.Skip();
}
void WX_COLLAPSIBLE_PANE_HEADER::onEnterWindow( wxMouseEvent& aEvent )
{
m_inWindow = true;
Refresh();
aEvent.Skip();
}
void WX_COLLAPSIBLE_PANE_HEADER::onLeaveWindow( wxMouseEvent& aEvent )
{
m_inWindow = false;
Refresh();
aEvent.Skip();
}
void WX_COLLAPSIBLE_PANE_HEADER::onLeftUp( wxMouseEvent& aEvent )
{
doSetCollapsed( !m_collapsed );
aEvent.Skip();
}
void WX_COLLAPSIBLE_PANE_HEADER::onChar( wxKeyEvent& aEvent )
{
switch( aEvent.GetKeyCode() )
{
case WXK_SPACE:
case WXK_RETURN:
doSetCollapsed( !m_collapsed );
break;
default:
aEvent.Skip();
break;
}
}

View File

@ -0,0 +1,173 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* 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 KICAD_COLLAPSIBLE_PANE_H
#define KICAD_COLLAPSIBLE_PANE_H
#include <wx/wx.h>
wxDECLARE_EVENT( WX_COLLAPSIBLE_PANE_HEADER_CHANGED, wxCommandEvent );
wxDECLARE_EVENT( WX_COLLAPSIBLE_PANE_CHANGED, wxCommandEvent );
/**
* A header control for WX_COLLAPSIBLE_PANE
* Looks like a static text with a unicode arrow prepended to show the state
* Takes the same space as a static text. This is similar to the wxCollapsiblePane on GTK.
*/
class WX_COLLAPSIBLE_PANE_HEADER : public wxControl
{
public:
WX_COLLAPSIBLE_PANE_HEADER()
{
init();
}
WX_COLLAPSIBLE_PANE_HEADER( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
const wxPoint& aPos = wxDefaultPosition,
const wxSize& aSize = wxDefaultSize, long aStyle = wxBORDER_NONE,
const wxValidator& aValidator = wxDefaultValidator,
const wxString& aName = wxT( "COLLAPSIBLE_PANE_HEADER" ) )
{
init();
Create( aParent, aId, aLabel, aPos, aSize, aStyle, aValidator, aName );
}
bool Create( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
const wxPoint& aPos = wxDefaultPosition,
const wxSize& aSize = wxDefaultSize, long aStyle = wxBORDER_NONE,
const wxValidator& aValidator = wxDefaultValidator,
const wxString& aName = wxT( "COLLAPSIBLE_PANE_HEADER" ) );
void SetCollapsed( bool aCollapsed = true );
bool IsCollapsed() const
{
return m_collapsed;
}
protected:
wxSize DoGetBestClientSize() const override;
private:
wxString m_label;
bool m_collapsed;
bool m_inWindow;
wxBitmap m_iconRight;
wxBitmap m_iconDown;
void init();
void onPaint( wxPaintEvent& aEvent );
void onFocus( wxFocusEvent& aEvent );
void onEnterWindow( wxMouseEvent& aEvent );
void onLeaveWindow( wxMouseEvent& aEvent );
void onLeftUp( wxMouseEvent& aEvent );
void onChar( wxKeyEvent& aEvent );
void doSetCollapsed( bool aCollapsed );
};
/**
* A better wxCollapsiblePane that
* - Looks the same on all platforms
* - Doesn't have the same sizer bugs
* - Uses proper window colors
*/
class WX_COLLAPSIBLE_PANE : public wxNavigationEnabled<wxControl>
{
public:
WX_COLLAPSIBLE_PANE()
{
init();
}
WX_COLLAPSIBLE_PANE( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
const wxPoint& aPos = wxDefaultPosition,
const wxSize& aSize = wxDefaultSize, long aStyle = wxBORDER_NONE,
const wxValidator& aValidator = wxDefaultValidator,
const wxString& aName = wxT( "COLLAPSIBLE_PANE_HEADER" ) )
{
init();
Create( aParent, aId, aLabel, aPos, aSize, aStyle, aValidator, aName );
}
~WX_COLLAPSIBLE_PANE();
bool Create( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
const wxPoint& aPos = wxDefaultPosition,
const wxSize& aSize = wxDefaultSize, long aStyle = wxBORDER_NONE,
const wxValidator& aValidator = wxDefaultValidator,
const wxString& aName = wxT( "COLLAPSIBLE_PANE_HEADER" ) );
void Collapse( bool aCollapse = true );
void Expand()
{
Collapse( false );
}
bool IsCollapsed() const;
bool IsExpanded() const { return !IsCollapsed(); }
wxWindow* GetPane()
{
return m_pane;
}
wxString GetLabel() const override
{
return m_header->GetLabel();
}
void SetLabel( const wxString& aLabel ) override;
bool SetBackgroundColour( const wxColour& aColor ) override;
bool InformFirstDirection( int aDirection, int aSize, int aAvailableOtherDir ) override;
wxSize DoGetBestClientSize() const override;
bool Layout() override;
private:
wxWindow* m_pane;
wxSizer* m_sizer;
WX_COLLAPSIBLE_PANE_HEADER* m_header;
void init();
int getBorder() const;
void onSize( wxSizeEvent& aEvent );
void onHeaderClicked( wxCommandEvent& aEvent );
};
#endif // KICAD_COLLAPSIBLE_PANE_H

View File

@ -32,12 +32,14 @@
#include <tool/tool_manager.h> #include <tool/tool_manager.h>
#include <tools/pcb_actions.h> #include <tools/pcb_actions.h>
#include <widgets/bitmap_toggle.h> #include <widgets/bitmap_toggle.h>
#include <widgets/collapsible_pane.h>
#include <widgets/color_swatch.h> #include <widgets/color_swatch.h>
#include <widgets/wx_grid.h> #include <widgets/wx_grid.h>
#include <widgets/grid_bitmap_toggle.h> #include <widgets/grid_bitmap_toggle.h>
#include <widgets/grid_color_swatch_helpers.h> #include <widgets/grid_color_swatch_helpers.h>
#include <widgets/grid_text_helpers.h> #include <widgets/grid_text_helpers.h>
#include <widgets/indicator_icon.h> #include <widgets/indicator_icon.h>
#include <wx/statline.h>
NET_GRID_TABLE::NET_GRID_TABLE( PCB_BASE_FRAME* aFrame, wxColor aBackgroundColor ) : NET_GRID_TABLE::NET_GRID_TABLE( PCB_BASE_FRAME* aFrame, wxColor aBackgroundColor ) :
@ -400,6 +402,8 @@ APPEARANCE_CONTROLS::APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFo
m_windowObjects->SetScrollRate( 0, 5 ); m_windowObjects->SetScrollRate( 0, 5 );
m_windowObjects->Bind( wxEVT_SET_FOCUS, &APPEARANCE_CONTROLS::OnSetFocus, this ); m_windowObjects->Bind( wxEVT_SET_FOCUS, &APPEARANCE_CONTROLS::OnSetFocus, this );
createControls();
m_btnNetInspector->SetBitmapLabel( KiBitmap( list_nets_xpm ) ); m_btnNetInspector->SetBitmapLabel( KiBitmap( list_nets_xpm ) );
m_btnConfigureNetClasses->SetBitmapLabel( KiBitmap( options_generic_xpm ) ); m_btnConfigureNetClasses->SetBitmapLabel( KiBitmap( options_generic_xpm ) );
@ -522,11 +526,6 @@ APPEARANCE_CONTROLS::APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFo
Bind( wxEVT_COMMAND_MENU_SELECTED, &APPEARANCE_CONTROLS::OnLayerContextMenu, this, Bind( wxEVT_COMMAND_MENU_SELECTED, &APPEARANCE_CONTROLS::OnLayerContextMenu, this,
ID_CHANGE_COLOR, ID_LAST_VALUE ); ID_CHANGE_COLOR, ID_LAST_VALUE );
m_rbNetColorAll->Bind( wxEVT_RADIOBUTTON, &APPEARANCE_CONTROLS::onNetColorModeChanged, this );
m_rbNetColorOff->Bind( wxEVT_RADIOBUTTON, &APPEARANCE_CONTROLS::onNetColorModeChanged, this );
m_rbNetColorRatsnest->Bind( wxEVT_RADIOBUTTON,
&APPEARANCE_CONTROLS::onNetColorModeChanged, this );
} }
@ -536,6 +535,136 @@ APPEARANCE_CONTROLS::~APPEARANCE_CONTROLS()
} }
void APPEARANCE_CONTROLS::createControls()
{
// Create layer display options
m_paneLayerDisplayOptions = new WX_COLLAPSIBLE_PANE( m_panelLayers, wxID_ANY,
_( "Layer Display Options" ) );
m_paneLayerDisplayOptions->Collapse();
m_paneLayerDisplayOptions->SetBackgroundColour( m_notebook->GetThemeBackgroundColour() );
wxWindow* layerDisplayPane = m_paneLayerDisplayOptions->GetPane();
wxBoxSizer* layerDisplayOptionsSizer;
layerDisplayOptionsSizer = new wxBoxSizer( wxVERTICAL );
m_staticTextContrastModeTitle = new wxStaticText( layerDisplayPane, wxID_ANY,
_( "Non-active layers:" ), wxDefaultPosition,
wxDefaultSize, 0 );
m_staticTextContrastModeTitle->Wrap( -1 );
layerDisplayOptionsSizer->Add( m_staticTextContrastModeTitle, 0,
wxEXPAND | wxBOTTOM | wxLEFT, 2 );
wxBoxSizer* contrastModeSizer;
contrastModeSizer = new wxBoxSizer( wxHORIZONTAL );
m_rbHighContrastNormal = new wxRadioButton( layerDisplayPane, wxID_ANY, _( "Normal" ),
wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_rbHighContrastNormal->SetValue( true );
m_rbHighContrastNormal->SetToolTip( _( "Non-active layers will be shown in full color" ) );
contrastModeSizer->Add( m_rbHighContrastNormal, 0, wxRIGHT, 4 );
m_rbHighContrastDim = new wxRadioButton( layerDisplayPane, wxID_ANY, _( "Dim" ),
wxDefaultPosition, wxDefaultSize, 0 );
m_rbHighContrastDim->SetToolTip( _( "Non-active layers will be dimmed" ) );
contrastModeSizer->Add( m_rbHighContrastDim, 0, wxRIGHT | wxLEFT, 10 );
m_rbHighContrastOff = new wxRadioButton( layerDisplayPane, wxID_ANY, _( "Hide" ),
wxDefaultPosition, wxDefaultSize, 0 );
m_rbHighContrastOff->SetToolTip( _( "Non-active layers will be hidden" ) );
contrastModeSizer->Add( m_rbHighContrastOff, 0, 0, 5 );
layerDisplayOptionsSizer->Add( contrastModeSizer, 0, wxEXPAND, 5 );
m_layerDisplaySeparator = new wxStaticLine( layerDisplayPane, wxID_ANY, wxDefaultPosition,
wxDefaultSize, wxLI_HORIZONTAL );
layerDisplayOptionsSizer->Add( m_layerDisplaySeparator, 0, wxEXPAND | wxTOP | wxBOTTOM, 5 );
m_cbFlipBoard = new wxCheckBox( layerDisplayPane, wxID_ANY, _( "Flip board view" ),
wxDefaultPosition, wxDefaultSize, 0 );
layerDisplayOptionsSizer->Add( m_cbFlipBoard, 0, 0, 5 );
layerDisplayPane->SetSizer( layerDisplayOptionsSizer );
layerDisplayPane->Layout();
layerDisplayOptionsSizer->Fit( layerDisplayPane );
m_panelLayersSizer->Add( m_paneLayerDisplayOptions, 0, wxEXPAND | wxTOP, 5 );
m_paneLayerDisplayOptions->Bind( WX_COLLAPSIBLE_PANE_CHANGED,
[&]( wxCommandEvent& aEvent )
{
Freeze();
m_panelLayers->Fit();
m_sizerOuter->Layout();
Thaw();
} );
// Create net display options
m_paneNetDisplayOptions = new WX_COLLAPSIBLE_PANE( m_panelNetsAndClasses, wxID_ANY,
_( "Net Display Options" ) );
m_paneNetDisplayOptions->Collapse();
m_paneNetDisplayOptions->SetBackgroundColour( m_notebook->GetThemeBackgroundColour() );
wxBoxSizer* netDisplayOptionsSizer = new wxBoxSizer( wxVERTICAL );
wxWindow* netDisplayPane = m_paneNetDisplayOptions->GetPane();
m_staticTextNetDisplayTitle = new wxStaticText( netDisplayPane, wxID_ANY, _( "Net colors:" ),
wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetDisplayTitle->Wrap( -1 );
m_staticTextNetDisplayTitle->SetToolTip( _( "Choose when to show net and netclass colors" ) );
netDisplayOptionsSizer->Add( m_staticTextNetDisplayTitle, 0, wxEXPAND | wxBOTTOM | wxLEFT, 2 );
wxBoxSizer* netColorSizer = new wxBoxSizer( wxHORIZONTAL );
m_rbNetColorAll = new wxRadioButton( netDisplayPane, wxID_ANY, _( "All" ), wxDefaultPosition,
wxDefaultSize, wxRB_GROUP );
m_rbNetColorAll->SetToolTip( _( "Net and netclass colors are shown on all copper items" ) );
netColorSizer->Add( m_rbNetColorAll, 0, wxRIGHT, 10 );
m_rbNetColorRatsnest = new wxRadioButton( netDisplayPane, wxID_ANY, _( "Ratsnest" ),
wxDefaultPosition, wxDefaultSize, 0 );
m_rbNetColorRatsnest->SetValue( true );
m_rbNetColorRatsnest->SetToolTip( _( "Net and netclass colors are shown on the ratsnest only" ) );
netColorSizer->Add( m_rbNetColorRatsnest, 0, wxRIGHT, 4 );
m_rbNetColorOff = new wxRadioButton( netDisplayPane, wxID_ANY, _( "None" ), wxDefaultPosition,
wxDefaultSize, 0 );
m_rbNetColorOff->SetToolTip( _( "Net and netclass colors are not shown" ) );
netColorSizer->Add( m_rbNetColorOff, 0, 0, 5 );
netDisplayOptionsSizer->Add( netColorSizer, 0, wxEXPAND|wxBOTTOM, 5 );
netDisplayPane->SetSizer( netDisplayOptionsSizer );
netDisplayPane->Layout();
netDisplayOptionsSizer->Fit( netDisplayPane );
m_netsTabOuterSizer->Add( m_paneNetDisplayOptions, 0, wxEXPAND | wxTOP, 5 );
m_paneNetDisplayOptions->Bind( WX_COLLAPSIBLE_PANE_CHANGED,
[&]( wxCommandEvent& aEvent )
{
Freeze();
m_panelNetsAndClasses->Fit();
m_sizerOuter->Layout();
Thaw();
} );
m_rbNetColorAll->Bind( wxEVT_RADIOBUTTON, &APPEARANCE_CONTROLS::onNetColorModeChanged, this );
m_rbNetColorOff->Bind( wxEVT_RADIOBUTTON, &APPEARANCE_CONTROLS::onNetColorModeChanged, this );
m_rbNetColorRatsnest->Bind( wxEVT_RADIOBUTTON,
&APPEARANCE_CONTROLS::onNetColorModeChanged, this );
}
wxSize APPEARANCE_CONTROLS::GetBestSize() const wxSize APPEARANCE_CONTROLS::GetBestSize() const
{ {
wxSize size( 220, 480 ); wxSize size( 220, 480 );
@ -544,26 +673,6 @@ wxSize APPEARANCE_CONTROLS::GetBestSize() const
} }
void APPEARANCE_CONTROLS::OnLayerDisplayPaneChanged( wxCollapsiblePaneEvent& event )
{
// Because wxWidgets is broken and will not properly lay these out automatically
Freeze();
m_panelLayers->Fit();
m_sizerOuter->Layout();
Thaw();
}
void APPEARANCE_CONTROLS::OnNetDisplayPaneChanged( wxCollapsiblePaneEvent& event )
{
// Because wxWidgets is broken and will not properly lay these out automatically
Freeze();
m_panelNetsAndClasses->Fit();
m_sizerOuter->Layout();
Thaw();
}
void APPEARANCE_CONTROLS::OnNotebookPageChanged( wxNotebookEvent& aEvent ) void APPEARANCE_CONTROLS::OnNotebookPageChanged( wxNotebookEvent& aEvent )
{ {
// Work around wxMac issue where the notebook pages are blank // Work around wxMac issue where the notebook pages are blank

View File

@ -36,6 +36,8 @@ class INDICATOR_ICON;
class PCB_BASE_FRAME; class PCB_BASE_FRAME;
class ROW_ICON_PROVIDER; class ROW_ICON_PROVIDER;
class GRID_BITMAP_TOGGLE_RENDERER; class GRID_BITMAP_TOGGLE_RENDERER;
class WX_COLLAPSIBLE_PANE;
class wxStaticLine;
using KIGFX::COLOR4D; using KIGFX::COLOR4D;
@ -251,10 +253,6 @@ public:
protected: protected:
void OnLayerDisplayPaneChanged( wxCollapsiblePaneEvent& event ) override;
void OnNetDisplayPaneChanged( wxCollapsiblePaneEvent& event ) override;
void OnNotebookPageChanged( wxNotebookEvent& event ) override; void OnNotebookPageChanged( wxNotebookEvent& event ) override;
void OnSetFocus( wxFocusEvent& aEvent ) override; void OnSetFocus( wxFocusEvent& aEvent ) override;
@ -338,6 +336,24 @@ private:
wxColour m_layerPanelColour; wxColour m_layerPanelColour;
// Layer display options controls
WX_COLLAPSIBLE_PANE* m_paneLayerDisplayOptions;
wxStaticText* m_staticTextContrastModeTitle;
wxRadioButton* m_rbHighContrastNormal;
wxRadioButton* m_rbHighContrastDim;
wxRadioButton* m_rbHighContrastOff;
wxStaticLine* m_layerDisplaySeparator;
wxCheckBox* m_cbFlipBoard;
// Net display options controls
WX_COLLAPSIBLE_PANE* m_paneNetDisplayOptions;
wxStaticText* m_staticTextNetDisplayTitle;
wxRadioButton* m_rbNetColorAll;
wxRadioButton* m_rbNetColorRatsnest;
wxRadioButton* m_rbNetColorOff;
enum POPUP_ID enum POPUP_ID
{ {
ID_CHANGE_COLOR = wxID_HIGHEST, ID_CHANGE_COLOR = wxID_HIGHEST,
@ -362,6 +378,8 @@ private:
ID_LAST_VALUE ID_LAST_VALUE
}; };
void createControls();
void rebuildLayers(); void rebuildLayers();
void rebuildLayerContextMenu(); void rebuildLayerContextMenu();

View File

@ -25,50 +25,6 @@ APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID
m_windowLayers = new wxScrolledCanvas( m_panelLayers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL ); m_windowLayers = new wxScrolledCanvas( m_panelLayers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
m_panelLayersSizer->Add( m_windowLayers, 1, wxEXPAND, 5 ); m_panelLayersSizer->Add( m_windowLayers, 1, wxEXPAND, 5 );
m_paneLayerDisplay = new wxCollapsiblePane( m_panelLayers, wxID_ANY, wxT("Layer Display Options"), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE|wxCP_NO_TLW_RESIZE );
m_paneLayerDisplay->Collapse( true );
wxBoxSizer* bSizer121;
bSizer121 = new wxBoxSizer( wxVERTICAL );
m_staticText13 = new wxStaticText( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Non-active layers:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText13->Wrap( -1 );
bSizer121->Add( m_staticText13, 0, wxEXPAND|wxBOTTOM, 2 );
wxBoxSizer* bSizer19;
bSizer19 = new wxBoxSizer( wxHORIZONTAL );
m_rbHighContrastNormal = new wxRadioButton( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Normal"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_rbHighContrastNormal->SetValue( true );
m_rbHighContrastNormal->SetToolTip( wxT("Non-active layers will be shown in full color") );
bSizer19->Add( m_rbHighContrastNormal, 0, wxRIGHT, 4 );
m_rbHighContrastDim = new wxRadioButton( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Dim"), wxDefaultPosition, wxDefaultSize, 0 );
m_rbHighContrastDim->SetToolTip( wxT("Non-active layers will be dimmed") );
bSizer19->Add( m_rbHighContrastDim, 0, wxRIGHT|wxLEFT, 10 );
m_rbHighContrastOff = new wxRadioButton( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Hide"), wxDefaultPosition, wxDefaultSize, 0 );
m_rbHighContrastOff->SetToolTip( wxT("Non-active layers will be hidden") );
bSizer19->Add( m_rbHighContrastOff, 0, 0, 5 );
bSizer121->Add( bSizer19, 0, wxEXPAND, 5 );
m_staticline5 = new wxStaticLine( m_paneLayerDisplay->GetPane(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizer121->Add( m_staticline5, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_cbFlipBoard = new wxCheckBox( m_paneLayerDisplay->GetPane(), wxID_ANY, wxT("Flip board view"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer121->Add( m_cbFlipBoard, 0, 0, 5 );
m_paneLayerDisplay->GetPane()->SetSizer( bSizer121 );
m_paneLayerDisplay->GetPane()->Layout();
bSizer121->Fit( m_paneLayerDisplay->GetPane() );
m_panelLayersSizer->Add( m_paneLayerDisplay, 0, wxBOTTOM|wxTOP|wxEXPAND, 5 );
m_panelLayers->SetSizer( m_panelLayersSizer ); m_panelLayers->SetSizer( m_panelLayersSizer );
m_panelLayers->Layout(); m_panelLayers->Layout();
@ -88,8 +44,7 @@ APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID
m_objectsPanelSizer->Fit( m_panelObjects ); m_objectsPanelSizer->Fit( m_panelObjects );
m_notebook->AddPage( m_panelObjects, wxT("Objects"), false ); m_notebook->AddPage( m_panelObjects, wxT("Objects"), false );
m_panelNetsAndClasses = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_panelNetsAndClasses = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer16; m_netsTabOuterSizer = new wxBoxSizer( wxVERTICAL );
bSizer16 = new wxBoxSizer( wxVERTICAL );
m_netsTabSplitter = new wxSplitterWindow( m_panelNetsAndClasses, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE ); m_netsTabSplitter = new wxSplitterWindow( m_panelNetsAndClasses, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE );
m_netsTabSplitter->SetSashGravity( 0.8 ); m_netsTabSplitter->SetSashGravity( 0.8 );
@ -191,52 +146,12 @@ APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID
m_panelNetclasses->Layout(); m_panelNetclasses->Layout();
bSizerNetClasses->Fit( m_panelNetclasses ); bSizerNetClasses->Fit( m_panelNetclasses );
m_netsTabSplitter->SplitHorizontally( m_panelNets, m_panelNetclasses, 300 ); m_netsTabSplitter->SplitHorizontally( m_panelNets, m_panelNetclasses, 300 );
bSizer16->Add( m_netsTabSplitter, 1, wxEXPAND, 5 ); m_netsTabOuterSizer->Add( m_netsTabSplitter, 1, wxEXPAND, 5 );
m_paneNetDisplay = new wxCollapsiblePane( m_panelNetsAndClasses, wxID_ANY, wxT("Net Display Options"), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE|wxCP_NO_TLW_RESIZE );
m_paneNetDisplay->Collapse( true );
wxBoxSizer* bSizerNetDisplay;
bSizerNetDisplay = new wxBoxSizer( wxVERTICAL );
m_staticTextNetDsplayTitle = new wxStaticText( m_paneNetDisplay->GetPane(), wxID_ANY, wxT("Net colors:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetDsplayTitle->Wrap( -1 );
m_staticTextNetDsplayTitle->SetToolTip( wxT("Choose when to show net and netclass colors") );
bSizerNetDisplay->Add( m_staticTextNetDsplayTitle, 0, wxEXPAND|wxBOTTOM, 2 );
wxBoxSizer* bSizer191;
bSizer191 = new wxBoxSizer( wxHORIZONTAL );
m_rbNetColorAll = new wxRadioButton( m_paneNetDisplay->GetPane(), wxID_ANY, wxT("All"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_rbNetColorAll->SetToolTip( wxT("Net and netclass colors are shown on all copper items") );
bSizer191->Add( m_rbNetColorAll, 0, wxRIGHT, 10 );
m_rbNetColorRatsnest = new wxRadioButton( m_paneNetDisplay->GetPane(), wxID_ANY, wxT("Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 );
m_rbNetColorRatsnest->SetValue( true );
m_rbNetColorRatsnest->SetToolTip( wxT("Net and netclass colors are shown on the ratsnest only") );
bSizer191->Add( m_rbNetColorRatsnest, 0, wxRIGHT, 4 );
m_rbNetColorOff = new wxRadioButton( m_paneNetDisplay->GetPane(), wxID_ANY, wxT("None"), wxDefaultPosition, wxDefaultSize, 0 );
m_rbNetColorOff->SetToolTip( wxT("Net and netclass colors are not shown") );
bSizer191->Add( m_rbNetColorOff, 0, 0, 5 );
bSizerNetDisplay->Add( bSizer191, 0, wxEXPAND|wxBOTTOM, 5 ); m_panelNetsAndClasses->SetSizer( m_netsTabOuterSizer );
m_paneNetDisplay->GetPane()->SetSizer( bSizerNetDisplay );
m_paneNetDisplay->GetPane()->Layout();
bSizerNetDisplay->Fit( m_paneNetDisplay->GetPane() );
bSizer16->Add( m_paneNetDisplay, 0, wxEXPAND|wxTOP, 5 );
m_panelNetsAndClasses->SetSizer( bSizer16 );
m_panelNetsAndClasses->Layout(); m_panelNetsAndClasses->Layout();
bSizer16->Fit( m_panelNetsAndClasses ); m_netsTabOuterSizer->Fit( m_panelNetsAndClasses );
m_notebook->AddPage( m_panelNetsAndClasses, wxT("Nets"), false ); m_notebook->AddPage( m_panelNetsAndClasses, wxT("Nets"), false );
m_sizerOuter->Add( m_notebook, 1, wxEXPAND, 5 ); m_sizerOuter->Add( m_notebook, 1, wxEXPAND, 5 );
@ -285,9 +200,6 @@ APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID
m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( APPEARANCE_CONTROLS_BASE::OnNotebookPageChanged ), NULL, this ); m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( APPEARANCE_CONTROLS_BASE::OnNotebookPageChanged ), NULL, this );
m_notebook->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_notebook->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_panelLayers->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelLayers->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_paneLayerDisplay->Connect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( APPEARANCE_CONTROLS_BASE::OnLayerDisplayPaneChanged ), NULL, this );
m_paneLayerDisplay->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_cbFlipBoard->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::OnFlipBoardChecked ), NULL, this );
m_panelObjects->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelObjects->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_panelNetsAndClasses->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelNetsAndClasses->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_panelNets->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelNets->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
@ -296,8 +208,6 @@ APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID
m_netsGrid->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridRightClick ), NULL, this ); m_netsGrid->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridRightClick ), NULL, this );
m_netsGrid->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_netsGrid->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_panelNetclasses->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelNetclasses->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_paneNetDisplay->Connect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( APPEARANCE_CONTROLS_BASE::OnNetDisplayPaneChanged ), NULL, this );
m_paneNetDisplay->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_cbLayerPresets->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::onLayerPresetChanged ), NULL, this ); m_cbLayerPresets->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::onLayerPresetChanged ), NULL, this );
} }
@ -309,9 +219,6 @@ APPEARANCE_CONTROLS_BASE::~APPEARANCE_CONTROLS_BASE()
m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( APPEARANCE_CONTROLS_BASE::OnNotebookPageChanged ), NULL, this ); m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( APPEARANCE_CONTROLS_BASE::OnNotebookPageChanged ), NULL, this );
m_notebook->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_notebook->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_panelLayers->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelLayers->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_paneLayerDisplay->Disconnect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( APPEARANCE_CONTROLS_BASE::OnLayerDisplayPaneChanged ), NULL, this );
m_paneLayerDisplay->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_cbFlipBoard->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::OnFlipBoardChecked ), NULL, this );
m_panelObjects->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelObjects->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_panelNetsAndClasses->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelNetsAndClasses->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_panelNets->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelNets->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
@ -320,8 +227,6 @@ APPEARANCE_CONTROLS_BASE::~APPEARANCE_CONTROLS_BASE()
m_netsGrid->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridRightClick ), NULL, this ); m_netsGrid->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( APPEARANCE_CONTROLS_BASE::OnNetGridRightClick ), NULL, this );
m_netsGrid->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_netsGrid->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_panelNetclasses->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this ); m_panelNetclasses->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_paneNetDisplay->Disconnect( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEventHandler( APPEARANCE_CONTROLS_BASE::OnNetDisplayPaneChanged ), NULL, this );
m_paneNetDisplay->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ), NULL, this );
m_cbLayerPresets->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::onLayerPresetChanged ), NULL, this ); m_cbLayerPresets->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_BASE::onLayerPresetChanged ), NULL, this );
} }

View File

@ -238,465 +238,6 @@
<property name="window_style">wxVSCROLL</property> <property name="window_style">wxVSCROLL</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxTOP|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxCollapsiblePane" 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="collapsed">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">Layer Display Options</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_paneLayerDisplay</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">wxCP_DEFAULT_STYLE|wxCP_NO_TLW_RESIZE</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="OnCollapsiblePaneChanged">OnLayerDisplayPaneChanged</event>
<event name="OnSetFocus">OnSetFocus</event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer121</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">2</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Non-active layers:</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_staticText13</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer19</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">4</property>
<property name="flag">wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Normal</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_rbHighContrastNormal</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">wxRB_GROUP</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Non-active layers will be shown in full color</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="value">1</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">10</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Dim</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_rbHighContrastDim</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">Non-active layers will be dimmed</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="value">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Hide</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_rbHighContrastOff</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">Non-active layers will be hidden</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="value">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="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_staticline5</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">wxLI_HORIZONTAL</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>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">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">Flip board view</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_cbFlipBoard</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="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="OnCheckBox">OnFlipBoardChecked</event>
</object>
</object>
</object>
</object>
</object>
</object> </object>
</object> </object>
</object> </object>
@ -884,9 +425,9 @@
<event name="OnSetFocus">OnSetFocus</event> <event name="OnSetFocus">OnSetFocus</event>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizer16</property> <property name="name">m_netsTabOuterSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
@ -949,7 +490,7 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<object class="splitteritem" expanded="1"> <object class="splitteritem" expanded="1">
<object class="wxPanel" expanded="1"> <object class="wxPanel" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1001,16 +542,16 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property> <property name="window_style">wxTAB_TRAVERSAL</property>
<event name="OnSetFocus">OnSetFocus</event> <event name="OnSetFocus">OnSetFocus</event>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizer192</property> <property name="name">bSizer192</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizer17</property> <property name="name">bSizer17</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
@ -1214,11 +755,11 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxGrid" expanded="1"> <object class="wxGrid" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1310,7 +851,7 @@
</object> </object>
</object> </object>
<object class="splitteritem" expanded="1"> <object class="splitteritem" expanded="1">
<object class="wxPanel" expanded="1"> <object class="wxPanel" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
@ -1362,16 +903,16 @@
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property> <property name="window_style">wxTAB_TRAVERSAL</property>
<event name="OnSetFocus">OnSetFocus</event> <event name="OnSetFocus">OnSetFocus</event>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizerNetClasses</property> <property name="name">bSizerNetClasses</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bSizer20</property> <property name="name">bSizer20</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
@ -1581,342 +1122,6 @@
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property>
<object class="wxCollapsiblePane" 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="collapsed">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">Net Display Options</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_paneNetDisplay</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">wxCP_DEFAULT_STYLE|wxCP_NO_TLW_RESIZE</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="OnCollapsiblePaneChanged">OnNetDisplayPaneChanged</event>
<event name="OnSetFocus">OnSetFocus</event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerNetDisplay</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">2</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Net colors:</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_staticTextNetDsplayTitle</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">Choose when to show net and netclass colors</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|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer191</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">10</property>
<property name="flag">wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">All</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_rbNetColorAll</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">wxRB_GROUP</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Net and netclass colors are shown on all copper items</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="value">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">4</property>
<property name="flag">wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Ratsnest</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_rbNetColorRatsnest</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">Net and netclass colors are shown on the ratsnest only</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="value">1</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">None</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_rbNetColorOff</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">Net and netclass colors are not shown</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="value">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object> </object>
</object> </object>
</object> </object>

View File

@ -17,16 +17,12 @@ class WX_GRID;
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h>
#include <wx/radiobut.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/checkbox.h>
#include <wx/collpane.h>
#include <wx/panel.h> #include <wx/panel.h>
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/image.h> #include <wx/image.h>
#include <wx/icon.h> #include <wx/icon.h>
#include <wx/stattext.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/bmpbuttn.h> #include <wx/bmpbuttn.h>
#include <wx/button.h> #include <wx/button.h>
@ -51,17 +47,11 @@ class APPEARANCE_CONTROLS_BASE : public wxPanel
wxPanel* m_panelLayers; wxPanel* m_panelLayers;
wxBoxSizer* m_panelLayersSizer; wxBoxSizer* m_panelLayersSizer;
wxScrolledCanvas* m_windowLayers; wxScrolledCanvas* m_windowLayers;
wxCollapsiblePane* m_paneLayerDisplay;
wxStaticText* m_staticText13;
wxRadioButton* m_rbHighContrastNormal;
wxRadioButton* m_rbHighContrastDim;
wxRadioButton* m_rbHighContrastOff;
wxStaticLine* m_staticline5;
wxCheckBox* m_cbFlipBoard;
wxPanel* m_panelObjects; wxPanel* m_panelObjects;
wxBoxSizer* m_objectsPanelSizer; wxBoxSizer* m_objectsPanelSizer;
wxScrolledCanvas* m_windowObjects; wxScrolledCanvas* m_windowObjects;
wxPanel* m_panelNetsAndClasses; wxPanel* m_panelNetsAndClasses;
wxBoxSizer* m_netsTabOuterSizer;
wxSplitterWindow* m_netsTabSplitter; wxSplitterWindow* m_netsTabSplitter;
wxPanel* m_panelNets; wxPanel* m_panelNets;
wxStaticText* m_staticTextNets; wxStaticText* m_staticTextNets;
@ -73,11 +63,6 @@ class APPEARANCE_CONTROLS_BASE : public wxPanel
wxBitmapButton* m_btnConfigureNetClasses; wxBitmapButton* m_btnConfigureNetClasses;
wxScrolledWindow* m_netclassScrolledWindow; wxScrolledWindow* m_netclassScrolledWindow;
wxBoxSizer* m_netclassOuterSizer; wxBoxSizer* m_netclassOuterSizer;
wxCollapsiblePane* m_paneNetDisplay;
wxStaticText* m_staticTextNetDsplayTitle;
wxRadioButton* m_rbNetColorAll;
wxRadioButton* m_rbNetColorRatsnest;
wxRadioButton* m_rbNetColorOff;
wxStaticText* presetsLabel; wxStaticText* presetsLabel;
wxStaticText* presetsHotkey; wxStaticText* presetsHotkey;
wxChoice* m_cbLayerPresets; wxChoice* m_cbLayerPresets;
@ -86,12 +71,9 @@ class APPEARANCE_CONTROLS_BASE : public wxPanel
virtual void OnSetFocus( wxFocusEvent& event ) { event.Skip(); } virtual void OnSetFocus( wxFocusEvent& event ) { event.Skip(); }
virtual void OnSize( wxSizeEvent& event ) { event.Skip(); } virtual void OnSize( wxSizeEvent& event ) { event.Skip(); }
virtual void OnNotebookPageChanged( wxNotebookEvent& event ) { event.Skip(); } virtual void OnNotebookPageChanged( wxNotebookEvent& event ) { event.Skip(); }
virtual void OnLayerDisplayPaneChanged( wxCollapsiblePaneEvent& event ) { event.Skip(); }
virtual void OnFlipBoardChecked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnNetGridClick( wxGridEvent& event ) { event.Skip(); } virtual void OnNetGridClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnNetGridDoubleClick( wxGridEvent& event ) { event.Skip(); } virtual void OnNetGridDoubleClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnNetGridRightClick( wxGridEvent& event ) { event.Skip(); } virtual void OnNetGridRightClick( wxGridEvent& event ) { event.Skip(); }
virtual void OnNetDisplayPaneChanged( wxCollapsiblePaneEvent& event ) { event.Skip(); }
virtual void onLayerPresetChanged( wxCommandEvent& event ) { event.Skip(); } virtual void onLayerPresetChanged( wxCommandEvent& event ) { event.Skip(); }