GLG Toolkit, C / C++ API Library  Version 4.5
2. C++ API

Detailed Description

The C++ API methods provide C++ wrappers for the corresponding C API functions.

The C++ API provides C++ wrappers for the most commonly used C API functions. The C++ wrappers manage the lifetime of GLG objects by automatically referencing and dereferencing them. This eliminates the need to explicitly call the GlgReferenceObject and GlgDropObject functions.

The C API functions can be used in the C++ code to access functionality not provided by the C++ wrappers. When C++ GlgObjectC objects are passed as parameters to the C API functions that take GlgObject parameters, they are automatically converted to GlgObject objects. Vise versa, when C GlgObject objects are passed as parameters to the C++ methods that take GlgObjectC parameters, they are automatically converted to the GlgObjectC object instances.

When C API functions are used in C++, the GLG_C_CONST_CHAR_PTR macro may be set to 1 before the GlgApi.h file is included to use constant strings (const char *).

Some C functions return a newly created GLG object that must be dereferenced when done. If a return value of such functions is assigned to a C++ GlgObjectC instance, the instance references the assigned object, and the instance's Drop method may be used right after the assignment to dereference the object.

One of the following macros can be defined before including the GlgClass.h file to specify the API to be used:

If no macros are defined, the Extended API is used by default, which will cause linking errors if the Extended API library is not available. To fix the errors, define one the above macros that corresponds to the available API library.

To avoid binary compatibility issues with different C++ compilers, the GLG C++ bindings are provided in the form of source code. To use the bindings in an application, include the GlgClass.h file in your source code, then copy the GlgClass.cpp file from the src directory of the GLG installation to your application directory and compile it with the rest of the source files.

To use the GLG GTKMM Wrapper widget, copy and include in your project the GtkmmGlgWidget.h and GtkmmGlgWidget.cpp files from the integration/gtkmm3_glg_native/src directory of the GLG installation on Linux.

Displaying GLG Drawing in a Program

A GLG drawing can be displayed by using either the platform-independent GLG Generic API or one of the native widgets and controls:

Regardless of the way the GLG drawing is displayed (the GLG Generic API or a native container), the rest of the GLG-related application logic is the same, which promotes code sharing between different deployment platforms.

Animating a Drawing with RealTime Data

The drawing can be updates with live data using either resources or tags:

Handling User Interaction

Input callback is the primary way user interaction is handled in a GLG application. The callback is added to a drawing's viewport using the viewport's EnableCallback method.

Trace callback may be used to handle native windowing system events.

Include file: GlgClass.h

Modules

 Standard API Methods
 
 Intermediate API Methods
 
 Extended API Methods
 
 Native Widgets
 

Structures and Classes

class  GlgObjectC
 The main class of the GLG C++ bindings. More...
 
class  GlgSessionC
 Provides an interface for initializing the GLG Toolkit. More...
 

Class Documentation

◆ GlgObjectC

class GlgObjectC

The main class of the GLG C++ bindings.

It provides functionality of the Standard, Intermediate and Extended APIs.

Include file: GlgClass.h

Inherited by GlgWrapperC.

Public Attributes

GlgObject glg_obj
 An object ID of the associated GLG object. More...
 
GlgObject suspend_obj
 An object containing suspension information. More...
 

Public Member Functions

 GlgObjectC (char *filename)
 Constructor: Loads an object from a file. More...
 
 GlgObjectC (GlgObject object)
 Constructor: Creates a C++ class from GlgObject. More...
 
 GlgObjectC (GlgObjectC &object, GlgCloneType clone_type=GLG_FULL_CLONE)
 Copy constructor, Extended API: Creates a copy of the object. More...
 
 GlgObjectC (GlgObjectC &parent, char *resource_name)
 Constructor, Intermediate API: associates this object with a named resource object inside another object. More...
 
 GlgObjectC (GlgObjectType type, char *name=NULL, GlgAnyType data1=NULL, GlgAnyType data2=NULL, GlgAnyType data3=NULL, GlgAnyType data4=NULL)
 Constructor, Extended API: Creates a new object of the specified type. More...
 
 GlgObjectC (void *image, GlgLong size)
 Constructor: loads an object from a generated memory image. More...
 
 GlgObjectC (void)
 Default constructor: Creates a null object. More...
 
