|
GLG Toolkit, C / C++ API Library
Version 4.5
|
This group lists GLG Standard API methods of the GlgObjectC class.
These methods are used to:
Specialized Chart methods, as well as a variety of utility functions, are also provided.
The C Standard API contains additional C Standard API functions that can be used in the C++ code.
See GlgObjectC for a complete list of methods in all APIs.
Include file: GlgClass.h
Functions | |
| GlgObjectC (char *filename) | |
| Constructor: Loads an object from a file. More... | |
| GlgObjectC (GlgObject object) | |
| Constructor: Creates a C++ class from GlgObject. 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... | |
| GlgObject | AddPlot (char *resource_name, GlgObjectC &plot) |
| Adds a plot to this chart. More... | |
| GlgObject | CreateAlarmList (void) |
| Creates and returns a list of alarms defined in this object. More... | |
| GlgObject | CreateTagList (GlgBoolean unique_tag_sources) |
| Creates and returns a list of data tags defined in this object. More... | |
| GlgBoolean | DeletePlot (char *resource_name, GlgObjectC &plot) |
| Deletes a plot from this chart. 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... | |
| 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... | |
| 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... | |
| 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 | 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... | |
| GlgObject | GetNamedPlot (char *resource_name, char *plot_name) |
| Given a name of this chart's plot, returns the plot's object ID. 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... | |
| 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... | |
| 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... | |
| GlgBoolean | HasResourceObject (char *resource_name) |
| Checks if a named resource of this object 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... | |
| GlgBoolean | IsNull (void) |
| Checks if a non-null object is stored in this instance. 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 (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... | |
| 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... | |
| GlgObjectC & | operator++ (int) |
| Postfix operator: References an object. More... | |
| GlgObjectC & | operator++ (void) |
| Prefix operator: References an object. More... | |
| GlgObjectC & | operator-- (int) |
| Postfix operator: Dereferences an object. More... | |
| GlgObjectC & | operator-- (void) |
| Prefix operator: Dereferences an object. More... | |
| GlgObjectC & | operator= (const GlgObjectC &object) |
| Assignment operator: Stores a GLG object in this instance. 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... | |
| void | Reference (void) |
| Explicitly references the GLG object contained in this instance. 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 | Same (GlgObject object) |
| Compares two GLG objects. More... | |
| GlgBoolean | Same (GlgObjectC &object) |
| Compares two GLG objects. 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... | |
| 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 | 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... | |
| 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 | 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... | |
| 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 | 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... | |
| 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 | Update (void) |
| Updates a drawing to show new resource values. More... | |
| GlgObjectC | ( | char * | filename | ) |
Constructor: Loads an object from a file.
This is a wrapper for GlgLoadObject.
| filename | Specifies the file or the URL to load an object from. For details of using URLs on Linux, see GlgGetURLCB. |
| GlgObjectC | ( | GlgObject | object | ) |
Constructor: Creates a C++ class from GlgObject.
This constructor makes it possible to assign GlgObject to a GlgObjectC object class:
| GlgObjectC | ( | void * | image, |
| GlgLong | size | ||
| ) |
Constructor: loads an object from a generated memory image.
| image | Specifies the address of the drawing image generated by the GLG Code Generation Utility gcodegen. |
| size | Specifies the image size. This is also generated by gcodegen. |
This is a wrapper for GlgLoadObjectFromImage, see GlgLoadObjectFromImage for more information.
| GlgObjectC | ( | void | ) |
Default constructor: Creates a null object.
|
virtual |
Destructor: Destroys an instance of GlgObjectC and dereferences the GlgObject object it contains.
| GlgObject AddPlot | ( | char * | resource_name, |
| GlgObjectC & | plot | ||
| ) |
Adds a plot to this chart.
This is a wrapper for GlgAddPlot.
| resource_name | A resource path for accessing the chart inside this object. Use NULL when this object is the chart. |
| plot | An object ID of a plot object. NULL may be used to create a new plot. |
If the plot parameter is NULL, the returned plot is referenced only by the chart's plot array it has been added to and may be destroyed when the number of plots changes. The program can store the plot in a GlgObjectC instance to keep a persistent reference to the plot.
| GlgObject CreateAlarmList | ( | void | ) |
Creates and returns a list of alarms defined in this object.
The top level viewport may be used to query the list of alarms of the whole drawing. This is a wrapper for GlgCreateAlarmList.
Each element of the returned group is an data object that has an alarm attached. The GetElement and GetSize methods of the Intermediate API may be used within the Standard API to handle the returned group object.
If this object is not a viewport, the returned alarm list will include only the alarms contained inside the object. For a viewport, the alarm list will contain all alarms defined in the viewport's drawing.
The following code prints information about all alarms defined in the drawing:
| GlgObject CreateTagList | ( | GlgBoolean | unique_tag_sources | ) |
Creates and returns a list of data tags defined in this object.
The top level viewport may be used to query the list of tags of the whole drawing. This is a wrapper for GlgCreateTagList.
| unique_tag_sources |
|
Each element of the returned group is an attribute object that has a data tag attached. The GetElement and GetSize methods of the Intermediate API may be used within the Standard API to handle the returned group object.
If this object is not a viewport, the returned tag list will include only the tags contained inside the object. For a viewport, the tag list will contain all tags defined in the viewport's drawing.
The following code prints information about all tags defined in the drawing:
Tag Access Performance Optimization
Since tags returned by CreateTagList are actually data objects the tags are attached to, their object IDs may be stored and then used repeatedly to optimized tag access performance when tags are used to supply data for a drawing with large number of tags.
Instead of setting new tag values with SetDTag:
the stored object IDs may be used with the the SetDResource method using NULL as the resource_name parameter to set a new value of each data object directly without an overhead of searching the drawing for each tag by its TagSource:
The GlgAddDataSampleNode function of the C IntermediateAPI" can also be used instead of setting values of chart entry points to prefill a chart with a large number of data samples.
The GetTagObject and QueryTags methods of the Intermediate API provide extended functionality for querying both data and export tags.
| GlgBoolean DeletePlot | ( | char * | resource_name, |
| GlgObjectC & | plot | ||
| ) |
Deletes a plot from this chart.
This is a wrapper for GlgDeletePlot.
| resource_name | A resource path for accessing the chart inside this object. Use NULL when this object is the chart. |
| plot | The plot to delete. |
| void DialogInitialDraw | ( | GlgObjectC & | parent | ) |
Displays a GLG drawing as a floating dialog for the first time after it has been created or loaded.
This is a wrapper for GlgDialogInitialDraw.
| parent | Specifies the viewport of the main drawing the dialog will be a child of. |
This method is similar to InitialDraw, with the only difference that the drawing will be displayed as a child dialog of the main drawing specified by the parent parameter.
GlgConfigureWindow may be used to set the dialog's size and position.
| void DialogSetupHierarchy | ( | GlgObjectC & | parent | ) |
Provides an explicit request to set up the object hierarchy of a drawing displayed in a dialog window.
This is a wrapper for GlgDialogSetupHierarchy.
| parent | Specifies the viewport of the main drawing the dialog will be a child of. |
This method similar to SetupHierarchy, with the only difference that the drawing will be set up as a child dialog of the main drawing specified by the parent parameter.
This method needs to be invoked only on the initial draw of the dialog. After the dialog has been set up, a generic SetupHierarchy method may be used for all objects, including the dialog.
| void Drop | ( | void | ) |
Explicitly dereferences the GLG object contained in this instance.
This is a wrapper for GlgDropObject.
| void EnableCallback | ( | GlgCallbackType | callback_type, |
| GlgObject | callback_viewport = NULL |
||
| ) |
Enables Input, Select, Trace and Hierarchy callbacks of this object.
| callback_type | Specifies the type of a callback to be added:
|
| callback_viewport | If not NULL, specifies the child viewport of this object to add the callbacks to. If NULL, the callbacks will be added to this viewport. |
This method enables the specified callback of a viewport object. The GlgObjectC class provides several callbacks that are invoked by the GLG Toolkit upon various actions. An application can subclass the GlgObjectC class to provide custom implementation of the callbacks that overrides the callbacks of the base class.
The following callbacks are provided:
See Input, Select, Trace and Hierarchy callbacks for the description of the available callback types.
Only one callback of each callback type may be added to an individual viewport. Any subsequent invocations of this method with the same callback type will overwrite the previous value of the viewport's callback.
Note: Callbacks must be enabled before the drawing's hierarchy is set up.
Several callbacks of the same type may be added to different viewports on different levels of the drawing hierarchy. However, only the first encountered callback on the lowest level of the hierarchy will be called. For example, if an input callback is attached to a viewport and its child viewport, only the child viewport's callback will be invoked when input event occurs in the child viewport.
The viewport's ProcessMouse attribute controls processing of the mouse selection events and tooltips inside the viewport and its child viewports.
See the Callback Events section of the Handling User Input and Other Events chapter of the GLG Programming Reference Manual for more information.
| 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.
This is a wrapper for GlgExportPostScript, which receives the method's parameters. See GlgExportPostScript for parameter descriptions.
| filename | See GlgExportPostScript for parameter description. |
| x,y | See GlgExportPostScript for parameter description. |
| width,height | See GlgExportPostScript for parameter description. |
| portrait | See GlgExportPostScript for parameter description. |
| stretch | See GlgExportPostScript for parameter description. |
| center | See GlgExportPostScript for parameter description. |
The drawing's hierarchy must be set up in order to generate PostScript output. Use Update before calling ExportPostScript to make sure the drawing is up to date.
| PlatformDependent GenerateImage | ( | char * | resource_name = NULL, |
| PlatformDependent | image = NULL |
||
| ) |
Creates and returns an image of the current state of the viewport's graphics.
This is a wrapper for GlgGenerateImage.
| resource_name | Specifies the resource path of a child viewport whose image to save, or NULL to save the image of this viewport. The resource path is relative to this viewport. |
| image | If not NULL, specifies a platform-dependent image to be used. This image will be filled and returned instead of creating and returning a new image. The type of the image is platform-dependent:
|
GenerateImage creates an image of the visible part of the viewport, clipping out the parts of the drawing that extends outside of it.
For a light viewport, the output will be generated for its parent viewport. The drawing's hierarchy must be set up in order to generate an image.
| 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.
This is a wrapper for GlgGenerateImageCustom.
| resource_name | Specifies the resource path of a child viewport whose image to save, or NULL to save the image of this viewport. The resource path is relative to this viewport. |
| image | If not NULL, specifies a platform-dependent image to be used. This image will be filled and returned instead of creating and returning a new image. The type of the image is platform-dependent:
|
| x | Specifies the X coordinate of the area used for generating an image. It defines an offset in screen pixels relative to the origin of the viewport's window, which has screen coordinates of (0,0). |
| y | Specifies the Y coordinate of the area used for generating an image. It defines an offset in screen pixels relative to the origin of the viewport's window, which has screen coordinates of (0,0). |
| width | Specifies the width in screen pixels of the area used for generating an image. |
| height | Specifies the height in screen pixels of the area used for generating an image. |
| gap | Specifies the padding space between the extent of the drawing and the border of the generated image in case when zero width and height parameters are specified. |
The x, y, width and height parameters may be obtained by querying the bounding box of either the whole drawing or of the area of the drawing for which the image needs to be generated using GetBoxPtr.
If width and height parameters are 0, the image of the whole drawing is generated using the drawing's bounding rectangle as the image generation area, without clipping to just the visible area. If the viewport is zoomed in, this area may be significantly bigger than the visible area of the viewport, and the image size may be quite large. The viewport's zoom factor defines the scaling factor for objects in the drawing when the image is saved.
For a light viewport, the output will be generated for its parent viewport. The drawing's hierarchy must be set up in order to generate an image.
| 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.
This is a wrapper for GlgGetChartDataExtent.
| resource_name | Specifies a resource path for accessing a child chart, plot or axis object inside this object. NULL may be used if this object is a Chart, Plot or Axis object. |
| min_max | Returned data extent. |
| x_extent | If True, the method returns the X extent, otherwise it returns the Y extent. |
| visible_only | If True, the method considers only visible data samples when calculating data extent, otherwise all samples are considered. |
For a Chart object, the data extent of all plots in the chart is returned. For a Plot object, the data extent of that plot is returned.
The object hierarchy must be set up for this method to succeed.
| GlgBoolean GetDResource | ( | char * | resource_name, |
| double * | value | ||
| ) |
Returns the current value of a D (double) resource of this object.
This is a wrapper for GlgGetDResource.
| resource_name | Specifies the resource path of the scalar resource to query. |
| value | Specifies a pointer used to return the resource value. |
If a scalar resource with the given resource path exists, this method copies its current value into the address specified by the value pointer and returns True, otherwise it generates an error message and returns False.
| GlgBoolean GetDTag | ( | char * | tag_name, |
| double * | value | ||
| ) |
Returns the current value of a D (double) tag.
This is a wrapper for GlgGetDTag.
| tag_name | Specifies the TagSource of the scalar tag to query. |
| value | Specifies a pointer used to return the tag value. |
If a scalar tag with the given TagSource exists, this method copies its current value into the address specified by the value pointer and returns True, otherwise it generates an error message and returns False.
| GlgObject GetGlgObject | ( | void | ) |
Returns an object ID of the stored GlgObject object.
| 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.
This is a wrapper for GlgGetGResource.
| resource_name | Specifies the resource path of the G resource to query. |
| x_value | Specifies a pointer used to return the X value of a geometrical resource or an R component of the color resource. |
| y_value | Specifies a pointer used to return the Y value of a geometrical resource or a G component of the color resource. |
| z_value | Specifies a pointer used to return the Z value of a geometrical resource or a B component of the color resource. |
If a G resource or with the given resource path exists, this method copies its current three values to the addresses specified with the x_value, y_value and z_value pointers and returns True. Otherwise it generates an error message and returns False.
| 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.
This is a wrapper for GlgGetGTag.
| tag_name | Specifies the TagSource of the G tag to query. All object's tags with the specified TagSource will be set to the supplied values. |
| x_value | Specifies a pointer used to return the X value of a geometrical tag or an R component of the color tag. |
| y_value | Specifies a pointer used to return the Y value of a geometrical tag or a G component of the color tag. |
| z_value | Specifies a pointer used to return the Z value of a geometrical tag or a B component of the color tag. |
If a G tag with the given TagSource exists, this method copies its current three values to the addresses specified with the x_value, y_value and z_value pointers and returns True. Otherwise it generates an error message and returns False.
| GlgObject GetNamedPlot | ( | char * | resource_name, |
| char * | plot_name | ||
| ) |
Given a name of this chart's plot, returns the plot's object ID.
This is a wrapper for GlgGetNamedPlot.
| resource_name | A resource path for accessing the chart inside this object. Use NULL when this object is the chart. |
| plot_name | The plot name. |
| GlgBoolean GetResource | ( | char * | resource_name, |
| char ** | value | ||
| ) |
Returns the current value of a S (string) resource of this object.
This is an overloaded version of GetSResource.
| resource_name | Specifies the resource path of the string resource to query. |
| value | Specifies a pointer used to return the resource value. |
If a string resource with the given resource path exists, this method copies the string pointer into the address specified by value pointer and returns True, otherwise it generates an error message and returns False.
Warning: The returned pointer points to GLG internal data structures and should not be modified. The pointer is valid only immediately after a call to GlgGetSResource. To store the returned string, create a copy of it using GlgStrClone.
| GlgBoolean GetResource | ( | char * | resource_name, |
| double * | value | ||
| ) |
Returns the current value of a D (double) resource of this object.
This is an overloaded version of GetDResource.
| resource_name | Specifies the resource path of the scalar resource to query. |
| value | Specifies a pointer used to return the resource value. |
If a scalar resource with the given resource path exists, this method copies its current value into the address specified by the value pointer and returns True, otherwise it generates an error message and returns False.
| 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.
This is an overloaded version of GetGResource.
| resource_name | Specifies the resource path of the G resource to query. |
| x_value | Specifies a pointer used to return the X value of a geometrical resource or an R component of the color resource. |
| y_value | Specifies a pointer used to return the Y value of a geometrical resource or a G component of the color resource. |
| z_value | Specifies a pointer used to return the Z value of a geometrical resource or a B component of the color resource. |
If a G resource or with the given resource path exists, this method copies its current three values to the addresses specified with the x_value, y_value and z_value pointers and returns True. Otherwise it generates an error message and returns False.
| GlgBoolean GetSResource | ( | char * | resource_name, |
| char ** | value | ||
| ) |
Returns the current value of a S (string) resource of this object.
This is a wrapper for GlgGetSResource.
| resource_name | Specifies the resource path of the string resource to query. |
| value | Specifies a pointer used to return the resource value. |
If a string resource with the given resource path exists, this method copies the string pointer into the address specified by value pointer and returns True, otherwise it generates an error message and returns False.
Warning: The returned pointer points to GLG internal data structures and should not be modified. The pointer is valid only immediately after a call to GlgGetSResource. To store the returned string, create a copy of it using GlgStrClone.
| GlgBoolean GetSTag | ( | char * | tag_name, |
| char ** | value | ||
| ) |
Returns the current value of a S (string) tag.
This is a wrapper for GlgGetSTag.
| tag_name | Specifies the TagSource of the string tag to query. |
| value | Specifies a pointer used to return the tag value. |
If a string tag with the given TagSource exists, this method copies the string pointer into the address specified by value pointer and returns True, otherwise it generates an error message and returns False.
Warning: The returned pointer points to GLG internal data structures and should not be modified. The pointer is valid only immediately after a call to GetSTag. To store the returned string, create a copy of it using GlgStrClone.
| GlgBoolean GetTag | ( | char * | tag_name, |
| char ** | value | ||
| ) |
Returns the current value of a S (string) tag.
This is an overloaded version of GetSTag.
| tag_name | Specifies the TagSource of the string tag to query. |
| value | Specifies a pointer used to return the tag value. |
If a string tag with the given TagSource exists, this method copies the string pointer into the address specified by value pointer and returns True, otherwise it generates an error message and returns False.
Warning: The returned pointer points to GLG internal data structures and should not be modified. The pointer is valid only immediately after a call to GetTag. To store the returned string, create a copy of it using GlgStrClone.
| GlgBoolean GetTag | ( | char * | tag_name, |
| double * | value | ||
| ) |
Returns the current value of a D (double) tag.
This is an overloaded version of GetDTag.
| tag_name | Specifies the TagSource of the scalar tag to query. |
| value | Specifies a pointer used to return the tag value. |
If a scalar tag with the given TagSource exists, this method copies its current value into the address specified by the value pointer and returns True, otherwise it generates an error message and returns False.
| 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.
This is an overloaded version of GetGTag.
| tag_name | Specifies the TagSource of the G tag to query. All object's tags with the specified TagSource will be set to the supplied values. |
| x_value | Specifies a pointer used to return the X value of a geometrical tag or an R component of the color tag. |
| y_value | Specifies a pointer used to return the Y value of a geometrical tag or a G component of the color tag. |
| z_value | Specifies a pointer used to return the Z value of a geometrical tag or a B component of the color tag. |
If a G tag with the given TagSource exists, this method copies its current three values to the addresses specified with the x_value, y_value and z_value pointers and returns True. Otherwise it generates an error message and returns False.
| GlgBoolean HasResourceObject | ( | char * | resource_name | ) |
Checks if a named resource of this object exists.
This is a wrapper for GlgHasResourceObject.
| resource_name | Specifies the resource path of the resource object to query. |
| GlgBoolean HasTagName | ( | char * | tag_name | ) |
Checks if a data tag with a specified tag name exists.
This is a wrapper for GlgHasTagName.
| tag_name | Specifies the tag name to query. |
| GlgBoolean HasTagSource | ( | char * | tag_source | ) |
Checks if a data tag with a specified tag source exists.
This is a wrapper for GlgHasTagSource.
| tag_source | Specifies the tag source to query. |
|
virtual |
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.
It is a virtual callback method to be overridden by a derived class and is enabled via EnableCallback.
SubWindow objects may be used to switch drawings displayed in them, and an application may want to install a separate Input callback for each loaded drawing to handle user interaction instead of having one giant Input callback that handles input events from all drawings. An Input callback has to be added to the viewport of a drawing displayed in the subwindow before the drawing is set up and drawn. The Hierarchy callback is invoked with the ID of the subwindow's drawing after it has been loaded but before its hierarchy has been set up, making it possible to add Input callbacks as well as to initialize the drawing with data before it is painted on the screen.
The Hierarchy callback can also be used to set up data tags defined in a SubDrawing object when an instance of the subdrawing is created.
The Hierarchy callback may be added to the top level viewport or any of its children viewports. If any of a subwindow's (or subdrawing's) parent viewports has a Hierarchy callback added, the callback of the closest parent viewport will be invoked each time a subwindow loads a new drawing or a subdrawing loads its template.
The Hierarchy callback is invoked multiple times for each template drawing: when the drawing is loaded but before it is set up, when the drawing is set up but before it is drawn, as well as before and after the drawing is reset. The condition field of the hierarchy_info structure provides information on when the callback is invoked.
The SCADAViewer/CPP/GlgViewer.cpp file in the GLG installation directory provides an elaborate example of using the Hierarchy callback.
| callback_viewport | The viewport the callback is attached to. |
| hierarchy_info | The structure containing information about the subdrawing triggered the callback. See GlgHierarchyCBStruct for more information. |
Reimplemented in GlgWrapperC.
| void InitialDraw | ( | void | ) |
Draws a GLG viewport object for the first time after it has been created or loaded.
This is a wrapper for GlgInitialDraw.
The method displays a viewport's drawing in a platform-independent way on both Windows and Linux/Unix, and is part of the GLG Generic API.
The method creates a top level window and renders the viewport's drawing in it. Depending on the used version of the GLG library and the configuration settings, different rendering engines may be used for rendering graphics:
If GlgWrapperC or GtkmmGlgWidget widgets are used on Linux/Unix, or the GlgControlC control is used on Windows, this method is invoked automatically, and need not be explicitly called.
InitialDraw is equivalent to the following sequence:
See Generic API Application Example for a cross-platform example of using this method.
|
virtual |
An Input callback is used to handle user interaction with input objects, as well as object selection and action processing.
It is a virtual callback method to be overridden by a derived class and is enabled via EnableCallback.
| callback_viewport | The viewport the callback is attached to. |
| message_object | The message object containing information about the event or action that triggered the callback. |
See the Appendix B: Message Object Resources section of the Appendices chapter of the GLG Programming Reference Manual for a description of data contained in the message object.
The example below demonstrates a very simple input callback which terminates the application when a Quit button is pressed. The example demonstrates how to handle the default input object events and process attached command actions.
The examples_c_cpp/RealTimeChart_cpp/GlgChart.cpp file in the GLG installation directory provides an elaborate example of using the Input callback. Other GLG Demos and Examples also provide coding examples of using the callback.
Reimplemented in GlgWrapperC.
| GlgBoolean IsNull | ( | void | ) |
Checks if a non-null object is stored in this instance.
| GlgBoolean Load | ( | char * | filename, |
| char * | resource_name = NULL |
||
| ) |
Loads an object from a file or a URL, replacing the previously stored object.
This is a wrapper for GlgLoadObject.
| filename | Specifies the file or the URL to load the object from. For details of using URLs on Linux, see GlgGetURLCB. |
| resource_name | An optional resource path.
|
| GlgBoolean Load | ( | void * | image, |
| GlgLong | size, | ||
| char * | resource_name = NULL |
||
| ) |
Loads an object from a generated memory image, replacing the previously stored object.
| image | Specifies the address of the drawing image generated by the GLG Code Generation Utility gcodegen. |
| size | Specifies the image size. This is also generated by gcodegen. |
| resource_name | An optional resource path.
|
This is a wrapper for GlgLoadObjectFromImage, see GlgLoadObjectFromImage for more information.
| void LoadNullObject | ( | void | ) |
Releases the stored object.
Replaces the currently loaded object with a null object.
| GlgBoolean LoadWidget | ( | char * | filename | ) |
Loads a GLG widget from a file or a URL.
Loads the "$Widget" viewport from a GLG drawing file or a URL, replacing the previously stored object. This is a wrapper for GlgLoadWidgetFromFile.
| filename | Specifies the name of the widget's drawing file or the URL. For details of using URLs on Linux, see GlgGetURLCB. |
| GlgBoolean LoadWidget | ( | GlgObjectC & | parent | ) |
Extracts a GLG widget contained inside another object.
Finds the "$Widget"viewport inside the parent object, and stores it, replacing the previously stored object. This is a wrapper for GlgLoadWidgetFromObject.
| parent | The parent object containing the "$Widget" viewport. |
| GlgBoolean LoadWidget | ( | void * | image, |
| GlgLong | size | ||
| ) |
Loads a GLG widget from a generated memory image.
Loads the "$Widget" viewport from a generated memory image, replacing the previously stored object.
| image | Specifies the address of the drawing image generated by the GLG Code Generation Utility gcodegen. |
| size | Specifies the image size. This is also generated by gcodegen. |
This is a wrapper for GlgLoadWidgetFromImage, see GlgLoadWidgetFromImage for more information.
| void OnDrawMetafile | ( | CDC * | print_dc | ) |
Windows only: Provides MFC metafile output support.
Is used by the MFC container's OnDrawMetafile method to produce metafile for the GLG child window.
If this object is a light viewport, the output will be generated for its parent viewport.
| print_dc | Specifies the printing device context for metafile output. |
| void OnPrint | ( | CDC * | print_dc | ) |
Windows only: Provides MFC printing support.
Is used by the MFC container's OnPrint method to print GLG child window. This is a wrapper for GlgOnPrint.
If this object is a light viewport, the output will be generated for its parent viewport.
| print_dc | Specifies the printing device context. |
| operator GlgObject | ( | void | ) |
Type converter to GlgObject.
This type converter allows using C++ GlgObjectC object instances as the GlgObject parameters of the C API functions.
| GlgBoolean operator! | ( | void | ) |
Checks if a non-null object is stored in this instance.
| GlgObjectC& operator++ | ( | int | ) |
Postfix operator: References an object.
This is a wrapper for GlgReferenceObject.
| GlgObjectC& operator++ | ( | void | ) |
Prefix operator: References an object.
This is a wrapper for GlgReferenceObject.
| GlgObjectC& operator-- | ( | int | ) |
Postfix operator: Dereferences an object.
This is a wrapper for GlgDropObject.
| GlgObjectC& operator-- | ( | void | ) |
Prefix operator: Dereferences an object.
This is a wrapper for GlgDropObject.
| GlgObjectC& operator= | ( | const GlgObjectC & | object | ) |
Assignment operator: Stores a GLG object in this instance.
| object | The object to store. |
| 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.
This is a wrapper for GlgNativePrint, which receives the method's parameters. See GlgNativePrint for parameter descriptions.
The drawing's hierarchy must be set up in order to print the drawing. Use Update before printing to make sure the drawing is up to date.
In the MFC environment on Windows, OnPrint may be used to support printing of the GlgControlC MFC wrapper.
| print_context | See GlgExportPostScript for parameter description. |
| x,y | See GlgExportPostScript for parameter description. |
| width,height | See GlgExportPostScript for parameter description. |
| portrait | See GlgExportPostScript for parameter description. |
| stretch | See GlgExportPostScript for parameter description. |
| center | See GlgExportPostScript for parameter description. |
| void Reference | ( | void | ) |
Explicitly references the GLG object contained in this instance.
This is a wrapper for GlgReferenceObject.
| GlgBoolean Reset | ( | void | ) |
Reinitializes the drawing by resetting the drawing hierarchy, then setting it up again and rendering the drawing.
This is a wrapper for GlgReset.
Calling Reset restores all volatile resource changes to the values the resources had when the widget was first drawn. It also discards currently displayed chart data, unless the chart Persistent attribute is set to True.
The method should be invoked only for the top-level viewports, not the child viewports.
| void ResetHierarchy | ( | void | ) |
Resets the object hierarchy.
This is a wrapper for GlgResetHierarchy.
Resets the object hierarchy of a top-level viewport or drawing. If the object was displayed using the Generic API, this method must be called before the top-level object is destroyed.
This method should not be called for the top-level viewports used in the integrated GLG widgets, such as the GlgWrapperC or GlgControlC.
Warning: Do not confuse this method with the Reset method, which is used to redraw a displayed drawing and to regenerate the object hierarchy.
| GlgBoolean Same | ( | GlgObject | object | ) |
Compares two GLG objects.
| object | The object to compare with. |
| GlgBoolean Same | ( | GlgObjectC & | object | ) |
Compares two GLG objects.
| object | The object to compare with. |
| 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.
This is a wrapper for GlgSaveImage.
| resource_name | Specifies the resource path of a child viewport whose image to save, or NULL to save the image of this viewport. The resource path is relative to this viewport. |
| filename | Specifies a filename in which to save the generated image. |
| format | Specifies an image format, must be GLG_JPEG or GLG_PNG. |
SaveImage saves an image of the visible part of the viewport, clipping out the parts of the drawing that extends outside of it.
For a light viewport, the output will be generated for its parent viewport. The drawing's hierarchy must be set up in order to generate an image.
| 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.
This is a wrapper for GlgSaveImageCustom.
| resource_name | Specifies the resource path of a child viewport whose image to save, or NULL to save the image of this viewport. The resource path is relative to this viewport. |
| filename | Specifies a filename in which to save the generated image. |
| format | Specifies an image format, must be GLG_JPEG or GLG_PNG. |
| x | Specifies the X coordinate of the area used for generating an image. It defines an offset in screen pixels relative to the origin of the viewport's window, which has screen coordinates of (0,0). |
| y | Specifies the Y coordinate of the area used for generating an image. It defines an offset in screen pixels relative to the origin of the viewport's window, which has screen coordinates of (0,0). |
| width | Specifies the width in screen pixels of the area used for generating an image. |
| height | Specifies the height in screen pixels of the area used for generating an image. |
| gap | Specifies the padding space between the extent of the drawing and the border of the generated image in case when zero width and height parameters are specified. |
The x, y, width and height parameters may be obtained by querying the bounding box of either the whole drawing or of the area of the drawing for which the image needs to be generated using GetBoxPtr.
If width and height parameters are 0, the image of the whole drawing is generated using the drawing's bounding rectangle as the image generation area, without clipping to just the visible area. If the viewport is zoomed in, this area may be significantly bigger than the visible area of the viewport, and the image size may be quite large. The viewport's zoom factor defines the scaling factor for objects in the drawing when the image is saved.
For a light viewport, the output will be generated for its parent viewport. The drawing's hierarchy must be set up in order to generate an image.
|
virtual |
A simplified selection callback is used to process object selection using object names.
It is a virtual callback method to be overridden by a derived class and is enabled via EnableCallback.
Select callback uses object names to handle selection. A more versatile Input callback may be used to handle object selection using object IDs, which will also handle unnamed objects.
Alternatively, an Action attached to an object provides the most effective way to handle object selection. An Input callback is used to process selection triggered by the Action objects.
GlgGetSelectionButton may be used inside the Select callback to query the mouse button that triggered the callback.
| callback_viewport | The viewport the callback is attached to. |
| name_array | A NULL-terminated list of names of all named selected objects. |
The name array contains names of all objects that overlap with the given rectangle completely or partially. Both the selected objects at the bottom of the hierarchy and all their named parents will be included.
Objects in the array are listed in the reversed order compared to their drawing order, so that the objects that are at the bottom of the drawing list and are drawn on top of other objects will be listed first in the array.
The name string is a complete resource path name (relative to viewport) which can be used to access resources of the object:
The examples_c_cpp/animation/GlgAnimationG.cpp file in the GLG installation directory provides an example of using the Select callback.
Reimplemented in GlgWrapperC.
| 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.
This is a wrapper for GlgSendMessage.
| resource_path | If NULL, the message is sent to this object, otherwise the message is sent to the object's child specified by the resource path. The resource path is relative to this object. For example, to send the message to a viewport's handler, invoke the viewport's SendMessage with "Handler" as the resource_path parameter. |
| message | A string defining the type of the message. |
| param1 | Message type dependent. |
| param2 | Message type dependent. |
| param3 | Message type dependent. |
| param4 | Message type dependent. |
This method is used to send a message to an input object with a request to execute some action. For example, a program can send an "Activate" message to a push button widget to simulate a user click, which will activate any click processing Action objects attached to the button. "Set" and "Reset" messages may be sent to a toggle button widget to change its value, which will also process any Action objects attached to the toggle.
The method also serves as an escape mechanism for actions that can not be easily accomplished by setting or querying a single resource, such us adding items to a list widget or querying a state of a multiple-selection list.
Refer to the Input Objects chapter of the of the GLG User's Guide and Builder Reference Manual for the description of the method's parameters and returned value for each of the GLG input handlers.
Some messages return an object that is is owned by the called and should be dereferenced. If the returned object is assigned to a GlgObjectC instance, use the instance's Drop method to dereference it.
| GlgBoolean SetDResource | ( | char * | resource_name, |
| double | value | ||
| ) |
Sets a new value of a D (double) resource of this object.
This is a wrapper for GlgSetDResource.
| resource_name | Specifies the name of the scalar resource to be set. |
| value | Specifies a new value. |
If a scalar resource with the given resource path exists, this method sets it to a new value and returns True, otherwise it generates an error message and returns False.
See Resource Access Performance Optimization for more.
| GlgBoolean SetDResourceIf | ( | char * | resource_name, |
| double | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets a new value of a D (double) resource of this object.
This is a wrapper for GlgSetDResourceIf.
| resource_name | Specifies the name of the scalar resource to be set. |
| value | Specifies a new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetDResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. The parameter is ignored when updating chart entry points to allow plotting straight lines when the plotted value does not change over time. |
If a scalar resource with the given resource path exists, this method sets it to a new value and returns True, otherwise it generates an error message and returns False.
See Resource Access Performance Optimization for more.
| GlgBoolean SetDTag | ( | char * | tag_name, |
| double | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets a new value for a D (double) tag.
This is a wrapper for GlgSetDTag.
| tag_name | Specifies TagSource of the scalar tag to be set. All object's tags with the specified TagSource will be set to the supplied value. |
| value | Specifies a new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one. Setting if_changed=True optimizes performance of applications that set tag values regardless whether the values have changed. The parameter is ignored when updating chart entry points to allow plotting straight lines when the plotted value does not change over time. |
If scalar tags with the given TagSource exist, this method sets their new values and returns True, otherwise it generates an error message and returns False.
See Tag Access Performance Optimization for more.
| void SetGlgObject | ( | GlgObject | object | ) |
Low-level utility: Stores the specified GlgObject object in this object and references the stored object.
| object | The object to store. |
| 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.
This is a wrapper for GlgSetGResource.
| resource_name | Specifies the resource path of the geometrical or color resource to be set. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
If a G resource with the given resource path exists, this method sets its new values and returns True, otherwise it generates an error message and returns False.
See Resource Access Performance Optimization for 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.
This is a wrapper for GlgSetGResourceIf.
| resource_name | Specifies the resource path of the geometrical or color resource to be set. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
| if_changed | If set to False, the graphical updates will be performed even if the new values are the same as the old one (equivalent to SetGResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a G resource with the given resource path exists, this method sets its new values and returns True, otherwise it generates an error message and returns False.
See Resource Access Performance Optimization for 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.
This is a wrapper for GlgSetGTag.
| tag_name | Specifies the TagSource of the geometrical or color tag to be set. All object's tags with the specified TagSource will be set to the supplied values. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one. Setting if_changed=True optimizes performance of applications that set tag values regardless whether the values have changed. |
If G tags with the given TagSource exist, this method sets their new value and returns True, otherwise it generates an error message and returns False.
See Tag Access Performance Optimization for 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.
This is an overloaded version of SetSResourceFromD.
| resource_name | Specifies the resource path of the string resource to be set. |
| format | Specifies the printf-style format to use when setting the resource string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
If a string resource with the given resource path exists, this method sets it to a new string containing the value parameter formatter using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Performance Optimization for 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.
This is an overloaded version of SetSResourceFromDIf.
| resource_name | Specifies the resource path of the string resource to be set. |
| format | Specifies the printf-style format to use when setting the resource string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetSResourceFromD). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a string resource with the given resource path exists, this method sets it to a new string containing the value parameter formatted using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Performance Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| char * | value | ||
| ) |
Replaces the string of an S (string) resource of this object.
This is an overloaded version of SetSResource.
| resource_name | Specifies the resource path of the string resource to be set. |
| value | Specifies a new string. |
If a string resource with the given resource path exists, this method creates a copy of the input string, sets that copy as the new value of the resource and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Performance Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| char * | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Replaces the string of an S (string) resource of this object.
This is an overloaded version of SetSResourceIf.
| resource_name | Specifies the resource path of the string resource to be set. |
| value | Specifies a new string. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetSResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a string resource with the given resource path exists, this method creates a copy of the input string, sets that copy as the new value of the resource and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Performance Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| double | value | ||
| ) |
Sets a new value of a D (double) resource of this object.
This is an overloaded version of SetDResource.
| resource_name | Specifies the name of the scalar resource to be set. |
| value | Specifies a new value. |
If a scalar resource with the given resource path exists, this method sets it to a new value and returns True, otherwise it generates an error message and returns False.
See Resource Access Performance Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| double | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets a new value of a D (double) resource of this object.
This is an overloaded version of SetDResourceIf.
| resource_name | Specifies the name of the scalar resource to be set. |
| value | Specifies a new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetDResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. The parameter is ignored when updating chart entry points to allow plotting straight lines when the plotted value does not change over time. |
If a scalar resource with the given resource path exists, this method sets it to a new value and returns True, otherwise it generates an error message and returns False.
See Resource Access Performance Optimization for 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.
This is an overloaded version of SetGResource.
| resource_name | Specifies the resource path of the geometrical or color resource to be set. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
If a G resource with the given resource path exists, this method sets its new values and returns True, otherwise it generates an error message and returns False.
See Resource Access Performance Optimization for 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.
This is an overloaded version of SetGResourceIf.
| resource_name | Specifies the resource path of the geometrical or color resource to be set. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
| if_changed | If set to False, the graphical updates will be performed even if the new values are the same as the old one (equivalent to SetGResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a G resource with the given resource path exists, this method sets its new values and returns True, otherwise it generates an error message and returns False.
See Resource Access Performance Optimization for 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.
This is an overloaded version of SetResourceFromObject.
| resource_name | Specifies the name of the resource of this object to be set. |
| value | Specifies the object containing the new value. |
If a resource of a matching type at the given resource path exists, the method sets the value of the resource to a value defined by the value object and returns True, otherwise it generates an error message and returns False.
The object type (and data type for the data object) of the resource specified by the resource path should match the type of the value object.
See Resource Access Performance Optimization for 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.
This is an overloaded version of SetResourceFromObjectIf.
| resource_name | Specifies the name of the resource of this object to be set. |
| value | Specifies the object containing the new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to GlgSetResourceFromObject). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a resource of a matching type at the given resource path exists, the method sets the value of the resource to a value defined by the value object and returns True, otherwise it generates an error message and returns False.
The object type (and data type for the data object) of the resource specified by the resource path should match the type of the value object.
See Resource Access Performance Optimization for 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.
This is a wrapper for GlgSetResourceFromObject.
| resource_name | Specifies the name of the resource of this object to be set. |
| value | Specifies the object containing the new value. |
If a resource of a matching type at the given resource path exists, the method sets the value of the resource to a value defined by the value object and returns True, otherwise it generates an error message and returns False.
The object type (and data type for the data object) of the resource specified by the resource path should match the type of the value object.
See Resource Access Performance Optimization for 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.
This is a wrapper for GlgSetResourceFromObjectIf.
| resource_name | Specifies the name of the resource of this object to be set. |
| value | Specifies the object containing the new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to GlgSetResourceFromObject). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a resource of a matching type at the given resource path exists, the method sets the value of the resource to a value defined by the value object and returns True, otherwise it generates an error message and returns False.
The object type (and data type for the data object) of the resource specified by the resource path should match the type of the value object.
See Resource Access Performance Optimization for more.
| GlgBoolean SetSResource | ( | char * | resource_name, |
| char * | value | ||
| ) |
Replaces the string of an S (string) resource of this object.
This is a wrapper for GlgSetSResource.
| resource_name | Specifies the resource path of the string resource to be set. |
| value | Specifies a new string. |
If a string resource with the given resource path exists, this method creates a copy of the input string, sets that copy as the new value of the resource and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Performance Optimization for 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.
This is a wrapper for GlgSetSResourceFromD.
| resource_name | Specifies the resource path of the string resource to be set. |
| format | Specifies the printf-style format to use when setting the resource string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
If a string resource with the given resource path exists, this method sets it to a new string containing the value parameter formatter using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Performance Optimization for 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.
This is a wrapper for GlgSetSResourceFromDIf.
| resource_name | Specifies the resource path of the string resource to be set. |
| format | Specifies the printf-style format to use when setting the resource string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to GlgSetSResourceFromD). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a string resource with the given resource path exists, this method sets it to a new string containing the value parameter formatted using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Performance Optimization for more.
| GlgBoolean SetSResourceIf | ( | char * | resource_name, |
| char * | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Replaces the string of an S (string) resource of this object.
This is a wrapper for GlgSetSResourceIf.
| resource_name | Specifies the resource path of the string resource to be set. |
| value | Specifies a new string. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetSResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a string resource with the given resource path exists, this method creates a copy of the input string, sets that copy as the new value of the resource and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Performance Optimization for more.
| GlgBoolean SetSTag | ( | char * | tag_name, |
| char * | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Replaces the string of an S (string) tag.
This is a wrapper for GlgSetSTag.
| tag_name | Specifies TagSource of the string tag to be set. All object's tags with the specified TagSource will be set to the supplied value. |
| value | Specifies a new string. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one. Setting if_changed=True optimizes performance of applications that set tag values regardless whether the values have changed. |
If string tags with the given TagSource exist, this method creates copies of the input string, sets these copies as new values of the tags and returns True, otherwise it generates an error message and returns False.
The memory associated with the old strings is automatically freed.
See Tag Access Performance Optimization for 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.
This is a wrapper for GlgSetSTagFromD.
| tag_name | Specifies the TagSource of the string tag to be set. All object's tags with the specified TagSource will be set to the supplied values. |
| format | Specifies the printf-style format to use when setting the tag string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one. Setting if_changed=True optimizes performance of applications that set tag values regardless whether the values have changed. |
If string tags with the given TagSource exist, this method replaces their strings with new strings containing the value parameter formatted using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old strings is automatically freed.
See Tag Access Performance Optimization for 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.
This is a wrapper for GlgSetSTagFromD.
| tag_name | Specifies the TagSource of the string tag to be set. All object's tags with the specified TagSource will be set to the supplied values. |
| format | Specifies the printf-style format to use when setting the tag string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one. Setting if_changed=True optimizes performance of applications that set tag values regardless whether the values have changed. |
If string tags with the given TagSource exist, this method replaces their strings with new strings containing the value parameter formatted using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old strings is automatically freed.
See Tag Access Performance Optimization for more.
| GlgBoolean SetTag | ( | char * | tag_name, |
| char * | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Replaces the string of an S (string) tag.
This is an overloaded version of SetSTag.
| tag_name | Specifies TagSource of the string tag to be set. All object's tags with the specified TagSource will be set to the supplied value. |
| value | Specifies a new string. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one. Setting if_changed=True optimizes performance of applications that set tag values regardless whether the values have changed. |
If string tags with the given TagSource exist, this method creates copies of the input string, sets these copies as new values of the tags and returns True, otherwise it generates an error message and returns False.
The memory associated with the old strings is automatically freed.
See Tag Access Performance Optimization for more.
| GlgBoolean SetTag | ( | char * | tag_name, |
| double | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets a new value for a D (double) tag.
This is an overloaded version of SetDTag.
| tag_name | Specifies TagSource of the scalar tag to be set. All object's tags with the specified TagSource will be set to the supplied value. |
| value | Specifies a new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one. Setting if_changed=True optimizes performance of applications that set tag values regardless whether the values have changed. The parameter is ignored when updating chart entry points to allow plotting straight lines when the plotted value does not change over time. |
If scalar tags with the given TagSource exist, this method sets their new values and returns True, otherwise it generates an error message and returns False.
See Tag Access Performance Optimization for 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.
This is an overloaded version of SetGTag.
| tag_name | Specifies the TagSource of the geometrical or color tag to be set. All object's tags with the specified TagSource will be set to the supplied values. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one. Setting if_changed=True optimizes performance of applications that set tag values regardless whether the values have changed. |
If G tags with the given TagSource exist, this method sets their new value and returns True, otherwise it generates an error message and returns False.
See Tag Access Performance Optimization for more.
| void SetupHierarchy | ( | void | ) |
Provides an explicit request to set up the object hierarchy without rendering the object.
This is a wrapper for GlgSetupHierarchy.
When invoked on a drawing which has been loaded but not yet displayed, the method sets up the drawing's object hierarchy to prepare the drawing for rendering. The drawing should contain either a top-level viewport object, or a group containing several top-level viewports.
After the initial draw (when the object hierarchy has already been set up), the method can be used to set up any type of object after its resources were changed. Unlike Update, SetupHierarchy sets up the object without repainting it
| GlgBoolean SetZoom | ( | char * | resource_name, |
| GlgLong | type, | ||
| double | value = 0. |
||
| ) |
Provides a programmatic interface to integrated zooming and panning.
This is a wrapper for GlgSetZoom.
| resource_name | Specifies the resource path of a child viewport to zoom or pan, or NULL to zoom or pan this viewport object. The resource path is relative to this viewport object. |
| type | A char value that specifies the type of the zoom or pan operation to perform. For example, 'i' may be used to zoom in. See GlgSetZoom for a list of possible values. |
| value | Specifies a value for zoom and pan operations. |
This method performs a specified zoom or pan operation regardless of the setting of the viewport's Pan and ZoomEnabled attributes.
Zooming and panning keyboard accelerators may also be used by settings a viewport's ZoomEnabled attribute to True (the user may have to click on the viewport first to set the keyboard focus). This is especially useful for interactive testing of integrated zooming and panning in the GLG Graphics Builder.
The viewport's Pan attribute can be used to activate integrated scrollbars for scrolling the drawing, as well as scrolling charts and GIS maps.
In the Drawing Zoom Mode, if the method attempts to set a very large zoom factor which would result in the overflow of the integer coordinate values used by the native windowing system, the zoom operation is not performed and the method returns False.
The left mouse button is the default button for performing the ZoomTo operation, as well as for panning and scrolling the drawing by dragging it with the mouse. These defaults can be changed by setting the GlgZoomToButton and GlgPanDragButton global configuration resources. If the default is changed, the left-click used in the description of the affected operations changes to the click with the mouse button assigned to the respective ZoomTo or Pan operation.
| 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.
This is a wrapper for GlgSetZoomMode.
In the Drawing Zoom Mode (default), the drawing displayed in the viewport is zoomed and panned. If the GIS Zoom Mode is set, any zooming and panning operation performed by SetZoom will zoom and pan the map displayed in the viewport's GIS Object, instead of being applied to the viewport's drawing. In the Chart Zoom Mode, the content of the chart is zoomed and panned.
| resource_name | Specifies the resource path of a child viewport whose zoom mode to set, or NULL to zoom or pan this viewport object. The resource path is relative to this viewport object. |
| zoom_object | GIS or Chart object to be zoomed in the GIS and Chart zooming modes (or NULL for the Drawing zoom mode):
|
| zoom_object_resource_name | Resource path of the GIS or Chart object.
|
| zoom_mode | The zoom mode to set:
|
| GlgBoolean Sync | ( | void | ) |
Flushes the windowing system output for this viewport to the display.
If OpenGL is used, it also flushes OpenGL buffers. In X11, it also waits for all requests to be processed. This is a wrapper for GlgSync.
|
virtual |
A Trace callback is used to handle native windowing events.
It is a virtual callback method to be overridden by a derived class and is enabled via EnableCallback.
| callback_viewport | The viewport the callback is attached to. |
| trace_info | The structure containing information about the native windowing event that triggered the callback. See GlgTraceCBStruct for more information. |
The trace callback is used as an escape mechanism to provide low-level access to native windowing events. It is invoked whenever a viewport receives a native windowing event and passes the event to the application code for processing. If a viewport object has a trace callback attached, the trace callback will be invoked for all events received by the viewport and all of its child viewports.
There are two trace callbacks: the Trace callback is invoked before the event is dispatched for processing, and the Trace2 callback is invoked after the event has been processed. If the same method is used to handle both callbacks, the reason field of the trace_info structure can be used to find which callback is invoked, GLG_TRACE_CB or GLG_TRACE2_CB.
The examples_c_cpp/GIS_cpp/GlgMapViewer.cpp file in the GLG installation directory provides an elaborate example of using the Trace callback.
Reimplemented in GlgWrapperC.
|
virtual |
A Trace2 callback is used to handle native windowing events.
It is a virtual callback method to be overridden by a derived class and is enabled via EnableCallback.
The Trace2 callback is similar to Trace, but is invoked after the event has been processed. See Trace for more information.
| callback_viewport | The viewport the callback is attached to. |
| trace_info | The structure containing information about the native windowing event that triggered the callback. See GlgTraceCBStruct for more information. |
Reimplemented in GlgWrapperC.
| GlgBoolean Update | ( | void | ) |
Updates a drawing to show new resource values.
If this object is a light viewport, an update of its parent viewport will be performed. All resource changes are held until the Update method is called or until the viewport's window receives an expose event. (That is, it must be redrawn because another window that was obscuring a part of the viewport's window has been moved. This causes the viewport to redraw itself, using its new data.)
Note: Some drawing resources affect the object hierarchy of the drawing. For example, the Factor attribute of a series object controls the number of template instances that will be created by the series. If a number of instances is increased by setting the series' Factor, the new instances will be created and their resources can be accessed only after the Update or SetupHierarchy method is invoked. If the series object is not persistent, any change (either increase or decrease) of its Factor attribute recreates its instances, and either the Update or SetupHierarchy method should be called before accessing resources of the series' instances.