GLG Toolkit, C# Class Library  Version 4.2
GlgObject Class Reference

Detailed Description

Abstract superclass of all GLG objects. Provides the GLG API functionality (Standard, Intermediate and Extended) for all GLG objects.

Inherited by GlgAction, GlgAngularAxis, GlgAnnotation, GlgArc, GlgAxis, GlgBoxAttr, GlgChart, GlgColorTable, GlgConnection, GlgDataPoint, GlgDataValue, GlgDynArray, GlgEdge, GlgFont, GlgFontTable, GlgFrame, GlgFunction, GlgGIS, GlgHistory, GlgImage, GlgLegend, GlgLevelLine, GlgLight, GlgLightViewport, GlgLineAttr, GlgList, GlgMarker, GlgMatrix, GlgParallelogram, GlgPlot, GlgPolygon, GlgPolyline, GlgPolySurface, GlgReference, GlgRenderingAttr, GlgResourceReference, GlgRounded, GlgScreen, GlgSeries, GlgSpline, GlgSquareSeries, GlgTag, GlgText, GlgVector, GlgViewport, and GlgXform.

Public Member Functions

void AbortGISRequest (String res_name)
 
GlgObject AddAnnotation (String res_name, GlgObject annotation, double position_x, double position_y, bool add_box)
 
GlgObject AddAttachmentPoint (double dx, double dy, double dz)
 
void AddDataSampleNode (GlgDataSampleNode node, bool quick_mode)
 
void AddListener (GlgCallbackType type, Object callback)
 
bool AddObjectAt (Object obj, int index)
 
bool AddObjectToBottom (Object obj)
 
bool AddObjectToTop (Object obj)
 
GlgObject AddPlot (String res_name, GlgObject plot)
 
GlgObject AddTimeLine (String res_name, GlgObject time_line, double time_stamp)
 
void ChangeObject (String res_name)
 
bool ClearDataBuffer (String res_name)
 
GlgObject CloneObject (GlgCloneType clone_type)
 
bool ConstrainObject (GlgObject to_attribute)
 
bool ContainsObject (Object obj)
 
GlgObject CopyObject ()
 
GlgObject CreateAlarmList ()
 
GlgObject CreateChartSelection (GlgObject plot, double x, double y, double dx, double dy, bool screen_coord, bool include_invalid, bool x_priority)
 
Bitmap CreateImage (String res_name)
 
Bitmap CreateImageCustom (String res_name, System.Drawing.Rectangle image_area, int gap)
 
GlgObject CreateInversedMatrix ()
 
GlgObject CreatePointArray (GlgControlPointType type)
 
GlgObject CreateResourceList (bool list_named_res, bool list_def_attr, bool list_aliases)
 
GlgObject CreateTagList (bool unique_tag_sources)
 
String CreateTooltipString (double x, double y, double dx, double dy, String format)
 
bool DeleteAnnotation (String res_name, GlgObject annotation, double position_x, double position_y)
 
bool DeleteBottomObject ()
 
bool DeleteObject (Object obj)
 
bool DeleteObjectAt (int index)
 
bool DeletePlot (String res_name, GlgObject plot)
 
bool DeleteTags (GlgTagType tag_type_mask)
 
bool DeleteTimeLine (String res_name, GlgObject time_line, double time_stamp)
 
bool DeleteTopObject ()
 
int ExportStrings (String filename, GlgMediumType medium_type, char separator1, char separator2, Encoding encoding)
 
int ExportTags (String filename, GlgMediumType medium_type, char separator1, char separator2, Encoding encoding)
 
bool FindMatchingObjects (GlgFindMatchingObjectsData data)
 
bool FitObject (GlgCoordType coord_type, GlgCube box, bool keep_ratio)
 
void Flush (int size)
 
GlgObject GetAction (GlgActionType action_type, GlgTriggerType trigger_type, int button, GlgArmedStateType armed_state, GlgDoubleClickStateType double_click_state, String action, String subaction, bool enabled_only)
 
GlgObject GetAlarmObject (String alarm_label, bool single_alarm)
 
GlgCube GetBox ()
 
GlgMinMax GetChartDataExtent (String res_name, bool time, bool visible_only)
 
GlgMinMax GetDataExtent (String res_name, bool time)
 
GlgDataType GetDataType ()
 
GlgObject GetDrawingMatrix ()
 
GlgDouble GetDResource (String resource_name)
 
GlgDouble GetDTag (String tag_source)
 
Object GetElement (int index)
 
GlgGISRequestObserver GetGISRequestInfo (String res_name)
 
GlgPoint GetGResource (String resource_name)
 
GlgPoint GetGTag (String tag_source)
 
int GetImageHeight ()
 
int GetImageWidth ()
 
int GetIndex (Object obj)
 
GlgObject GetLegendSelection (double x, double y)
 
GlgMatrixData GetMatrixData (GlgMatrixData matrix_data)
 
GlgObject GetNamedObject (String name)
 
GlgObject GetNamedPlot (String res_name, String plot_name)
 
Object GetNativeComponent (String res_name, GlgComponentQueryType type)
 
int GetNumParents ()
 
String GetObjectName ()
 
GlgObjectType GetObjectType ()
 
GlgObject GetParent ()
 
GlgObject GetParentViewport (bool heavy_weight)
 
Object GetResource (String resource_name)
 
GlgObject GetResourceObject (String resource_name)
 
int GetSize ()
 
String GetSResource (String resource_name)
 
String GetSTag (String tag_source)
 
int GetStringIndex (String search_string)
 
GlgObject GetTagObject (String search_string, bool by_name, bool unique_tags, bool single_tag, GlgTagType tag_type_mask)
 
bool GISConvert (String res_name, GlgCoordType coord_type, bool coord_to_lat_lon, GlgPoint in_point, GlgPoint out_point)
 
GlgObject GISCreateSelection (String res_name, String layers, double x, double y, GlmLabelSelectionMode select_labels)
 
GlgDouble GISGetElevation (String res_name, String layer_name, double lon, double lat)
 
bool HasResourceObject (String resource_name)
 
bool HasTag (String tag_name, GlgTagType tag_type_mask)
 
bool HasTagName (String tag_name)
 
bool HasTagSource (String tag_source)
 
int ImportStrings (String filename, GlgMediumType medium_type, bool verbose, Encoding encoding)
 
int ImportTags (String filename, GlgMediumType medium_type, bool verbose, Encoding encoding)
 
void InitialDraw ()
 
bool InstallGISRequest (String res_name)
 
void Inverse ()
 
bool IsAt (GlgPositionType position)
 
bool IsDrawable ()
 
Object Iterate ()
 
Object IterateBack ()
 
bool LayoutObjects (GlgObject sel_elem, GlgLayoutType type, double distance, bool use_box, bool process_subobjects)
 
bool MoveObject (GlgCoordType coord_type, GlgPoint start_point, GlgPoint end_point)
 
bool MoveObjectBy (GlgCoordType coord_type, double x, double y, double z)
 
bool MoveObjectBy (GlgCoordType coord_type, GlgPoint point)
 
bool NativePrint (Graphics graphics)
 
bool PositionObject (GlgCoordType coord_type, GlgAnchoringType anchoring, GlgPoint position)
 
bool PositionObject (GlgCoordType coord_type, GlgAnchoringType anchoring, double x, double y, double z)
 
GlgDouble PositionToValue (String res_name, double x, double y, bool outside_x, bool outside_y)
 
bool Print (String file, double x, double y, double width, double height, bool portrait, bool stretch)
 
GlgObject QueryTags (GlgTagType tag_type_mask)
 
void ReleaseObject (GlgObject suspend_info)
 
bool ReorderElement (int current_index, int new_index)
 
bool RequestGISMap (String res_name, double extent_x, double extent_y, double center_x, double center_y, double angle, GlgProjectionType projection, String layers, GlgGISRequestFlags flags, GlgGISRequestObserver request_observer)
 
bool RequestGISZoom (String res_name, char type, double value, GlgGISRequestObserver request_observer)
 
bool Reset ()
 
void ResetHierarchy ()
 
bool RotateObject (GlgCoordType coord_type, GlgPoint center, double x, double y, double z)
 
bool SaveObject (String filename)
 
bool SaveObject (String filename, Encoding encoding)
 
bool SaveObject (Object medium, GlgMediumType medium_type)
 
bool SaveObject (Object medium, GlgMediumType medium_type, Encoding encoding)
 
bool ScaleObject (GlgCoordType coord_type, GlgPoint center, double x, double y, double z)
 
bool ScreenToWorld (bool inside_vp, GlgPoint in_point, GlgPoint out_point)
 
Object SendMessage (String res_name, String message, Object param1, Object param2, Object param3, Object param4)
 
bool SetBrowserSelection (String res_name, String selection, String filter)
 
bool SetChartFilter (String res_name, GlgChartFilter filter, Object client_data)
 
bool SetDResource (String resource_name, double value)
 
bool SetDResource (String resource_name, GlgDouble value)
 
bool SetDResource (String resource_name, double value, bool if_changed)
 
bool SetDResource (String resource_name, GlgDouble value, bool if_changed)
 
bool SetDTag (String tag_source, double value, bool if_changed)
 
bool SetDTag (String tag_source, GlgDouble value, bool if_changed)
 
bool SetElement (int index, Object new_object)
 
void SetEnd ()
 
void SetFocus (String res_name)
 
bool SetGResource (String resource_name, double g_value1, double g_value2, double g_value3)
 
bool SetGResource (String resource_name, double g_value1, double g_value2, double g_value3, bool if_changed)
 
bool SetGResource (String resource_name, GlgPoint g_value)
 
bool SetGResource (String resource_name, GlgPoint g_value, bool if_changed)
 
bool SetGTag (String tag_source, double g_value1, double g_value2, double g_value3, bool if_changed)
 
bool SetGTag (String tag_source, GlgPoint g_value, bool if_changed)
 
void SetImageSize (int width, int height)
 
bool SetLabelFormatter (String res_name, GlgLabelFormatter formatter)
 
bool SetLinkedAxis (String res_name, GlgObject axis_object, String axis_res_name)
 
void SetMatrixData (GlgMatrixData matrix_data)
 
bool SetResource (String resource_name, Object value)
 
bool SetResourceFromObject (String resource_name, GlgObject o_value)
 
bool SetResourceFromObject (String resource_name, GlgObject o_value, bool if_changed)
 
bool SetResourceObject (String resource_name, GlgObject value)
 
GlgGISRequestObserver SetScrollbarObserver (String res_name, GlgGISRequestObserver request_observer)
 
bool SetSResource (String resource_name, String s_value)
 
bool SetSResource (String resource_name, String s_value, bool if_changed)
 
bool SetSResourceFromD (String resource_name, String format, double d_value)
 
bool SetSResourceFromD (String resource_name, String format, double d_value, bool if_changed)
 
bool SetSResourceFromD (String resource_name, String format, GlgDouble d_value)
 
bool SetSResourceFromD (String resource_name, String format, GlgDouble d_value, bool if_changed)
 
bool SetSTag (String tag_source, String s_value, bool if_changed)
 
bool SetSTagFromD (String tag_source, String format, double d_value, bool if_changed)
 
bool SetSTagFromDObj (String tag_source, String format, GlgDouble d_value, bool if_changed)
 
void SetStart ()
 
void SetupHierarchy ()
 
bool SetXform (GlgObject xform)
 
bool SetZoom (String res_name, char type, double value)
 
bool SetZoomMode (String res_name, GlgObject zoom_object, String zoom_object_name, GlgZoomMode zoom_mode)
 
GlgObject SuspendObject ()
 
bool TransformObject (GlgObject xform, GlgCoordType coord_type, GlgObject parent)
 
void TransformPoint (GlgPoint in_point, GlgPoint out_point)
 
void TraverseObjects (GlgObjectActionInterface action)
 
bool UnconstrainObject ()
 
bool UpdateGlg ()
 
bool UpdateImmediately ()
 
bool WorldToScreen (bool inside_vp, GlgPoint in_point, GlgPoint out_point)
 

Static Public Member Functions

static void AddDataSample (GlgObject plot, GlgDataSample datasample)
 
static void Bell ()
 
static void CatchGlobalErrors (bool catch_all, bool exit)
 
static String ConcatResNames (String resource_name1, String resource_name2)
 
static GlgObject ConvertViewportType (GlgObject obj)
 
static GlgDataSample CreateDataSample (bool extended)
 
static GlgDataSampleNode CreateDataSampleNode (GlgObject plot, bool extended)
 
static String CreateIndexedName (String template_name, int resource_index)
 
static GlgObject CreateSelection (GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp)
 
static GlgObject CreateSelection (MouseEventArgs mouse_event, int delta, GlgObject top_vp, GlgObject selected_vp)
 
static GlgObject CreateSelectionMessage (GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp, GlgSelectionEventType selection_type, int button)
 
static GlgObject CreateSelectionNames (GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp)
 
static GlgObject CreateSelectionNames (MouseEventArgs mouse_event, int delta, GlgObject top_vp, GlgObject selected_vp)
 
static bool EnableAttachmentPoints (bool state)
 
static bool EnableTimerXforms (bool state)
 
static void Error (GlgErrorType error_type, String message, Exception e)
 
static void FreeDataSampleNode (GlgObject plot, GlgDataSampleNode node)
 
static bool GetModifierState (GlgModifierType modifier)
 
static GlgObject GetSelectedPlot ()
 
static String GetStackTraceAsString ()
 
static String GetStackTraceAsString (Exception e)
 
static void GlmConvert (GlgProjectionType projection, bool stretch, GlgCoordType coord_type, bool coord_to_lat_lon, GlgPoint center, GlgPoint extent, double angle, double min_x, double max_x, double min_y, double max_y, GlgPoint in_point, GlgPoint out_point)
 
static bool IHCallCurrIH (GlgCallEvent call_event)
 
static bool IHCallCurrIHWithModifToken (GlgCallEvent call_event, int token)
 
static bool IHCallCurrIHWithToken (int token)
 
static void IHCallPrevIHWithModifToken (GlgCallEvent call_event, int token)
 