virtual ~GlgObjectC (void)
 Destructor: Destroys an instance of GlgObjectC and dereferences the GlgObject object it contains. More...
 
GlgBoolean Add (GlgObjectC &object, GlgAccessType access_type=GLG_BOTTOM, GlgPositionModifier pos_modifier=GLG_AFTER)
 A generic method for adding an object to this container. More...
 
GlgBoolean AddAt (GlgObjectC &object, GlgLong index)
 Adds an object at the specified position inside this container. More...
 
GlgObject AddPlot (char *resource_name, GlgObjectC &plot)
 Adds a plot to this chart. More...
 
GlgBoolean AddToBottom (GlgObjectC &object)
 Adds an object at the end of this container. More...
 
GlgBoolean AddToTop (GlgObjectC &object)
 Adds an object at the beginning of this container. More...
 
GlgBoolean ConstrainObject (GlgObjectC &to_attribute)
 Constrains an attribute or a point of an object to an attribute or a point of another object. More...
 
GlgBoolean ContainsObject (GlgObjectC &object)
 Checks if object belongs to this container. More...
 
void Copy (GlgCloneType clone_type=GLG_FULL_CLONE)
 Creates a copy of an object. More...
 
void Create (GlgObjectType type, char *name=NULL, GlgAnyType data1=NULL, GlgAnyType data2=NULL, GlgAnyType data3=NULL, GlgAnyType data4=NULL)
 Creates a new GLG object of the specified type. More...
 
GlgObject CreateAlarmList (void)
 Creates and returns a list of alarms defined in this object. More...
 
GlgObject CreateChartSelection (GlgObjectC *plot, double x, double y, double dx, double dy, GlgBoolean screen_coord, GlgBoolean include_invalid, GlgBoolean x_priority)
 Selects a this chart's data sample closest to the specified position and returns a message object containing the selected sample's information. More...
 
GlgObject CreatePointArray (GlgControlPointType type)
 ADVANCED: Creates and returns an array containing all control points of an object. More...
 
GlgObject CreateResourceList (GlgBoolean list_named_res, GlgBoolean list_def_attr, GlgBoolean list_aliases)
 Returns a list of an object's resources. More...
 
GlgObject CreateTagList (GlgBoolean unique_tag_sources)
 Creates and returns a list of data tags defined in this object. More...
 
char * CreateTooltipString (double x, double y, double dx, double dy, char *format)
 Creates and returns a chart or axis tooltip string based on the mouse position. More...
 
GlgBoolean Delete (GlgObjectC *object=NULL, GlgAccessType access_type=GLG_BOTTOM, GlgPositionModifier pos_modifier=GLG_AFTER)
 A generic method for deleting an object from this container. More...
 
GlgBoolean DeleteBottomObject (void)
 Deletes an object from the bottom of this container. More...
 
GlgBoolean DeleteObject (GlgObjectC &object)
 Finds and deletes an object from this container. More...
 
GlgBoolean DeleteObjectAt (GlgLong index)
 Deletes an object from the specified position in this container. More...
 
GlgBoolean DeletePlot (char *resource_name, GlgObjectC &plot)
 Deletes a plot from this chart. More...
 
GlgBoolean DeleteTopObject (void)
 Deletes an object from the beginning of this container. More...
 
void DialogInitialDraw (GlgObjectC &parent)
 Displays a GLG drawing as a floating dialog for the first time after it has been created or loaded. More...
 
void DialogSetupHierarchy (GlgObjectC &parent)
 Provides an explicit request to set up the object hierarchy of a drawing displayed in a dialog window. More...
 
void Drop (void)
 Explicitly dereferences the GLG object contained in this instance. More...
 
void EnableCallback (GlgCallbackType callback_type, GlgObject callback_viewport=NULL)
 Enables Input, Select, Trace and Hierarchy callbacks of this object. More...
 
GlgBoolean ExportPostScript (char *filename="out.ps", double x=0., double y=0., double width=2000., double height=2000., GlgBoolean portrait=True, GlgBoolean stretch=True, GlgBoolean center=True)
 Generates a PostScript output of the current state of the viewport's graphics. More...
 
