|
KiCad PCB EDA Suite
|
Helper class returned by TOOLBAR_CONFIGURATION::AppendAction() to allow chaining of context menu registration. More...
#include <toolbar_configuration.h>
Public Member Functions | |
| TOOLBAR_ITEM_REF (class TOOLBAR_CONFIGURATION &aParent, TOOLBAR_ITEM &aItem) | |
| TOOLBAR_CONFIGURATION & | WithContextMenu (TOOLBAR_CONTEXT_MENU_REGISTRY::MENU_FACTORY aFactory) |
| Associate a context menu factory with this action. | |
| operator TOOLBAR_CONFIGURATION & () | |
| Allow implicit conversion back to TOOLBAR_CONFIGURATION for chaining. | |
| TOOLBAR_ITEM_REF | AppendAction (const std::string &aActionName) |
| TOOLBAR_ITEM_REF | AppendAction (const TOOL_ACTION &aAction) |
| TOOLBAR_CONFIGURATION & | AppendSeparator () |
| TOOLBAR_CONFIGURATION & | AppendSpacer (int aSize) |
| TOOLBAR_CONFIGURATION & | AppendGroup (const TOOLBAR_GROUP_CONFIG &aGroup) |
| TOOLBAR_CONFIGURATION & | AppendControl (const std::string &aControlName) |
| TOOLBAR_CONFIGURATION & | AppendControl (const ACTION_TOOLBAR_CONTROL &aControl) |
Private Attributes | |
| TOOLBAR_CONFIGURATION & | m_parent |
| TOOLBAR_ITEM & | m_item |
Helper class returned by TOOLBAR_CONFIGURATION::AppendAction() to allow chaining of context menu registration.
Definition at line 100 of file toolbar_configuration.h.
|
inline |
Definition at line 103 of file toolbar_configuration.h.
References m_item, and m_parent.
Referenced by AppendAction(), and AppendAction().
| TOOLBAR_ITEM_REF TOOLBAR_ITEM_REF::AppendAction | ( | const std::string & | aActionName | ) |
Definition at line 231 of file toolbar_configuration.cpp.
References m_parent, and TOOLBAR_ITEM_REF().
| TOOLBAR_ITEM_REF TOOLBAR_ITEM_REF::AppendAction | ( | const TOOL_ACTION & | aAction | ) |
Definition at line 237 of file toolbar_configuration.cpp.
References m_parent, and TOOLBAR_ITEM_REF().
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::AppendControl | ( | const ACTION_TOOLBAR_CONTROL & | aControl | ) |
Definition at line 267 of file toolbar_configuration.cpp.
References m_parent.
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::AppendControl | ( | const std::string & | aControlName | ) |
Definition at line 261 of file toolbar_configuration.cpp.
References m_parent.
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::AppendGroup | ( | const TOOLBAR_GROUP_CONFIG & | aGroup | ) |
Definition at line 255 of file toolbar_configuration.cpp.
References m_parent.
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::AppendSeparator | ( | ) |
Definition at line 243 of file toolbar_configuration.cpp.
References m_parent.
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::AppendSpacer | ( | int | aSize | ) |
Definition at line 249 of file toolbar_configuration.cpp.
References m_parent.
|
inline |
Allow implicit conversion back to TOOLBAR_CONFIGURATION for chaining.
Definition at line 122 of file toolbar_configuration.h.
References m_parent.
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::WithContextMenu | ( | TOOLBAR_CONTEXT_MENU_REGISTRY::MENU_FACTORY | aFactory | ) |
Associate a context menu factory with this action.
The factory is registered globally so JSON-loaded configurations will also get this menu.
| aFactory | Factory function that creates the context menu |
Definition at line 220 of file toolbar_configuration.cpp.
References m_item, m_parent, and TOOLBAR_CONTEXT_MENU_REGISTRY::RegisterMenuFactory().
|
private |
Definition at line 135 of file toolbar_configuration.h.
Referenced by TOOLBAR_ITEM_REF(), and WithContextMenu().
|
private |
Definition at line 134 of file toolbar_configuration.h.
Referenced by AppendAction(), AppendAction(), AppendControl(), AppendControl(), AppendGroup(), AppendSeparator(), AppendSpacer(), operator TOOLBAR_CONFIGURATION &(), TOOLBAR_ITEM_REF(), and WithContextMenu().