static void IHCallPrevIHWithToken (int token)
 
static void IHChangeBParameter (GlgObject ih, String name, bool value)
 
static void IHChangeDParameter (GlgObject ih, String name, double value)
 
static void IHChangeIParameter (GlgObject ih, String name, int value)
 
static void IHChangeNParameter (GlgObject ih, String name, Object value)
 
static void IHChangeOParameter (GlgObject ih, String name, GlgObject value)
 
static void IHChangeSParameter (GlgObject ih, String name, String value)
 
static bool IHGetBParameter (GlgObject ih, String name)
 
static GlgObject IHGetCurrIH ()
 
static double IHGetDParameter (GlgObject ih, String name)
 
static GlgIHHandlerInterface IHGetHandlerInterface (GlgObject ih)
 
static int IHGetIParameter (GlgObject ih, String name)
 
static Object IHGetNParameter (GlgObject ih, String name)
 
static GlgObject IHGetOParameter (GlgObject ih, String name)
 
static bool IHGetOptBParameter (GlgObject ih, String name, bool default_value)
 
static double IHGetOptDParameter (GlgObject ih, String name, double default_value)
 
static int IHGetOptIParameter (GlgObject ih, String name, int default_value)
 
static Object IHGetOptNParameter (GlgObject ih, String name, Object default_value)
 
static GlgObject IHGetOptOParameter (GlgObject ih, String name, GlgObject default_value)
 
static String IHGetOptSParameter (GlgObject ih, String name, String default_value)
 
static GlgIHHandlerInterface IHGetPrevHandlerInterface ()
 
static GlgObject IHGetPrevIH ()
 
static String IHGetSParameter (GlgObject ih, String name)
 
static int IHGetToken (GlgCallEvent call_event)
 
static GlgCallEventType IHGetType (GlgCallEvent call_event)
 
static void IHInit ()
 
static GlgObject IHInstall (GlgIHHandlerInterface interface_handler)
 
static void IHPassToken (GlgIHHandlerInterface handler_interface, int token, bool uninstall)
 
static void IHResetup (GlgObject ih)
 
static void IHSetBParameter (GlgObject ih, String name, bool value)
 
static void IHSetDParameter (GlgObject ih, String name, double value)
 
static void IHSetIParameter (GlgObject ih, String name, int value)
 
static void IHSetNParameter (GlgObject ih, String name, Object value)
 
static void IHSetOParameter (GlgObject ih, String name, GlgObject value)
 
static void IHSetOParameterFromD (GlgObject ih, String name, double value)
 
static void IHSetOParameterFromG (GlgObject ih, String name, GlgPoint point)
 
static void IHSetOParameterFromG (GlgObject ih, String name, double value1, double value2, double value3)
 
static void IHSetSParameter (GlgObject ih, String name, String value)
 
static void IHStart ()
 
static void IHTerminate ()
 
static void IHUninstall ()
 
static void IHUninstallWithEvent (GlgCallEvent call_event)
 
static void IHUninstallWithToken (int token)
 
static void Init ()
 
static bool IsDemo ()
 
static GlgObject LoadObject (String filename, GlgMediumType medium_type)
 
static GlgObject LoadObject (String filename, GlgMediumType medium_type, Encoding encoding)
 
static GlgObject LoadObject (Object medium, GlgMediumType medium_type)
 
static GlgObject LoadObject (Object medium, GlgMediumType medium_type, Encoding encoding)
 
static GlgObject LoadWidget (String filename, GlgMediumType medium_type)
 
static GlgObject LoadWidget (String filename, GlgMediumType medium_type, Encoding encoding)
 
static GlgObject LoadWidget (GlgObject glg_object)
 
static String Printf (String format, double value)
 
static String Printf (String format, int value)
 
static String Printf (String format, String value)
 
static double Rand (double low, double high)
 
static bool RootToScreenCoord (GlgObject viewport, GlgPoint root_coord)
 
static GlgAlarmHandler SetAlarmHandler (GlgAlarmHandler alarm_handler)
 
static bool SetAttachmentMoveMode (bool state)
 
static void SetBrowserObject (GlgObject browser, GlgObject glg_object)
 
static bool SetEditMode (GlgObject viewport, String res_name, bool edit_mode)
 
static GlgErrorHandler SetErrorHandler (GlgErrorHandler new_handler)
 
static GlgTooltipFormatter SetTooltipFormatter (GlgTooltipFormatter formatter)
 
static bool Sleep (long millisec)
 
static void Terminate ()
 
static void ThrowExceptionOnError (bool user_error, bool internal_error)
 
static bool TraceObject (GlgObject object, bool state, bool is_widget, GlgObject top_parent, GlgObjectActionInterface action)
 
static void TranslatePointOrigin (GlgObject from_viewport, GlgObject to_viewport, GlgPoint point)
 

Public Attributes

const int CHART_FILTER_VERSION = 2
 
const double COORD_MAPPING_ADJ = 0.5
 
const double EQUATOR_RADIUS = 6378136.0
 
const double GIS_OUTSIDE_VALUE = -2000.0
 
const int MAJOR_VERSION = 4
 
const int MINOR_VERSION = 2
 

Static Public Attributes

static GlgObject IH_CURR = null
 
static GlgObject IH_GLOBAL = null
 
static GlgObject IH_NEW = null
 

Member Function Documentation

◆ AbortGISRequest()

void AbortGISRequest ( String  res_name)

Intermediate API: Aborts the GIS request in progress, if any.

Parameters
res_nameIf is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used.

◆ AddAnnotation()

GlgObject AddAnnotation ( String  res_name,
GlgObject  annotation,
double  position_x,
double  position_y,
bool  add_box 
)

Adds an annotation to a chart.

Parameters
res_nameThe resource path of a child chart to add the annotation to, or null to add to this chart object.
annotationThe annotation object to add, or null to create a new annotation.
position_xThe annotation's X position.
position_yThe annotation's Y position.
add_boxIf set to true, a text box will be added to the annotation label if the new annnotation is created.
Returns
The added annotation object, or null on failure.

◆ AddAttachmentPoint()

GlgObject AddAttachmentPoint ( double  dx,
double  dy,
double  dz 
)

Extended API: Adds an attachment point to a reference object at the specified offset from its anchor point. The offset is in world coordinates for resizable reference objects and in screen corrdinates for fixed size references.

Parameters
dxX offset
dyY offset
dzZ offset
Returns
Created attachment point.

◆ AddDataSample()

static void AddDataSample ( GlgObject  plot,
GlgDataSample  datasample 
)
static

Deprecated, use AddDataSampleNode.

◆ AddDataSampleNode()

void AddDataSampleNode ( GlgDataSampleNode  node,
bool  quick_mode 
)

Intermediate API, ADVANCED: Adds a datasample node directly to this plot's data buffer. This method may be used to quickly add a large number of datasamples to prefill a chart. A node can be created using the CreateDataSampleNode method.

Parameters
nodeThe datasample node to be added.
quick_modeEnables a quick mode that bypasses chart autoscroll and autoscale logic for faster chart prefilling, and also disables all validity checks for increased performance of charts with large number of data samples.
To scroll the chart to the last added sample when done adding samples, set the chart XAxis' EndValue to the time stamp of the last sample.

It is recommended that the initial development is done with quick_mode=false, switching to quick_mode=true when all potential errors have been dealt with.

◆ AddListener()

void AddListener ( GlgCallbackType  type,
Object  callback 
)

Adds a listener for GLG events to a viewport or light viewport.

Light viewports support only input listeners, while viewport objects support all listener types.

Parameters
typeCallback type: SELECT_CB, INPUT_CB, HIERARCHY_CB, TRACE_CB or TRACE2_CB.
callbackListener of an appropriate type (GlgInputListener, GlgSelectListener, GlgHierarchyListener or GlgTraceListener).

◆ AddObjectAt()

bool AddObjectAt ( Object  obj,
int  index 
)

Extended API: Adds object to the container at the specified position.

Parameters
objObject to add
indexPosition index

◆ AddObjectToBottom()

bool AddObjectToBottom ( Object  obj)

Extended API: Adds object to the bottom of the container.

Parameters
objObject to add

◆ AddObjectToTop()

bool AddObjectToTop ( Object  obj)

Extended API: Adds object to the top of the container.

Parameters
objObject to add

◆ AddPlot()

GlgObject AddPlot ( String  res_name,
GlgObject  plot 
)

Adds a plot line to a chart.

Parameters
res_nameThe resource path of a child chart to add the plot to, or null to add to this chart object.
plotThe plot object. It null is specified, the method creates a plot with default parameters.
Returns
The added plot object.

◆ AddTimeLine()

GlgObject AddTimeLine ( String  res_name,
GlgObject  time_line,
double  time_stamp 
)

Adds a time line to a chart.

Parameters
res_nameThe resource path of a child chart to add the time line to, or null to add to this chart object.
time_lineThe time line object to add, or null to create a new time line.
time_stampThe time stamp to assign to the added time line.
Returns
The added time line object, or null on failure.

◆ Bell()

static void Bell ( )
static

Emits an audio beep.

◆ CatchGlobalErrors()

static void CatchGlobalErrors ( bool  catch_all,
bool  exit 
)
static

May be invoked on application start-up to log exceptions and display stack trace for application errors via the GLG error handler.

Parameters
catch_allWhen set to true, catches all exceptions, otherwise catches only thread exceptions.
exitSet to true to exit the application after displaying an error message.

◆ ChangeObject()

void ChangeObject ( String  res_name)

Forces a change event for an object.

◆ ClearDataBuffer()

bool ClearDataBuffer ( String  res_name)

Clears data buffer of a chart or a plot object.

For a chart object, the method clears data buffers of all its plots. For a plot object, the method clears the buffer of the plot.

Parameters
res_nameThe resource path of a child chart or a child's plot to clear the buffer of, or null to clear this object.
Returns
false if the buffer did not contain any data samples, or true otherwise.

◆ CloneObject()

GlgObject CloneObject ( GlgCloneType  clone_type)

Extended API: Creates and returns a copy of an object according to the clone_type.

The WEAK_CLONE, STRONG_CLONE, FULL_CLONE or CONSTRAINED_CLONE clone types differ in the way they handle objects' Global flag settings.

The SHALLOW_CLONE fills the returned group with the object IDs of the elements of the original group without copying the elements.

Returns
Object copy

◆ ConcatResNames()

static String ConcatResNames ( String  resource_name1,
String  resource_name2 
)
static

Concatenates two resource names, inserting the "/" separator if necessary.

Parameters
resource_name1Resource path
resource_name2Resource name
Returns
Created name

◆ ConstrainObject()

bool ConstrainObject ( GlgObject  to_attribute)

Intermediate API: Constrains the attribute object.

Parameters
to_attributeThe object to constrain to

◆ ContainsObject()

bool ContainsObject ( Object  obj)

Intermediate API: Checks if the object is contained in the container.

Parameters
objThe object to search for.
Returns
true if the object is contained in the container.

◆ ConvertViewportType()

static GlgObject ConvertViewportType ( GlgObject  obj)
static

Extended API: Converts viewport to a light viewport, or a light viewport to a viewport.

Parameters
objObject to be converted: viewport or light viewport.
Returns
Converted object on success, or null on error.

◆ CopyObject()

GlgObject CopyObject ( )

Extended API: Creates a copy of an object using FULL_CLONE copy method.

Returns
Object copy

◆ CreateAlarmList()

GlgObject CreateAlarmList ( )

Returns a list of all alarms defined in the object.

◆ CreateChartSelection()

GlgObject CreateChartSelection ( GlgObject  plot,
double  x,
double  y,
double  dx,
double  dy,
bool  screen_coord,
bool  include_invalid,
bool  x_priority 
)

Intermediate API, ADVANCED: Returns chart selection corresponding to the screen point.

Parameters
plotThe plot to create selection for, or null to query all plots of this chart.
xThe x/time coordinate.
yThe y coordinate.
dxThe x distance around the point. Datasamples with greater x distances from the point will not be considered.
dyThe y distance around the point. Datasamples with greater y distances from the point will not be considered. not be considered.
screen_coordIf set to true, the coordinates are supplied in screen pixels (with pixel0 center at 0.5). If set to false, x coordinates are suplied in the units of the chart's X axis (x or time value), and y coordinates are supplied in relative units with the [0,1] range corresponding to the min/max of each datagroup. Relative ranges are used to allow for uniform handling of multiple datagroups.
include_invalidIf set to true, invalid samples will be reported if their time stamp matches the x coordinate.
x_priorityIf set to true, a point with the smallest x deviation will be selected, otherwise a point with the smallest xy distance will be selected.
Returns
Selection object (a group containing properties of the selected datasample). Refer to the Chart Selection Message Object section of the GLG Programming Reference Manual for detailed description of the chart selection object.

◆ CreateDataSample()

static GlgDataSample CreateDataSample ( bool  extended)
static

Deprecated, use CreateDataSampleNode.

◆ CreateDataSampleNode()

static GlgDataSampleNode CreateDataSampleNode ( GlgObject  plot,
bool  extended 
)
static

Intermediate API, ADVANCED: Creates a chart datasample node to be used with the AddChartDataSampleNode method.

Returns a cached datasample node if available, otherwise creates a new one and returns it. A datasample node contains a GlgDataSample object that may be retrieved from the node using its GlgGetNodeDataSample method. The program can then set datasample fields prior to adding the datasample node to a chart plot.

Unused datasample nodes that were not added to a chart may be returned to a cache using the FreeDataSampleNode method.

Parameters
plotSpecifies a plot a datasample will be added to. If the plot doesn't use a cache, this parameter may be set to null.

If the plot uses cache, the method returns a datasample node from the cache, if available. If the plot cache is empty, or if the parameter is null, the datasample node will be taken from a global cache. If the global cache is empty, a newly created datasample node will be returned.
extendedIf set to true, the returned node will contain an extended datasample instead of a regular datasample.
Returns
A new datasample node.

◆ CreateImage()

Bitmap CreateImage ( String  res_name)