GlgBoolean FitObject (GlgCoordType coord_type, GlgCube *box, GlgBoolean keep_ratio)
 Fits an object to the specified rectangular area. More...
 
PlatformDependent GenerateImage (char *resource_name=NULL, PlatformDependent image=NULL)
 Creates and returns an image of the current state of the viewport's graphics. More...
 
PlatformDependent GenerateImageCustom (char *resource_name, PlatformDependent image, GlgLong x, GlgLong y, GlgLong width, GlgLong height, GlgLong gap)
 Creates an image of the specified rectangular region of the viewport's graphics. More...
 
GlgObject GetAlarmObject (char *alarm_label, GlgBoolean single_alarm)
 Returns an alarm object with a specified alarm label, or a list of alarms matching the specified alarm label pattern. More...
 
GlgCubeGetBoxPtr (void)
 Returns an object's bounding box extent in screen coordinates. More...
 
GlgBoolean GetChartDataExtent (char *resource_name, GlgMinMax *min_max, GlgBoolean x_extent, GlgBoolean visible_only)
 Queries the minimum and maximum extent of the data accumulated in thischart or in one of its plots. More...
 
GlgObject GetDrawingMatrix (void)
 Returns the transformation matrix used to draw the object. More...
 
GlgBoolean GetDResource (char *resource_name, double *value)
 Returns the current value of a D (double) resource of this object. More...
 
GlgBoolean GetDTag (char *tag_name, double *value)
 Returns the current value of a D (double) tag. More...
 
GlgObject GetElement (GlgLong index)
 Returns the object at the specified position in this container. More...
 
GlgObject GetGlgObject (void)
 Returns an object ID of the stored GlgObject object. More...
 
GlgBoolean GetGResource (char *resource_name, double *x_value, double *y_value, double *z_value)
 Returns the current value of a G (geometrical or color) resource of this object. More...
 
GlgBoolean GetGTag (char *tag_name, double *x_value, double *y_value, double *z_value)
 Returns the current value of a G (geometrical or color) tag. More...
 
GlgLong GetIndex (GlgObjectC &object)
 Returns the index of the first occurrence of an object in this container. More...
 
void GetMatrixData (GlgMatrixData *matrix_data)
 Queries coefficients of this matrix. More...
 
GlgObject GetNamedObject (char *name)
 Find and returns an object ID of the object with the specified name inside this container. More...
 
GlgObject GetNamedPlot (char *resource_name, char *plot_name)
 Given a name of this chart's plot, returns the plot's object ID. More...
 
GlgObject GetParent (GlgLong *num_parents)
 Returns an object's parent object, if one exists. More...
 
GlgBoolean GetResource (char *resource_name, char **value)
 Returns the current value of a S (string) resource of this object. More...
 
GlgBoolean GetResource (char *resource_name, double *value)
 Returns the current value of a D (double) resource of this object. More...
 
GlgBoolean GetResource (char *resource_name, double *x_value, double *y_value, double *z_value)
 Returns the current value of a G (geometrical or color) resource of this object. More...
 
GlgObject GetResourceObject (char *resource_name)
 Find a resource object. More...
 
GlgLong GetSize (void)
 Returns size of this container object. More...
 
GlgBoolean GetSResource (char *resource_name, char **value)
 Returns the current value of a S (string) resource of this object. More...
 
GlgBoolean GetSTag (char *tag_name, char **value)
 Returns the current value of a S (string) tag. More...
 
GlgLong GetStringIndex (char *string)
 Returns the index of the first occurrence of a string in this container of the GLG_STRING type. More...
 
GlgBoolean GetTag (char *tag_name, char **value)
 Returns the current value of a S (string) tag. More...
 
GlgBoolean GetTag (char *tag_name, double *value)
 Returns the current value of a D (double) tag. More...
 
GlgBoolean GetTag (char *tag_name, double *x_value, double *y_value, double *z_value)
 Returns the current value of a G (geometrical or color) tag. More...
 
GlgObject GetTagObject (char *search_string, GlgBoolean by_name, GlgBoolean unique_tags, GlgBoolean single_tag, GlgTagType tag_type_mask)
 Retrieves a tag object with a specified tag name, data tag source, or export tag category, or retrieves a list of tags matching the specified tag name, tag source or category pattern. More...
 
