Call-back procedures ensures the callbacks of GrEditor from import dll. They enable to create the graphic objects in the active pictures of D2000 System by decoding of import file. They are designed to suit to all future formats of D2000 System pictures. I.e. the import dll will work also in next versions of D2000 System. However, it will not be able to use new features of the import.
In the table, you can find the types of procedures:
Procedure | procType | Description |
---|---|---|
CreateObj | 1 | Creates a new graphic object. |
ObjAction | 2 | Action with objects. |
Set_string | 3 | Inserts a text into the particular parameter when creating the graphic object. |
Set_boolean | 4 | Inserts a logical value into the particular parameter when creating the graphic object. |
Set_integer | 5 | Inserts an integer value into the particular parameter when creating the graphic object. |
Set_float | 6 | Inserts a real value into the particular parameter when creating the graphic object. |
Set_integer2 | 7 | Inserts two integer values into the particular parameter when creating the graphic object. |
Set_float2 | 8 | Inserts two real values text into the particular parameter when creating the graphic object. |
ShowInfo | 0 | Shows the information about import. |
You can find the list of parameters and some permitted values in the chapter that describes the interface for a compiler of ADA and C languages.
Note: The integer and real values are transformed into the internal representation of value of the influenced parameter.
CreateObj
This procedure creates a graphic object or object that can be added to the other created. You can find more information in the chapter Graphic object creating.
The function definition in compilers of "ADA" and "C":
type tCreateObj is access procedure (objType : integer);
void _stdcall (*CreateObj)(int)
ObjAction
This procedure executes an action with the created object according to defined parameter.
The function definition in compilers of "ADA" and "C":
type tObjAtion is access procedure (action : tObjAction :=closeObject);
void _stdcall (*ObjAtion)(tObjAction)
The definition of parameter type in compilers of "ADA" and "C":
type tObjAction is (closeFigure, closeObject, closeGroup,closeAll);
The parameters:
Parameter | objType | Description |
---|---|---|
closeFigure | 0 | Closes the position group of points of Polyline - changes the object to polygon. |
closeObject | 1 | Closes the object creation (the object is closed automatically as soon as you start to create new object). |
closeGroup | 2 | Closes the group of objects - closes the object creating and the last object of Group type. |
closeAll | 3 | Closes all the semifinished objects - closes the object creating and all objects of Group type. The function with this parameter is called automatically when finishing the import. |
Set_string
The procedure inserts a text to the parameter of created graphic object.
The definition of function type in the compilers of "ADA" and "C":
type tset_string is access procedure (param : integer; val:string);
void _stdcall (*Set_string)(int,char far *)
Set_boolean
This procedure inserts a logic value to the parameter of created graphic object.
The definition of function type in the compilers of "ADA" and "C":
type tset_boolean is access procedure (param : integer;val :boolean);
void _stdcall (*Set_boolean)(int,bool)
Set_integer
This procedure inserts an integer value to the parameter of created graphic object.
The definition of function type in the compilers of "ADA" and "C":
type tset_integer is access procedure (param : integer;val :integer);
void _stdcall (*Set_integer)(int,int)
Set_float
This procedure inserts a real value to the parameter of created graphic object.
The definition of function type in the compilers of "ADA" and "C":
type tset_float is access procedure (param : integer; val:long_float);
void _stdcall (*Set_float)(int,real)
Set_integer2
This procedure inserts two integer value to the parameter of created graphic object.
The definition of function type in the compilers of "ADA" and "C":
type tset_integer2 is access procedure (param : integer;val1,val2 : integer);
void _stdcall (*>Set_integer2)(int,int,int)
Set_float2
This procedure inserts two real value to the parameter of created graphic object.
The definition of function type in the compilers of "ADA" and "C":
type tset_float2 is access procedure (param : integer;val1,val2 : long_float);
void _stdcall (*Set_float2)(int,real,real)
ShowInfo
This procedure inserts a text to the information window which is opened during import.
The definition of function type in the compilers of "ADA" and "C":
type tShowInfo is access procedure (text : string);
void _stdcall (*ShowInfo)(char far * )
Related pages:
Pridať komentár