![]() | InDesign SDK 20.5 |

Public Member Functions | |
| DVOwnerDrawMenu (IPMUnknown *boss) | |
| virtual void | DrawMenuItem (IGraphicsContext *oc, ActionID menuActionID, const SysRect &itemRect, bool16 isCurrentlySelectedItem, int16 actionState) |
| virtual void | MeasureItem (ActionID menuActionID, uint16 *outItemWidth, uint16 *outItemHeight) |
| virtual void | AddMenuWidget (ActionID menuActionID, IControlView *widget) |
| virtual void | RemoveMenuWidget (ActionID menuActionID, bool16 deleteUID=kTrue) |
| virtual void | RemoveAllMenuWidgets (bool16 deleteUID=kTrue) |
| virtual bool16 | IsValidActionID (ActionID actionID) |
| virtual PMReal | GetMenuViewScale () |
| virtual void | SetMenuViewScale (PMReal scale) |
| virtual void | ReadWrite (IPMStream *s, ImplementationID prop) |
Public Member Functions inherited from CPMUnknown< IDVOwnerDrawMenu > | |
| IPMUnknown * | QueryInterface (PMIID interfaceID) const |
| void | AddRef () const |
| void | Release () const |
| void | PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue) |
| void | PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue) |
| CPMUnknown (const CPMUnknown &)=delete | |
| CPMUnknown & | operator= (const CPMUnknown &)=delete |
Callbacks to manage Drawing of OwnerDraw menus | |
Adding and removing widgets for associated ActionIDs. Typically, widgets are added to the OwnerDraw menu using these methods and when DrawMenu is called, | |
it will draw the widget that was added for the requested ActionID | |
Protected Member Functions | |
| IControlView * | GetWidgetForAction (ActionID menuActionID) |
| virtual void | DrawHilite (dvaui::drawbot::Drawbot *drawbotP, IControlView *menuView, bool16 isCurrentlySelectedItem) |
| virtual void | HandleEnablement (IControlView *menuView, int16 actionState) |
Protected Member Functions inherited from CPMUnknown< IDVOwnerDrawMenu > | |
| CPMUnknown (IPMUnknown *boss) | |
Additional Inherited Members | |
Public Types inherited from IDVOwnerDrawMenu | |
| enum | { kDefaultIID = IID_IDVOWNERDRAWMENU } |
Protected Attributes inherited from CPMUnknown< IDVOwnerDrawMenu > | |
| HelperInterface | fHelperInterface |
| virtual |
Add a widget for a given ActionID. This is the preferred method for using OwnerDraw Menus. Widgets are added with AddMenuWidget and associated with an ActionID.
| The | ActionID of the specific menu item that you are associating with the given widget. |
| The | widget that is being added to the OwnerDraw menus list of widgets and associated actions |
Implements IDVOwnerDrawMenu.
| virtual |
This method is called by the Menu Manager code to draw an OwnerDraw menu item. When called, client should draw into the specified port and rectangle
| The | IViewPort that you should draw into |
| The | ActionID of the specific menu that is being asked to be drawn. Only 1 menu item at a time is drawn. This identifies which menu item to draw. |
| The | rect in which to draw you menu item |
| kTrue | if this menu item has the mouse over it and should be drawn hilited to indicate that it is the curren target menu item. kFalse otherwise |
| action | state of the menu item. This is the same as the action states in IActionStateList.h and should be used to determine whether to draw disabled, with a checkmark, etc. Options are (kDisabled_Unselected, kEnabledAction, kSelectedAction, kMultiSelectedAction, kAltSelectedAction) |
Implements IDVOwnerDrawMenu.
| virtual |
A way to find out what scale the owner drawn view should be drawn at. If using a HIDPI screen this may be greater than 1.
Implements IDVOwnerDrawMenu.
| virtual |
Test the Action ID to see if it is one of the actions that this class can render. Override this for components that have a mix of ownerdraw menus and regular menus. If you don't do this, your owner draw code will be called when your regular menu is colorized in the Menus dialog.
| actionID | the action id you want to test |
Implements IDVOwnerDrawMenu.
| virtual |
This method is called by the Menu Manager code to determine the size of the given menu manager. The height and width returned here will match the height and width of the rectangle given in DrawMenuItem
| The | ActionID of the specific menu that is being asked to be measured. Only 1 menu item at a time is measured. This identifies which menu item to measure. |
| this | an out only parameter. You should set it to the width of your menu. This may be nil, so check before setting it |
| this | an out only parameter. You should set it to the height of your menu. This may be nil, so check before setting it |
Implements IDVOwnerDrawMenu.
| virtual |
Remove all the widgets that have been added.
| When | the widgets are removed, do you want the UIDs of the widgets deleted? Typically, you've created the widgets for this purpose, so you want to delete the UIDs when they go away. |
Implements IDVOwnerDrawMenu.
| virtual |
Remove the widget that is associated with the specified action.
| The | ActionID of the specific menu item whose widget you wish to remove. |
| When | the widget is removed, do you want the UID of the widget deleted? Typically, you've created the widget for this purpose, so you want to delete the UID when it goes away. |
Implements IDVOwnerDrawMenu.
| virtual |
This is set in the menu manager before calling the owner drawn menu to draw.
| scale | view is drawn at. |
Implements IDVOwnerDrawMenu.