GlgBoolean HasResourceObject (char *resource_name)
 Checks if a named resource of this object exists. More...
 
GlgBoolean HasTag (char *tag_name, GlgTagType tag_type_mask)
 Checks if a data or export tag with a specified tag name exists. More...
 
GlgBoolean HasTagName (char *tag_name)
 Checks if a data tag with a specified tag name exists. More...
 
GlgBoolean HasTagSource (char *tag_source)
 Checks if a data tag with a specified tag source exists. More...
 
virtual void Hierarchy (GlgObjectC &callback_viewport, GlgHierarchyCBStruct *hierarchy_info)
 A Hierarchy callback is used to get access to the drawing to be displayed in the SubWindow and SubDrawing objects before the drawing is displayed. More...
 
void InitialDraw (void)
 Draws a GLG viewport object for the first time after it has been created or loaded. More...
 
virtual void Input (GlgObjectC &callback_viewport, GlgObjectC &message_object)
 An Input callback is used to handle user interaction with input objects, as well as object selection and action processing. More...
 
void Inverse ()
 Inverses the order of elements inside this container object. More...
 
GlgObject InverseMatrix (void)
 Inverts this matrix object. More...
 
GlgBoolean IsContainer (void)
 
GlgBoolean IsNull (void)
 Checks if a non-null object is stored in this instance. More...
 
GlgObject Iterate (void)
 Traverses elements of this container object in the forward direction. More...
 
GlgObject IterateBack (void)
 Traverses elements of this container object in the backward direction. More...
 
GlgBoolean LayoutObjects (GlgObject anchor, GlgLayoutType type, double distance, GlgBoolean use_box, GlgBoolean process_subobjects)
 Performs operations ranging from setting an object's width and height to aligning and layout of groups of objects. More...
 
GlgBoolean Load (char *filename, char *resource_name=NULL)
 Loads an object from a file or a URL, replacing the previously stored object. More...
 
GlgBoolean Load (GlgObjectC &parent, char *resource_name=NULL)
 Finds a resource. More...
 
GlgBoolean Load (void *image, GlgLong size, char *resource_name=NULL)
 Loads an object from a generated memory image, replacing the previously stored object. More...
 
void LoadNullObject (void)
 Releases the stored object. More...
 
GlgBoolean LoadWidget (char *filename)
 Loads a GLG widget from a file or a URL. More...
 
GlgBoolean LoadWidget (GlgObjectC &parent)
 Extracts a GLG widget contained inside another object. More...
 
GlgBoolean LoadWidget (void *image, GlgLong size)
 Loads a GLG widget from a generated memory image. More...
 
GlgBoolean MoveObject (GlgCoordType coord_type, GlgPoint *start_point, GlgPoint *end_point)
 Moves an object by a move vector. More...
 
GlgBoolean MoveObjectBy (GlgCoordType coord_type, double x, double y, double z)
 Moves an object by the specified distances. More...
 
void OnDrawMetafile (CDC *print_dc)
 Windows only: Provides MFC metafile output support. More...
 
void OnPrint (CDC *print_dc)
 Windows only: Provides MFC printing support. More...
 
 operator GlgObject (void)
 Type converter to GlgObject. More...
 
GlgBoolean operator! (void)
 Checks if a non-null object is stored in this instance. More...
 
GlgObjectCoperator++ (int)
 Postfix operator: References an object. More...
 
GlgObjectCoperator++ (void)
 Prefix operator: References an object. More...
 
GlgObjectCoperator-- (int)
 Postfix operator: Dereferences an object. More...
 
GlgObjectCoperator-- (void)
 Prefix operator: Dereferences an object. More...
 
GlgObjectCoperator= (const GlgObjectC &object)
 Assignment operator: Stores a GLG object in this instance. More...
 
GlgBoolean PositionObject (GlgCoordType coord_type, GlgLong anchoring, double x, double y, double z)
 Positions an object at the specified location. More...
 
GlgBoolean PositionToValue (char *resource_name, double x, double y, GlgBoolean outside_x, GlgBoolean outside_y, double *value)
 Returns a value corresponding to the specified position on top of this Chart or Axis object. More...
 
