To provide the content in DesignCenter, it is necessary to implement at least the IAcDcContentView interface. If the application is intended to participate in the Finder mechanism, then the application must support the IAcDcContentFinder interface as well. Implementing the IAcDcContentFinder interface is optional.
Typically, an application component would do the following:
IAcDcContentBrowser interface functions |
|
---|---|
Function |
Description |
AddPaletteItem |
Adds an item in the DesignCenter palette. |
AddNavigatorNode |
Necessary only in case of custom view. Adds a node in the DesignCenter navigator. |
GetDCFrameWindow |
This is useful in the case of components wanting to have a valid window handle to display their context menus. |
SetItemDescription |
Sets the description text in description pane of the DesignCenter. |
SetPaletteImageList |
Sets the small/large image list used by the palette in the DesignCenter. |
SetNavigatorImageList |
Sets the small image list used by the navigator in the DesignCenter. |
SetPaletteMultiSelect |
Enables the option to select multiple content entities in the DesignCenter palette. |
InsertPaletteColumn |
Inserts a column (a subitem) for a content entity showing up in the palette. |
DeleteAllPaletteItems |
Deletes all the items in the DesignCenter palette. |
GetSelectedNavNodeText |
Gets the selected navigator node text. |
GetCurrentViewMode |
Gets the current view mode (desktop, open drawings, etc.). |
SetPaletteSubItem |
Sets a subitem for an item in the DesignCenter palette. |
SortPaletteItems |
Sorts the items in the DesignCenter palette. |
IAcDcContentView interface functions |
|
---|---|
Function |
Description |
Initialize |
Caches the given IAcDcContentBrowser. Optionally creates the component window and hides it. This allows a component to popup any context menus for its content. Creates at least one small and large image list. It also performs whatever other initialization is required. |
NavigatorNodeClick |
Shows the contents of the given file in the palette by calling AddPaletteItem() from the cached IAcDcContentBrowser. Optionally, it can ask the browser to sort the items. There are functions in IAcDcContentBrowser to do the sorting. |
NavigatorMouseUp |
Displays the context menu meaningful for a given container. |
PaletteMouseUp |
Displays the context menu meaningful for a given content entity/entities. |
PaletteItemClick |
Caches the given selected item and optionally sets the description of the item via the browser. This method is optional. |
RenderPreviewWindow |
Renders the image of the selected item on the given preview window. This method is optional. |
PaletteItemDblClick |
Shows the contents of the container in case the clicked item is a file. Does whatever is appropriate in AutoCAD if the clicked item is the content that the component is displaying. |
PaletteColumnClick |
Asks the content browser to do the sorting with the component's sort data. This method is optional. |
PaletteBeginDrag |
Begins the dragging of a content/container entity. The component is assumed to take care of the drag and drop of file/content types that are meaningful to it. |
ReleaseBrowser |
Releases the cached browser. |
GetLargeImage |
Gets the preview icon (32x32) for a given container file to show up in large icon view in Design Context. |
QueryContextMenu |
Appends the context menu items for a container (file) in the palette to a given context menu. |
InvokeCommand |
Invokes the command at a given command ID on the context menu that the component provided. |