KiCad PCB EDA Suite
|
#include <panel_toolbar_customization.h>
Public Member Functions | |
PANEL_TOOLBAR_CUSTOMIZATION (wxWindow *aParent, APP_SETTINGS_BASE *aCfg, TOOLBAR_SETTINGS *aTbSettings, std::vector< TOOL_ACTION * > aTools, std::vector< ACTION_TOOLBAR_CONTROL * > aControls) | |
~PANEL_TOOLBAR_CUSTOMIZATION () | |
void | ResetPanel () override |
Reset the contents of this panel. | |
bool | TransferDataFromWindow () override |
bool | TransferDataToWindow () override |
virtual wxString | GetResetTooltip () const |
Get the tooltip the reset button should display when showing this panel. | |
wxString | GetHelpTextAtPoint (const wxPoint &aPt, wxHelpEvent::Origin aOrigin) const override |
Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }. | |
Protected Member Functions | |
std::optional< TOOLBAR_CONFIGURATION > | parseToolbarTree () |
void | populateToolbarTree () |
void | populateActions () |
void | enableCustomControls (bool enable) |
void | enableToolbarControls (bool enable) |
void | onGroupPress (wxCommandEvent &aEvent) |
void | onSpacerPress (wxCommandEvent &aEvent) |
void | onSeparatorPress (wxCommandEvent &aEvent) |
void | onCustomizeTbCb (wxCommandEvent &event) override |
void | onToolDelete (wxCommandEvent &event) override |
void | onToolMoveUp (wxCommandEvent &event) override |
void | onToolMoveDown (wxCommandEvent &event) override |
void | onBtnAddAction (wxCommandEvent &event) override |
void | onTreeBeginLabelEdit (wxTreeEvent &event) override |
void | onTreeEndLabelEdit (wxTreeEvent &event) override |
void | onTbChoiceSelect (wxCommandEvent &event) override |
virtual void | OnUpdateUI (wxUpdateUIEvent &event) |
Protected Attributes | |
wxImageList * | m_actionImageList |
wxVector< wxBitmapBundle > | m_actionImageBundleVector |
std::map< std::string, int > | m_actionImageListMap |
APP_SETTINGS_BASE * | m_appSettings |
TOOLBAR_SETTINGS * | m_appTbSettings |
TOOLBAR_LOC | m_currentToolbar |
std::map< TOOLBAR_LOC, TOOLBAR_CONFIGURATION > | m_toolbars |
std::map< std::string, TOOL_ACTION * > | m_availableTools |
std::map< std::string, ACTION_TOOLBAR_CONTROL * > | m_availableControls |
wxCheckBox * | m_customToolbars |
wxStaticLine * | m_staticline1 |
wxChoice * | m_tbChoice |
wxTreeCtrl * | m_toolbarTree |
STD_BITMAP_BUTTON * | m_btnToolDelete |
STD_BITMAP_BUTTON * | m_btnToolMoveUp |
STD_BITMAP_BUTTON * | m_btnToolMoveDown |
SPLIT_BUTTON * | m_insertButton |
STD_BITMAP_BUTTON * | m_btnAddTool |
wxListCtrl * | m_actionsList |
Definition at line 39 of file panel_toolbar_customization.h.
PANEL_TOOLBAR_CUSTOMIZATION::PANEL_TOOLBAR_CUSTOMIZATION | ( | wxWindow * | aParent, |
APP_SETTINGS_BASE * | aCfg, | ||
TOOLBAR_SETTINGS * | aTbSettings, | ||
std::vector< TOOL_ACTION * > | aTools, | ||
std::vector< ACTION_TOOLBAR_CONTROL * > | aControls | ||
) |
Definition at line 111 of file panel_toolbar_customization.cpp.
References _, STD_BITMAP_BUTTON::Enable(), SPLIT_BUTTON::GetSplitButtonMenu(), ID_GROUP_MENU, ID_SPACER_MENU, KiBitmapBundle(), m_availableControls, m_availableTools, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_btnAddTool, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_btnToolDelete, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_btnToolMoveDown, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_btnToolMoveUp, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_insertButton, onGroupPress(), onSeparatorPress(), onSpacerPress(), STD_BITMAP_BUTTON::SetBitmap(), and SPLIT_BUTTON::SetLabel().
PANEL_TOOLBAR_CUSTOMIZATION::~PANEL_TOOLBAR_CUSTOMIZATION | ( | ) |
Definition at line 156 of file panel_toolbar_customization.cpp.
References m_actionImageList.
|
protected |
Definition at line 666 of file panel_toolbar_customization.cpp.
References enableToolbarControls(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_tbChoice.
Referenced by onCustomizeTbCb(), and TransferDataToWindow().
|
protected |
Definition at line 673 of file panel_toolbar_customization.cpp.
References SPLIT_BUTTON::Enable(), STD_BITMAP_BUTTON::Enable(), PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_actionsList, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_btnAddTool, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_btnToolDelete, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_insertButton, and PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_toolbarTree.
Referenced by enableCustomControls(), and populateToolbarTree().
|
inlineoverrideinherited |
Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }.
Definition at line 72 of file resettable_panel.h.
References RESETTABLE_PANEL::GetResetTooltip().
|
inlinevirtualinherited |
Get the tooltip the reset button should display when showing this panel.
Reimplemented in PANEL_COLOR_SETTINGS, and PANEL_HOTKEYS_EDITOR.
Definition at line 64 of file resettable_panel.h.
References _.
Referenced by RESETTABLE_PANEL::GetHelpTextAtPoint().
|
overrideprotectedvirtual |
Reimplemented from PANEL_TOOLBAR_CUSTOMIZATION_BASE.
Definition at line 723 of file panel_toolbar_customization.cpp.
References TOOL_ACTION::GetFriendlyName(), TOOL_ACTION::GetName(), TOOLBAR_TREE_ITEM_DATA::GetType(), m_actionImageListMap, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_actionsList, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_toolbarTree, and TOOLBAR_TREE_ITEM_DATA::SetAction().
|
overrideprotectedvirtual |
Reimplemented from PANEL_TOOLBAR_CUSTOMIZATION_BASE.
Definition at line 660 of file panel_toolbar_customization.cpp.
References enableCustomControls().
|
protected |
Definition at line 540 of file panel_toolbar_customization.cpp.
References _, TOOLBAR_TREE_ITEM_DATA::GetName(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_toolbarTree.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION().
|
protected |
Definition at line 620 of file panel_toolbar_customization.cpp.
References PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_toolbarTree.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION().
|
protected |
Definition at line 581 of file panel_toolbar_customization.cpp.
References TOOLBAR_TREE_ITEM_DATA::GetSize(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_toolbarTree.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION().
|
overrideprotectedvirtual |
Reimplemented from PANEL_TOOLBAR_CUSTOMIZATION_BASE.
Definition at line 821 of file panel_toolbar_customization.cpp.
References m_currentToolbar, m_toolbars, parseToolbarTree(), and populateToolbarTree().
|
overrideprotectedvirtual |
Reimplemented from PANEL_TOOLBAR_CUSTOMIZATION_BASE.
Definition at line 687 of file panel_toolbar_customization.cpp.
References PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_toolbarTree.
|
overrideprotectedvirtual |
Reimplemented from PANEL_TOOLBAR_CUSTOMIZATION_BASE.
Definition at line 717 of file panel_toolbar_customization.cpp.
|
overrideprotectedvirtual |
Reimplemented from PANEL_TOOLBAR_CUSTOMIZATION_BASE.
Definition at line 711 of file panel_toolbar_customization.cpp.
|
overrideprotectedvirtual |
Reimplemented from PANEL_TOOLBAR_CUSTOMIZATION_BASE.
Definition at line 788 of file panel_toolbar_customization.cpp.
References TOOLBAR_TREE_ITEM_DATA::GetType(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_toolbarTree.
|
overrideprotectedvirtual |
Reimplemented from PANEL_TOOLBAR_CUSTOMIZATION_BASE.
Definition at line 815 of file panel_toolbar_customization.cpp.
|
inlineprotectedvirtualinherited |
Definition at line 57 of file panel_toolbar_customization_base.h.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION_BASE::PANEL_TOOLBAR_CUSTOMIZATION_BASE(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::~PANEL_TOOLBAR_CUSTOMIZATION_BASE().
|
protected |
Definition at line 250 of file panel_toolbar_customization.cpp.
References TOOLBAR_GROUP_CONFIG::AddAction(), config, TOOLBAR_TREE_ITEM_DATA::GetAction(), TOOLBAR_TREE_ITEM_DATA::GetName(), TOOLBAR_TREE_ITEM_DATA::GetSize(), TOOLBAR_TREE_ITEM_DATA::GetType(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_toolbarTree.
Referenced by onTbChoiceSelect(), and TransferDataFromWindow().
|
protected |
Definition at line 461 of file panel_toolbar_customization.cpp.
References KiBitmap(), KiBitmapBundle(), m_actionImageBundleVector, m_actionImageList, m_actionImageListMap, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_actionsList, and m_availableTools.
Referenced by TransferDataToWindow().
|
protected |
Definition at line 333 of file panel_toolbar_customization.cpp.
References enableToolbarControls(), TOOLBAR_CONFIGURATION::GetToolbarItems(), m_actionImageList, m_actionImageListMap, m_availableTools, m_currentToolbar, m_toolbars, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_toolbarTree, TOOLBAR_TREE_ITEM_DATA::SetAction(), TOOLBAR_TREE_ITEM_DATA::SetName(), and TOOLBAR_TREE_ITEM_DATA::SetSize().
Referenced by onTbChoiceSelect(), ResetPanel(), and TransferDataToWindow().
|
overridevirtual |
Reset the contents of this panel.
Implements RESETTABLE_PANEL.
Definition at line 162 of file panel_toolbar_customization.cpp.
References TOOLBAR_SETTINGS::DefaultToolbarConfig(), m_appTbSettings, m_currentToolbar, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_tbChoice, m_toolbars, and populateToolbarTree().
|
override |
Definition at line 232 of file panel_toolbar_customization.cpp.
References m_appSettings, m_appTbSettings, m_currentToolbar, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_customToolbars, APP_SETTINGS_BASE::m_CustomToolbars, m_toolbars, parseToolbarTree(), and TOOLBAR_SETTINGS::SetStoredToolbarConfig().
|
override |
Definition at line 187 of file panel_toolbar_customization.cpp.
References enableCustomControls(), TOOLBAR_SETTINGS::GetToolbarConfig(), m_appSettings, m_appTbSettings, m_currentToolbar, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_customToolbars, APP_SETTINGS_BASE::m_CustomToolbars, PANEL_TOOLBAR_CUSTOMIZATION_BASE::m_tbChoice, m_toolbars, populateActions(), populateToolbarTree(), and s_toolbarNameMap.
|
protected |
Definition at line 79 of file panel_toolbar_customization.h.
Referenced by populateActions().
|
protected |
Definition at line 78 of file panel_toolbar_customization.h.
Referenced by populateActions(), populateToolbarTree(), and ~PANEL_TOOLBAR_CUSTOMIZATION().
|
protected |
Definition at line 80 of file panel_toolbar_customization.h.
Referenced by onBtnAddAction(), populateActions(), and populateToolbarTree().
|
protectedinherited |
Definition at line 54 of file panel_toolbar_customization_base.h.
Referenced by enableToolbarControls(), onBtnAddAction(), PANEL_TOOLBAR_CUSTOMIZATION_BASE::PANEL_TOOLBAR_CUSTOMIZATION_BASE(), and populateActions().
|
protected |
Definition at line 83 of file panel_toolbar_customization.h.
Referenced by TransferDataFromWindow(), and TransferDataToWindow().
|
protected |
Definition at line 84 of file panel_toolbar_customization.h.
Referenced by ResetPanel(), TransferDataFromWindow(), and TransferDataToWindow().
|
protected |
Definition at line 93 of file panel_toolbar_customization.h.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION().
|
protected |
Definition at line 92 of file panel_toolbar_customization.h.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION(), populateActions(), and populateToolbarTree().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 51 of file panel_toolbar_customization_base.h.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION(), PANEL_TOOLBAR_CUSTOMIZATION_BASE::PANEL_TOOLBAR_CUSTOMIZATION_BASE(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::~PANEL_TOOLBAR_CUSTOMIZATION_BASE().
|
protectedinherited |
Definition at line 50 of file panel_toolbar_customization_base.h.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION(), PANEL_TOOLBAR_CUSTOMIZATION_BASE::PANEL_TOOLBAR_CUSTOMIZATION_BASE(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::~PANEL_TOOLBAR_CUSTOMIZATION_BASE().
|
protected |
Definition at line 87 of file panel_toolbar_customization.h.
Referenced by onTbChoiceSelect(), populateToolbarTree(), ResetPanel(), TransferDataFromWindow(), and TransferDataToWindow().
|
protectedinherited |
Definition at line 45 of file panel_toolbar_customization_base.h.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION_BASE::PANEL_TOOLBAR_CUSTOMIZATION_BASE(), TransferDataFromWindow(), TransferDataToWindow(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::~PANEL_TOOLBAR_CUSTOMIZATION_BASE().
|
protectedinherited |
Definition at line 52 of file panel_toolbar_customization_base.h.
Referenced by enableToolbarControls(), PANEL_TOOLBAR_CUSTOMIZATION(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::PANEL_TOOLBAR_CUSTOMIZATION_BASE().
|
protectedinherited |
Definition at line 46 of file panel_toolbar_customization_base.h.
Referenced by PANEL_TOOLBAR_CUSTOMIZATION_BASE::PANEL_TOOLBAR_CUSTOMIZATION_BASE().
|
protectedinherited |
|
protected |
Definition at line 90 of file panel_toolbar_customization.h.
Referenced by onTbChoiceSelect(), populateToolbarTree(), ResetPanel(), TransferDataFromWindow(), and TransferDataToWindow().
|
protectedinherited |
Definition at line 48 of file panel_toolbar_customization_base.h.
Referenced by enableToolbarControls(), onBtnAddAction(), onGroupPress(), onSeparatorPress(), onSpacerPress(), onToolDelete(), onTreeBeginLabelEdit(), PANEL_TOOLBAR_CUSTOMIZATION_BASE::PANEL_TOOLBAR_CUSTOMIZATION_BASE(), parseToolbarTree(), populateToolbarTree(), and PANEL_TOOLBAR_CUSTOMIZATION_BASE::~PANEL_TOOLBAR_CUSTOMIZATION_BASE().