CONTAINEROBJECTDATA

Summary

The CONTAINEROBJECTDATA holds the data that describes a container object.

Syntax

typedef struct _CONTAINEROBJECTDATA 
{ 
   L_INT nSize; 
   CONTAINEROBJECTTYPE nObjectType; 
   L_VOID *pObjectData; 
   CONTAINERSTATE fState; 
   L_VOID *pUserData; 
} CONTAINEROBJECTDATA,  *pCONTAINEROBJECTDATA; 

Members

nSize

Size of this structure.

nObjectType

Object type. Possible values are:

Value Meaning
ONTAINER_OBJECT_TYPE_POINT The object is a point, nothing is drawn to the screen.
CONTAINER_OBJECT_TYPE_LINE The object is a line. The container will start drawing a line when the user presses the left mouse button, and will continue drawing the line as the user drags the mouse. The drawing will end when the user releases the left mouse button or presses the right mouse button.
CONTAINER_OBJECT_TYPE_SQUARE The object is a square. The container will start drawing a square when the user presses the left mouse button, and will continue drawing the square as the user drags the mouse. The drawing will end when the user releases the left mouse button or presses the right mouse button.
CONTAINER_OBJECT_TYPE_RECT The object is a rectangle. The container will start drawing a rectangle when the user presses the left mouse button, and will continue drawing the rectangle as the user drags the mouse. The drawing will end when the user releases the left mouse button or presses the right mouse button.
CONTAINER_OBJECT_TYPE_CIRCLE The object is a circle. The container will start drawing a circle when the user presses the left mouse button, and will continue drawing the circle as the user drags the mouse. The drawing will end when the user releases the left mouse button or presses the right mouse button.
CONTAINER_OBJECT_TYPE_ELLIPSE The object is an ellipse. The container will start drawing an ellipse when the user presses the left mouse button, and will continue drawing the ellipse as the user drags the mouse. The drawing will end when the user releases the left mouse button or presses the right mouse button.
CONTAINER_OBJECT_TYPE_POLYLINE The object is a polygon. The container will start drawing a polygon when the user presses the left mouse button, and will continue drawing the polygon as the user drags the mouse. The drawing will end when the user double clicks the left mouse button. Drawing is aborted when the user presses the right mouse button.
CONTAINER_OBJECT_TYPE_BEZIER The object is a Bezier curve. The container will start drawing a Bezier curve when the user presses the left mouse button, and will continue drawing the curve as the user drags the mouse. The drawing will end when the user double clicks the left mouse button. Drawing is aborted when the user presses the right mouse button. The user can manipulate the curve control points, after drawing the first curve, by using the left mouse button to move the first curve control point and the SHIFT+left mouse button to move the second control point.
CONTAINER_OBJECT_TYPE_ARC The object is an arc. The arc is drawn by specifying its center, radius, start angle and sweep angle. The user presses the left mouse button at the point where the center of the arc (the vertex about which the arc sweeps) will be. Holding the left mouse button down, the user drags the mouse the length of the radius, along the desired start angle and releases the left mouse button. Press the left mouse button again and drag the mouse through the desired sweep angle. Release the mouse button. Releasing the mouse button will end the operation. Clicking the right-mouse button will abort the operation.
CONTAINER_OBJECT_TYPE_TEXT The object is a text object. The user specifies the text box dimensions by pressing the left-mouse button and dragging the mouse. The desired text can then be entered in the text box. Double-clicking anywhere outside the text box will end the operation. Clicking the right-mouse button will abort the operation. The properties of the text will be specified through the container metrics.

pObjectData

Pointer to a structure that contains a description of the object. The structure type will depend on the nObjectType field. Therefore, this pointer must be cast to the appropriate type for the object. For more information on the object descriptions, refer to the structures specified below.

nObjectType Appropriate Pointer Type
CONTAINER_OBJECT_TYPE_POINT (pCONTAINERPOINTDATA)
CONTAINER_OBJECT_TYPE_LINE (pCONTAINERLINEDATA)
CONTAINER_OBJECT_TYPE_SQUARE (pCONTAINERSQUAREDATA)
CONTAINER_OBJECT_TYPE_RECT (pCONTAINERRECTDATA)
CONTAINER_OBJECT_TYPE_CIRCLE (pCONTAINERCIRCLEDATA)
CONTAINER_OBJECT_TYPE_ELLIPSE (pCONTAINERELLIPSEDATA)
CONTAINER_OBJECT_TYPE_POLYLINE (pCONTAINERPOLYLINEDATA)
CONTAINER_OBJECT_TYPE_BEZIER (pCONTAINERBEZIERDATA)
CONTAINER_OBJECT_TYPE_ARC (pCONTAINERARCDATA)
CONTAINER_OBJECT_TYPE_TEXT (pCONTAINERTEXTDATA)

pUserData

Void pointer that you can use to store additional user-defined data. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this member, pass the address of the variable or structure, casting it to L_VOID*. When you later access this structure, you can cast pUserData to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this member.

fState

Flag that indicates the drawing state of the object. Possible values are:

Value Meaning
CONTAINER_STATE_BEGIN The container has just started drawing the object.
CONTAINER_STATE_PROCESS The container is continuing to draw the object.
CONTAINER_STATE_END The container has finished drawing the object.
CONTAINER_STATE_ABORT The container aborted the drawing process.

Usage

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.