InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ToolRecord Class Reference

#include <ToolRecord.h>

Public Types

typedef base_type data_type
 

Public Member Functions

 ToolRecord (ITool *face, int32 groupNum, int32 toolNum, ClassID parentTool, int32 subToolNum, RsrcID iconID, const PluginID &pluginID)
 
 ToolRecord (const ToolRecord &rec)
 
void ReadWrite (IPMStream *s)
 
IToolQueryTool ()
 
int32 GetGroupNum () const
 
int32 GetToolNum () const
 
ClassID GetParentTool () const
 
int32 GetSubToolNum () const
 
RsrcID GetIconID ()
 
PluginID GetIconPluginID ()
 
void SetGroupNum (int32 newGroup)
 

Friends

bool16 operator== (const ToolRecord &a, const ToolRecord &b)
 

Detailed Description

Class which maintains information about tool positions in toolbox.

Member Function Documentation

int32 ToolRecord::GetGroupNum () const

Gets the toolbox group number this tool belongs in. Ignored if this is a subtool. This is used for positioning the tool in the toolbox.

See Also
ToolBoxDefs.h
Returns
the toolbox group number
RsrcID ToolRecord::GetIconID ()

Gets the resource id of the icon for this tool

Returns
the icon resource id
PluginID ToolRecord::GetIconPluginID ()

Gets the plugin id of the icon for this tool

Returns
the plugin id
ClassID ToolRecord::GetParentTool () const

Gets the parent tool of this tool. This is used for positioning the tool in the toolbox. If a tool has a parent tool, then by default it is hidden 'under' that tool in the toolbox. Tools which have a parent tool are sometimes called subtools.

See Also
ToolBoxDefs.h
Returns
the parent tool ClassID
int32 ToolRecord::GetSubToolNum () const

Gets the subtool number of this tool. Ignored if this is not a subtool. This is used for positioning the subtool in the toolbox flyout.

See Also
ToolBoxDefs.h
Returns
the toolbox group number
int32 ToolRecord::GetToolNum () const

Gets the tool number within a group. Ignored if this is a subtool. This is used for positioning the tool in the toolbox.

See Also
ToolBoxDefs.h
Returns
the toolbox group number
ITool* ToolRecord::QueryTool ()

Query the tool from the ToolRecord. This does an AddRef() caller should Release() the returned ITool*

Returns
the tool
void ToolRecord::SetGroupNum (int32 newGroup)

Sets the group number for positioning this tool. Rarely used. No effect after the toolbox has been built.

Parameters
newGroupwhich group to move the tool into.