Share

Tool Palette Classes and Interfaces (WIN)

Description

Classes

Class Description
AcTcCatalogAcTcCatalog encapsulates the catalog item in the tool catalog.
AcTcCatalogItemAcTcCatalogItem is the base class for all catalog items. It encapsulates an item's common properties and behavior. This class is used to derive from and implement the following catalog items:
  • Tool
  • Package
  • Palette
  • Category
  • Catalog
  • Stock Tool
AcTcCatalogItemReactor This is the reactor base class for notification when a child is added to, deleted from, or detached from a catalog item. This class is meant to be derived from and cannot be instantiated.
AcTcCatalogSet This class stores and manages a collection of catalogs. The catalogs are loaded from a semicolon-delimited list of paths set in the catalog set. This class cannot be instantiated by external applications. A pointer to this class can be obtained by using AcTcScheme::GetCatalogSet().
AcTcCategoryAcTcCategory encapsulates the category item in the tool catalog.
AcTcImageAcTcImage provides functionality for loading, saving, and rendering BMP, JPG, GIF, and PNG files. The image data can be loaded and saved to a file or to an IStream object.
AcTcImageListAcTcImageList is used to manage the images associated with a catalog item. Multiple images with different sizes can be associated with a catalog item. Images of closely matching size are used for rendering the image. The constructor of this class is protected, so it cannot be created. The pointer to this object can be obtained using AcTcCatalogItem::GetImageList().
AcTcManagerAcTcManager, the tool manager, contains and manages stock tool and workspace catalogs. Stock tools are stored in stock tool files (as either one stock tool per file or multiple stock tools in a catalog file). Stock tool files are stored in the stock tool catalog directory. Workspace catalogs are stored as catalog files in the workspace catalogs directory. At startup, the tool manager reads the stock tool files and loads the stock tools found in them. Then it loads the workspace catalogs from the workspace catalogs directory.
AcTcPackageAcTcPackage encapsulates the package item in the tool catalog.
AcTcPaletteAcTcPalette encapsulates the palette item in the tool catalog.
AcTcScheme This class is used to store and manage a tool palette scheme.A scheme is a collection of the following types of catalogs:
  • Tool catalogs
  • Stock tool catalogs
  • Shape catalogs
These catalogs can be loaded from catalog files that are located in multiple paths.
AcTcStockToolAcTcStockTool represents a registered stock tool.Stock tool information is stored in a stock tool file. AcTcStockTool encapsulates the stock tool information read from the file and provides methods to manage the information.
AcTcToolAcTcTool encapsulates the tool item in the tool catalog.
CAcTcUiCatalogViewCAcTcUiCatalogView is used to display the child items of a catalog item. The CAcTcUiCatalogView is associated with a catalog item whose children are displayed in the view. Each child item displayed in the view is encapsulated by a CAcTcUiCatalogViewItem object.
CAcTcUiCatalogViewItemCAcTcUiCatalogViewItem is used to encapsulate the items displayed in CAcTcUiCatalogView. Each CAcTcUiCatalogViewItem is associated to a catalog item object AcTcCatalogItem. It reads the catalog item's image and text and renders it in the view. This object cannot be created; the catalog view creates and maintains this object.
CAcTcUiManager The tool palette UI module contains a global singleton object of type CAcTcUiManager, which can be obtained using the global function AcTcUiGetManager(). This object manages the tool palette UI module and contains a function to get the tool palette window pointer. It also contains helper functions to create, export, import, and find palettes.
CAcTcUiPaletteViewCAcTcUiPaletteView is used to display the tools contained in a palette.
CAcTcUiScheme This class handles the UI schemes in tool palettes. Every tool palette set must belong to a scheme, and it cannot be part of two schemes. The palette sets in each scheme can have their own traits. Schemes exist independent of each other, and multiple schemes can coexist.
CAcTcUiToolPaletteCAcTcUiToolPalette is the container for palette view (CAcTcUiPaletteView). The palette view is embedded as a child window in the tool palette window's client area. CAcTcUiToolPalette overrides the base class functions to customize the behavior of the base class. The tool palette can contain only one palette view.
CAcTcUiToolPaletteGroup This class lets clients organize available tool palettes in logical groups.
CAcTcUiToolPaletteSetCAcTcUiToolPaletteSet is the container for one or more tool palettes (CAcTcUiToolPalette). CAcTcUiToolPaletteSet customizes the base class by implementing features specific to the tool palette set and modifying the standard base class behavior as necessary. The constructor is protected. The palette set pointer for the tool palette window can be obtained using AcTcUiGetToolPaletteWindow.

