Commit ad3cb1f3 authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Added TOOL_MANAGER::RunAction() function.

parent bec2e9b1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -194,6 +194,12 @@ void TOOL_MANAGER::UnregisterAction( TOOL_ACTION* aAction )
}


bool TOOL_MANAGER::RunAction( const std::string& aActionName )
{
    return m_actionMgr->RunAction( aActionName );
}


bool TOOL_MANAGER::invokeTool( TOOL_BASE* aTool )
{
    wxASSERT( aTool != NULL );
+9 −0
Original line number Diff line number Diff line
@@ -99,6 +99,15 @@ public:
     */
    void UnregisterAction( TOOL_ACTION* aAction );

    /**
     * Function RunAction()
     * Runs the specified action. The common format is "application.ToolName.Action".
     *
     * @param aActionName is the name of action to be invoked.
     * @return True if the action finished successfully, false otherwise.
     */
    bool RunAction( const std::string& aActionName );

    /**
     * Function FindTool()
     * Searches for a tool with given ID.