CPopupMenuItem
#include "PopupMenuItem.h"
Description
Popup item class. You can use this class only for individual elements, for more items use CPopup or CPopupItemsManager class.
Private variables
| Type | Name | Description |
|---|---|---|
| PPluginAction | PluginAction | Variable used to communicate with AQQ (create and remove item) |
| PPluginActionEdit | PluginActionEdit | Variable used to communicate with AQQ (update item) |
Public variables
| Type | Name | Description |
|---|---|---|
| UnicodeString | Action | Name of action available in AQQ |
| UnicodeString | Name | Internal name |
| UnicodeString | Caption | Caption |
| int | Position | Position. 0 = auto |
| int | IconID | ID of icon loaded to AQQ. -1 = none |
| UnicodeString | Service | Name of service to call after click |
| UnicodeString | PopupName | Name of parent popup menu |
| int | PopupPosition | Position in Popup |
| int | GroupIndex | Group index |
| bool | Grouped | Item belongs to group |
| bool | AutoCheck | Auto check/unchek item after click |
| bool | Checked | Item checked after create |
| unsigned int | Handle | Handle of parent window. 0 = main AQQ window |
| UnicodeString | Shortcut | Shortcut in Delphi text format |
| UnicodeString | Hint | Hint on hover |
| UnicodeString | PositionAfter | Name of item after which you want to add new item |
| bool | Enabled | Item is enabled. After the creation is true. If you want to change this you must call Update() function |
| bool | Visible | Item is visible. After the creation is true. If you want to change this you must call Update() function |
Public methods
| Type | Name | Description |
|---|---|---|
| CPopupMenuItem() | Constructor | |
| CPopupMenuItem(UnicodeString Name, UnicodeString Caption, int Position, int IconID, UnicodeString Service, UnicodeString PopupName = "") | Constructor. Item will be created after calling Create() function | |
| CPopupMenuItem(UnicodeString Name, UnicodeString Caption, UnicodeString PositionAfter, int IconID, UnicodeString Service, UnicodeString PopupName = "") | Constructor. Item will be created after calling Create() function | |
| ~CPopupMenuItem() | Destructor | |
| PPluginAction | AQQFormat() | Function converts this object to AQQ structure |
| void | SDKFormat(PPluginAction PluginAction) | Function converts AQQ structure to this object |
| int | Create() | Function creates button using specified properties. In case of error returns 0, else returns 1 |
| void | Destroy() | Function removes item |
| void | Get(PPluginItemDescriber PluginItemDescriber) | Function gets popup item from AQQ using data in PPluginItemDescriber structure |
| void | Update() | Function updates item. Update affects these fields: Caption, Hint, Enabled, Visible, IconIndex and Checked |
Example
Example plugin that using CPopupMenuItem class you may find here.