Creates an image of the viewport's graphics clipped to the viewport's visible area. For a light viewport, creates an image of its parent viewport.

Parameters
res_nameThe resource path of a child viewport to use, or null to create image for this viewport.
Returns
Created image

◆ CreateImageCustom()

Bitmap CreateImageCustom ( String  res_name,
System.Drawing.Rectangle  image_area,
int  gap 
)

Creates an unclipped image of the viewport's graphics within the given rectangular area in screen coordinates. If rectangle is null, the bounding box of the drawing (extended by the specified gap) is used to define the area whose image to generate. For a light viewport, creates an image of its parent viewport.

Parameters
res_nameThe resource path of a child viewport to use, or null to create image for this viewport.
image_areaDefines the extent of the image in the screen coordinates of the viewport; use null to include all of the viewport's graphical objects.
gapA gap in screen coordinates to add to the image extent when image_area is null.
Returns
Created image

◆ CreateIndexedName()

static String CreateIndexedName ( String  template_name,
int  resource_index 
)
static

Creates an indexed name by inserting a number into the first % character of the name template.

Returns
Created name

◆ CreateInversedMatrix()

GlgObject CreateInversedMatrix ( )

Intermediate API, ADVANCED: Creates and returns a matrix that is an inverse of this matrix.

Returns
Inversed matrix

◆ CreatePointArray()

GlgObject CreatePointArray ( GlgControlPointType  type)

Intermediate API, ADVANCED: Creates an array containing all of an object's control points.

Parameters
typeReserved for future use.
Returns
Array of the object's control points.

◆ CreateResourceList()

GlgObject CreateResourceList ( bool  list_named_res,
bool  list_def_attr,
bool  list_aliases 
)

Intermediate API, ADVANCED: Queries object's resources.

Creates an array of all resource names of this object on one level of hierarchy.

Parameters
list_named_resInclude named resources if true
list_def_attrInclude default attributes if true
list_aliasesInclude aliases if true
Returns
An array of resources containing named resource objects, or dummy named objects for defauilt resources and aliases.

◆ CreateSelection() [1/2]

static GlgObject CreateSelection ( GlgObject  top_vp,
GlgCube  rectangle,
GlgObject  selected_vp 
)
static

Intermediate API, ADVANCED: Creates an array of objects selected by a rectangle.

This is the same as CreateSelectionNames, but returns an array of selected objects on the bottom of the hierarchy instead of an array of object names.

Parameters
top_vpThe top viewport of the drawing
rectangleRectangle in screen coordinates of the selected_vp.
selected_vpThe selection viewport.
Returns
Array of objects selected by the rectangle.

◆ CreateSelection() [2/2]

static GlgObject CreateSelection ( MouseEventArgs  mouse_event,
int  delta,
GlgObject  top_vp,
GlgObject  selected_vp 
)
static

Intermediate API, ADVANCED: Creates object selection from a mouse event.

Parameters
mouse_eventMouse event
deltaMouse sensitivity in pixels
top_vpThe top viewport of the drawing
selected_vpThe viewport of the mouse event.
Returns
Array of objects selected by the mouse event.

◆ CreateSelectionMessage()

static GlgObject CreateSelectionMessage ( GlgObject  top_vp,
GlgCube  rectangle,
GlgObject  selected_vp,
GlgSelectionEventType  selection_type,
int  button 
)
static

ADVANCED: Alternative interface to custom events and commands. Finds the first object selected by the specified rectangle that contains a matching action attached and returns a custom event or command message for the found action. The message is the same as the one received in the Input callback on mouse click or mouse over event. The rectangle is used to select an object with an attached custom event or command action, instead of using the mouse event for selecting an object. The first selected custom event or command message is returned, or null if no objects with custom event or command actions were selected.

Parameters
top_vpThe top viewport of the drawing
rectangleRectangle in screen coordinates of the selected_vp.
selected_vpThe selection viewport in which rectangle coordinates are defined.
selection_typeCLICK_SELECTION, MOVE_SELECTION or TOOLTIP_SELECTION.
buttonselection button for click selection or 0.0
Returns
Custom event or command message object containing information about the selected object.

◆ CreateSelectionNames() [1/2]

static GlgObject CreateSelectionNames ( GlgObject  top_vp,
GlgCube  rectangle,
GlgObject  selected_vp 
)
static

ADVANCED: Creates an array of objects selected by a rectangle.

Parameters
top_vpThe top viewport of the drawing
rectangleRectangle in screen coordinates of the selected_vp.
selected_vpThe selection viewport in which rectangle coordinates are defined.
Returns
Array of names of all objects selected by the rectangle.

◆ CreateSelectionNames() [2/2]

static GlgObject CreateSelectionNames ( MouseEventArgs  mouse_event,
int  delta,
GlgObject  top_vp,
GlgObject  selected_vp 
)
static

ADVANCED: Creates object selection from a mouse event.

This method is useful for use with the TraceListener to implement custom selection logic based on the mouse events.

Parameters
mouse_eventMouse event
deltaMouse sensitivity in pixels
top_vpThe top viewport of the drawing
selected_vpThe viewport of the mouse event.
Returns
Array of names of all objects selected by the mouse event.

◆ CreateTagList()

GlgObject CreateTagList ( bool  unique_tag_sources)

Returns a list of all tags of the DATA_TAG type defined in the object

Parameters
unique_tag_sourcesIf set to true, only the first encountered tag of the highest priority will be reported for tags with the same tag source. Input tags are prioritized over output tags, and enabled tags over disabled tags.

◆ CreateTooltipString()

String CreateTooltipString ( double  x,
double  y,
double  dx,
double  dy,
String  format 
)

Intermediate API, ADVANCED: Returns tooltip string corresponding to the screen point.

Parameters
xThe x coordinate.
yThe y coordinate.
dxThe x distance around the point for chart tooltips. Datasamples with greater x distances from the point will not be considered.
dyThe y distance around the point for chart tooltips. Datasamples with greater y distances from the point will not be considered.
formatTooltip format. Pass null to use default tooltip, pass "<single_line>" to use default tooltip without line breaks.
Returns
Tooltip string containing information about the chart point or an axis position selected by the passed coordinates.

◆ DeleteAnnotation()

bool DeleteAnnotation ( String  res_name,
GlgObject  annotation,
double  position_x,
double  position_y 
)

Deletes an annotation from a chart.

Parameters
res_nameThe resource path of a child chart to delete the annotation from, or null to delete from this chart object.
annotationThe annotation object to delete, or null to delete an annotation with the specified position_x and position_y parameters.
position_xThe x position of the annotation to delete when the annotation parameter is null.
Returns
true if a time line was deleted.

◆ DeleteBottomObject()

bool DeleteBottomObject ( )

Extended API: Deletes last object from the container.

◆ DeleteObject()

bool DeleteObject ( Object  obj)

Extended API: Deletes the object from the container.

Parameters
objObject to delete.
Returns
true if the object was successfully deleted.

◆ DeleteObjectAt()

bool DeleteObjectAt ( int  index)

Extended API: Deletes the object of the container at the specified position.

Parameters
indexIndex of the object to delete.

◆ DeletePlot()

bool DeletePlot ( String  res_name,
GlgObject  plot 
)

Deletes a plot line from a chart.

Parameters
res_nameThe resource path of a child chart to delete the plot from, or null to delete from this chart object.
plotThe plot object.
Returns
true on success.

◆ DeleteTags()

bool DeleteTags ( GlgTagType  tag_type_mask)

Intermediate API: Delete all tags of a requested tag type.

Parameters
tag_type_maskSpecifies the tag type(s) to search. Several tag types can be combined by ORing them together.

◆ DeleteTimeLine()

bool DeleteTimeLine ( String  res_name,
GlgObject  time_line,
double  time_stamp 
)

Deletes a time line from a chart.

Parameters
res_nameThe resource path of a child chart to delete the time line from, or null to delete from this chart object.
time_lineThe time line object to delete, or null to delete a time line with the specified time stamp.
time_stampThe time stamp of the time line to delete when the time_line parameter is null.
Returns
true if a time line was deleted.

◆ DeleteTopObject()

bool DeleteTopObject ( )

Extended API: Deletes first object from the container.

◆ EnableAttachmentPoints()

static bool EnableAttachmentPoints ( bool  state)
static

Intermediate API: Enables use of attachment points for object layout.

If attachment points are disabled, layout methods do not consider attachment points in the control points layout mode. If attachment points are enabled, both control points and attachment points are used to determine an object's extent.

Parameters
stateThe new state of the attachment point use mode.
Returns
The previous state of the attachmenmt point use mode.

◆ EnableTimerXforms()

static bool EnableTimerXforms ( bool  state)
static

Enables or disables all timer transformations defined inside GLG drawings.

Parameters
stateThe new enabled state.
Returns
Previous value of the enabled state.

◆ Error()

static void Error ( GlgErrorType  error_type,
String  message,
Exception  e 
)
static

Invokes a currently installed error handler to generate an error message.

