20#include <boost/test/unit_test.hpp>
79 .Name(
"common.showDatasheet" )
80 .FriendlyName(
"Show Datasheet" )
82 .DefaultHotkey(
'D' ) );
84 .Name(
"pcbnew.dragMove45" )
85 .FriendlyName(
"Drag 45" )
87 .DefaultHotkey(
'D' ) );
96 .Name(
"common.Interactive.copy" )
97 .FriendlyName(
"Copy" )
99 .DefaultHotkey(
'C' ) );
101 .Name(
"pcbnew.InteractiveMove.copyWithReference" )
102 .FriendlyName(
"Copy With Reference" )
104 .DefaultHotkey(
'X' ) );
109 std::vector<const TOOL_ACTION*> global{ &commonCopy, &frameCopy };
113 BOOST_CHECK_EQUAL( global.front()->GetName(),
"pcbnew.InteractiveMove.copyWithReference" );
119 .Name(
"common.Interactive.copy" )
120 .FriendlyName(
"Copy" )
122 .DefaultHotkey(
'C' ) );
124 .Name(
"pcbnew.InteractiveMove.copyWithReference" )
125 .FriendlyName(
"Copy With Reference" )
127 .DefaultHotkey(
'X' ) );
131 std::vector<const TOOL_ACTION*> global{ &commonCopy, &frameCopy };
141 .Name(
"common.Interactive.copy" )
142 .FriendlyName(
"Copy" )
144 .DefaultHotkey(
'C' ) );
146 .Name(
"pcbnew.InteractiveMove.copyWithReference" )
147 .FriendlyName(
"Copy With Reference" )
149 .DefaultHotkey(
'C' ) );
151 std::vector<const TOOL_ACTION*> global{ &commonCopy, &frameCopy };
176 auto alwaysTrue = [](
const SELECTION& ) {
return true; };
static void PromoteUserBoundFrameAction(std::vector< const TOOL_ACTION * > &aGlobalActions, FRAME_T aFrameType, int aMatchedHotKey)
Reorder global actions sharing a hotkey so that one native to the given frame is tried first when the...
static bool NotEmpty(const SELECTION &aSelection)
Test if there are any items selected.
static bool empty(const wxTextEntryBase *aCtrl)
Functors that can be used to figure out how the action controls should be displayed in the UI and if ...
SELECTION_CONDITION enableCondition
Returns true if the UI control should be enabled.
ACTION_CONDITIONS & HotkeyEnable(const SELECTION_CONDITION &aCondition)
Set a separate condition for direct command dispatch (hotkeys and navlib buttons).
ACTION_CONDITIONS & Enable(const SELECTION_CONDITION &aCondition)
const SELECTION_CONDITION & GetHotkeyCondition() const
Return the condition that direct command dispatch should use, falling back to enableCondition when no...
BOOST_AUTO_TEST_CASE(UserBoundDetection_DefaultUntouched)
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")