InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IToolBoxUtils Class Referenceabstract

#include <IToolBoxUtils.h>

Inheritance diagram for IToolBoxUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITOOLBOXUTILS }
 

Public Member Functions

virtual bool16 SetActiveTool (ITool *itool, ClassID toolType=kPointerToolBoss)=0
 
virtual IToolQueryActiveTool (ClassID toolType=kPointerToolBoss)=0
 
virtual IToolQueryPreviousActiveTool (ClassID toolType=kPointerToolBoss)=0
 
virtual IToolQueryMostRecentSelectionTool ()=0
 
virtual IToolQueryMostRecentCreationTool ()=0
 
virtual IToolQueryTool (ClassID toolClass)=0
 
virtual int32 GetNumTools ()=0
 
virtual IToolQueryNthTool (int32 index)=0
 
virtual void EnableToolsForViewClass (ClassID theClass)=0
 
virtual bool16 IsToolEnabled (ITool *itool)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This interface provides utility routines for dealing with tools. i.e. Utils<IToolBoxUtils>()->SetActiveTool( ... ) ;

Member Function Documentation

virtual void IToolBoxUtils::EnableToolsForViewClass (ClassID theClass)
pure virtual

Enables/disables tools in the toolbox based on the classID of the passed in view. Tools which don't work in this view are disabled.

Parameters
theClassThe class of the view you want to base tool enabling on.
virtual int32 IToolBoxUtils::GetNumTools ()
pure virtual

Counts the number of tools that live in the toolbox. This includes tools in the main toolbox, and 'subtools' which are accessible 'under' a toolbox tool.

Returns
the count of tools
virtual bool16 IToolBoxUtils::IsToolEnabled (IToolitool)
pure virtual

Tests to see if a tool in the tool panel is enabled. This returns kTrue if the tool panel is hidden.

Parameters
itoolthe tool to test.
Returns
kTrue if the tool is enabled. kFalse if the tool is disabled and the panel is visible.
virtual ITool* IToolBoxUtils::QueryActiveTool (ClassID toolType = kPointerToolBoss)
pure virtual

Retrieves the currently active tool.

Parameters
toolTypethe type of the tool you're interested in. Tools of the same type are mutually exclusive. "Traditional" tools(creation, selection,...) are of type kPointerToolBoss
Returns
the active tool for the passed in toolType. Callers should Release() this pointer when done.
virtual ITool* IToolBoxUtils::QueryMostRecentCreationTool ()
pure virtual

Retrieves the most recently active tool which is classified as a creation tool.

Returns
the most recent creation tool. Callers should Release() this pointer when done.
virtual ITool* IToolBoxUtils::QueryMostRecentSelectionTool ()
pure virtual

Retrieves the most recently active tool which is classified as a selection tool.

Returns
the most recent selection tool. Callers should Release() this pointer when done.
virtual ITool* IToolBoxUtils::QueryNthTool (int32 index)
pure virtual

Gets the nth tool from the toolbox

Parameters
indexwhich tool you're interested in
Returns
the requested tool. Callers should Release() this pointer when done.
virtual ITool* IToolBoxUtils::QueryPreviousActiveTool (ClassID toolType = kPointerToolBoss)
pure virtual

Retrieves the previous active tool.

Parameters
toolTypethe type of the tool you're interested in. Tools of the same type are mutually exclusive. "Traditional" tools(creation, selection,...) are of type kPointerToolBoss
Returns
the toolvfor the passed in toolType, which was active before the current one. Callers should Release() this pointer when done.
virtual ITool* IToolBoxUtils::QueryTool (ClassID toolClass)
pure virtual

Retrieves the pointer to the tool with the given ClassID

Parameters
toolClassthe boss ID of the tool you're interested in
Returns
the requested tool. Callers should Release() this pointer when done.
virtual bool16 IToolBoxUtils::SetActiveTool (IToolitool,
ClassID toolType = kPointerToolBoss 
)
pure virtual

Sets the currently active tool. Tool can be set to nil.

Parameters
itoolThe tool to set active
toolTypethe type of the tool. Tools of the same type are mutually exclusive. "Traditional" tools(creation, selection,...) are of type kPointerToolBoss
Returns
kTrue if tool could be set ok.