MIL_ID EventId, | //in |
MIL_INT64 InfoType, | //in |
void *UserVarPtr | //out |
This function allows you to get information about the event that caused the hook-handler function to be called. MgraGetHookInfo() should only be called within the scope of a graphics list hook-handler function (see MgraHookFunction()).
Specifies the graphics list event identifier received by the hook-handler function (see MgraHookFunction()). The event will be of the type passed to the HookType parameter of the hook-handler function.
See the Parameter associations section for possible values that can be specified.
Specifies the type of information to get.
See the Parameter associations section for possible values that can be specified.
Specifies the address in which to write the requested information.
See the Parameter associations section for possible values that can be returned.
The table below lists possible values for the EventId and InfoType parameters and possible values returned to the UserVarPtr parameter.
Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.
For getting information about a graphics
list event
|
|||||||||||||||||||||||||||||||||||||||
EventId |
Description
|
||||||||||||||||||||||||||||||||||||||
InfoType | |||||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
An M_GRAPHIC_LIST_MODIFIED event ID |
Specifies that the event that called the hook-handler function was due to the graphics list being modified, either by a MIL function or by interactive manipulations. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_LIST_ID + |
Retrieves the MIL identifier of the graphics list that triggered the event. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_ID |
||||||||||||||||||||||||||||||||||||||
An M_GRAPHIC_MODIFIED event ID |
Specifies that the event that callled the hook-handler function was due to a graphic in the graphics list being modified, either by a MIL function or by interactive manipulations. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_CONTROL_TYPE + |
Inquires the type of modification made to the graphics in the list that triggered the event. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_INT64 |
||||||||||||||||||||||||||||||||||||||
M_ANGLE |
Specifies the angle of the graphic was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_ANGLE_END |
Specifies the angle at which to stop drawing the arc was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_ANGLE_START |
Specifies the angle at which to start drawing the arc was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_APPLY_SCALE |
Specifies a uniform scaling operation was performed on the graphic. INFO |
||||||||||||||||||||||||||||||||||||||
M_ARC_STYLE |
Specifies the option of whether to draw an arc or a sector was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_BACKCOLOR |
Specifies the background color of the text was modified. |
||||||||||||||||||||||||||||||||||||||
M_BACKGROUND_MODE |
Specifies the option of whether to fill the text's background was modified. |
||||||||||||||||||||||||||||||||||||||
M_COLOR |
Specifies the foreground color of the graphic was modified. |
||||||||||||||||||||||||||||||||||||||
M_CONSTRAIN_ASPECT_RATIO |
Specifies the option of whether to force the width and height of a graphic to be equal was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_DELETE |
Specifies that one of the following has been called on the graphics list, resulting in some graphics being removed from the graphics list: MgraControlList() with M_DELETE, MgraClear(), or when MgraCopy() with M_MOVE deletes graphics from a source graphics list. |
||||||||||||||||||||||||||||||||||||||
M_DRAW_OFFSET_X |
Specifies the offset to subtract from the source X-coordinates before rendering the graphic was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_DRAW_OFFSET_Y |
Specifies the offset to subtract from the source Y-coordinates before rendering the graphic was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_DRAW_ZOOM_X |
Specifies the scale factor in the X-direction was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_DRAW_ZOOM_Y |
Specifies the scale factor in the Y-direction was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_EDITABLE |
Specifies the option of whether a graphic can be edited via user interaction in an interactive display was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_FILLED |
Specifies the option of whether to fill the graphic was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_FIXTURE |
Specifies the calibration information to use when rendering (drawing or displaying) a graphic that has been defined in world units (M_INPUT_UNITS set to M_WORLD) was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_FONT |
Specifies the font of the characters in text was modified. |
||||||||||||||||||||||||||||||||||||||
M_FONT_AUTO_SELECT |
Specifies the option of whether MIL should search for a suitable font to draw text if the currently selected font (M_FONT) is a TrueType font that does not support the character code was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_FONT_SIZE |
Specifies the size to draw text when using a TrueType font was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_FONT_X_SCALE |
Specifies the font's horizontal scaling factor was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_FONT_Y_SCALE |
Specifies the font's vertical scaling factor was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_CONVERSION_MODE |
Specifies how the shape of a graphic, defined in world units, is converted to pixels (rendered) was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_CREATE |
Specifies that a new graphic has been added to the graphics list, either using a MIL function or through interactive manipulations. |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_INTERACTIVE |
Specifies that interactive manipulations, such as translation, rotation, and resizing, have changed the properties of a graphic in the graphics list. |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_SOURCE_CALIBRATION |
Specifies that the identifier of the calibration information used to interpret positioning and dimensioning information of a graphic defined in world units was modified. |
||||||||||||||||||||||||||||||||||||||
M_INPUT_UNITS |
Specifies the units with which to interpret the graphic's position and dimensional information, for graphics already added to the graphics list was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_INTERACTIVE_ANNOTATIONS_COLOR |
Specifies the color of the selection box and handles when in interactive mode was modified. |
||||||||||||||||||||||||||||||||||||||
M_MOVABLE |
Specifies the option of whether a graphic can be moved via user interaction in an interactive display was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_MOVE |
Specifies that a call to MgraCopy(), with an in-place move (M_MOVE) operation, changed the order of the graphics inside the graphics list. |
||||||||||||||||||||||||||||||||||||||
M_MULTIPLE_SELECTION |
Specifies the option of whether to permit interactive multiple selection using the Ctrl key was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_POSITION_TYPE |
Sets how to interpret M_POSITION_X and M_POSITION_Y for a rectangle was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_POSITION_X |
Specifies the X-position of a graphic or of one of its sub-elements (position-points) was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_POSITION_Y |
Specifies the Y-position of a graphic or of one of its sub-elements (position-points) was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_RADIUS_X |
Specifies the radius of the arc, in the X-direction was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_RADIUS_Y |
Specifies the radius of the arc, in the Y-direction was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_RECTANGLE_HEIGHT |
Specifies the height of the rectangle was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_RECTANGLE_WIDTH |
Specifies the width of the rectangle was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_RESIZABLE |
Specifies the option of whether a graphic can be resized via user interaction in an interactive display was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_ROTATABLE |
Specifies the option of whether a graphic can be rotated via user interaction in an interactive display was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_ROTATE |
Specifies a rotation operation was performed on the graphic. INFO |
||||||||||||||||||||||||||||||||||||||
M_SELECTABLE |
Specifies the option of whether a graphic can be selected via user interaction in an interactive display was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_SELECTED_COLOR |
Specifies the color of the selected graphics in interactive mode was modified. |
||||||||||||||||||||||||||||||||||||||
M_SELECTION_RADIUS |
Specifies the size of the selection-radius when in interactive mode was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_SPECIFIC_FEATURES_EDITABLE |
Specifies the option of whether a graphic can be modified via user interaction in an interactive display using handles that are specific to its graphic type was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_TEXT_ALIGN_HORIZONTAL |
Specifies the horizontal alignment of text was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_TEXT_ALIGN_VERTICAL |
Specifies the vertical alignment of text was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_TEXT_BORDER |
Specifies the border drawn around the text was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_TEXT_DIRECTION |
Specifies the direction to draw text when using a TrueType font was modified. |
||||||||||||||||||||||||||||||||||||||
M_TRANSLATE_X |
Specifies a horizontal translation of a graphic, or one of its sub-elements, was performed. INFO |
||||||||||||||||||||||||||||||||||||||
M_TRANSLATE_Y |
Specifies a vertical translation of a graphic, or one of its sub-elements, was performed. INFO |
||||||||||||||||||||||||||||||||||||||
M_VISIBLE |
Specifies the option of whether a graphic is rendered on the display was modified. INFO |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_LABEL_VALUE + |
Retrieves the label of the modified graphic that triggered the event. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies that all graphics in the graphics list were modified using MgraClear() or MgraControlList() with M_ALL. |
||||||||||||||||||||||||||||||||||||||
M_ALL_SELECTED |
Specifies that all selected graphics in the graphics list were modified using MgraControlList() with M_ALL_SELECTED. |
||||||||||||||||||||||||||||||||||||||
M_LIST |
Specifies that a graphics list's setting was modified using MgraControlList() with M_LIST. |
||||||||||||||||||||||||||||||||||||||
M_MULTIPLE_LABELS |
Specifies that more than one graphic was modified. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the label of the graphic. |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_LIST_ID + |
Retrieves the MIL identifier of the graphics list containing the graphic that triggered the event. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_ID |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_SUB_INDEX + |
Retrieves the index of the sub-element of the graphic that triggered the event. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the event affected the whole graphic. |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the index of the sub-element of the graphic that triggered the event. |
||||||||||||||||||||||||||||||||||||||
An M_GRAPHIC_SELECTION_MODIFIED event ID |
Specifies that the event that called the hook-handler function was due to a graphic being selected or deselected. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_LABEL_VALUE + |
Retrieves the label of the graphic that triggered the event. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MULTIPLE_LABELS |
Specifies that more than one graphic was selected. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NO_LABEL |
Specifies a deselection triggered the event and no graphic was selected. |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the label of the graphic that was selected. |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_LABEL_VALUE_DESELECTED + |
Retrieves the label of the graphic that was deselected when the event was triggered. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MULTIPLE_LABELS |
Specifies that more than one graphic was deselected. |
||||||||||||||||||||||||||||||||||||||
M_NO_LABEL |
Specifies that no graphic was deselected. |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the label of the graphic that was deselected. |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_LIST_ID + |
Retrieves the MIL identifier of the graphics list containing the graphic that triggered the event. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_ID |
||||||||||||||||||||||||||||||||||||||
An
M_INTERACTIVE_GRAPHIC_STATE_MODIFIED event ID |
Specifies that the event that called the hook-handler function was due to the graphics list's interactive state being modified, either by a MIL function or by interactive manipulations. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_LABEL_VALUE + |
Retrieves the label of the graphic that triggered the event. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NO_LABEL |
Specifies that a MIL function triggered the event. |
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the label of the graphic that triggered the event. |
||||||||||||||||||||||||||||||||||||||
M_GRAPHIC_LIST_ID + |
Retrieves the MIL identifier of the graphics list that triggered the event. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_ID |
||||||||||||||||||||||||||||||||||||||
M_INTERACTIVE_GRAPHIC_PREVIOUS_STATE + |
Inquires the state of interactivity of the graphics list before the event occurred. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STATE_BEING_CREATED |
Specifies that a new graphic was being created. |
||||||||||||||||||||||||||||||||||||||
M_STATE_GRAPHIC_DRAGGED |
Specifies that a graphic was being dragged using the mouse. |
||||||||||||||||||||||||||||||||||||||
M_STATE_GRAPHIC_HOVERED |
Specifies that the cursor was hovering over a graphic. |
||||||||||||||||||||||||||||||||||||||
M_STATE_HANDLE_DRAGGED |
Specifies that a graphic's handle was being dragged using the mouse. |
||||||||||||||||||||||||||||||||||||||
M_STATE_HANDLE_HOVERED |
Specifies that the cursor was hovering over a graphic's handle. |
||||||||||||||||||||||||||||||||||||||
M_STATE_IDLE |
Specifies that the cursor was not hovering over anything and that no graphic was queued for creation. |
||||||||||||||||||||||||||||||||||||||
M_STATE_WAITING_FOR_CREATION |
Specifies that a graphic was queued for creation. |
||||||||||||||||||||||||||||||||||||||
M_INTERACTIVE_GRAPHIC_STATE + |
Inquires the current state of interactivity of the graphics list. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_STATE_BEING_CREATED |
Specifies that a new graphic is being created. |
||||||||||||||||||||||||||||||||||||||
M_STATE_GRAPHIC_DRAGGED |
Specifies that a graphic is being dragged using the mouse. |
||||||||||||||||||||||||||||||||||||||
M_STATE_GRAPHIC_HOVERED |
Specifies that the cursor is currently hovering over a graphic. |
||||||||||||||||||||||||||||||||||||||
M_STATE_HANDLE_DRAGGED |
Specifies that a graphic's handle is being dragged using the mouse. |
||||||||||||||||||||||||||||||||||||||
M_STATE_HANDLE_HOVERED |
Specifies that the cursor is currently hovering over a graphic's handle. |
||||||||||||||||||||||||||||||||||||||
M_STATE_IDLE |
Specifies that the cursor is not hovering over anything and that no graphic is queued for creation. |
||||||||||||||||||||||||||||||||||||||
M_STATE_WAITING_FOR_CREATION |
Specifies that a graphic is queued for creation. |
You can add one of the following values to the above-mentioned values to cast the requested information to a required data type.
For specifying the data type
|
|||||||||||||||||||||||||||||||||||||||
InfoType |
Description
|
||||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_DOUBLE |
Casts the requested information to a MIL_DOUBLE. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_DOUBLE |
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_ID |
Casts the requested information to a MIL_ID. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_ID |
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT |
Casts the requested information to a MIL_INT. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_INT |
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT32 |
Casts the requested information to a MIL_INT32. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_INT32 |
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT64 |
Casts the requested information to a MIL_INT64. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr data type info |
Data
type: MIL_INT64 |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |