|
KiCad PCB EDA Suite
|
Functors that can be used to figure out how the action controls should be displayed in the UI and if an action should be enabled given the current selection. More...
#include <action_manager.h>
Public Member Functions | |
| ACTION_CONDITIONS () | |
| ACTION_CONDITIONS & | Check (const SELECTION_CONDITION &aCondition) |
| ACTION_CONDITIONS & | Enable (const SELECTION_CONDITION &aCondition) |
| ACTION_CONDITIONS & | HotkeyEnable (const SELECTION_CONDITION &aCondition) |
| Set a separate condition for direct command dispatch (hotkeys and navlib buttons). | |
| ACTION_CONDITIONS & | Show (const SELECTION_CONDITION &aCondition) |
| const SELECTION_CONDITION & | GetHotkeyCondition () const |
| Return the condition that direct command dispatch should use, falling back to enableCondition when no separate dispatch condition has been set. | |
Public Attributes | |
| SELECTION_CONDITION | checkCondition |
| Returns true if the UI control should be checked. | |
| SELECTION_CONDITION | enableCondition |
| Returns true if the UI control should be enabled. | |
| SELECTION_CONDITION | showCondition |
| Returns true if the UI control should be shown. | |
| std::optional< SELECTION_CONDITION > | hotkeyCondition |
| Optional separate condition for hotkey dispatch (when empty, enableCondition is used) | |
Functors that can be used to figure out how the action controls should be displayed in the UI and if an action should be enabled given the current selection.
checkCondition is also used for determining the state of a toggled toolbar item (the item is toggled when the condition is true). Definition at line 47 of file action_manager.h.
|
inline |
Definition at line 49 of file action_manager.h.
References checkCondition, enableCondition, SELECTION_CONDITIONS::ShowAlways(), showCondition, and SELECTION_CONDITIONS::ShowNever().
Referenced by Check(), Enable(), HotkeyEnable(), and Show().
|
inline |
Definition at line 56 of file action_manager.h.
References ACTION_CONDITIONS(), and checkCondition.
Referenced by EDA_BASE_FRAME::setupUIConditions().
|
inline |
Definition at line 62 of file action_manager.h.
References ACTION_CONDITIONS(), and enableCondition.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BITMAP2CMP_FRAME::doReCreateMenuBar(), KICAD_MANAGER_FRAME::doReCreateMenuBar(), PCB_EDIT_FRAME::doReCreateMenuBar(), PL_EDITOR_FRAME::doReCreateMenuBar(), SCH_EDIT_FRAME::doReCreateMenuBar(), and KICAD_MANAGER_FRAME::setupUIConditions().
|
inline |
Return the condition that direct command dispatch should use, falling back to enableCondition when no separate dispatch condition has been set.
Definition at line 89 of file action_manager.h.
References enableCondition, and hotkeyCondition.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inline |
Set a separate condition for direct command dispatch (hotkeys and navlib buttons).
When set, it is used instead of enableCondition, allowing menu items to appear disabled while the action still fires for immediate-mode operations like rotate and mirror.
Definition at line 73 of file action_manager.h.
References ACTION_CONDITIONS(), and hotkeyCondition.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 79 of file action_manager.h.
References ACTION_CONDITIONS(), and showCondition.
| SELECTION_CONDITION ACTION_CONDITIONS::checkCondition |
Returns true if the UI control should be checked.
Definition at line 97 of file action_manager.h.
Referenced by ACTION_CONDITIONS(), Check(), and EDA_BASE_FRAME::HandleUpdateUIEvent().
| SELECTION_CONDITION ACTION_CONDITIONS::enableCondition |
Returns true if the UI control should be enabled.
Definition at line 98 of file action_manager.h.
Referenced by ACTION_CONDITIONS(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), Enable(), GetHotkeyCondition(), EDA_BASE_FRAME::HandleUpdateUIEvent(), NL_GERBVIEW_PLUGIN_IMPL::SetActiveCommand(), and NL_PL_EDITOR_PLUGIN_IMPL::SetActiveCommand().
| std::optional<SELECTION_CONDITION> ACTION_CONDITIONS::hotkeyCondition |
Optional separate condition for hotkey dispatch (when empty, enableCondition is used)
Definition at line 102 of file action_manager.h.
Referenced by GetHotkeyCondition(), and HotkeyEnable().
| SELECTION_CONDITION ACTION_CONDITIONS::showCondition |
Returns true if the UI control should be shown.
Definition at line 99 of file action_manager.h.
Referenced by ACTION_CONDITIONS(), EDA_BASE_FRAME::HandleUpdateUIEvent(), and Show().