GlgBoolean Print (PlatformDependent print_context, double x=0., double y=0., double width=2000., double height=2000., GlgBoolean portrait=True, GlgBoolean stretch=True, GlgBoolean center=True)
 GTK and Windows only: Generates printing output of the current state of the viewport's graphics. More...
 
GlgObject QueryTags (GlgTagType tag_type_mask)
 Returns a group of all tags of the requested tag type defined in the object. More...
 
void Reference (void)
 Explicitly references the GLG object contained in this instance. More...
 
void ReleaseObject (void)
 Releases an object that was suspended for editing. More...
 
GlgBoolean ReorderElement (GlgLong old_index, GlgLong new_index)
 Changes an object's position inside this container. More...
 
GlgBoolean Reset (void)
 Reinitializes the drawing by resetting the drawing hierarchy, then setting it up again and rendering the drawing. More...
 
void ResetHierarchy (void)
 Resets the object hierarchy. More...
 
GlgBoolean RotateObject (GlgCoordType coord_type, GlgPoint *center, double x_angle, double y_angle, double z_angle)
 Rotates an object. More...
 
GlgBoolean Same (GlgObject object)
 Compares two GLG objects. More...
 
GlgBoolean Same (GlgObjectC &object)
 Compares two GLG objects. More...
 
GlgBoolean Save (char *filename)
 Saves this object to a file. More...
 
GlgBoolean SaveImage (char *resource_name, char *filename, GlgImageFormat format=GLG_JPEG)
 Generates a JPEG or PNG image of the current state of this viewport's graphics and saves it to a file. More...
 
GlgBoolean SaveImageCustom (char *resource_name, char *filename, GlgImageFormat format, GlgLong x, GlgLong y, GlgLong width, GlgLong height, GlgLong gap)
 Generates a JPEG or PNG image of the specified rectangular region of the viewport's graphics and saves it to a file. More...
 
GlgBoolean ScaleObject (GlgCoordType coord_type, GlgPoint *center, double x_scale, double y_scale, double z_scale)
 Scales an object. More...
 
GlgBoolean ScreenToWorld (GlgBoolean inside_vp, GlgPoint *in_point, GlgPoint *out_point)
 Converts a point's screen coordinates to the GLG world coordinate system. More...
 
virtual void Select (GlgObjectC &callback_viewport, char **name_array)
 A simplified selection callback is used to process object selection using object names. More...
 
GlgAnyType SendMessage (char *resource_path, char *message, GlgAnyType param1=NULL, GlgAnyType param2=NULL, GlgAnyType param3=NULL, GlgAnyType param4=NULL)
 Sends a message to an object to request some action to be performed. More...
 
GlgBoolean SetDResource (char *resource_name, double value)
 Sets a new value of a D (double) resource of this object. More...
 
GlgBoolean SetDResourceIf (char *resource_name, double value, GlgBoolean if_changed)
 Sets a new value of a D (double) resource of this object. More...
 
GlgBoolean SetDTag (char *tag_name, double value, GlgBoolean if_changed)
 Sets a new value for a D (double) tag. More...
 
void SetEnd (void)
 Initializes this container object for the backward traversing. More...
 
void SetGlgObject (GlgObject object)
 Low-level utility: Stores the specified GlgObject object in this object and references the stored object. More...
 
GlgBoolean SetGResource (char *resource_name, double x_value, double y_value, double z_value)
 Sets new values of a G (geometrical or color) resource of this object. More...
 
GlgBoolean SetGResourceIf (char *resource_name, double x_value, double y_value, double z_value, GlgBoolean if_changed)
 Sets new values of a G (geometrical or color) resource of this object. More...
 
GlgBoolean SetGTag (char *tag_name, double x_value, double y_value, double z_value, GlgBoolean if_changed)
 Sets new values of a G (geometrical or color) tag. More...
 
void SetMatrixData (GlgMatrixData *matrix_data)
 Sets coefficients of this matrix. More...
 
GlgBoolean SetResource (char *resource_name, char *format, double value)
 Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string. More...
 
GlgBoolean SetResource (char *resource_name, char *format, double value, GlgBoolean if_changed)
 Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string. More...
 
GlgBoolean SetResource (char *resource_name, char *value)
 Replaces the string of an S (string) resource of this object. More...
 
