version 2003
PA_GetAreaEvent (params) PA_AreaEvent
Parameter | Type | Description | |
params | PA_PluginParameters | Parameters received in PluginMain | |
Function result | PA_AreaEvent | Type of event in the area |
Description
The routine PA_GetAreaEvent returns the event that 4D passes to the area. The code of an external area usually consists of a switch of the event kind received.
params is the PA_PluginParameters the plug-in received in its PluginMain routine.
Currently, the events that an area can receive are stored in an enum, in the "PublicTypes.h" header file. Refer to the Plug-in Area Tutorial for more information.
typedef enum { eAE_Idle = 0, eAE_MouseDown = 1, eAE_MouseUp = 2, eAE_KeyDown = 3, eAE_KeyUp = 4, eAE_AutoKey = 5, eAE_Update = 6, eAE_InitArea = 16, eAE_Deinit = 17, aAE_Cursor = 18, eAE_IsFocusable = 20, eAE_Select = 21, eAE_Deselect = 22, eAE_Scroll = 25, eAE_DesignUpdate = 26, eAE_TestPrintSize = 27, eAE_GetPrintSize = 28, eAE_PrintBand = 29, eAE_UndoCommand = 30, eAE_CutCommand = 31, eAE_CopyCommand = 32, eAE_PasteCommand = 33, eAE_ClearCommand = 34, eAE_SelectAllCommand = 35, eAE_SelectDeselect = 38, eAE_UpdateEditCommands = 43, eAE_LoadRecord = 69, eAE_SaveRecord = 70, eAE_AllowDrop = 80, eAE_Drag = 81, eAE_Drop = 82, eAE_EditAdvancedProperties = 600, eAE_DisposeAdvancedProperties = 601, eAE_Init = 602, eAE_AreAdvancedPropertiesEditable = 603, eAE_GetMenuIcon = 604, eAE_DesignInit = 605 } PA_AreaEvent;
Example
Tell the user he clicked in the area
if(PA_GetAreaEvent(params) == eAE_MouseDown) { PA_Alert("You press the mouse in MY area"); }
See Also
Create and use an external area, PA_GetAreaName, PA_GetAreaRect.
Error Handling
PA_GetLastError keeps the last error that occurred before calling the routine.