Parameters
error_typeSpecifies an error type: INTERNAL_ERROR, USER_ERROR, USER_ERROR_NO_STACK,WARNING, INFO (Java only), LOGGING (C# only).
messageAn error message
eAn optional exception that caused the error. If it is not null, it may used to extract additional information and an exact stack trace.

◆ ExportStrings()

int ExportStrings ( String  filename,
GlgMediumType  medium_type,
char  separator1,
char  separator2,
Encoding  encoding 
)

Exports all strings defined in the (drawing) object.

Parameters
filenameDefines the file to save exported strings.
medium_typeFILE or URL constant
separator1Defines the first separator character
separator2Defines the second separator character
encodingEncoding to use for encoding exported strings. If null, a default encoding is used.
Returns
Number of exported strings or -1 on error.

◆ ExportTags()

int ExportTags ( String  filename,
GlgMediumType  medium_type,
char  separator1,
char  separator2,
Encoding  encoding 
)

Exports all tags defined in the (drawing) object.

Parameters
filenameDefines the file to save exported tag names.
medium_typeFILE or URL constant
separator1Defines the first separator character
separator2Defines the second separator character
encodingEncoding to use for encoding exported strings. If null, a default encoding is used.
Returns
Number of exported tags or -1 if error.

◆ FindMatchingObjects()

bool FindMatchingObjects ( GlgFindMatchingObjectsData  data)

Intermediate API: Finds object's parents or children that match the specified search criteria.

Parameters
dataIs used to provides the search criteria and to return the results of the search. Refer to the description of GlgFindMatchingObjectsData for more information.

◆ FitObject()

bool FitObject ( GlgCoordType  coord_type,
GlgCube  box,
bool  keep_ratio 
)

Intermediate API: Fits an object to the specified box.

Parameters
coord_typeThe coordinate system in which the box is defined. May have the following values:

SCREEN_COORD to fit in screen pixels

PARENT_COORD to fit in the world coordinates of the object's parent

OBJECT_COORD to fit in the world coordinates of the object.

boxNew object bounding box.
keep_ratioIf set to true, the same scale factor is used for X, Y and Z scaling.
Returns
false if errors were encountered during the fitting process.

◆ Flush()

void Flush ( int  size)

Extended API: Sets container size to the requested size. If the new size is less than the container size, extra elements are removed. If the new size is larger, it adds elements by making a copy of the last element.

The container may be a group, a viewport, a polygon (as a container of points), a spline or a connector. The function can only be invoked if the container is not set up. If the container is set up (drawn), the function must be surrounded by the SuspendObject and ReleaseObject calls.

Parameters
sizeNew size.

◆ FreeDataSampleNode()

static void FreeDataSampleNode ( GlgObject  plot,
GlgDataSampleNode  node 
)
static

Intermediate API, ADVANCED: Releases a datasample node to a cache. The node and its datasample should not be accessed by the program after releasing the node.

Parameters
plotThe plot whose cache to release the datasample node to. If the plot doesn't use a cache, or if the parameter is null, the node will be released to a global cache.
nodeThe datasample node to be freed.

◆ GetAction()

GlgObject GetAction ( GlgActionType  action_type,
GlgTriggerType  trigger_type,
int  button,
GlgArmedStateType  armed_state,
GlgDoubleClickStateType  double_click_state,
String  action,
String  subaction,
bool  enabled_only 
)

Intermediate API: Returns the first found action with the matching parameters attached to the object.

Parameters
action_typeSpecifies an action type. If zero, actions of any type will be considered.
trigger_typeSpecifies a trigger type. If zero, actions with any trigger type will be considered.
buttonSpecifies a mouse button. If zero, actions that are activated by any mouse button will be considered.
armed_stateSpecifies settings of an action's ProcessArmed attribute, may be ANY_ARMED_STATE, ARMED_ONLY_STATE or UNARMED_ONLY_STATE.
double_click_stateSpecifies settings of an action's DoubleClick attribute, may be DOUBLE_CLICK_NONE, DOUBLE_CLICK_ONLY, SINGLE_CLICK_ONLY or SINGLE_AND_DOUBLE_CLICK.
actionSpecifies input action string for action objects with INPUT trigger. If null, action objects with any input action string will be considered.
subactionSpecifies input subaction string for action objects with INPUT trigger. If null, action objects with any input subaction string will be considered.
enabled_onlyIf set to true, only actions enabled by the settings of their Enabled attribute will be considered.
Returns
Matching action object.

◆ GetAlarmObject()

GlgObject GetAlarmObject ( String  alarm_label,
bool  single_alarm 
)

Intermediate API: Finds alarms based on their alarm label attribute.

Parameters
alarm_labelAlarm label, may contain '*' and '?' wildcards.
single_alarmIf set to true, the method returns the first found alarm object with the specified alarm label.
Returns
An alarm object if single_tag=true or an array of alarms otherwise.

◆ GetBox()

GlgCube GetBox ( )

Intermediate API, ADVANCED: Returns object's 3D bounding box in screen coordinates.

The box can be used for collision detection. The coordinates of the box are valid only after the object has been drawn.

Returns
Bounding box

◆ GetChartDataExtent()

GlgMinMax GetChartDataExtent ( String  res_name,
bool  time,
bool  visible_only 
)

Returns the extent of data accumulated in the chart in one direction.

Parameters
res_nameThe resource path of a child chart or a child's plot to query, or null to query this object.
timetrue to query the minimum and maximum timestamps (or X values the X/Y scatter plot), false to query the minimum and maximum Y values.
visible_onlyControls the extent of the query when querying minimum and maximum of Y values. If set to true, the minimum and maximum Y values of the visible data samples will be returned. If set to false, the minimum and maximum of all data samples will be returned.
Returns
GlgMinMax object or null if the chart plot's contain no data.

◆ GetDataExtent()

GlgMinMax GetDataExtent ( String  res_name,
bool  time 
)

Deprecated, use GetChartDataExtent.

◆ GetDataType()

GlgDataType GetDataType ( )

Returns a data type of a data or attribute object.

◆ GetDrawingMatrix()

GlgObject GetDrawingMatrix ( )

Intermediate API, ADVANCED: Returns the matrix object of the transformation used to draw the object on the screen.

Returns
Drawing matrix

◆ GetDResource()

GlgDouble GetDResource ( String  resource_name)

Returns value of a D (double) resource.

For efficiency, if the returned object is not null, it can be returned to the internal cache via the object's ReleaseToCache method.

Parameters
resource_nameResource name
Returns
Resource value

◆ GetDTag()

GlgDouble GetDTag ( String  tag_source)

Returns value of a D (double) tag.

For efficiency, if the returned object is not null, it can be returned to the internal cache via the object's ReleaseToCache method.

Parameters
tag_sourceTag source
Returns
Tag value

◆ GetElement()

Object GetElement ( int  index)

Returns container's element at the specified position.

Parameters
indexPosition Index
Returns
Container's element or null on failure.

◆ GetGISRequestInfo()

GlgGISRequestObserver GetGISRequestInfo ( String  res_name)

Intermediate API: Obtains information about a GIS object's current GIS request being processed.

Parameters
res_nameIf is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used.
Returns
The request observer of a GIS request in progress, or null if the GIS object has no pending GIS requests.

◆ GetGResource()

GlgPoint GetGResource ( String  resource_name)

Returns value of a G (geometrical or color) resource.

Parameters
resource_nameResource name
Returns
Resource value

◆ GetGTag()

GlgPoint GetGTag ( String  tag_source)

Returns value of a G (geometrical or color) tag.

Parameters
tag_sourceTag source
Returns
Tag value

◆ GetImageHeight()

int GetImageHeight ( )

Returns the height of the last image generated by the GLG Graphics Server for the top viewport (GLG Graphics Server only).

◆ GetImageWidth()

int GetImageWidth ( )

Returns the width of the last image generated by the GLG Graphics Server for the top viewport (GLG Graphics Server only).

◆ GetIndex()

int GetIndex ( Object  obj)

Intermediate API: Returns the index of the first occurrence of the object in the container.

Parameters
objThe object to search for.
Returns
Object's index or -1 if the object wasn't found in the container.

◆ GetLegendSelection()

GlgObject GetLegendSelection ( double  x,
double  y 
)

Intermediate API, ADVANCED: Returns a plot object corresponding to the legend item at the specified screen point.

Parameters
xThe x coordinate.
yThe y coordinate.
Returns
The plot corresponding to the selected legend item of this legend object.

◆ GetMatrixData()

GlgMatrixData GetMatrixData ( GlgMatrixData  matrix_data)

Intermediate API, ADVANCED: Returns values of the matrix's coefficients

Parameters
matrix_dataGlgMatrixData object to be filled with returned matrix data. If null is passed, a new GlgMatrixData object will be created.
Returns
GlgMatrixData object filled with the matrix data.

◆ GetModifierState()

static bool GetModifierState ( GlgModifierType  modifier)
static

Returns the current state of a modifier.

Parameters
modifierSpecifies the modifier to query.
Returns
The current modifier state.

◆ GetNamedObject()

GlgObject GetNamedObject ( String  name)

Intermediate API: Returns container's element with the specified name

Parameters
nameThe element's name
Returns
Container's element or null if named element wasn't found.

◆ GetNamedPlot()

GlgObject GetNamedPlot ( String  res_name,
String  plot_name 
)

Finds a chart's plot by name.

Parameters
res_nameThe resource path of a child chart to query, or null to query this chart object.
plot_nameThe plot name.
Returns
The plot object.

◆ GetNativeComponent()

Object GetNativeComponent ( String  res_name,
GlgComponentQueryType  type 
)

Returns the native component of the viewport.

Parameters
res_nameThe resource name of the child object, or null to use this object.
typeSpecifies the type of the component to return.
Returns
The native component object.

◆ GetNumParents()

int GetNumParents ( )

Intermediate API, ADVANCED: Returns the number of object's parents.

Used to determine the type of the return value of the GetParent method.

Returns
number object's parents

◆ GetObjectName()

String GetObjectName ( )

Returns an object's name.

◆ GetObjectType()

GlgObjectType GetObjectType ( )

Returns an object's type.

◆ GetParent()

GlgObject GetParent ( )

Intermediate API, ADVANCED: Returns object parent(s).

The type of the return value may be determined by using GetNumParents method.

Returns
objects' parent if the object has one parent. If object has more than one parent, returns an array of parents.

◆ GetParentViewport()

GlgObject GetParentViewport ( bool  heavy_weight)

Intermediate API: Returns object's parent viewport.

This method provides a convenient way to get the viewport or the light viewport the object is drawn in.

Parameters
heavy_weightThe type of a viewport to return. If set to true, the closest heavy-weight parent viewport will be returned; otherwise the closest parent viewport will be returned, either heavy or light-weight.
Returns
The object's parent viewport of the specified type.

◆ GetResource()

Object GetResource ( String  resource_name)

Intermediate API: Finds and returns a resource of an arbitrary type.

Parameters
resource_nameResource name
Returns
Resource object.

◆ GetResourceObject()

GlgObject GetResourceObject ( String  resource_name)

Intermediate API: Finds and returns a named resource or an attribute of the object.

Parameters
resource_nameResource name
Returns
Resource or attribute object.

◆ GetSelectedPlot()

static GlgObject GetSelectedPlot ( )
static

Returns a plot corresponding to the last selected legend item, or null if no item was selected.

When the legend is selected by the mouse move or mouse click event, it determines the legend item the mouse points at, and stores the item's plot object.

◆ GetSize()

int GetSize ( )

Returns container's size.

◆ GetSResource()

String GetSResource ( String  resource_name)

Returns value of an S (string) resource.

Parameters
resource_nameResource name
Returns
Resource value

◆ GetStackTraceAsString() [1/2]

static String GetStackTraceAsString ( )
static

Returns the current stack trace as a String.

◆ GetStackTraceAsString() [2/2]

static String GetStackTraceAsString ( Exception  e)
static

Returns the stack trace of the specified exception as a String.

◆ GetSTag()

String GetSTag ( String  tag_source)

Returns value of an S (string) tag. All tags with the specified tag_source will be set to the supplied value.

Parameters
tag_sourceTag source
Returns
Tag value

◆ GetStringIndex()

int GetStringIndex ( String  search_string)

Intermediate API: Returns the index of the first occurrence of the string in a string container.

Parameters
search_stringThe string to search for.
Returns
Object's index or -1 if the object wasn't found in the container.

◆ GetTagObject()

GlgObject GetTagObject ( String  search_string,
bool  by_name,
bool  unique_tags,
bool  single_tag,
GlgTagType  tag_type_mask 
)

Intermediate API: Finds tags based on their TagName or TagSource attributes.

Parameters
search_stringTag name or source, may contain '*' and '?' wildcards.
by_nameSearch type: search for tag name if true, search for tag source (or category for export tags) if false.
unique_tagsIf set to true, only one tag instance of the highest priority will be listed when several tags with the same tag name or tag source exist in the drawing. Input tags are prioritized over output tags, and enabled tags over disabled tags. If set to false, all tags matching the search criteria will be listed. The parameter is ignored in the single tag mode and when searching for export tags.
single_tagIf set to true, the method returns the first found tag object of the highest priority matching the search criteria. Input tags are prioritized over output tags, and enabled tags over disabled tags.
tag_type_maskSpecifies the types of tags to return, is formed by ORing the tag type constants.
Returns
A tag object if single_tag=true or an array of tags otherwise.

◆ GISConvert()

bool GISConvert ( String  res_name,
GlgCoordType  coord_type,
bool  coord_to_lat_lon,
GlgPoint  in_point,
GlgPoint  out_point 
)

Performs coordinate conversion between the GIS to GLG coordinate systems using the current settings of the GIS object.

Parameters
res_nameThe resource path of a child GIS object to query, or null to query this GIS object.
coord_typeCoordinate system to use, SCREEN_COORD or OBJECT_COORD. For OBJECT_COORD, the world coordinate system of the GIS object is used.
coord_to_lat_lonConversion type: x/y to lon/lat if true, lon/lat to x/y if false.
in_pointInput values (x/y in the selected coordinate system or lon/lat).
out_pointConverted output values (x/y in the selected coordinate system or lon/lat).
Returns
true if coordinate conversion succeeded with no errors.

◆ GISCreateSelection()

GlgObject GISCreateSelection ( String  res_name,
String  layers,
double  x,
double  y,
GlmLabelSelectionMode  select_labels 
)

Queries information about GIS features located at the specified map position.

Parameters
res_nameThe resource path of a child GIS object to query or null to query this GIS object.
layersList of vector layers query
xThe X coordinate (in screen pixels) in the GIS object's parent viewport.
yThe Y coordinate (in screen pixels) in the GIS object's parent viewport.
select_labelsControls text label selection. May have the following values:

GIS_LBL_SEL_NONE disables label selection

GIS_LBL_SEL_IN_TILE enables selection

GIS_LBL_SEL_MAX_PRECISION enables selection with maximum precision

Returns
A message object containing selection data.

Refer to the GlmGetSelection section of the GLG Map Server Reference Manual for information on the structure of the returned message object.

◆ GISGetElevation()

GlgDouble GISGetElevation ( String  res_name,
String  layer_name,
double  lon,
double  lat 
)

Queries map server elevation data.

For efficiency, if the returned object is not null, it can be returned to the internal cache via the object's ReleaseToCache method.

Parameters
res_nameThe resource path of a child GIS object to query or null to query this GIS object.
layer_nameName of the elevation layer to query
latThe Lat coordinate of the point
lonThe Lon coordinate of the point
Returns
elevation value if elevation data for the requested lat/lon location exist, or null otherwise.

◆ GlmConvert()

static void GlmConvert ( GlgProjectionType  projection,
bool  stretch,
GlgCoordType  coord_type,
bool  coord_to_lat_lon,
GlgPoint  center,
GlgPoint  extent,
double  angle,
double  min_x,
double  max_x,
double  min_y,
double  max_y,
GlgPoint  in_point,
GlgPoint  out_point 
)
static

Low-level interface to the map server; performs GIS coordinate conversion.

Parameters
projectionRECTANGULAR or ORTHOGRAPHIS
stretchIf false, the map extent is adjusted to preserve X/Y ratio (for SCREEN_COORD coordinate type only).
coord_typeCoordinate system to use.
coord_to_lat_lonConversion type: x/y to lon/lat if true, lon/lat to x/y if false.
centerCenter of the map in lat/lon.
extentExtent of the map in lat/lon (rectangular projection) or in meters for orthogonal progection.
angleAngle of the map rotation.
min_xThe extent of the GIS object in the selected coordinate system.
min_yThe extent of the GIS object in the selected coordinate system.
max_xThe extent of the GIS object in the selected coordinate system.
max_yThe extent of the GIS object in the selected coordinate system.
in_pointInput values (x/y in the selected coordinate system or lon/lat).
out_pointConverted output values (x/y in the selected coordinate system or lon/lat).

◆ HasResourceObject()

bool HasResourceObject ( String  resource_name)

Checks for the existence of the resource object.

Parameters
resource_nameResource name
Returns
true on success

◆ HasTag()

bool HasTag ( String  tag_name,
GlgTagType  tag_type_mask 
)

Intermediate API: Checks for an existence of a tag object with the specified tag name and tag type.

Parameters
tag_nameTag name
tag_type_maskSpecifies the types of tags to search, is formed by ORing the tag type constants.
Returns
true on success

◆ HasTagName()

bool HasTagName ( String  tag_name)

Checks for an existence of a data tag object with the given tag name.

Parameters
tag_nameTag name
Returns
true on success

◆ HasTagSource()

bool HasTagSource ( String  tag_source)

Checks for an existence of a data tag object with the given tag source.

Parameters
tag_sourceTag source
Returns
true on success

◆ IHCallCurrIH()

static bool IHCallCurrIH ( GlgCallEvent  call_event)
static

Intermediate API: Passes the event to the current handler.

Parameters
call_eventThe event to pass.
Returns
true if the handler was uninstalled as a result of processing the event, false otherwise.

◆ IHCallCurrIHWithModifToken()

static bool IHCallCurrIHWithModifToken ( GlgCallEvent  call_event,
int  token 
)
static

Intermediate API: Same as IHCallCurrIHWithToken, but it reuses the existing event by setting its token instead of creating a new call event to pass the token to the handler.

Parameters
call_eventThe event to use.
tokenThe token to pass.
Returns
true if the handler was uninstalled as a result of processing the token, false otherwise.

◆ IHCallCurrIHWithToken()

static bool IHCallCurrIHWithToken ( int  token)
static

Intermediate API: Passes the token to the current handler.

The method creates a call event object used to pass the token to the handler, and destroys the event object when done.

Parameters
tokenThe token to pass.
Returns
true if the handler was uninstalled as a result of processing the token, false otherwise.

◆ IHCallPrevIHWithModifToken()

static void IHCallPrevIHWithModifToken ( GlgCallEvent  call_event,
int  token 
)
static

Intermediate API: Same as IHCallPrevIHWithToken, but reuses the event object for efficiency, the same way as IHCallCurrIHWithModifToken.

Parameters
call_eventThe event to use.
tokenThe token to pass.

◆ IHCallPrevIHWithToken()

static void IHCallPrevIHWithToken ( int  token)
static

Intermediate API: Passes the token to the parent handler of the currently active handler. The parent handler is the handler preceding the current handler on the stack.

Note: when the parent handler is invoked, the current handler is not the parent handler, but the handler that invoked it. Therefore, the parent handler cannot uninstall itself by simply calling IHUninstall.

Parameters
tokenThe token to pass.

◆ IHChangeBParameter()

static void IHChangeBParameter ( GlgObject  ih,
String  name,
bool  value 
)
static

Intermediate API: Same as IHSetBParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.

◆ IHChangeDParameter()

static void IHChangeDParameter ( GlgObject  ih,
String  name,
double  value 
)
static

Intermediate API: Same as IHSetDParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.

◆ IHChangeIParameter()

static void IHChangeIParameter ( GlgObject  ih,
String  name,
int  value 
)
static

Intermediate API: Same as IHSetIParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.

◆ IHChangeNParameter()

static void IHChangeNParameter ( GlgObject  ih,
String  name,
Object  value 
)
static

Intermediate API: Same as IHSetNParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.

◆ IHChangeOParameter()

static void IHChangeOParameter ( GlgObject  ih,
String  name,
GlgObject  value 
)
static

Intermediate API: Same as IHSetOParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.

◆ IHChangeSParameter()

static void IHChangeSParameter ( GlgObject  ih,
String  name,
String  value 
)
static

Intermediate API: Same as IHSetSParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.

◆ IHGetBParameter()

static bool IHGetBParameter ( GlgObject  ih,
String  name 
)
static

Intermediate API: Returns a boolean value stored in a named parameter.

A GLG error is generated if a requested named parameter does not exist, or if its value cannot be converted to the requested type.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.

◆ IHGetCurrIH()

static GlgObject IHGetCurrIH ( )
static

Intermediate API: Returns the ID of the currently active interaction handler.

Returns
ID of the current interaction handler.

◆ IHGetDParameter()

static double IHGetDParameter ( GlgObject  ih,
String  name 
)
static

Intermediate API: Returns a double value stored in a named parameter.

A GLG error is generated if a requested named parameter does not exist, or if its value cannot be converted to the requested type.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.

◆ IHGetHandlerInterface()

static GlgIHHandlerInterface IHGetHandlerInterface ( GlgObject  ih)
static

Intermediate API: Returns the instance of the handler interface used to implement the handler.

Parameters
ihThe handler to query. IH_CURR can be used as the ih parameter to access the curent handler.
Returns
The handler's interface instance.

◆ IHGetIParameter()

static int IHGetIParameter ( GlgObject  ih,
String  name 
)
static

Intermediate API: Returns an integer value stored in a named parameter.

A GLG error is generated if a requested named parameter does not exist, or if its value cannot be converted to the requested type.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.

◆ IHGetNParameter()

static Object IHGetNParameter ( GlgObject  ih,
String  name 
)
static

Intermediate API: Returns a native object stored in a named parameter.

A GLG error is generated if a requested named parameter does not exist, or if its value cannot be converted to the requested type.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.

◆ IHGetOParameter()

static GlgObject IHGetOParameter ( GlgObject  ih,
String  name 
)
static

Intermediate API: Returns a GLG object stored in a named parameter.

A GLG error is generated if a requested named parameter does not exist, or if its value cannot be converted to the requested type.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.

◆ IHGetOptBParameter()

static bool IHGetOptBParameter ( GlgObject  ih,
String  name,
bool  default_value 
)
static

Intermediate API: Same as IHGetBParameter, except that the parameter is optional.

If a parameter with the requested name does not exist, a default value provided by the default_value argument is returned.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.
default_valueThe default value.

◆ IHGetOptDParameter()

static double IHGetOptDParameter ( GlgObject  ih,
String  name,
double  default_value 
)
static

Intermediate API: Same as IHGetDParameter, except that the parameter is optional.

If a parameter with the requested name does not exist, a default value provided by the default_value argument is returned.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.
default_valueThe default value.

◆ IHGetOptIParameter()

static int IHGetOptIParameter ( GlgObject  ih,
String  name,
int  default_value 
)
static

Intermediate API: Same as IHGetIParameter, except that the parameter is optional.

If a parameter with the requested name does not exist, a default value provided by the default_value argument is returned.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.
default_valueThe default value.

◆ IHGetOptNParameter()

static Object IHGetOptNParameter ( GlgObject  ih,
String  name,
Object  default_value 
)
static

Intermediate API: Same as IHGetNParameter, except that the parameter is optional.

If a parameter with the requested name does not exist, a default value provided by the default_value argument is returned.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.
default_valueThe default value.

◆ IHGetOptOParameter()

static GlgObject IHGetOptOParameter ( GlgObject  ih,
String  name,
GlgObject  default_value 
)
static

Intermediate API: Same as IHGetOParameter, except that the parameter is optional.

If a parameter with the requested name does not exist, a default value provided by the default_value argument is returned.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.
default_valueThe default value.

◆ IHGetOptSParameter()

static String IHGetOptSParameter ( GlgObject  ih,
String  name,
String  default_value 
)
static

Intermediate API: Same as IHGetSParameter, except that the parameter is optional.

If a parameter with the requested name does not exist, a default value provided by the default_value argument is returned.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.
default_valueThe default value.

◆ IHGetPrevHandlerInterface()

static GlgIHHandlerInterface IHGetPrevHandlerInterface ( )
static

Intermediate API: Returns the handler interface used to implement the parent handler of the currently active handler. The parent handler is the handler preceding the current handler on the stack.

Returns
The parent handler's interface instance.

◆ IHGetPrevIH()

static GlgObject IHGetPrevIH ( )
static

Intermediate API: Returns the ID of the parent handler of the currently active interface handler. The parent handler is the handler preceding the current handler on the stack of the installed handlers.

Returns
ID of the parent interaction handler.

◆ IHGetSParameter()

static String IHGetSParameter ( GlgObject  ih,
String  name 
)
static

Intermediate API: Returns a string value stored in a named parameter.

A GLG error is generated if a requested named parameter does not exist, or if its value cannot be converted to the requested type.

Parameters
ihThe handler to query the parameter of. IH_CURR can be used to specify the currently active handler, and IH_GLOBAL can be used to query global parameters.
nameParameter name.

◆ IHGetToken()

static int IHGetToken ( GlgCallEvent  call_event)
static

Intermediate API: Returns a token associated with the MESSAGE_EVENT event.

Tokens are application-defined integer values used to uniquely identify each user interaction event.

Parameters
call_eventThe event to query.
Returns
Token associated with the event.

◆ IHGetType()

static GlgCallEventType IHGetType ( GlgCallEvent  call_event)
static

Intermediate API: Returns event's type.

Parameters
call_eventThe event to query.
Returns
Event type, one of HI_SETUP_EVENT, HI_RESETUP_EVENT, HI_CLEANUP_EVENT or MESSAGE_EVENT

◆ IHInit()

static void IHInit ( )
static

Intermediate API: Initializes installable handler utilities. Must be invoked after Init, but before installable handler methods.

◆ IHInstall()

static GlgObject IHInstall ( GlgIHHandlerInterface  interface_handler)
static

Intermediate API: Creates a handler with the specified handler interface and installs the handler, adding it to a stack of handlers.

The stack of handlers is used to keep track of nested handlers; the last handler pushed onto the stack becomes the active handler, referred to as the current handler.

Parameters
interface_handlerA user-defined interface handler.
Returns
ID of the created handler.

◆ IHPassToken()

static void IHPassToken ( GlgIHHandlerInterface  handler_interface,
int  token,
bool  uninstall 
)
static

Intermediate API: Installs the specified handler and invokes its entry point with the specified token.

This method is used to implement pass-though handlers for processing global accelerators, stateless options, as well as managing floating stay-open dialogs, such as the Edit Properties dialog shown on the GlgDiagram demo.

Parameters
handler_interfaceThe handler to pass the token to.
tokenThe token to pass.
uninstallIf true, the handler is uninstalled after processing the token, unless the handler has already uninstalled itself. If the handler installs other handlers while processing the token, the last installed handler (the current handler) will be uninstalled instead of the handler the token is passed to.

◆ IHResetup()

static void IHResetup ( GlgObject  ih)
static

Intermediate API: Invokes the handlers entry point with the HI_RESETUP_EVENT event. This can be used to reinitialize the handler by sharing some of the HI_SETUP_EVENT code.

Parameters
ihThe handler to pass the event to.

◆ IHSetBParameter()

static void IHSetBParameter ( GlgObject  ih,
String  name,
bool  value 
)
static

Intermediate API: Creates a named boolean parameter.

Parameters
ihThe handler to add the parameter to. IH_CURR can be used to specify the currently active handler, IH_NEW to specify the just installed handler, and IH_GLOBAL to add global parameters.
nameParameter name. If a parameter with this name already exists, it will be replaced, which can change the type of the parameter associated with this name.
valueParameter value.

◆ IHSetDParameter()

static void IHSetDParameter ( GlgObject  ih,
String  name,
double  value 
)
static

Intermediate API: Creates a named double parameter.

Parameters
ihThe handler to add the parameter to. IH_CURR can be used to specify the currently active handler, IH_NEW to specify the just installed handler, and IH_GLOBAL to add global parameters.
nameParameter name. If a parameter with this name already exists, it will be replaced, which can change the type of the parameter associated with this name.
valueParameter value.

◆ IHSetIParameter()

static void IHSetIParameter ( GlgObject  ih,
String  name,
int  value 
)
static

Intermediate API: Creates a named integer parameter.

Parameters
ihThe handler to add the parameter to. IH_CURR can be used to specify the currently active handler, IH_NEW to specify the just installed handler, and IH_GLOBAL to add global parameters.
nameParameter name. If a parameter with this name already exists, it will be replaced, which can change the type of the parameter associated with this name.
valueParameter value.

◆ IHSetNParameter()

static void IHSetNParameter ( GlgObject  ih,
String  name,
Object  value 
)
static

Intermediate API: Creates a named parameter that stores a native object.

Parameters
ihThe handler to add the parameter to. IH_CURR can be used to specify the currently active handler, IH_NEW to specify the just installed handler, and IH_GLOBAL to add global parameters.
nameParameter name. If a parameter with this name already exists, it will be replaced, which can change the type of the parameter associated with this name.
valueParameter value.

◆ IHSetOParameter()

static void IHSetOParameter ( GlgObject  ih,
String  name,
GlgObject  value 
)
static

Intermediate API: Creates a named parameter that stores GlgObject.

Parameters
ihThe handler to add the parameter to. IH_CURR can be used to specify the currently active handler, IH_NEW to specify the just installed handler, and IH_GLOBAL to add global parameters.
nameParameter name. If a parameter with this name already exists, it will be replaced, which can change the type of the parameter associated with this name.
valueParameter value.

◆ IHSetOParameterFromD()

static void IHSetOParameterFromD ( GlgObject  ih,
String  name,
double  value 
)
static

Intermediate API: Creates a GlgDataValue object parameter containing a double value.

Parameters
ihThe handler to add the parameter to. IH_CURR can be used to specify the currently active handler, IH_NEW to specify the just installed handler, and IH_GLOBAL to add global parameters.
nameParameter name. If a parameter with this name already exists, it will be replaced, which can change the type of the parameter associated with this name.
valueParameter value.

◆ IHSetOParameterFromG() [1/2]

static void IHSetOParameterFromG ( GlgObject  ih,
String  name,
GlgPoint  point 
)
static

Intermediate API: Creates a GlgDataValue object parameter containing geometrical (XYZ) or color (RGB) data.

Parameters
ihThe handler to add the parameter to. IH_CURR can be used to specify the currently active handler, IH_NEW to specify the just installed handler, and IH_GLOBAL to add global parameters.
nameParameter name. If a parameter with this name already exists, it will be replaced, which can change the type of the parameter associated with this name.
pointParameter value.

◆ IHSetOParameterFromG() [2/2]

static void IHSetOParameterFromG ( GlgObject  ih,
String  name,
double  value1,
double  value2,
double  value3 
)
static

Intermediate API: Creates a GlgDataValue object parameter containing geometrical (XYZ) or color (RGB) data.

Parameters
ihThe handler to add the the parameter to. IH_CURR can be used to specify the currently active handler, IH_NEW to specify the just installed handler, and IH_GLOBAL to add global parameters.
nameParameter name. If a parameter with this name already exists, it will be replaced, which can change the type of the parameter associated with this name.
value1X value.
value2Y value.
value3Z value.

◆ IHSetSParameter()

static void IHSetSParameter ( GlgObject  ih,
String  name,
String  value 
)
static

Intermediate API: Creates a named string parameter.

Parameters
ihThe handler to add the parameter to. IH_CURR can be used to specify the currently active handler, IH_NEW to specify the just installed handler, and IH_GLOBAL to add global parameters.
nameParameter name. If a parameter with this name already exists, it will be replaced, which can change the type of the parameter associated with this name.
valueParameter value.

◆ IHStart()

static void IHStart ( )
static

Intermediate API: Invokes the handler's entry point with the HI_SETUP_EVENT event, which allows the handler to perform any desired initialization, such as displaying a dialog associated with the handler, if any.

Refer to the GLG Installable Interface Handlers section of the C/C++ Extended API in the GLG Programming Reference Manual for a detailed description of general topics of the handler's usage in an editor-style application, including examples of passing parameters to a handler.

The Java, C# and JavaScript versions of the GlgDiagram demo provide source code examples of using the handlers.

◆ IHTerminate()

static void IHTerminate ( )
static

Intermediate API: Terminates installable handler utilities. All currently installed handlers must be uninstalled before invoking this method.

◆ IHUninstall()

static void IHUninstall ( )
static

Intermediate API: Uninstalls the current handler (the last handler on the stack).

The handlers entry point is invoked with the GLG_CLEANUP_EVENT event prior to uninstalling to let the handler perform any required cleanup. After the handler is uninstalled, a previous handler in the stack (if any) becomes the active current handler. Uninstalling a handler deletes its stored data and invalidates its ID; the ID should not be used after the handler has been uninstalled.

◆ IHUninstallWithEvent()

static void IHUninstallWithEvent ( GlgCallEvent  call_event)
static

Intermediate API: Uninstalls the handler using IHUninstall and passes the event to the previous handler (which becomes current after IHUninstall is invoked).

Parameters
call_eventThe event to be passed.

◆ IHUninstallWithToken()

static void IHUninstallWithToken ( int  token)
static

Intermediate API: Uninstalls the handler using IHUninstall and invokes the previous handler (which becomes current after IHUninstall is invoked) with the specified token.

Parameters
tokenThe token to pass.

◆ ImportStrings()

int ImportStrings ( String  filename,
GlgMediumType  medium_type,
bool  verbose,
Encoding  encoding 
)

Imports strings from a file or URL and converts matching strings of the (drawing) object.

Parameters
filenameDefines a drawing file or URL.
medium_typeFILE or URL constant
verboseIf set to true, generates a warning for each string in the drawing that was not converted.
encodingEncoding to use for decoding imported strings. If null, a default encoding is used.
Returns
Number of converted strings or -1 on error.

◆ ImportTags()

int ImportTags ( String  filename,
GlgMediumType  medium_type,
bool  verbose,
Encoding  encoding 
)

Imports tag names from a file or URL and converts matching tags of the (drawing) object.

Parameters
filenameDefines a drawing file or URL.
medium_typeFILE or URL constant
verboseIf set to true, generates a warning for each tag in the drawing that was not converted.
encodingEncoding to use for decoding imported tag names. If null, a default encoding is used.
Returns
Number of converted tags or -1 if error.

◆ Init()

static void Init ( )
static

Initializes GLG Toolkit.

◆ InitialDraw()

void InitialDraw ( )

Draws a viewport object for the first time.

◆ InstallGISRequest()

bool InstallGISRequest ( String  res_name)

Intermediate API: Installs the GIS object's GIS request. This method may be invoked only from inside of a request observer's RequestUpdate method invoked with the GIS_REQUEST_READY status.

Parameters
res_nameIf is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used.
Returns
true on success, false on failure.

◆ Inverse()

void Inverse ( )

Intermediate API: Reverses the order of objects in a container.

◆ IsAt()

bool IsAt ( GlgPositionType  position)

Intermediate API: May be used to query if traversing reached the start or the end of a container.

Parameters
positionThe query type. May have the following values:

FIRST returns true if reversed traversing reaches the first container element.

LAST returns true if traversing reaches the last container element.

◆ IsDemo()

static bool IsDemo ( )
static

Returns true if a Community Edition version of the library is used.

◆ IsDrawable()

bool IsDrawable ( )

Intermediate API: Returns true if the object is drawable.

Drawable objects can be placed directly in a drawing area, have control points and a bounding box, have the visisibilty attribute and can contain custom properties, actions and aliases. For a chart object, the chart itself is drawable, but its plots are not.

◆ Iterate()

Object Iterate ( )

Intermediate API: Returns the next element of container.

◆ IterateBack()

Object IterateBack ( )

Intermediate API: Returns the previous element of container.

◆ LayoutObjects()

bool LayoutObjects ( GlgObject  sel_elem,
GlgLayoutType  type,
double  distance,
bool  use_box,
bool  process_subobjects 
)

Intermediate API: Performs layout action on an object or a group of objects.

Parameters
sel_elemAnchor element, may be set to null if not used.
typeType of the layout action. May have the following values:

ALIGN_LEFT - align the left edge of elements within the group with the left edge of the achor element

ALIGN_RIGHT - align the right edge of elements within the group with the right edge of the achor element

ALIGN_HCENTER - align the center of elements within the group with the center of the achor element horizontally

ALIGN_TOP - align the top edge of elements within the group with the top edge of the achor element

ALIGN_BOTTOM - align the bottom edge of elements within the group with the bottom edge of the achor element

ALIGN_VCENTER - align the center of elements within the group with the center of the achor element vertically

SET_EQUAL_VSIZE - set the height of elements within the group to the height of the anchor

SET_EQUAL_HSIZE - set the width of elements within the group to the width of the anchor

SET_EQUAL_SIZE - set the width and height of elements within the group to the width and height of the anchor

SET_EQUAL_VDISTANCE - equally distributes the group's elements in vertical direction as measured by the distance between their centers

SET_EQUAL_HDISTANCE - equally distributes the group's elements in horizontal direction as measured by the distance between their centers

SET_EQUAL_VSPACE - equally distibutes space gaps between group's elements in vertical direction

SET_EQUAL_HSPACE - equally distibutes space gaps between group's elements in horizontal direction

SET_VSIZE - If anchor is null, sets the object's height; if anchor in not null, sets the height of all elements within the group. The height is defined by the value of the distance parameter.

SET_HSIZE - If anchor is null, sets the object's width; if anchor in not null, sets the width of all elements within the group. The width is defined by the value of the distance parameter.

SET_VDISTANCE - set vertical distance between centers of the group's elements to a value defined by the distance parameter

SET_HDISTANCE - set horizontal distance between centers of the group's elements to a value defined by the distance parameter

SET_VSPACE - sets space gaps between group's elements in vertical direction to a value defined by the distance parameter

SET_HSPACE - sets space gaps between group's elements in horizontal direction to a value defined by the distance parameter

distanceThe distance in screen coordinates for positioning objects, depending on the layout action.
use_boxUse object's control points if false, otherwise use object's bounding box.
process_subobjectsIf true, apply SET_VSIZE and SET_HSIZE actions to the subobjects of the group, otherwise apply the actions to the group itself.
Returns
false if errors were encountered during the layout action.

◆ LoadObject() [1/4]

static GlgObject LoadObject ( String  filename,
GlgMediumType  medium_type 
)
static

Loads object from a file or URL using default charset.

Parameters
filenameDefines a drawing file or URL.
medium_typeFILE or URL constant
Returns
Loaded object or null if load fails.

◆ LoadObject() [2/4]

static GlgObject LoadObject ( String  filename,
GlgMediumType  medium_type,
Encoding  encoding 
)
static

Loads object from a file or URL using the specified charset.

Parameters
filenameDefines a drawing file or URL.
medium_typeFILE or URL constant
encodingEncoding for string decoding.
Returns
Loaded object or null if load fails.

◆ LoadObject() [3/4]

static GlgObject LoadObject ( Object  medium,
GlgMediumType  medium_type 
)
static

Loads an object from a stream using default charset.

Parameters
mediumThe source to load the object from (Stream)
medium_typeSource object type (STREAM)
Returns
Loaded object or null if load fails.

◆ LoadObject() [4/4]

static GlgObject LoadObject ( Object  medium,
GlgMediumType  medium_type,
Encoding  encoding 
)
static

Loads an object from a stream using the specified charset.

Parameters
mediumThe source to load the object from (Stream)
medium_typeSource object type (STREAM)
encodingEncoding for string decoding.
Returns
Loaded object or null if load fails.

◆ LoadWidget() [1/3]

static GlgObject LoadWidget ( String  filename,
GlgMediumType  medium_type 
)
static

Loads a viewport named "$Widget" from a file or URL using default charset.

Parameters
filenameDefines a drawing file or URL.
medium_typeFILE or URL constant
Returns
Loaded viewport or null if load fails.

◆ LoadWidget() [2/3]

static GlgObject LoadWidget ( String  filename,
GlgMediumType  medium_type,
Encoding  encoding 
)
static

Loads a viewport named "$Widget" from a file or URL using the specified charset.

Parameters
filenameDefines a drawing file or URL.
medium_typeFILE or URL constant
encodingEncoding for string decoding.
Returns
Loaded viewport or null if load fails.

◆ LoadWidget() [3/3]

static GlgObject LoadWidget ( GlgObject  glg_object)
static

Finds a viewport named "$Widget" inside an object and returns it.

Parameters
glg_objectAn object containing the $Widget viewport
Returns
Viewport or null if search fails.

◆ MoveObject()

bool MoveObject ( GlgCoordType  coord_type,
GlgPoint  start_point,
GlgPoint  end_point 
)

Intermediate API: Moves an object by specified vector.

Parameters
coord_typeThe coordinate system in which the move vector is defined. May have the following values:

SCREEN_COORD to move in screen pixels

PARENT_COORD to move in the world coordinates of the object's parent

OBJECT_COORD to move in the world coordinates of the object.

start_pointStart point of the move vector.
end_pointEnd point of the move vector.

◆ MoveObjectBy() [1/2]

bool MoveObjectBy ( GlgCoordType  coord_type,
double  x,
double  y,
double  z 
)

Intermediate API: Moves an object by specified distance in x, y and z directions.

Parameters
coord_typeThe coordinate system in which x, y and z distance is defined. May have the following values:

SCREEN_COORD to move in screen pixels

PARENT_COORD to move in the world coordinates of the object's parent

OBJECT_COORD to move in the world coordinates of the object.

xThe X move distance.
yThe Y move distance.
zThe Z move distance.

◆ MoveObjectBy() [2/2]

bool MoveObjectBy ( GlgCoordType  coord_type,
GlgPoint  point 
)

Intermediate API: Moves an object by specified distance in x, y and z directions.

Parameters
coord_typeThe coordinate system in which x, y and z distance is defined. May have the following values:

SCREEN_COORD to move in screen pixels

PARENT_COORD to move in the world coordinates of the object's parent

OBJECT_COORD to move in the world coordinates of the object.

pointPoint containing X, Y and Z distance values.

◆ NativePrint()

bool NativePrint ( Graphics  graphics)

Prints the viewport drawing into the print graphics. For a light viewport, prints the drawing of its parent viewport.

Parameters
graphicsPrint graphics

◆ PositionObject() [1/2]

bool PositionObject ( GlgCoordType  coord_type,
GlgAnchoringType  anchoring,
GlgPoint  position 
)

Intermediate API: Moves an object to the specified position.

Parameters
coord_typeThe coordinate system in which position is defined. May have the following values:

SCREEN_COORD to move in screen pixels

PARENT_COORD to move in the world coordinates of the object's parent

OBJECT_COORD to move in the world coordinates of the object.

anchoringSpecifies which part of the object's bounding box will be position at the specified coordinates. It is a bitwise OR of horizontal and vertical anchor types: HLEFT, HCENTER and HRIGHT for horizontal types, and VTOP, VCENTER and VBOTTOM for vertical types.
positionNew position

◆ PositionObject() [2/2]

bool PositionObject ( GlgCoordType  coord_type,
GlgAnchoringType  anchoring,
double  x,
double  y,
double  z 
)

Intermediate API: Move object to the specified position.

Parameters
coord_typeThe coordinate system in which position is defined. May have the following values:

SCREEN_COORD to use screen pixels

PARENT_COORD to use the world coordinates of the object's parent

OBJECT_COORD to use the world coordinates of the object.

anchoringSpecifies which part of the object's bounding box will be position at the specified coordinates. It is a bitwise OR of horizontal and vertical anchor types: HLEFT, HCENTER and HRIGHT for horizontal types, and VTOP, VCENTER and VBOTTOM for vertical types.
xThe X coordinates of the new position.
yThe Y coordinates of the new position.
zThe Z coordinates of the new position.

◆ PositionToValue()

GlgDouble PositionToValue ( String  res_name,
double  x,
double  y,
bool  outside_x,
bool  outside_y 
)

Intermediate API, ADVANCED: Translates point's screen coordinates to the corresponding value according to the object type: axis, plot or chart. For a chart, returns the value of its X axis. For a plot, returns the Y value relative to the plot's range.

For efficiency, if the returned object is not null, it can be returned to the internal cache via the object's ReleaseObject method.

Parameters
res_nameThe resource path of a child object to query, or null to query this object.
xThe x screen coordinate (with pixel0 center at 0.5).
yThe y screen coordinate (with pixel0 center at 0.5).
outside_xIf set to true, the method returns null for points outside the object's x extent.
outside_yIf set to true, the method returns null for points outside the object's y extent.
Returns
Converted value.

◆ Print()

bool Print ( String  file,
double  x,
double  y,
double  width,
double  height,
bool  portrait,
bool  stretch 
)

Prints the viewport's drawing and saves it in a PostScript file. For a light viewport, prints the drawing of its parent viewport.

Parameters
fileFilename
xThe X coordinate of the lower left corner of the postcript output on a page in GLG coordinates [-1000;1000].
yThe Y coordinate of the lower left corner of the postcript output on a page in GLG coordinates [-1000;1000].
widthThe width of the postcript output on a page in GLG coordinates [-1000;1000].
heightThe height of the postcript output on a page in GLG coordinates [-1000;1000].
portraitOrientation of the postscript output: true for portrait
stretchPreserving X/Y ratio: true to stretch, false to preserve.

◆ Printf() [1/3]

static String Printf ( String  format,
double  value 
)
static

Utilty function: C-style printf.

◆ Printf() [2/3]

static String Printf ( String  format,
int  value 
)
static

Utilty function: C-style printf.

◆ Printf() [3/3]

static String Printf ( String  format,
String  value 
)
static

Utilty function: C-style printf.

◆ QueryTags()

GlgObject QueryTags ( GlgTagType  tag_type_mask)

Intermediate API: Returns a list of all tags of the requested tag type defined in the object.

Parameters
tag_type_maskSpecifies the tag type to search

◆ Rand()

static double Rand ( double  low,
double  high 
)
static

Returns a random number in the specified range.

◆ ReleaseObject()

void ReleaseObject ( GlgObject  suspend_info)

Intermediate API: Releases the object after suspending for editing.

Parameters
suspend_infoReturned value of a previous call to SuspendObject.

◆ ReorderElement()

bool ReorderElement ( int  current_index,
int  new_index 
)

Intermediate API: Moves the container's element from the current_index to the new_index position.

Parameters
current_indexIndex of the object to be reordered.
new_indexIndex of the new object position.
Returns
false if indexes are out of range.

◆ RequestGISMap()

bool RequestGISMap ( String  res_name,
double  extent_x,
double  extent_y,
double  center_x,
double  center_y,
double  angle,
GlgProjectionType  projection,
String  layers,
GlgGISRequestFlags  flags,
GlgGISRequestObserver  request_observer 
)

Intermediate API: Requests an asynchronous GIS map update. When the new map image is either ready or aborted, the request observer's RequestUpdate method will be invoked with the status information. The observer can install a successfully prepared request via the InstallGISRequest method, or do nothing to cancel the request. Refer to the description of GlgGISRequestObserver for more information.

Parameters
res_nameIf is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used.
extent_xSpecifies the new GIS x extent.
extent_ySpecifies the new GIS y extent.
center_xSpecifies the new GIS x center.
center_ySpecifies the new GIS y center.
angleSpecifies the new GIS angle.
projectionSpecifies the new GIS projection.
layersSpecifies the new GIS layer string.
flagsControls which GIS object's parameters will be updated and may have any OR combination of the following flags (defined in the GlgObject class for Java or GlgGISRequestStatus enum for C#): GIS_REQUEST_EXTENT, GIS_REQUEST_CENTER, GIS_REQUEST_ANGLE, GIS_REQUEST_PROJECTION or GIS_REQUEST_LAYERS.
request_observerSpecifies an observer whose RequestUpdate method will be invoked with status updates. Refer to the description of GlgGISRequestObserver for more information.
Returns
true on success, false on failure.

◆ RequestGISZoom()

bool RequestGISZoom ( String  res_name,
char  type,
double  value,
GlgGISRequestObserver  request_observer 
)

Intermediate API: Requests asynchronous GIS zoom in a way compatible with the SetZoom method. When the new zoomed map image is either ready or aborted, the request observer's RequestUpdate method will be invoked with the status information. The observer can install a successfully prepared request via the InstallGISRequest method, or do nothing to cancel the request. Refer to the description of GlgGISRequestObserver for more information.

Parameters
res_nameIf is not null, specifies the resource path of a child viewport to be zoomed, otherwise this viewport will be used.
typeSpecifies the zoom operation to perform. See the SetZoom method for a list of possible values.
valueSpecifies the amount to zoom or pan by. See the SetZoom method for more information.
request_observerSpecifies an observer whose RequestUpdate method will be invoked with status updates. Refer to the description of GlgGISRequestObserver for more information.
Returns
true on success, false on failure.

◆ Reset()

bool Reset ( )

Resets the object hierarchy of a top-level viewport and then sets it up again.

◆ ResetHierarchy()

void ResetHierarchy ( )

Resets object hierarchy.

◆ RootToScreenCoord()

static bool RootToScreenCoord ( GlgObject  viewport,
GlgPoint  root_coord 
)
static

Intermediate API: Converts screen coordinates relative to the root window to the screen coordinates of the specified viewport.

Parameters
viewportViewport object
root_coordRoot coordinates
Returns
true on success.

◆ RotateObject()

bool RotateObject ( GlgCoordType  coord_type,
GlgPoint  center,
double  x,
double  y,
double  z 
)

Intermediate API: Rotates an object around the X, Y or Z axis.

Parameters
coord_typeThe coordinate system in which the center point is defined. May have the following values:

SCREEN_COORD to use screen pixels

PARENT_COORD to use the world coordinates of the object's parent

OBJECT_COORD to use the world coordinates of the object.

centerCenter of rotation. The center of the object's bounding box is used if null is passed.
xThe X rotation angle.
yThe Y rotation angle.
zThe Z rotation angle.

◆ SaveObject() [1/4]

bool SaveObject ( String  filename)

Intermediate API: Saves an object into a file using default charset.

Parameters
filenameFilename
Returns
true on success

◆ SaveObject() [2/4]

bool SaveObject ( String  filename,
Encoding  encoding 
)

Intermediate API: Saves an object into a file using the specified charset.

Parameters
filenameFilename
encodingEncoding for string encoding.
Returns
true on success

◆ SaveObject() [3/4]

bool SaveObject ( Object  medium,
GlgMediumType  medium_type 
)

Intermediate API: Saves an object into a stream using default charset.

Parameters
mediumThe destination to save to (Stream)
medium_typeDestination object type (STREAM)
Returns
true on success

◆ SaveObject() [4/4]

bool SaveObject ( Object  medium,
GlgMediumType  medium_type,
Encoding  encoding 
)

Intermediate API: Saves an object into a stream using the specified charset.

Parameters
mediumThe destination to save to (Stream)
medium_typeDestination object type (STREAM)
encodingEncoding for string encoding.
Returns
true on success

◆ ScaleObject()

bool ScaleObject ( GlgCoordType  coord_type,
GlgPoint  center,
double  x,
double  y,
double  z 
)

Intermediate API: Scale object in X, Y and Z dimensions

Parameters
coord_typeThe coordinate system in which the center point is defined. May have the following values:

SCREEN_COORD to use screen pixels

PARENT_COORD to use the world coordinates of the object's parent

OBJECT_COORD to use the world coordinates of the object.

centerCenter of scaling. The center of the object's bounding box is used if null is passed.
xThe X scale factor.
yThe Y scale factor.
zThe Z scale factor.

◆ ScreenToWorld()

bool ScreenToWorld ( bool  inside_vp,
GlgPoint  in_point,
GlgPoint  out_point 
)

Intermediate API: Converts a point from screen to world coordinates.

Parameters
inside_vpFor viewports, may be set to true to use the coordinate system used to draw objects inside the viewport, or false to use viewport's parent coordinate system. The parameter is ignored for non-viewport objects.
in_pointPoint in screen coordinates.
out_pointCalculated world coordinates.

◆ SendMessage()

Object SendMessage ( String  res_name,
String  message,
Object  param1,
Object  param2,
Object  param3,
Object  param4 
)

Sends a message to object.

Parameters
res_nameThe resource path of a child object to send the message to, or null to send the the message to this object.
messageMessage type.
param1Message-specific parameter
param2Message-specific parameter
param3Message-specific parameter
param4Message-specific parameter
Returns
Return value of the message.

Refer to the Input Objects chapter of the GLG User’s Guide and Builder Reference Manual for the description of the function’s parameters and returned value for each of the GLG input handlers.

Integer parameters should be passed as native Integer objects in Java and GlgInteger objects in C#.

◆ SetAlarmHandler()

static GlgAlarmHandler SetAlarmHandler ( GlgAlarmHandler  alarm_handler)
static

Installs a global alarm handler.

Parameters
alarm_handlerNew alarm hadler
Returns
Previous alarm handler

◆ SetAttachmentMoveMode()

static bool SetAttachmentMoveMode ( bool  state)
static

Extended API: Sets attachment points move mode.

If the move mode is set, transforming the attachment point changes its position relatively to the anchor point of the reference object. If the mode is unset, transforming the attachment point move the reference object.

Parameters
stateThe new state of the move mode.
Returns
The previous state of the move mode.

◆ SetBrowserObject()

static void SetBrowserObject ( GlgObject  browser,
GlgObject  glg_object 
)
static

Sets an object to be browsed by the GLG Resource Browser widget.

Parameters
browserViewport of the resource browser widget
glg_objectObject to browse

◆ SetBrowserSelection()

bool SetBrowserSelection ( String  res_name,
String  selection,
String  filter 
)

Sets a new value of browser selection text box for resource, alarm, tag and data browsers after the browser object has been set up.

Parameters
res_nameThe resource name of the child object, or null to use this object.
selectionSpecifies new selection, or null to keep current selection.
filterSpecifies new filter, or null to keep current filter.
Returns
true on success.

◆ SetChartFilter()

bool SetChartFilter ( String  res_name,
GlgChartFilter  filter,
Object  client_data 
)

Attaches a custom filter to a chart's plot.

Parameters
res_nameThe resource name of the object's plot, or null to use this plot object.
filterCustom filter.
client_dataCustom filter data.
Returns
true on success.

◆ SetDResource() [1/4]

bool SetDResource ( String  resource_name,
double  value 
)

Sets value of a D (double) resource.

Parameters
resource_nameResource name
valueResource value

◆ SetDResource() [2/4]

bool SetDResource ( String  resource_name,
GlgDouble  value 
)

Sets value of a D (double) resource.

Parameters
resource_nameResource name
valueResource value

◆ SetDResource() [3/4]

bool SetDResource ( String  resource_name,
double  value,
bool  if_changed 
)

Sets value of a D (double) resource.

Parameters
resource_nameResource name
valueResource value
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetDResource() [4/4]

bool SetDResource ( String  resource_name,
GlgDouble  value,
bool  if_changed 
)

Sets value of a D (double) resource.

Parameters
resource_nameResource name
valueResource value
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetDTag() [1/2]

bool SetDTag ( String  tag_source,
double  value,
bool  if_changed 
)

Sets value of a D (double) tag. All tags with the specified tag_source will be set to the supplied value.

Parameters
tag_sourceTag source
valueTag value
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetDTag() [2/2]

bool SetDTag ( String  tag_source,
GlgDouble  value,
bool  if_changed 
)

Sets value of a D (double) tag. All tags with the specified tag_source will be set to the supplied value.

Parameters
tag_sourceTag source
valueTag value
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetEditMode()

static bool SetEditMode ( GlgObject  viewport,
String  res_name,
bool  edit_mode 
)
static

Sets the edit mode to disable GLG input objects in the drawing area for editing.

Parameters
viewportThe drawing area viewport, or the top viewport containing the drawing area if the res_name is not null.
res_nameIf not null, specifies the resource path of the drawing area inside the top viewport.
edit_modeEdit mode: true or false.
Returns
true on success. The edit mode is inherited by all child viewports and is global: setting it for a new viewport resets it for the previous viewport.

◆ SetElement()

bool SetElement ( int  index,
Object  new_object 
)

Extended API: Sets an element of a container to a new value. Generates an error message and returns false if the element with the index does not exist.

Parameters
indexIndex of the element
new_objectNew value

◆ SetEnd()

void SetEnd ( )

Intermediate API: Initializes container for traversing in the reversed direction.

This method should be invoked before invoking the container's IterateBack method.

◆ SetErrorHandler()

static GlgErrorHandler SetErrorHandler ( GlgErrorHandler  new_handler)
static

Installs a custom error handler.

Parameters
new_handlerNew error hadler
Returns
Previous error handler

◆ SetFocus()

void SetFocus ( String  res_name)

Sets focus to the object's viewport.

Parameters
res_nameThe resource name of the child object, or null to use this object.

◆ SetGResource() [1/4]

bool SetGResource ( String  resource_name,
double  g_value1,
double  g_value2,
double  g_value3 
)

Sets value of a G (geometrical or color) resource.

Parameters
resource_nameResource name
g_value1the first value of the XYZ or RGB value triplet.
g_value2the second value of the XYZ or RGB value triplet.
g_value3the third value of the XYZ or RGB value triplet.

◆ SetGResource() [2/4]

bool SetGResource ( String  resource_name,
double  g_value1,
double  g_value2,
double  g_value3,
bool  if_changed 
)

Sets value of a G (geometrical or color) resource.

Parameters
resource_nameResource name
g_value1the first value of the XYZ or RGB value triplet.
g_value2the second value of the XYZ or RGB value triplet.
g_value3the third value of the XYZ or RGB value triplet.
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetGResource() [3/4]

bool SetGResource ( String  resource_name,
GlgPoint  g_value 
)

Sets value of a G (geometrical or color) resource.

Parameters
resource_nameResource name
g_valueXYZ or RGB resource values

◆ SetGResource() [4/4]

bool SetGResource ( String  resource_name,
GlgPoint  g_value,
bool  if_changed 
)

Sets value of a G (geometrical or color) resource.

Parameters
resource_nameResource name
g_valueXYZ or RGB resource values
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetGTag() [1/2]

bool SetGTag ( String  tag_source,
double  g_value1,
double  g_value2,
double  g_value3,
bool  if_changed 
)

Sets value of a G (geometrical or color) tag. All tags with the specified tag_source will be set to the supplied values.

Parameters
tag_sourceTag source
g_value1the first value of the XYZ or RGB value triplet.
g_value2the second value of the XYZ or RGB value triplet.
g_value3the third value of the XYZ or RGB value triplet.
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetGTag() [2/2]

bool SetGTag ( String  tag_source,
GlgPoint  g_value,
bool  if_changed 
)

Sets value of a G (geometrical or color) tag. All tags with the specified tag_source will be set to the supplied values.

Parameters
tag_sourceTag source
g_valueXYZ or RGB tag values
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetImageSize()

void SetImageSize ( int  width,
int  height 
)

Sets the size of the image to be generated by the Graphics Server for this top viewport (GLG Graphics Server only).

Parameters
widthThe width if the image to be generated.
heightThe height if the image to be generated.

◆ SetLabelFormatter()

bool SetLabelFormatter ( String  res_name,
GlgLabelFormatter  formatter 
)

Attaches a custom label formatter to an axis object.

Parameters
res_nameThe resource name of the object's child axis, or null to use this axis object.
formatterCustom label formatter.
Returns
true on success.

◆ SetLinkedAxis()

bool SetLinkedAxis ( String  res_name,
GlgObject  axis_object,
String  axis_res_name 
)

Associates a chart's plot or a level line with an Y axis.

Parameters
res_nameThe resource path of a chart's plot, level, time line, annotation object, or null to associate the axis with this object.
axis_objectA chart's Y axis to associate with if axis_res_path is null, or an axis parent used in conjunction with the axis_res_path to specify the Y axis. If the parameter value is null, this object will be used as an axis parent.
axis_res_nameThe resource path of a chart's axis relatively to the axis_object, or null to use axis_object as the Y axis to link with.
Returns
true on success.

◆ SetMatrixData()

void SetMatrixData ( GlgMatrixData  matrix_data)

Intermediate API, ADVANCED: Sets matrix's coefficients to supplied values.

Parameters
matrix_dataGlgMatrixData object containing new matrix values.

◆ SetResource()

bool SetResource ( String  resource_name,
Object  value 
)

Intermediate API: Sets the new value of the object's attribute (of the C# Object type).

This method may be used for setting object's DataSlot attribute.

Parameters
resource_nameAttribute name
valueThe object to set or replace.

◆ SetResourceFromObject() [1/2]

bool SetResourceFromObject ( String  resource_name,
GlgObject  o_value 
)

Sets value of the data or matrix resource to the value of the data object.

Parameters
resource_nameResource name
o_valueA GLG data object providing a value (must match the resource's data type).

◆ SetResourceFromObject() [2/2]

bool SetResourceFromObject ( String  resource_name,
GlgObject  o_value,
bool  if_changed 
)

Sets value of the data or matrix resource to the value of the data object.

Parameters
resource_nameResource name
o_valueA GLG data object providing a value (must match the resource's data type)
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetResourceObject()

bool SetResourceObject ( String  resource_name,
GlgObject  value 
)

Sets the new value of the object's attribute.

Without the Extended API, this method may be used to set global configuration resources. With the Extended API, it may also be used for attaching Custom Property objects, aliases, tags, alarms and history objects.

Parameters
resource_nameAttribute name
valueGlgObject to attach.

◆ SetScrollbarObserver()

GlgGISRequestObserver SetScrollbarObserver ( String  res_name,
GlgGISRequestObserver  request_observer 
)

Intermediate API: Controls the the way integrated scrollbars work for the GIS object.

Parameters
res_nameIf is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used.
request_observerSpecifies a request observer. If a non-null observer is specified, integrated scrollbars will use an asynchronous request to scroll the map. The observer's RequestUpdate method will be invoked with status updates. If null is specified, the new map will be loaded without the use of an asynchronous request.
Returns
Previous scrollbar request observer.

◆ SetSResource() [1/2]

bool SetSResource ( String  resource_name,
String  s_value 
)

Sets value of an S (string) resource.

Parameters
resource_nameResource name
s_valueResource value

◆ SetSResource() [2/2]

bool SetSResource ( String  resource_name,
String  s_value,
bool  if_changed 
)

Sets value of an S (string) resource.

Parameters
resource_nameResource name
s_valueResource value
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetSResourceFromD() [1/4]

bool SetSResourceFromD ( String  resource_name,
String  format,
double  d_value 
)

Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.

Parameters
resource_nameResource name
formatC-style format (for example, "%.2f")
d_valueValue

◆ SetSResourceFromD() [2/4]

bool SetSResourceFromD ( String  resource_name,
String  format,
double  d_value,
bool  if_changed 
)

Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.

Parameters
resource_nameResource name
formatC-style format (for example, "%.2f")
d_valueValue
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetSResourceFromD() [3/4]

bool SetSResourceFromD ( String  resource_name,
String  format,
GlgDouble  d_value 
)

Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.

Parameters
resource_nameResource name
formatC-style format (for example, "%.2f")
d_valueValue

◆ SetSResourceFromD() [4/4]

bool SetSResourceFromD ( String  resource_name,
String  format,
GlgDouble  d_value,
bool  if_changed 
)

Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.

Parameters
resource_nameResource name
formatC-style format (for example, "%.2f")
d_valueValue
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetSTag()

bool SetSTag ( String  tag_source,
String  s_value,
bool  if_changed 
)

Sets value of an S (string) tag. All tags with the specified tag_source will be set to the supplied value.

Parameters
tag_sourceTag source
s_valueTag value
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetSTagFromD()

bool SetSTagFromD ( String  tag_source,
String  format,
double  d_value,
bool  if_changed 
)

Sets value of an S (string) tag from a double value, converting the value into a string using a C-style format. All tags with the specified tag_source will be set to the converted string.

Parameters
tag_sourceTag source
formatC-style format (for example, "%.2f")
d_valueValue
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetSTagFromDObj()

bool SetSTagFromDObj ( String  tag_source,
String  format,
GlgDouble  d_value,
bool  if_changed 
)

Sets value of an S (string) tag from a double value, converting the value into a string using a C-style format. All tags with the specified tag_source will be set to the converted string.

Parameters
tag_sourceTag source
formatC-style format (for example, "%.2f")
d_valueValue
if_changedIf set to true, the graphics will be redrawn only if the new tag value is different from the old one.

◆ SetStart()

void SetStart ( )

Intermediate API: Initializes container for traversing.

This method should be invoked before invoking the container's Iterate method.

◆ SetTooltipFormatter()

static GlgTooltipFormatter SetTooltipFormatter ( GlgTooltipFormatter  formatter)
static

Sets a custom tooltip formatter.

Parameters
formatterCustom tooltip formatter.
Returns
Previous tooltip formatter.

◆ SetupHierarchy()

void SetupHierarchy ( )

Sets up object hierarchy.

◆ SetXform()

bool SetXform ( GlgObject  xform)

Extended API: Sets the object's transformation to a constrained copy of the xform parameter.

Parameters
xformTransformation to attach to the object.

◆ SetZoom()

bool SetZoom ( String  res_name,
char  type,
double  value 
)

Programmatic interface for the integrated zoom and pan features.

Zooms or pans the viewport by the specified amount. If the res_name parameter is not null, the child viewport of the object with the name specified by the res_name parameter is zoomed or panned.

The type may be one of the following:

'u' - pan up (default amount is 1/2 of the window height).

'd' - pan down (default amount is 1/2 of the window height).

'l' - pan left (default amount is 1/2 of the window width).

'r' - pan right (default amount is 1/2 of the window width).

'i' - zoom in (default zoom scale is 2 ).

'o' - zoom out (default zoom scale is 1/2 ).

'U' - pan the drawing all the way up

'D' - pan the drawing all the way down

'L' - pan the drawing all the way to the left

'R' - pan the drawing all the way to the right

'x' - pan horizontally by the distance in screen coordinates

'y' - pan vertically by the distance in screen coordinates

'X' - pan horizontally by the distance in world coordinates

'Y' - pan vertically by the distance in world coordinates

'f' - fit the drawing to the window

'n' - reset any zoom and pan

't' - start ZoomTo mode

'e' - abort ZoomTo mode in progress (if any)

'g' - if the mouse points at the GIS object, set the GIS zoom mode for that object.

'G' - reset the GIS zoom mode.

The value specifies the amount to zoom or pan by (when the value of 0 is passed, the default value is used). For pan operations, the value is expressed in the fractions of the screen size (for example, using 2/3 as the value will pan by 2/3 of the screen width or height). For zoom operations, the value defines the zoom scale (for example, using 5 as the value will zoom in or out by the factor of 5). The value is ignored in Reset, Start ZoomTo or Abort ZoomTo modes.

Parameters
res_nameIf is not null, specifies the resource path of child viewport to be zoomed.
typeSpecifies the zoom operation to perform.
valueSpecifies .
Returns
false if the zoom factor or pan amount is too big and would result in the overflow of the integer values used for drawing primitives by the windowing system, otherwise true.

◆ SetZoomMode()

bool SetZoomMode ( String  res_name,
GlgObject  zoom_object,
String  zoom_object_name,
GlgZoomMode  zoom_mode 
)

Sets the viewport's zoom mode and selects the GIS or CHART object to be zoomed.

Parameters
res_nameThe resource path of a child viewport to zoom, or null to zoom this viewport.
zoom_objectThe GIS or CHART object to be zoomed if zoom_object_name is null, or a parent of the GIS or CHART object if zoom_object_name is not null.
zoom_object_nameThe resource name of the GIS or CHART object to be zoomed relative to the parent specified by the zoom_object parameter.
zoom_modeThe Zoom mode: GRAPHICS_ZOOM_MODE, GIS_ZOOM_MODE or CHART_ZOOM_MODE.
Returns
true on success.

◆ Sleep()

static bool Sleep ( long  millisec)
static

Sleeps for the specified number of milliseconds.

◆ SuspendObject()

GlgObject SuspendObject ( )

Intermediate API: Suspends the object for editing.

This method must be called before adding a transformation or constraining attributes of the object whose object hierarchy has been setup (the object has been drawn).

Returns
Suspend information (GlgObject) to be used as a suspend_info parameter in a subsequent call to the ReleaseObject method.

◆ Terminate()

static void Terminate ( )
static

Destroys GLG Toolkit's internal objects.

◆ ThrowExceptionOnError()

static void ThrowExceptionOnError ( bool  user_error,
bool  internal_error 
)
static

Controls displaying a stack trace on errors.

Parameters
user_errorSet to true to display a stack trace on application errors, such as "Can't find resource".
internal_errorSet to true to display a stack trace on internal GLG errors.

◆ TraceObject()

static bool TraceObject ( GlgObject  object,
bool  state,
bool  is_widget,
GlgObject  top_parent,
GlgObjectActionInterface  action 
)
static

Intermediate API: Highlights all objects in the drawing that depend on the tag or resource object that is being traced. All parents of an object are searched and highlighted based on the supplied conditions. The parent search is performed until any of the supplied conditions (is_widget, top_parent or action) is satisfied. If no conditions are supplied, all immediate drawable parents will be highlighted.

Parameters
objectObject to be traced. The object must be setup.
stateIf set to true, the objects are highlighted with an outline when they are drawn. If set to false, the objects are unhighlighted. The attributes of the outline are defined by the GlgHighlightPolygon global configuration resource.
is_widgetIf set to true, the parents that have resource named IsWidget are highlighed.
top_parentIf non-null, the parents that are direct children of top_parent are highlighed.
actionAn optional interface that provides a custom condition. The Action method of the interface will be invoked for every parent of the object. If the method returns true, the parent will be highlighed.
Returns
true if any objects were highlighted.

◆ TransformObject()

bool TransformObject ( GlgObject  xform,
GlgCoordType  coord_type,
GlgObject  parent 
)

Intermediate API, ADVANCED: Transforms an object's points with a transformation object.

The object's hierarchy must be set (drawn) to use this method.

Parameters
xformTransformation object
coord_typeThe coordinate system in which the transformation is defined. May have the following values:

SCREEN_COORD to transform in screen pixels

PARENT_COORD to transform in the world coordinates of the object's parent

OBJECT_COORD to transform in the world coordinates of the object.

parentObject's parent (returned by the GetParent method). This parameter is required only when coordinate type is set to PARENT_COORD, or when the method is invoked on the G data value object representing a control point. In all other cases null may be passed as the parameter value.

◆ TransformPoint()

void TransformPoint ( GlgPoint  in_point,
GlgPoint  out_point 
)

Intermediate API, ADVANCED: Transforms a point with this matrix object.

Transforms the in_point with this matrix and places the result into the out_point.

Parameters
in_pointPoint to transform with the matrix
out_pointPoint to receive transformed values

◆ TranslatePointOrigin()

static void TranslatePointOrigin ( GlgObject  from_viewport,
GlgObject  to_viewport,
GlgPoint  point 
)
static

Intermediate API, ADVANCED: Translates screen point's coordinates from one viewport to another.

Parameters
from_viewportThe viewport in which the screen coordinates of the point are defined.
to_viewportThe viewport to convert screen coordinates of the point to.
pointSupplies the screen coordinate values to be converted.

◆ TraverseObjects()

void TraverseObjects ( GlgObjectActionInterface  action)

Intermediate API: Traverses the object and all its subobjects and performs specified actions on each of them.

Parameters
actionGlgObjectActionInterface or GlgObjectActionInterfaceExt interface that provides custom actions to be performed on each traversed object.

If action implements the GlgObjectActionInterfaceExt interface, the interface's methods will be invoked twice for each traversed object: the Action method will be invoked before traversing the object's subobjects, and ActionExt will be invoked after traversing the object's subobjects.

If action implements the GlgObjectActionInterface interface, the interface's Action method will be invoked just once before traversing each object's subobjects.

If Action interface method invoked before traversing the object's subobjects returns false, the object's subobjects will not be traversed.

◆ UnconstrainObject()

bool UnconstrainObject ( )

Intermediate API: Unconstrains this attribute object.

◆ UpdateGlg()

bool UpdateGlg ( )

Updates the drawing of a viewport or a light viewport with the latest resource values.

Returns
true on success.

◆ UpdateImmediately()

bool UpdateImmediately ( )

ADVANCED: Updates the drawing of a viewport or a light viewport with the latest resource values, immediately.

Updates the drawing without defering the actual painting until the next paint event. It is rarely necessary to call this method, as it is less effcient than the Update method and does not guarantee a perfect redraw of children viewports. However, this method is useful if one needs to update the display while the current event is being dispatched.

Returns
true on success,

◆ WorldToScreen()

bool WorldToScreen ( bool  inside_vp,
GlgPoint  in_point,
GlgPoint  out_point 
)

Intermediate API: Converts a point from world to screen coordinates.

Parameters
inside_vpFor viewports, may be set to true to use the coordinate system used to draw objects inside the viewport, or false to use viewport's parent coordinate system. The parameter is ignored for non-viewport objects.
in_pointPoint in world coordinates.
out_pointCalculated screen coordinates.

Member Data Documentation

◆ CHART_FILTER_VERSION

const int CHART_FILTER_VERSION = 2

Custom filter version.

◆ COORD_MAPPING_ADJ

const double COORD_MAPPING_ADJ = 0.5

Coordinate adjustement constant used to map the pixel index to the center of the pixel (i.e pixel #5 is mapped to coord=5.5).

◆ EQUATOR_RADIUS

const double EQUATOR_RADIUS = 6378136.0

GIS constants for orthographic projection extent.

◆ GIS_OUTSIDE_VALUE

const double GIS_OUTSIDE_VALUE = -2000.0

A negative value for Z coordinates of converted points outside of the visible part of the globe in the orthographic projection.

◆ IH_CURR

GlgObject IH_CURR = null
static

ID of the current installable interface handler.

◆ IH_GLOBAL

GlgObject IH_GLOBAL = null
static

ID of the global data cache of the installable interface handlers.

◆ IH_NEW

GlgObject IH_NEW = null
static

ID of the last installed installable interface handler.

◆ MAJOR_VERSION

const int MAJOR_VERSION = 4

Major version

◆ MINOR_VERSION

const int MINOR_VERSION = 2

Minor version