Interfaces

Interface Description
IAcadStockTool This interface is defined by the framework. Tool writers implement this interface in a COM object. Each stock tool is implemented in a separate COM object. The framework creates the COM object using information stored in the stock tool file, gets the IAcadStockTool interface, and then calls the interface object's CreateTool() method to create the tools.IAcadStockTool and IAcadTool may be implemented using two different COM objects, or combined in a single COM object. This interface does not need to be registered.
IAcadTool This interface provides the primary communication channel between the tool palette framework and tools implemented by tool writers. It is defined by the framework, which uses tools through this interface.Tool writers implement this interface in a COM object. IAcadStockTool and IAcadTool may be implemented either as two different COM objects, or as a single COM object.This interface does not need to be registered, nor does it need to be exposed through the IAcadStockTool::QueryInterface() method. The framework uses the IAcadStockTool::CreateTool() method to get the IAcadTool interface.
IAcadToolContextMenu The stock tool implements this interface if it wants to customize the context menu displayed in the palette background. This interface is queried from the IAcadStockTool interface.
IAcadToolCopyPaste This interface, which is queried from the IAcadStockTool interface, allows a stock tool to handle objects pasted into the palette from the Clipboard. This interface's copy-and-paste operation is roughly equivalent to the drag-and-drop capabilities provided by the tool's IDropTarget implementation.The framework tries to pass the Clipboard object to each registered stock tool's IAcadToolCopyPaste interface. It continues iterating through the registered tools until it finds one that accepts the object.
IAcadToolDragSource A stock tool implements this interface to receive notification when the tools belonging to the stock tool are dragged and dropped. This interface is queried from IAcadStockTool using QueryInterface(). If this interface is implemented by a stock tool, the framework does the following:
  1. When a tool belonging to the stock tool is dragged and dropped, the framework calls its BeginDrag(), DragInProgress(), and EndDrag() methods before, during, and after the drag-and-drop operation, respectively. The stock tool can use this event sequence to copy data to the data object, allowing it to be dropped in its intended target.
  2. When... more
IAcadToolDropTarget A stock tool implements this interface to handle objects dragged and dropped in the palette. This interface is queried from the IAcadStockTool interface. Its functionality is basically equivalent to the IDropTarget interface. However, an IAcadToolDropTarget interface implemented by IAcadStockTool can create multiple tools from the drag-and-drop object, whereas the IDropTarget interface implemented by IAcadTool may create only one tool.
IAcadToolFlyoutShape This interface provides access to the ID of the flyout tool that is being executed or dragged. If a tool appearing in a flyout palette is executed or dragged, and the tool's COM object supports this interface, the framework calls the IAcadToolFlyoutShape::SetFlyoutTools() method to set the flyout tool ID before calling the tool's execute or drag methods.This interface is queried from the IAcadTool interface when the flyout tool is executed. It is queried from the IAcadStockTool interface when the flyout tool is dragged.
IAcadToolImageIAcadToolImage manages image objects and their properties. The framework implements IAcadToolImage.The image object supports IPersistStream. This allows it to save and load itself from an instance of IStream. It also allows the caller to manage image properties and to use the image in graphical rendering.
IAcadToolPropertiesIAcadToolProperties can be used by the tool's COM object to get and set properties of the tool, such as name, description, and image. After the COM object is created, the framework passes the IAcadToolProperties interface to the COM object in IAcadTool::SetToolProperties(). The COM object should cache this pointer and use it to get and set the display properties of the tool.
IAcadToolProperties3 IAcadToolProperties3 is a new COM interface class that provides access to the name, description, read-only state, image, and overlay image.
IAcadToolSort This interface can be implemented by tools to take part in custom sorting if the sort option kSortByCustom is specified during sorting. This interface is queried from the IAcadTool interface.

Namespaces

Namespace Description
AcTc Scoping container for tool and catalog framework enumerated types.

Was this information helpful?