ClipXPopupModifier Service
Header: #include
<ClipXPopupModifier.h>
Ancestor: ClipXPopupModifer
Member Events:
virtual void customizeSystrayMenu(ClipXMenuHandler *menu) {}
This callback
function is called after the user has right-clicked the System Tray
icon, and before the menu is shown.
ClipXMenuHandler *menu
A ClipXMenuHandler interface used to add your own items to the main menu.
virtual void customizeHistoryMenu(ClipXMenuHandler *menu, int is_hotkey, int is_submenu) {}
This callback function is called after the user has pressed the Clipboard History hotkey, or has clicked the System Tray icon (if this is a right-click, this function is called after customizeSystrayMenu has been called).
ClipXMenuHandler *menu
A ClipXMenuHandler interface used to add your own items to the Clipboard History menu.
int is_hotkey
A boolean value indicating if the menu has been spawned in response to the paste hotkey.
int is_submenu
A boolean value indicating if the Clipboard History menu is a submenu of the main system tray menu or not (if is_submenu is true, the menu has been spawned in response to a right-click on the System Tray icon)
virtual void onCustomSize(int cmd, int *w, int *h) {}
This callback function is called for each of the items you have inserted in the menu using the MF_OWNERDRAW flag.
int cmd
The command identifier for the menu item.
int *w
A pointer to an integer value used to calculate the size of the menu. You should fill this variable with the width of your rendered item.
int *h
A pointer to an integer value used to calculate the size of the menu item. You should fill this variable with the height of your rendered item.
virtual void onCustomDraw(int cmd, HDC dc, RECT rcitem, int state) {}
This callback function is called whenever an menu item that has been inserted with the MF_OWNERDRAW flag needs to be rendered.
int cmd
The command identifier for the menu item.
HDC dc
The HDC handle that you should use to draw your menu item.
RECT rcitem
The rectangle in which you should draw your menu item.
int state
The state in which you should draw your menu item. This value can be a combination of the following values:
ODS_CHECKED –
The menu item is to be checked
ODS_DISABLED – The
menu item is to be drawn disabled
ODS_GRAYED – The
menu item is to be grayed
ODS_SELECTED – The menu
item is to be draw selected
virtual int onCustomAccelerator(char c) { return -1; }
This callback function is called in response to a keypress within a menu, and is used to implement a custom accelerator for your items that have been inserted with the MF_OWNERDRAW flag.
char c
The character that was pressed.
return value (int):
The command identifier that corresponds to this keyboard accelerator or -1 if none does.
virtual void onCommand(int cmd) {}
This callback function is called when the user has selected one of your menu items.
int cmd
The command
identifier of the selected menu item.
virtual void onDeleteMenu(ClipXMenuHandler *menu) {}
This callback function is called when the menu is
deleted.
ClipXMenuHandler *menu
The ClipXMenuHandler interface for the menu that is going away.