Break long header link with TOOL_ACTION and TOOLS_HOLDER

This commit is contained in:
Ian McInerney 2023-07-13 00:18:20 +01:00
parent a98e25d4df
commit e926952f66
2 changed files with 16 additions and 9 deletions

View File

@ -39,6 +39,18 @@ TOOLS_HOLDER::TOOLS_HOLDER() :
m_moveWarpsCursor( true )
{ }
void TOOLS_HOLDER::RegisterUIUpdateHandler( const TOOL_ACTION& aAction,
const ACTION_CONDITIONS& aConditions )
{
RegisterUIUpdateHandler( aAction.GetUIId(), aConditions );
}
void TOOLS_HOLDER::UnregisterUIUpdateHandler( const TOOL_ACTION& aAction )
{
UnregisterUIUpdateHandler( aAction.GetUIId() );
}
// TODO: Implement an RAII mechanism for the stack PushTool/PopTool pairs
void TOOLS_HOLDER::PushTool( const TOOL_EVENT& aEvent )

View File

@ -27,12 +27,13 @@
#include <vector>
#include <view/view_controls.h>
#include <tool/selection.h>
#include <tool/tool_action.h>
struct ACTION_CONDITIONS;
class ACTIONS;
class TOOL_ACTION;
class TOOL_DISPATCHER;
class TOOL_EVENT;
class TOOL_MANAGER;
/*
@ -61,10 +62,7 @@ public:
* @param aConditions are the UI conditions to use for the control states.
*/
virtual void RegisterUIUpdateHandler( const TOOL_ACTION& aAction,
const ACTION_CONDITIONS& aConditions )
{
RegisterUIUpdateHandler( aAction.GetUIId(), aConditions );
}
const ACTION_CONDITIONS& aConditions );
/**
* Register a UI update handler for the control with ID @c aID.
@ -80,10 +78,7 @@ public:
*
* @param aAction is the action to unregister the handler for.
*/
virtual void UnregisterUIUpdateHandler( const TOOL_ACTION& aAction )
{
UnregisterUIUpdateHandler( aAction.GetUIId() );
}
virtual void UnregisterUIUpdateHandler( const TOOL_ACTION& aAction );
/**
* Unregister a UI handler for a given ID that was registered using @c RegisterUIUpdateHandler.