|
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 96 of file toolbar_configuration.h.
|
inline |
Definition at line 99 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 233 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 239 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 269 of file toolbar_configuration.cpp.
References m_parent.
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::AppendControl | ( | const std::string & | aControlName | ) |
Definition at line 263 of file toolbar_configuration.cpp.
References m_parent.
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::AppendGroup | ( | const TOOLBAR_GROUP_CONFIG & | aGroup | ) |
Definition at line 257 of file toolbar_configuration.cpp.
References m_parent.
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::AppendSeparator | ( | ) |
Definition at line 245 of file toolbar_configuration.cpp.
References m_parent.
| TOOLBAR_CONFIGURATION & TOOLBAR_ITEM_REF::AppendSpacer | ( | int | aSize | ) |
Definition at line 251 of file toolbar_configuration.cpp.
References m_parent.
|
inline |
Allow implicit conversion back to TOOLBAR_CONFIGURATION for chaining.
Definition at line 118 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 222 of file toolbar_configuration.cpp.
References m_item, m_parent, and TOOLBAR_CONTEXT_MENU_REGISTRY::RegisterMenuFactory().
|
private |
Definition at line 131 of file toolbar_configuration.h.
Referenced by TOOLBAR_ITEM_REF(), and WithContextMenu().
|
private |
Definition at line 130 of file toolbar_configuration.h.
Referenced by AppendAction(), AppendAction(), AppendControl(), AppendControl(), AppendGroup(), AppendSeparator(), AppendSpacer(), operator TOOLBAR_CONFIGURATION &(), TOOLBAR_ITEM_REF(), and WithContextMenu().