Fix focus handling on appearance panel
wxScrolledWindow doesn't like to give up its focus events, use wxScrolledCanvas instead. Fixes https://gitlab.com/kicad/code/kicad/-/issues/5251
This commit is contained in:
parent
17066134f4
commit
4cd13c3867
|
@ -102,6 +102,16 @@ APPEARANCE_CONTROLS::APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFo
|
|||
int pointSize = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ).GetPointSize();
|
||||
int screenHeight = wxSystemSettings::GetMetric( wxSYS_SCREEN_Y );
|
||||
|
||||
m_layersOuterSizer = new wxBoxSizer( wxVERTICAL );
|
||||
m_windowLayers->SetSizer( m_layersOuterSizer );
|
||||
m_windowLayers->SetScrollRate( 0, 5 );
|
||||
m_windowLayers->Bind( wxEVT_SET_FOCUS, &APPEARANCE_CONTROLS::OnSetFocus, this );
|
||||
|
||||
m_objectsOuterSizer = new wxBoxSizer( wxVERTICAL );
|
||||
m_windowObjects->SetSizer( m_objectsOuterSizer );
|
||||
m_windowObjects->SetScrollRate( 0, 5 );
|
||||
m_windowObjects->Bind( wxEVT_SET_FOCUS, &APPEARANCE_CONTROLS::OnSetFocus, this );
|
||||
|
||||
m_btnNetInspector->SetBitmapLabel( KiBitmap( list_nets_xpm ) );
|
||||
m_btnConfigureNetClasses->SetBitmapLabel( KiBitmap( options_generic_xpm ) );
|
||||
|
||||
|
@ -173,6 +183,8 @@ APPEARANCE_CONTROLS::APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFo
|
|||
|
||||
m_paneLayerDisplay->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
|
||||
|
||||
m_currentLayer = F_Cu;
|
||||
|
||||
loadDefaultLayerPresets();
|
||||
rebuildObjects();
|
||||
OnBoardChanged();
|
||||
|
@ -240,6 +252,22 @@ void APPEARANCE_CONTROLS::OnNotebookPageChanged( wxNotebookEvent& aEvent )
|
|||
m_sizerOuter->Layout();
|
||||
Thaw();
|
||||
#endif
|
||||
|
||||
Bind( wxEVT_IDLE, &APPEARANCE_CONTROLS::idleFocusHandler, this );
|
||||
}
|
||||
|
||||
|
||||
void APPEARANCE_CONTROLS::idleFocusHandler( wxIdleEvent& aEvent )
|
||||
{
|
||||
passOnFocus();
|
||||
Unbind( wxEVT_IDLE, &APPEARANCE_CONTROLS::idleFocusHandler, this );
|
||||
}
|
||||
|
||||
|
||||
void APPEARANCE_CONTROLS::OnSetFocus( wxFocusEvent& aEvent )
|
||||
{
|
||||
passOnFocus();
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
|
||||
|
@ -316,23 +344,19 @@ void APPEARANCE_CONTROLS::OnLayerChanged()
|
|||
|
||||
PCB_LAYER_ID current = m_frame->GetActiveLayer();
|
||||
|
||||
for( std::unique_ptr<APPEARANCE_SETTING>& setting : m_layerSettings )
|
||||
{
|
||||
LAYER_NUM layer = setting->id;
|
||||
wxASSERT( m_layerSettingsMap.count( current ) );
|
||||
wxASSERT( m_layerSettingsMap.count( m_currentLayer ) );
|
||||
|
||||
if( setting->ctl_panel )
|
||||
{
|
||||
setting->ctl_panel->SetBackgroundColour( current == layer ?
|
||||
highlightColor : normalColor );
|
||||
}
|
||||
APPEARANCE_SETTING* oldSetting = m_layerSettingsMap.at( m_currentLayer );
|
||||
APPEARANCE_SETTING* newSetting = m_layerSettingsMap.at( current );
|
||||
|
||||
if( setting->ctl_indicator )
|
||||
{
|
||||
setting->ctl_indicator->SetIndicatorState( current == layer ?
|
||||
ROW_ICON_PROVIDER::STATE::ON :
|
||||
ROW_ICON_PROVIDER::STATE::OFF );
|
||||
}
|
||||
}
|
||||
oldSetting->ctl_panel->SetBackgroundColour( normalColor );
|
||||
newSetting->ctl_panel->SetBackgroundColour( highlightColor );
|
||||
|
||||
oldSetting->ctl_indicator->SetIndicatorState( ROW_ICON_PROVIDER::STATE::OFF );
|
||||
newSetting->ctl_indicator->SetIndicatorState( ROW_ICON_PROVIDER::STATE::ON );
|
||||
|
||||
m_currentLayer = current;
|
||||
|
||||
#if defined( __WXMAC__ ) || defined( __WXMSW__ )
|
||||
Refresh();
|
||||
|
@ -516,7 +540,7 @@ void APPEARANCE_CONTROLS::rebuildLayers()
|
|||
#endif
|
||||
|
||||
m_layerSettings.clear();
|
||||
m_layers_outer_sizer->Clear( true );
|
||||
m_layersOuterSizer->Clear( true );
|
||||
|
||||
auto appendLayer =
|
||||
[&]( std::unique_ptr<APPEARANCE_SETTING>& aSetting )
|
||||
|
@ -560,7 +584,7 @@ void APPEARANCE_CONTROLS::rebuildLayers()
|
|||
sizer->AddSpacer( 5 );
|
||||
sizer->Add( label, 1, wxALIGN_CENTER_VERTICAL | wxTOP, topMargin );
|
||||
|
||||
m_layers_outer_sizer->Add( panel, 0, wxEXPAND, 0 );
|
||||
m_layersOuterSizer->Add( panel, 0, wxEXPAND, 0 );
|
||||
|
||||
aSetting->ctl_panel = panel;
|
||||
aSetting->ctl_indicator = indicator;
|
||||
|
@ -593,6 +617,7 @@ void APPEARANCE_CONTROLS::rebuildLayers()
|
|||
{
|
||||
wxASSERT( m_layerContextMenu );
|
||||
PopupMenu( m_layerContextMenu );
|
||||
passOnFocus();
|
||||
};
|
||||
|
||||
panel->Bind( wxEVT_RIGHT_DOWN, rightClickHandler );
|
||||
|
@ -688,7 +713,8 @@ void APPEARANCE_CONTROLS::rebuildLayers()
|
|||
#endif
|
||||
}
|
||||
|
||||
m_layers_outer_sizer->Layout();
|
||||
m_layersOuterSizer->AddSpacer( 10 );
|
||||
m_windowLayers->Layout();
|
||||
}
|
||||
|
||||
|
||||
|
@ -909,6 +935,7 @@ void APPEARANCE_CONTROLS::onLayerClick( wxMouseEvent& aEvent )
|
|||
#endif
|
||||
|
||||
m_frame->SetActiveLayer( layer );
|
||||
passOnFocus();
|
||||
}
|
||||
|
||||
|
||||
|
@ -996,8 +1023,8 @@ void APPEARANCE_CONTROLS::rebuildObjects()
|
|||
int labelWidth = 0;
|
||||
|
||||
m_objectSettings.clear();
|
||||
m_objectsSizer->Clear( true );
|
||||
m_objectsSizer->AddSpacer( 5 );
|
||||
m_objectsOuterSizer->Clear( true );
|
||||
m_objectsOuterSizer->AddSpacer( 5 );
|
||||
|
||||
auto appendObject =
|
||||
[&]( const std::unique_ptr<APPEARANCE_SETTING>& aSetting )
|
||||
|
@ -1090,6 +1117,7 @@ void APPEARANCE_CONTROLS::rebuildObjects()
|
|||
|
||||
slider->Bind( wxEVT_SCROLL_CHANGED, opacitySliderHandler );
|
||||
slider->Bind( wxEVT_SCROLL_THUMBTRACK, opacitySliderHandler );
|
||||
slider->Bind( wxEVT_SET_FOCUS, &APPEARANCE_CONTROLS::OnSetFocus, this );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1099,8 +1127,8 @@ void APPEARANCE_CONTROLS::rebuildObjects()
|
|||
}
|
||||
|
||||
aSetting->ctl_text = label;
|
||||
m_objectsSizer->Add( sizer, 0, wxEXPAND | wxLEFT | wxRIGHT, 5 );
|
||||
m_objectsSizer->AddSpacer( 1 );
|
||||
m_objectsOuterSizer->Add( sizer, 0, wxEXPAND | wxLEFT | wxRIGHT, 5 );
|
||||
m_objectsOuterSizer->AddSpacer( 1 );
|
||||
};
|
||||
|
||||
for( const APPEARANCE_SETTING& s_setting : s_objectSettings )
|
||||
|
@ -1136,12 +1164,12 @@ void APPEARANCE_CONTROLS::rebuildObjects()
|
|||
for( const std::unique_ptr<APPEARANCE_SETTING>& setting : m_objectSettings )
|
||||
{
|
||||
if( setting->spacer )
|
||||
m_objectsSizer->AddSpacer( m_pointSize );
|
||||
m_objectsOuterSizer->AddSpacer( m_pointSize );
|
||||
else
|
||||
appendObject( setting );
|
||||
}
|
||||
|
||||
m_objectsSizer->Layout();
|
||||
m_objectsOuterSizer->Layout();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -157,6 +157,8 @@ protected:
|
|||
|
||||
void OnNotebookPageChanged( wxNotebookEvent& event ) override;
|
||||
|
||||
void OnSetFocus( wxFocusEvent& aEvent ) override;
|
||||
|
||||
private:
|
||||
PCB_BASE_FRAME* m_frame;
|
||||
|
||||
|
@ -168,6 +170,8 @@ private:
|
|||
|
||||
BOARD* m_board;
|
||||
|
||||
PCB_LAYER_ID m_currentLayer;
|
||||
|
||||
std::vector<std::unique_ptr<APPEARANCE_SETTING>> m_layerSettings;
|
||||
|
||||
std::map<PCB_LAYER_ID, APPEARANCE_SETTING*> m_layerSettingsMap;
|
||||
|
@ -202,6 +206,9 @@ private:
|
|||
/// The name of the netclass that was right-clicked
|
||||
wxString m_contextMenuNetclass;
|
||||
|
||||
wxBoxSizer* m_layersOuterSizer;
|
||||
wxBoxSizer* m_objectsOuterSizer;
|
||||
|
||||
// The built-in layer presets
|
||||
|
||||
static LAYER_PRESET presetNoLayers;
|
||||
|
@ -288,6 +295,8 @@ private:
|
|||
void handleBoardItemsChanged();
|
||||
|
||||
void passOnFocus();
|
||||
|
||||
void idleFocusHandler( wxIdleEvent& aEvent );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,17 +20,8 @@ APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID
|
|||
m_panelLayers = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
m_panelLayersSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_windowLayers = new wxScrolledWindow( m_panelLayers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
|
||||
m_windowLayers->SetScrollRate( 0, 5 );
|
||||
m_windowLayers->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
|
||||
|
||||
m_layers_outer_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_windowLayers->SetSizer( m_layers_outer_sizer );
|
||||
m_windowLayers->Layout();
|
||||
m_layers_outer_sizer->Fit( m_windowLayers );
|
||||
m_panelLayersSizer->Add( m_windowLayers, 1, wxEXPAND|wxTOP, 5 );
|
||||
m_windowLayers = new wxScrolledCanvas( m_panelLayers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
|
||||
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 );
|
||||
|
@ -86,16 +77,7 @@ APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID
|
|||
|
||||
m_objectsPanelSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_windowObjects = new wxScrolledWindow( m_panelObjects, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
|
||||
m_windowObjects->SetScrollRate( 0, 5 );
|
||||
m_windowObjects->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
|
||||
|
||||
m_objectsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_windowObjects->SetSizer( m_objectsSizer );
|
||||
m_windowObjects->Layout();
|
||||
m_objectsSizer->Fit( m_windowObjects );
|
||||
m_windowObjects = new wxScrolledCanvas( m_panelObjects, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
|
||||
m_objectsPanelSizer->Add( m_windowObjects, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
@ -268,20 +250,42 @@ APPEARANCE_CONTROLS_BASE::APPEARANCE_CONTROLS_BASE( wxWindow* parent, wxWindowID
|
|||
m_sizerOuter->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ) );
|
||||
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_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_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_btnNetInspector->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_btnConfigureNetClasses->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 );
|
||||
}
|
||||
|
||||
APPEARANCE_CONTROLS_BASE::~APPEARANCE_CONTROLS_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_BASE::OnSetFocus ) );
|
||||
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_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_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_btnNetInspector->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_btnConfigureNetClasses->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 );
|
||||
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnSetFocus">OnSetFocus</event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_sizerOuter</property>
|
||||
|
@ -112,10 +113,11 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnNotebookPageChanged">OnNotebookPageChanged</event>
|
||||
<event name="OnSetFocus">OnSetFocus</event>
|
||||
<object class="notebookpage" expanded="1">
|
||||
<property name="bitmap"></property>
|
||||
<property name="label">Layers</property>
|
||||
<property name="select">0</property>
|
||||
<property name="select">1</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
|
@ -167,6 +169,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnSetFocus">OnSetFocus</event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_panelLayersSizer</property>
|
||||
|
@ -174,9 +177,9 @@
|
|||
<property name="permission">protected</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxScrolledWindow" expanded="1">
|
||||
<object class="CustomControl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -186,13 +189,16 @@
|
|||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg">wxSYS_COLOUR_WINDOW</property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="class">wxScrolledCanvas</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="construction"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="declaration"></property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
|
@ -204,6 +210,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="include">#include <wx/scrolwin.h></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -219,8 +226,7 @@
|
|||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="scroll_rate_x">0</property>
|
||||
<property name="scroll_rate_y">5</property>
|
||||
<property name="settings"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
|
@ -228,13 +234,7 @@
|
|||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxHSCROLL|wxVSCROLL</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_layers_outer_sizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">protected</property>
|
||||
</object>
|
||||
<property name="window_style">wxVSCROLL</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
@ -300,6 +300,7 @@
|
|||
<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>
|
||||
|
@ -753,6 +754,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnSetFocus">OnSetFocus</event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_objectsPanelSizer</property>
|
||||
|
@ -762,7 +764,7 @@
|
|||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxScrolledWindow" expanded="1">
|
||||
<object class="CustomControl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -772,13 +774,16 @@
|
|||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg">wxSYS_COLOUR_WINDOW</property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="class">wxScrolledCanvas</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="construction"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="declaration"></property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
|
@ -790,6 +795,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="include">#include <wx/scrolwin.h></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -805,8 +811,7 @@
|
|||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="scroll_rate_x">0</property>
|
||||
<property name="scroll_rate_y">5</property>
|
||||
<property name="settings"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
|
@ -814,13 +819,7 @@
|
|||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxHSCROLL|wxVSCROLL</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_objectsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">protected</property>
|
||||
</object>
|
||||
<property name="window_style">wxVSCROLL</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -829,7 +828,7 @@
|
|||
<object class="notebookpage" expanded="1">
|
||||
<property name="bitmap"></property>
|
||||
<property name="label">Nets</property>
|
||||
<property name="select">1</property>
|
||||
<property name="select">0</property>
|
||||
<object class="wxPanel" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
|
@ -881,6 +880,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnSetFocus">OnSetFocus</event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer16</property>
|
||||
|
@ -999,6 +999,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnSetFocus">OnSetFocus</event>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer192</property>
|
||||
|
@ -1208,6 +1209,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnSetFocus">OnSetFocus</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -1332,6 +1334,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnSetFocus">OnSetFocus</event>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer21</property>
|
||||
|
@ -1477,6 +1480,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnSetFocus">OnSetFocus</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -1614,6 +1618,7 @@
|
|||
<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">bSizer1211</property>
|
||||
|
|
|
@ -9,15 +9,15 @@
|
|||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/collpane.h>
|
||||
|
@ -47,8 +47,7 @@ class APPEARANCE_CONTROLS_BASE : public wxPanel
|
|||
wxNotebook* m_notebook;
|
||||
wxPanel* m_panelLayers;
|
||||
wxBoxSizer* m_panelLayersSizer;
|
||||
wxScrolledWindow* m_windowLayers;
|
||||
wxBoxSizer* m_layers_outer_sizer;
|
||||
wxScrolledCanvas* m_windowLayers;
|
||||
wxCollapsiblePane* m_paneLayerDisplay;
|
||||
wxStaticText* m_staticText13;
|
||||
wxRadioButton* m_rbHighContrastNormal;
|
||||
|
@ -58,8 +57,7 @@ class APPEARANCE_CONTROLS_BASE : public wxPanel
|
|||
wxCheckBox* m_cbFlipBoard;
|
||||
wxPanel* m_panelObjects;
|
||||
wxBoxSizer* m_objectsPanelSizer;
|
||||
wxScrolledWindow* m_windowObjects;
|
||||
wxBoxSizer* m_objectsSizer;
|
||||
wxScrolledCanvas* m_windowObjects;
|
||||
wxPanel* m_panelNetsAndClasses;
|
||||
wxSplitterWindow* m_netsTabSplitter;
|
||||
wxPanel* m_panelNets;
|
||||
|
@ -82,6 +80,7 @@ class APPEARANCE_CONTROLS_BASE : public wxPanel
|
|||
wxChoice* m_cbLayerPresets;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnSetFocus( wxFocusEvent& event ) { event.Skip(); }
|
||||
virtual void OnNotebookPageChanged( wxNotebookEvent& event ) { event.Skip(); }
|
||||
virtual void OnLayerDisplayPaneChanged( wxCollapsiblePaneEvent& event ) { event.Skip(); }
|
||||
virtual void OnFlipBoardChecked( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
|
Loading…
Reference in New Issue