GlgBoolean SetResource (char *resource_name, char *value, GlgBoolean if_changed)
 Replaces the string of an S (string) resource of this object. More...
 
GlgBoolean SetResource (char *resource_name, double value)
 Sets a new value of a D (double) resource of this object. More...
 
GlgBoolean SetResource (char *resource_name, double value, GlgBoolean if_changed)
 Sets a new value of a D (double) resource of this object. More...
 
GlgBoolean SetResource (char *resource_name, double x_value, double y_value, double z_value)
 Sets new values of a G (geometrical or color) resource of this object. More...
 
GlgBoolean SetResource (char *resource_name, double x_value, double y_value, double z_value, GlgBoolean if_changed)
 Sets new values of a G (geometrical or color) resource of this object. More...
 
GlgBoolean SetResource (char *resource_name, GlgObjectC &value)
 Sets the value of a data or matrix object using another object of the same type and data type. More...
 
GlgBoolean SetResource (char *resource_name, GlgObjectC &value, GlgBoolean if_changed)
 Sets the value of a data or matrix object using another object of the same type and data type. More...
 
GlgBoolean SetResourceFromObject (char *resource_name, GlgObjectC &value)
 Sets the value of a data or matrix object using another object of the same type and data type. More...
 
GlgBoolean SetResourceFromObjectIf (char *resource_name, GlgObjectC &value, GlgBoolean if_changed)
 Sets the value of a data or matrix object using another object of the same type and data type. More...
 
GlgBoolean SetResourceObject (char *resource_name, GlgObjectC *value)
 Replaces a resource object. More...
 
GlgBoolean SetSResource (char *resource_name, char *value)
 Replaces the string of an S (string) resource of this object. More...
 
GlgBoolean SetSResourceFromD (char *resource_name, char *format, double value)
 Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string. More...
 
GlgBoolean SetSResourceFromDIf (char *resource_name, char *format, double value, GlgBoolean if_changed)
 Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string. More...
 
GlgBoolean SetSResourceIf (char *resource_name, char *value, GlgBoolean if_changed)
 Replaces the string of an S (string) resource of this object. More...
 
GlgBoolean SetSTag (char *tag_name, char *value, GlgBoolean if_changed)
 Replaces the string of an S (string) tag. More...
 
GlgBoolean SetSTagFromD (char *tag_name, char *format, double value, GlgBoolean if_changed)
 Replaces the string of an S (string) tag with a value specified by an input number and a format string. More...
 
void SetStart (void)
 Initializes this container object for the forward traversing. More...
 
GlgBoolean SetTag (char *tag_name, char *format, double value, GlgBoolean if_changed)
 Replaces the string of an S (string) tag with a value specified by an input number and a format string. More...
 
GlgBoolean SetTag (char *tag_name, char *value, GlgBoolean if_changed)
 Replaces the string of an S (string) tag. More...
 
GlgBoolean SetTag (char *tag_name, double value, GlgBoolean if_changed)
 Sets a new value for a D (double) tag. More...
 
GlgBoolean SetTag (char *tag_name, double x_value, double y_value, double z_value, GlgBoolean if_changed)
 Sets new values of a G (geometrical or color) tag. More...
 
void SetupHierarchy (void)
 Provides an explicit request to set up the object hierarchy without rendering the object. More...
 
GlgBoolean SetXform (GlgObjectC *xform)
 Adds or deletes transformations attached to an object. More...
 
GlgBoolean SetZoom (char *resource_name, GlgLong type, double value=0.)
 Provides a programmatic interface to integrated zooming and panning. More...
 
GlgBoolean SetZoomMode (char *resource_name, GlgObjectC *zoom_object, char *zoom_object_resource_name, GlgZoomMode zoom_mode)
 Sets or resets a viewport's zoom mode by supplying a GIS or Chart object to be zoomed. More...
 
void SuspendObject (void)
 Suspends a drawn object for editing. More...
 
GlgBoolean Sync (void)
 Flushes the windowing system output for this viewport to the display. More...
 
virtual void Trace (GlgObjectC &callback_viewport, GlgTraceCBStruct *trace_info)
 A Trace callback is used to handle native windowing events. More...
 
