From 94bc373f309f44240285ee92de35d27c46f4f7c2 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 23 Feb 2021 20:40:22 +0100 Subject: [PATCH] PANEL_EESCHEMA_EDITING_OPTIONS: add info about left mouse click and modifiers. Similar to the existing info in Pcbnew editing options panel. --- .../panel_eeschema_editing_options.cpp | 8 + .../panel_eeschema_editing_options_base.cpp | 105 +- .../panel_eeschema_editing_options_base.fbp | 1232 ++++++++++++++++- .../panel_eeschema_editing_options_base.h | 24 +- 4 files changed, 1366 insertions(+), 3 deletions(-) diff --git a/eeschema/dialogs/panel_eeschema_editing_options.cpp b/eeschema/dialogs/panel_eeschema_editing_options.cpp index e41fd65d1b..14d71b086b 100644 --- a/eeschema/dialogs/panel_eeschema_editing_options.cpp +++ b/eeschema/dialogs/panel_eeschema_editing_options.cpp @@ -41,6 +41,14 @@ PANEL_EESCHEMA_EDITING_OPTIONS::PANEL_EESCHEMA_EDITING_OPTIONS( SCH_EDIT_FRAME* // Make the color swatch show "Clear Color" instead m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED ); m_backgroundColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED ); + +#ifdef __WXOSX_MAC__ + m_mouseCmdsOSX->Show( true ); + m_mouseCmdsWinLin->Show( false ); +#else + m_mouseCmdsWinLin->Show( true ); + m_mouseCmdsOSX->Show( false ); +#endif } diff --git a/eeschema/dialogs/panel_eeschema_editing_options_base.cpp b/eeschema/dialogs/panel_eeschema_editing_options_base.cpp index 4ad66402c1..17cbaa1d97 100644 --- a/eeschema/dialogs/panel_eeschema_editing_options_base.cpp +++ b/eeschema/dialogs/panel_eeschema_editing_options_base.cpp @@ -81,6 +81,110 @@ PANEL_EESCHEMA_EDITING_OPTIONS_BASE::PANEL_EESCHEMA_EDITING_OPTIONS_BASE( wxWind bLeftColumn->Add( sbSizerPinSel, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + bLeftColumn->Add( 0, 20, 0, 0, 5 ); + + m_mouseCmdsWinLin = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Left Click Mouse Commands") ), wxVERTICAL ); + + m_staticText8 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Left click (and drag) actions depend on 3 modifier keys:\nAlt, Shift and Ctrl."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8->Wrap( -1 ); + m_mouseCmdsWinLin->Add( m_staticText8, 0, wxALL, 5 ); + + m_staticline1 = new wxStaticLine( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + m_mouseCmdsWinLin->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxFlexGridSizer* fgSizerCmdsWinLin; + fgSizerCmdsWinLin = new wxFlexGridSizer( 0, 2, 0, 0 ); + fgSizerCmdsWinLin->SetFlexibleDirection( wxBOTH ); + fgSizerCmdsWinLin->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText91 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Shift"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText91->Wrap( -1 ); + fgSizerCmdsWinLin->Add( m_staticText91, 0, wxALL, 5 ); + + m_staticText101 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Add item(s) to selection."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText101->Wrap( -1 ); + fgSizerCmdsWinLin->Add( m_staticText101, 0, wxALL, 5 ); + + m_staticText131 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Ctrl"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText131->Wrap( -1 ); + fgSizerCmdsWinLin->Add( m_staticText131, 0, wxALL, 5 ); + + m_staticText141 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Toggle selected state of item(s)."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText141->Wrap( -1 ); + fgSizerCmdsWinLin->Add( m_staticText141, 0, wxALL, 5 ); + + m_staticText151 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Ctrl+Shift"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText151->Wrap( -1 ); + fgSizerCmdsWinLin->Add( m_staticText151, 0, wxALL, 5 ); + + m_staticText161 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Remove item(s) from selection."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText161->Wrap( -1 ); + fgSizerCmdsWinLin->Add( m_staticText161, 0, wxALL, 5 ); + + m_staticText111 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Alt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText111->Wrap( -1 ); + fgSizerCmdsWinLin->Add( m_staticText111, 0, wxALL, 5 ); + + m_staticText121 = new wxStaticText( m_mouseCmdsWinLin->GetStaticBox(), wxID_ANY, _("Clarify selection from menu."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText121->Wrap( -1 ); + fgSizerCmdsWinLin->Add( m_staticText121, 0, wxALL, 5 ); + + + m_mouseCmdsWinLin->Add( fgSizerCmdsWinLin, 1, wxEXPAND, 5 ); + + + bLeftColumn->Add( m_mouseCmdsWinLin, 1, wxEXPAND, 5 ); + + m_mouseCmdsOSX = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Left Click Mouse Commands") ), wxVERTICAL ); + + m_staticText81 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Left click (and drag) actions depend on 3 modifier keys:\nAlt, Shift and Cmd."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText81->Wrap( -1 ); + m_mouseCmdsOSX->Add( m_staticText81, 0, wxALL, 5 ); + + wxFlexGridSizer* fgSizerCmdsWinMac; + fgSizerCmdsWinMac = new wxFlexGridSizer( 0, 2, 0, 0 ); + fgSizerCmdsWinMac->SetFlexibleDirection( wxBOTH ); + fgSizerCmdsWinMac->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText9 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Shift"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( -1 ); + fgSizerCmdsWinMac->Add( m_staticText9, 0, wxALL, 5 ); + + m_staticText10 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Add item(s) to selection."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText10->Wrap( -1 ); + fgSizerCmdsWinMac->Add( m_staticText10, 0, wxALL, 5 ); + + m_staticText13 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Cmd"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13->Wrap( -1 ); + fgSizerCmdsWinMac->Add( m_staticText13, 0, wxALL, 5 ); + + m_staticText14 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Toggle selected state of item(s)."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText14->Wrap( -1 ); + fgSizerCmdsWinMac->Add( m_staticText14, 0, wxALL, 5 ); + + m_staticText15 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Cmd+Shift"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + fgSizerCmdsWinMac->Add( m_staticText15, 0, wxALL, 5 ); + + m_staticText16 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Remove item(s) from selection."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + fgSizerCmdsWinMac->Add( m_staticText16, 0, wxALL, 5 ); + + m_staticText11 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Alt"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + fgSizerCmdsWinMac->Add( m_staticText11, 0, wxALL, 5 ); + + m_staticText12 = new wxStaticText( m_mouseCmdsOSX->GetStaticBox(), wxID_ANY, _("Clarify selection from menu."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + fgSizerCmdsWinMac->Add( m_staticText12, 0, wxALL, 5 ); + + + m_mouseCmdsOSX->Add( fgSizerCmdsWinMac, 1, wxEXPAND, 5 ); + + + bLeftColumn->Add( m_mouseCmdsOSX, 1, wxEXPAND, 5 ); + + bPanelSizer->Add( bLeftColumn, 1, wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bRightColumn; @@ -169,7 +273,6 @@ PANEL_EESCHEMA_EDITING_OPTIONS_BASE::PANEL_EESCHEMA_EDITING_OPTIONS_BASE( wxWind this->SetSizer( bPanelSizer ); this->Layout(); - bPanelSizer->Fit( this ); } PANEL_EESCHEMA_EDITING_OPTIONS_BASE::~PANEL_EESCHEMA_EDITING_OPTIONS_BASE() diff --git a/eeschema/dialogs/panel_eeschema_editing_options_base.fbp b/eeschema/dialogs/panel_eeschema_editing_options_base.fbp index 96e0b4ee99..6fa9ea1ed6 100644 --- a/eeschema/dialogs/panel_eeschema_editing_options_base.fbp +++ b/eeschema/dialogs/panel_eeschema_editing_options_base.fbp @@ -43,7 +43,7 @@ PANEL_EESCHEMA_EDITING_OPTIONS_BASE - -1,-1 + 661,584 ; forward_declare @@ -618,6 +618,1236 @@ + + 5 + + 0 + + 20 + protected + 0 + + + + 5 + wxEXPAND + 1 + + wxID_ANY + Left Click Mouse Commands + + m_mouseCmdsWinLin + wxVERTICAL + 1 + protected + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Left click (and drag) actions depend on 3 modifier keys: Alt, Shift and Ctrl. + 0 + + 0 + + + 0 + + 1 + m_staticText8 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + + + 0 + + fgSizerCmdsWinLin + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 0 + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Shift + 0 + + 0 + + + 0 + + 1 + m_staticText91 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Add item(s) to selection. + 0 + + 0 + + + 0 + + 1 + m_staticText101 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Ctrl + 0 + + 0 + + + 0 + + 1 + m_staticText131 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Toggle selected state of item(s). + 0 + + 0 + + + 0 + + 1 + m_staticText141 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Ctrl+Shift + 0 + + 0 + + + 0 + + 1 + m_staticText151 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Remove item(s) from selection. + 0 + + 0 + + + 0 + + 1 + m_staticText161 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Alt + 0 + + 0 + + + 0 + + 1 + m_staticText111 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Clarify selection from menu. + 0 + + 0 + + + 0 + + 1 + m_staticText121 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + 5 + wxEXPAND + 1 + + wxID_ANY + Left Click Mouse Commands + + m_mouseCmdsOSX + wxVERTICAL + 1 + protected + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Left click (and drag) actions depend on 3 modifier keys: Alt, Shift and Cmd. + 0 + + 0 + + + 0 + + 1 + m_staticText81 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + + + 0 + + fgSizerCmdsWinMac + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 0 + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Shift + 0 + + 0 + + + 0 + + 1 + m_staticText9 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Add item(s) to selection. + 0 + + 0 + + + 0 + + 1 + m_staticText10 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Cmd + 0 + + 0 + + + 0 + + 1 + m_staticText13 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Toggle selected state of item(s). + 0 + + 0 + + + 0 + + 1 + m_staticText14 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Cmd+Shift + 0 + + 0 + + + 0 + + 1 + m_staticText15 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Remove item(s) from selection. + 0 + + 0 + + + 0 + + 1 + m_staticText16 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Alt + 0 + + 0 + + + 0 + + 1 + m_staticText11 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Clarify selection from menu. + 0 + + 0 + + + 0 + + 1 + m_staticText12 + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + diff --git a/eeschema/dialogs/panel_eeschema_editing_options_base.h b/eeschema/dialogs/panel_eeschema_editing_options_base.h index 79bc410ffe..9507d4cdea 100644 --- a/eeschema/dialogs/panel_eeschema_editing_options_base.h +++ b/eeschema/dialogs/panel_eeschema_editing_options_base.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -42,6 +43,27 @@ class PANEL_EESCHEMA_EDITING_OPTIONS_BASE : public wxPanel wxStaticText* m_backgroundColorLabel; COLOR_SWATCH* m_backgroundColorSwatch; wxCheckBox* m_cbPinSelectionOpt; + wxStaticBoxSizer* m_mouseCmdsWinLin; + wxStaticText* m_staticText8; + wxStaticLine* m_staticline1; + wxStaticText* m_staticText91; + wxStaticText* m_staticText101; + wxStaticText* m_staticText131; + wxStaticText* m_staticText141; + wxStaticText* m_staticText151; + wxStaticText* m_staticText161; + wxStaticText* m_staticText111; + wxStaticText* m_staticText121; + wxStaticBoxSizer* m_mouseCmdsOSX; + wxStaticText* m_staticText81; + wxStaticText* m_staticText9; + wxStaticText* m_staticText10; + wxStaticText* m_staticText13; + wxStaticText* m_staticText14; + wxStaticText* m_staticText15; + wxStaticText* m_staticText16; + wxStaticText* m_staticText11; + wxStaticText* m_staticText12; wxCheckBox* m_checkAutoplaceFields; wxCheckBox* m_checkAutoplaceJustify; wxCheckBox* m_checkAutoplaceAlign; @@ -58,7 +80,7 @@ class PANEL_EESCHEMA_EDITING_OPTIONS_BASE : public wxPanel public: - PANEL_EESCHEMA_EDITING_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + PANEL_EESCHEMA_EDITING_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 661,584 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); ~PANEL_EESCHEMA_EDITING_OPTIONS_BASE(); };