virtual void Trace2 (GlgObjectC &callback_viewport, GlgTraceCBStruct *trace_info)
 A Trace2 callback is used to handle native windowing events. More...
 
GlgBoolean TransformObject (GlgObjectC &xform, GlgCoordType coord_type, GlgObjectC *parent=NULL)
 ADVANCED: Transforms all control points of an object with an arbitrary transformation. More...
 
void TransformPoint (GlgPoint *in_point, GlgPoint *out_point)
 Transforms a single point using this matrix. More...
 
GlgBoolean UnconstrainObject (void)
 Unconstrains an attribute or point object stored in this object. More...
 
GlgBoolean Update (void)
 Updates a drawing to show new resource values. More...
 
GlgBoolean WorldToScreen (GlgBoolean inside_vp, GlgPoint *in_point, GlgPoint *out_point)
 Converts a point's coordinates from the GLG world coordinate system to the screen coordinate system. More...
 

Member Data Documentation

◆ glg_obj

GlgObject glg_obj

An object ID of the associated GLG object.

◆ suspend_obj

GlgObject suspend_obj

An object containing suspension information.

It is not NULL if the object was suspended for editing using SuspendObject.

◆ GlgSessionC

class GlgSessionC

Provides an interface for initializing the GLG Toolkit.

The class also provides a generic interface to a windowing system specific event loop.

Click on this link for an example of using this class to initialize a GLG C++ application.

Include file: GlgClass.h

Public Attributes

GlgAppContext app_context
 Application context. More...
 

Public Member Functions

 GlgSessionC (GlgBoolean initialized, GlgAppContext application_context, int argc=0, char **argv=NULL)
 Constructor: Initializes the Toolkit by calling GlgInit. More...
 
 GlgSessionC (void)
 Default constructor. More...
 
virtual ~GlgSessionC (void)
 Destructor. More...
 
void Create (GlgBoolean initialized=False, GlgAppContext application_context=NULL, int argc=0, char **argv=NULL)
 Initializes the Toolkit by calling GlgInit. More...
 
GlgAppContext GetAppContext (void)
 Returns the application context. More...
 
GlgBoolean MainLoop (void)
 Provides a platform-independent interface to the event loop, uses GlgMainLoop. More...
 

Constructor & Destructor Documentation

◆ GlgSessionC() [1/2]

GlgSessionC ( void  )

Default constructor.

It doesn't initialize the Toolkit, Create must be called explicitly to initialize.

◆ GlgSessionC() [2/2]

GlgSessionC ( GlgBoolean  initialized,
GlgAppContext  application_context,
int  argc = 0,
char **  argv = NULL 
)

Constructor: Initializes the Toolkit by calling GlgInit.

The method is a wrapper for GlgInit, which receives the method's parameters. See GlgInit for parameter descriptions.

Parameters
initializedSee GlgInit for parameter description.
application_contextSee GlgInit for parameter description.
argcSee GlgInit for parameter description.
argvSee GlgInit for parameter description.

Click on this link for an example of using GlgSessionC.

◆ ~GlgSessionC()

virtual ~GlgSessionC ( void  )
virtual

Destructor.

Member Function Documentation

◆ Create()

void Create ( GlgBoolean  initialized = False,
GlgAppContext  application_context = NULL,
int  argc = 0,
char **  argv = NULL 
)

Initializes the Toolkit by calling GlgInit.

This method initializes the Toolkit when the default constructor was used to create the GlgSessionC object.

The method is a wrapper for GlgInit, which receives the method's parameters. See GlgInit for parameter descriptions.

Parameters
initializedSee GlgInit for parameter description.
application_contextSee GlgInit for parameter description.
argcSee GlgInit for parameter description.
argvSee GlgInit for parameter description.

◆ GetAppContext()

GlgAppContext GetAppContext ( void  )

Returns the application context.

Returns
Application context.

◆ MainLoop()

GlgBoolean MainLoop ( void  )

Provides a platform-independent interface to the event loop, uses GlgMainLoop.

Returns
Exit code on Windows, GLG_EXIT_OK on X11 and in GTK.

On Windows, the return value of this method may be used as the return value of GlgMain.

Click on this link for an example of using this method.

Member Data Documentation

◆ app_context

GlgAppContext app_context

Application context.