GLG Toolkit, JavaScript Library  Version 4.6
GlgObject Class Reference

An abstract superclass of all GLG objects. More...

Detailed Description

An abstract superclass of all GLG objects.

Provides GLG API functionality for all GLG objects, with methods grouped by the API type (Standard, Intermediate and Extended).

Public Member Functions

void AbortGISRequest (String resource_name)
 Aborts a GIS object's asynchronous map loading request in progress, if any. More...
 
GlgObject AddAnnotation (String resource_name, GlgObject annotation, double position_x, double position_y, boolean add_box)
 Adds an annotation to the chart object. More...
 
GlgObject AddAttachmentPoint (double dx, double dy, double dz)
 Adds an attachment point to the reference object and returns the added point. More...
 
void AddListener (GlgCallbackType type, Function callback)
 Adds a GLG event listener to the viewport. More...
 
boolean AddObject (Object object, GlgAccessType access_type, GlgPositionModifier pos_modifier)
 A generic method for adding an object to the container. More...
 
boolean AddObjectAt (Object object, int index)
 Adds an object at the specified position inside the container. More...
 
boolean AddObjectToBottom (Object object)
 Adds an object at the end of the container. More...
 
boolean AddObjectToTop (Object object)
 Adds an object at the beginning of the container. More...
 
GlgObject AddPlot (String resource_name, GlgObject plot)
 Adds a plot line to the chart object. More...
 
boolean AddPlotDataSample (double value, double time_stamp, boolean valid, float marker_visibility, boolean quick_mode)
 Adds a new data sample with the supplied values directly to the plot's data buffer. More...
 
GlgObject AddTimeLine (String resource_name, GlgObject time_line, double time_stamp)
 Adds a vertical time line to the chart object. More...
 
void ChangeObject (String resource_path)
 Sends a change message the object without actually changing the object's properties. More...
 
boolean ClearDataBuffer (String resource_name)
 Clears accumulated data samples of a real-time chart or one of its plots. More...
 
GlgObject CloneObject (GlgCloneType clone_type)
 Creates a specialized copy (clone) of an object. More...
 
boolean ConfigureWindow (int x, int y, int width, int height, GlgConfigureMask mask, GlgObject parent)
 Sets the size and/or position of a viewport's window. More...
 
boolean ConstrainObject (GlgObject to_attribute)
 Constrains an attribute or a point of the object to an attribute or a point of another object. More...
 
boolean ContainsObject (Object object)
 Checks if object belongs to the container. More...
 
GlgObject CopyObject ()
 Creates a copy of the object. More...
 
GlgObject CreateAlarmList ()
 Creates and returns a list of alarms defined in the object. More...
 
GlgObject CreateChartSelection (GlgObject plot, double x, double y, double dx, double dy, boolean screen_coord, boolean include_invalid, boolean x_priority)
 Selects the chart's data sample closest to the specified position. More...
 
GlgObject CreateInversedMatrix ()
 ADVANCED: Inverts the matrix object. More...
 
GlgObject CreatePointArray (GlgControlPointType type)
 ADVANCED: Creates and returns an array containing all control points of the object. More...
 
GlgObject CreateResourceList (boolean list_named_res, boolean list_def_attr, boolean list_aliases)
 Returns a list of the object's resources. More...
 
GlgObject CreateTagList (boolean unique_tag_sources)
 Creates and returns a list of data tags defined in the object. More...
 
String CreateTooltipString (double x, double y, double dx, double dy, String format)
 Creates and returns a chart or axis tooltip string corresponding to the specified position in screen coordinates. More...
 
boolean DeleteAnnotation (String resource_name, GlgObject annotation, double position_x, double position_y)
 Deletes an annotation from the chart. More...
 
boolean DeleteBottomObject ()
 Deletes an object from the bottom of the container. More...
 
boolean DeleteObject (GlgAccessType access_type, GlgPositionModifier pos_modifier, boolean replace_element, Object replace_obj)
 A generic method for deleting an object from the container. More...
 
boolean DeleteObjectAt (int index)
 Deletes an object from the specified position in the container. More...
 
boolean DeletePlot (String resource_name, GlgObject plot)
 Deletes a plot line from the chart. More...
 
boolean DeleteTags (GlgTagType tag_type_mask)
 Deletes all data tags or all public properties inside the object the method is invoked on. More...
 
boolean DeleteThisObject (Object object)
 Finds and deletes an object from the container. More...
 
boolean DeleteTimeLine (String resource_name, GlgObject time_line, double time_stamp)
 Deletes a time line from the chart. More...
 
boolean DeleteTopObject ()
 Deletes an object from the beginning of the container. More...
 
boolean Equals (GlgObject object)
 Performs equality comparison between the object passed as the method parameter and the object the method is invoked on. More...
 
Object ExportStrings (String separator1, String separator2)
 Writes all text strings defined in the viewport's drawing into an object representing an image of a string translation file. More...
 
Object ExportTags (String separator1, String separator2)
 Writes tag names and tag sources of all data tags defined in the viewport's drawing to a tag remapping file. More...
 
Object FindObjects (GlgObjectMatchType match_type, boolean find_parents, boolean include_top_object, boolean find_first_match, boolean search_inside, boolean search_drawable_only, GlgObjectType object_type, String object_name, String resource_name, GlgObject object_id, Function custom_match, boolean search_templates, boolean dont_add_matches)
 Finds either one or all parents or children of the object that match the supplied search criteria. More...
 
boolean FitObject (GlgCoordType coord_type, GlgCube box, boolean keep_ratio)
 Fits the object to the specified rectangular area. More...
 
void Flush (int size)
 Set the size of the container object. More...
 
GlgObject GetAction (GlgActionType action_type, GlgTriggerType trigger_type, int button, GlgArmedStateType armed_state, GlgDoubleClickStateType double_click_state, String action, String subaction, boolean enabled_only)
 Returns the first found action with the matching parameters attached to the object. More...
 
GlgObject GetAlarmObject (String alarm_label, boolean single_alarm)
 Retrieves an alarm object with a specified alarm label inside the object the method is invoked on. More...
 
GlgCube GetBox ()
 Returns the object's bounding box extent in screen coordinates. More...
 
GlgMinMax GetChartDataExtent (String resource_name, boolean x_extent, boolean visible_only)
 Queries the minimum and maximum extent of the data accumulated in the chart or in one of its plots in the specified X or Y direction. More...
 
GlgDataType GetDataType ()
 Returns The data object's data type. More...
 
GlgObject GetDrawingMatrix ()
 ADVANCED: Returns transformation matrix used to draw the object. More...
 
double GetDResource (String resource_name)
 Returns the current value of the object's D (double) resource. More...
 
double GetDTag (String tag_source)
 Returns the current value of the object's D (double) tag. More...
 
Object GetElement (int index)
 Returns element at the specified position in the container. More...
 
GlgGISRequestObserver GetGISRequestInfo (String resource_name)
 Obtains information about an asynchronous map loading request in progress for the GIS object the method is invoked on. More...
 
GlgPoint GetGResource (String resource_name)
 Returns the current value of the object's G (geometrical or color) resource. More...
 
GlgPoint GetGTag (String tag_source)
 Returns the current value of the object's G (geometrical or color) tag. More...
 
int GetIndex (Object object)
 Returns index of the first occurrence of an object in the container. More...
 
GlgObject GetLegendSelection (double x, double y)
 Returns the plot object corresponding to the legend item at the specified position in the legend object the method is invoked on, if any. More...
 
GlgMatrixData GetMatrixData (GlgMatrixData matrix_data)
 ADVANCED: Queries matrix coefficients of the matrix. More...
 
GlgObject GetNamedObject (String name)
 Finds an object with the specified name inside the container of GLG objects and returns it. More...
 
GlgObject GetNamedPlot (String resource_name, String plot_name)
 Given a name of the chart's plot, returns the plot's object ID. More...
 
Object GetNativeComponent (String resource_name, GlgComponentQueryType type)
 ADVANCED: Returns a native component used to render the viewport. More...
 
int GetNumParents ()
 ADVANCED: Returns number of the object's parents. More...
 
Object GetObjectData ()
 Retrieves application data attached to the object via SetObjectData. More...
 
String GetObjectName ()
 Returns the object's name. More...
 
GlgObjectType GetObjectType ()
 Returns the object's type. More...
 
GlgObject GetObjectViewport (boolean heavy_weight, boolean self)
 Returns parent viewport of the drawable object. More...
 
GlgObject GetParent ()
 ADVANCED: Returns the object's parent object, if one exists, or an array of all parents for constrained data objects. More...
 
GlgObject GetParentViewport (boolean heavy_weight)
 Returns parent viewport of the drawable object. More...
 
Object GetResource (String resource_name)
 Deprecated, use GetNativeComponent:
Returns an ID of a native resource. More...
 
GlgObject GetResourceObject (String resource_name)
 Finds and returns a named resource or an attribute of the object. More...
 
int GetSize ()
 Returns size of the container object. More...
 
String GetSResource (String resource_name)
 Returns the current value of the object's S (string) resource. More...
 
String GetSTag (String tag_source)
 Returns the current value of the object's S (string) tag. More...
 
int GetStringIndex (String search_string)
 Returns index of the first occurrence of a string in the container of the STRING type. More...
 
GlgObject GetTagObject (String search_string, boolean by_name, boolean unique_tags, boolean single_tag, GlgTagType tag_type_mask)
 Retrieves a tag object with a specified tag name, data tag source, or export tag category inside the object the method is invoked on. More...
 
boolean GISConvert (String resource_name, GlgCoordType coord_type, boolean coord_to_lat_lon, GlgPoint in_point, GlgPoint out_point)
 Performs coordinate conversion from the GIS coordinates of the GIS Object to the GLG coordinates of the drawing and visa versa. More...
 
boolean GISCreateSelection (String resource_name, String layers, double x, double y, GlmLabelSelectionMode select_labels, Function callback)
 Queries information about GIS features located at the specified map position. More...
 
boolean GISGetElevation (String resource_name, String layer_name, double lon, double lat, Function callback)
 
Queries map server elevation data. More...
 
boolean HasResourceObject (String resource_name)
 Checks if the object's named resource exists. More...
 
boolean HasTag (String tag_name, GlgTagType tag_type_mask)
 Checks if a data or export tag with a specified tag name exists inside the object the method is invoked on. More...
 
boolean HasTagName (String tag_name)
 Checks if the object's data tag with a specified tag name exists. More...
 
boolean HasTagSource (String tag_source)
 Checks if the object's data tag with a specified tag source exists. More...
 
int ImportStrings (String data, boolean verbose)
 Replaces text strings in the viewport's drawing with the strings loaded from a string translation file. More...
 
int ImportTags (String data, boolean verbose)
 Replaces the TagName and TagSource attributes of data tags in the viewport's drawing with information loaded from a tag remapping file. More...
 
void InitialDraw ()
 Draws a GLG viewport object for the first time after it has been created or loaded. More...
 
boolean InstallGISRequest (String resource_name)
 Installs a new map received by the GIS request in the GIS object. More...
 
void Inverse ()
 Inverses the order of elements inside the container object. More...
 
boolean IsAt (GlgPositionType position)
 Checks the position of the iteration pointer (the current element of the container). More...
 
boolean IsDrawable ()
 Checks if the object is drawable. More...
 
Object Iterate ()
 Traverses the container object's elements in the forward direction. More...
 
Object IterateBack ()
 Traverses the container object's elements in the backward direction. More...
 
boolean LayoutObjects (GlgObject anchor, GlgLayoutType type, double distance, boolean use_box, boolean process_subobjects)
 Performs operations ranging from setting an object's width and height to aligning and layout of groups of objects. More...
 
boolean MoveObject (GlgCoordType coord_type, GlgPoint start_point, GlgPoint end_point)
 Moves an object by a move vector. More...
 
boolean MoveObjectBy (GlgCoordType coord_type, double x, double y, double z)
 Moves the object by the specified distances. More...
 
boolean MoveObjectByPoint (GlgCoordType coord_type, GlgPoint point)
 Moves the object by distances specified by the GlgPoint object. More...
 
boolean PositionObject (GlgCoordType coord_type, GlgAnchoringType anchoring, double x, double y, double z)
 Positions the object at the specified location. More...
 
boolean PositionObjectByPoint (GlgCoordType coord_type, GlgAnchoringType anchoring, GlgPoint position)
 Positions the object at the location specified by the GlgPoint object. More...
 
double PositionToValue (String resource_name, double x, double y, boolean outside_x, boolean outside_y)
 Returns a value corresponding to the specified position on top of the Chart or an Axis object. More...
 
GlgObject QueryTags (GlgTagType tag_type_mask)
 Returns a group of all tags of the requested tag type defined in the object. More...
 
void ReleaseObject (GlgObject suspend_info)
 Releases the object that was suspended for editing. More...
 
boolean ReorderElement (int current_index, int new_index)
 Changes an element's position inside the container. More...
 
boolean RequestGISMap (String resource_name, double extent_x, double extent_y, double center_x, double center_y, double angle, GlgProjectionType projection, String layers, GlgGISRequestFlags flags, GlgGISRequestObserver request_observer)
 Initiates an asynchronous GIS map loading request. More...
 
boolean RequestGISZoom (String resource_name, char type, double value, GlgGISRequestObserver request_observer)
 Initiates an asynchronous GIS zooming or panning request compatible with the SetZoom method interface. More...
 
boolean Reset ()
 Reinitializes the viewport's drawing by resetting its drawing hierarchy, then setting it up again and rendering the drawing. More...
 
void ResetHierarchy ()
 Resets the object hierarchy of the object. More...
 
boolean RotateObject (GlgCoordType coord_type, GlgPoint center, double x_angle, double y_angle, double z_angle)
 Rotates the object. More...
 
Uint8List SaveObject (String encoding)
 Serializes the object into a byte array using the specified encoding. More...
 
boolean ScaleObject (GlgCoordType coord_type, GlgPoint center, double x_scale, double y_scale, double z_scale)
 Scales the object. More...
 
boolean ScreenToWorld (boolean inside_vp, GlgPoint in_point, GlgPoint out_point)
 Converts a point's screen coordinates to the GLG world coordinate system. More...
 
Object SendMessageToObject (String resource_name, String message, Object param1, Object param2, Object param3, Object param4)
 Sends a message to the object to request some action to be performed. More...
 
boolean SetCursorType (String resource_name, GlgCursorType cursor_type)
 Sets cursor for the viewport's drawing or one of its child viewports. More...
 
boolean SetDResource (String resource_name, double value)
 Sets a new value of the object's D (double) resource. More...
 
boolean SetDResourceIf (String resource_name, double value, boolean if_changed)
 Sets a new value of the object's D (double) resource. More...
 
boolean SetDTag (String tag_source, double value, boolean if_changed)
 Sets a new value of the object's D (double) tag. More...
 
boolean SetElement (int index, Object new_object)
 Replaces the object at the specified position in the container. More...
 
void SetEnd ()
 Initializes the container object for the backward traversing. More...
 
void SetFocus (String resource_name)
 Sets the keyboard focus to the object's viewport. More...
 
boolean SetGResource (String resource_name, double x_value, double y_value, double z_value)
 Sets new values of the object's G (geometrical or color) resource. More...
 
boolean SetGResourceFromPoint (String resource_name, GlgPoint g_value)
 Sets new values of the object's G (geometrical or color) resource. More...
 
boolean SetGResourceFromPointIf (String resource_name, GlgPoint g_value, boolean if_changed)
 Sets new values of the object's G (geometrical or color) resource. More...
 
boolean SetGResourceIf (String resource_name, double x_value, double y_value, double z_value, boolean if_changed)
 Sets new values of the object's G (geometrical or color) resource. More...
 
boolean SetGTag (String tag_source, double x_value, double y_value, double z_value, boolean if_changed)
 Sets new values of the object's G (geometrical or color) tag. More...
 
boolean SetGTagObj (String tag_source, GlgPoint value, boolean if_changed)
 Sets new values of the object's G (geometrical or color) tag. More...
 
boolean SetLabelFormatter (String resource_name, function formatter)
 Attaches a custom label formatter to the chart axis or the stand-alone axis object. More...
 
boolean SetLinkedAxis (String resource_name, GlgObject axis_object, String axis_resource_name)
 Associates the chart's plot, level line or annotation object with an Y axis for automatic rescaling. More...
 
void SetMatrixData (GlgMatrixData matrix_data)
 ADVANCED: Sets matrix's coefficients to the supplied values. More...
 
void SetObjectData (Object data)
 Attaches arbitrary application data to the graphical object the method is invoked on. More...
 
void SetParentElement (String element_id)
 Specifies a parent DIV element to use for the viewport's drawing. More...
 
boolean SetResourceFromObject (String resource_name, GlgObject value)
 Sets a new value of the object's resource to the value of contained in the provided data object of the same data type. More...
 
boolean SetResourceFromObjectIf (String resource_name, GlgObject value, boolean if_changed)
 Sets the value of the object's data object to the value of another data object of the same data type. More...
 
boolean SetResourceObject (String resource_name, GlgObject value)
 Replaces a resource object inside the object the method is invoked on. More...
 
GlgGISRequestObserver SetScrollbarObserver (String resource_name, GlgGISRequestObserver request_observer)
 Controls the the way integrated scrollbars work for the GIS object. More...
 
boolean SetSResource (String resource_name, String value)
 Replaces the string of the object's S (string) resource. More...
 
boolean SetSResourceFromD (String resource_name, String format, double value)
 Sets the value of the object's S (string) resource from a double value, converting the value into a string using a C-style printf format string. More...
 
boolean SetSResourceFromDIf (String resource_name, String format, double value, boolean if_changed)
 Sets the value of the object's S (string) resource from a double value, converting the value into a string using a C-style printf format string. More...
 
boolean SetSResourceIf (String resource_name, String value, boolean if_changed)
 Replaces the string of the object's S (string) resource. More...
 
boolean SetSTag (String tag_source, String value, boolean if_changed)
 Replaces the string of the object's S (string) tag. More...
 
boolean SetSTagFromD (String tag_source, String format, double value, boolean if_changed)
 Sets the value of the object's S (string) tag from a double value, converting the value into a string using a C-style printf format string. More...
 
void SetStart ()
 Initializes the container object for the forward traversing. More...
 
void SetTemplate (GlgObject template)
 ADVANCED: Sets a template of a subdrawing or subwindow object. More...
 
void SetupHierarchy ()
 Provides an explicit request to set up the object hierarchy of the object without rendering it. More...
 
boolean SetXform (GlgObject xform)
 Adds or deletes transformations attached to the object. More...
 
boolean SetZoom (String resource_name, char type, double value)
 Provides a programmatic interface to integrated zooming and panning. More...
 
boolean SetZoomMode (String resource_name, GlgObject zoom_object, String zoom_object_resource_name, GlgZoomMode zoom_mode)
 Sets or resets the viewport's zoom mode by supplying a GIS or Chart object to be zoomed. More...
 
GlgObject SuspendObject ()
 Suspends the object for editing after it has been drawn. More...
 
boolean TransformObject (GlgObject xform, GlgCoordType coord_type, GlgObject parent)
 ADVANCED: Transforms all control points of the object with an arbitrary transformation. More...
 
void TransformPoint (GlgPoint in_point, GlgPoint out_point)
 Transforms a single point using the matrix object the method is invoked on. More...
 
void TraverseObjects (Function enter_func, Function exit_func)
 Traverses the object hierarchy of the object and invokes the supplied functions on the object itself and all its subobjects, including object attributes. More...
 
boolean UnconstrainObject ()
 Unconstrains the object's attribute or the object's point. More...
 
boolean Update ()
 Updates the drawing of a viewport or a light viewport with the latest resource values. More...
 
boolean UpdateChartState (String resource_name, int state)
 Triggers updating the chart's state after prefilling it with data using the quick mode of AddPlotDataSample. More...
 
boolean UpdateChartTimeAxis (String resource_name, double time_stamp, boolean initialize)
 Scrolls the chart forward to show all data samples up to the provided time stamp or index. More...
 
void UpdateSize ()
 Updates the size of the top viewport. More...
 
boolean WorldToScreen (boolean inside_vp, GlgPoint in_point, GlgPoint out_point)
 Converts a point's coordinates from the GLG world coordinate system to the screen coordinate system. More...
 

Static Public Member Functions

static void AddGlobalListener (GlgCallbackType type, Function callback)
 ADVANCED: Adds a global listener for the TemplateLoad events. More...
 
static void AddHandler (String handler_name, GlgHandler handler)
 Registers a custom interaction handler. More...
 
static void Bell ()
 Emits an audio beep. More...
 
static void BellExt (double volume, double frequency, double duration)
 Emits a beeping sound with the specified parameters. More...
 
static String ConcatResNames (String resource_name1, String resource_name2)
 Creates a composite resource path from two components. More...
 
static GlgObject ConvertViewportType (GlgObject object)
 Converts a viewport to a light viewport, or a light viewport to a viewport. More...
 
static String CreateIndexedName (String template_name, int resource_index)
 Creates a string with a name of an enumerated resource. More...
 
static GlgObject CreateMessage (GlgObject viewport)
 Creates a GLG message object that may be sent by an interaction handler to a parent handler or a parent's Input callback via SendMessageToParent. More...
 
static GlgObject CreateObject (GlgObjectType type, Object param1, Object param2, Object param3, Object param4)
 Creates a GLG object of a specified type. More...
 
static String CreateResourcePath (GlgObject object, GlgObject parent)
 Returns a relative resource path that can be used to access the object as a resource of the parent object. More...
 
static GlgObject CreateSelection (GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp)
 Returns a list of the objects intersecting a given rectangle. More...
 
static GlgObject CreateSelectionFromEvent (int x, int y, int delta, GlgObject top_vp, GlgObject selected_vp)
 Returns a list of names of objects located under the mouse. More...
 
static GlgObject CreateSelectionMessage (GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp, GlgSelectionEventType selection_type, int button)
 Searches for an Action object that would be activated by the user interaction event. More...
 
static GlgObject CreateSelectionNames (GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp)
 Returns a list of names of objects intersecting a given rectangle. More...
 
static GlgObject CreateSelectionNamesFromEvent (int x, int y, int delta, GlgObject top_vp, GlgObject selected_vp)
 Returns a list of names of objects located under the mouse. More...
 
static boolean EnableAttachmentPoints (boolean state)
 Controls the use of attachment points to determine object extents when the objects are aligned. More...
 
static void EnableMultiTouchDefaultAction (bool state)
 Enables or disables default browser actions on double touch when touch events are enabled. More...
 
static boolean EnableTimerXforms (boolean state)
 ADVANCED: Enables or disables all timer transformations defined inside GLG drawings. More...
 
static void Error (GlgErrorType error_type, String message, Object exception)
 Display an error message using the GLG error handler. More...
 
static Object GetHandlerData (GlgObject viewport)
 Retrieves stored data used by a custom handler instance. More...
 
static String GetLibraryVersion ()
 Returns GLG API library version as a string. More...
 
static boolean GetModifierState (GlgModifierType modifier)
 Returns the current state of a modifier. More...
 
static int GetNativeEventKey (GlgCallEvent call_event)
 Retrieves the key of the native keypress event. More...
 
static GlgEventType GetNativeEventType (GlgCallEvent call_event)
 Retrieves the type of the native event that triggered the call event being sent to the custom interaction handler. More...
 
static double GetNativeEventXY (GlgCallEvent call_event, boolean y_coord)
 Retrieves the X and Y coordinates of the native event. More...
 
static int GetPendingInstances ()
 Returns a number of subdrawing and subwindow objects that are waiting for their templates being loaded. More...
 
static int GetPendingTemplates ()
 Returns a number of subdrawing and subwindow templates that are in the process of being loaded. More...
 
static GlgObject GetReference (GlgObject object)
 Creates a reference to a GlgObject that may be used outside of a callback function. More...
 
static GlgObject GetSelectedPlot ()
 Returns the plot object corresponding to the last legend item selected with the mouse, if any. More...
 
static String GetStackTraceAsString ()
 Returns current stack trace as a string. More...
 
static boolean GetTouchMode ()
 Queries the state of the GLG touch mode. More...
 
static void GlmConvert (GlgProjectionType projection, boolean stretch, GlgCoordType coord_type, boolean 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)
 A low level method that performs coordinate conversion from the GIS coordinates of a map to the GLG coordinates of the drawing and visa versa without the help of a GLG GIS Object. More...
 
static boolean IHCallCurrIH (GlgIHCallEvent call_event)
 Passes an event to the current handler. More...
 
static boolean IHCallCurrIHWithModifToken (GlgIHCallEvent call_event, int token)
 A variation on IHCallCurrIHWithToken that reuses an existing user interface event. More...
 
static boolean IHCallCurrIHWithToken (int token)
 Passes a token to the current handler. More...
 
static void IHCallPrevIHWithModifToken (GlgIHCallEvent call_event, int token)
 A variation on IHCallPrevIHWithToken that reuses an existing user interface event. More...
 
static void IHCallPrevIHWithToken (int token)
 Passes the token to the parent handler of the currently active handler. More...
 
static void IHChangeBParameter (GlgObject ih, String name, boolean value)
 Changes a boolean value stored in a named parameter. More...
 
static void IHChangeDParameter (GlgObject ih, String name, double value)
 Changes a double value stored in a named parameter. More...
 
static void IHChangeIParameter (GlgObject ih, String name, int value)
 Changes an integer value stored in a named parameter. More...
 
static void IHChangeNParameter (GlgObject ih, String name, Object value)
 Replaces a native object stored in a named parameter. More...
 
static void IHChangeOParameter (GlgObject ih, String name, GlgObject value)
 Replaces a GLG object stored in a named parameter. More...
 
static void IHChangeSParameter (GlgObject ih, String name, String value)
 Replaces a string stored in a named parameter. More...
 
static boolean IHGetBParameter (GlgObject ih, String name)
 Returns a boolean value stored in a named parameter. More...
 
static GlgObject IHGetCurrIH ()
 Retrieves the current active interface handler. More...
 
static double IHGetDParameter (GlgObject ih, String name)
 Returns a double value stored in a named parameter. More...
 
static GlgIHHandlerInterface IHGetHandlerInterface (GlgObject ih)
 Retrieves a handler interface instance used to implement a handler. More...
 
static Function IHGetHandlerInterfaceFunction (GlgIHHandlerInterface handler_interface)
 Returns function used to implement EntryPoint of the interface handler interface. More...
 
static int IHGetIParameter (GlgObject ih, String name)
 Returns an integer value stored in a named parameter. More...
 
static Object IHGetNParameter (GlgObject ih, String name)
 Returns a native object stored in a named parameter. More...
 
static GlgObject IHGetOParameter (GlgObject ih, String name)
 Returns a GLG object stored in a named parameter. More...
 
static boolean IHGetOptBParameter (GlgObject ih, String name, boolean default_value)
 Returns a boolean value stored in an optional named parameter. More...
 
static double IHGetOptDParameter (GlgObject ih, String name, double default_value)
 Returns a double value stored in an optional named parameter. More...
 
static int IHGetOptIParameter (GlgObject ih, String name, int default_value)
 Returns an integer value stored in an optional named parameter. More...
 
static Object IHGetOptNParameter (GlgObject ih, String name, Object default_value)
 Returns a native object stored in an optional named parameter. More...
 
static GlgObject IHGetOptOParameter (GlgObject ih, String name, GlgObject default_value)
 Returns a GLG object stored in an optional named parameter. More...
 
static String IHGetOptSParameter (GlgObject ih, String name, String default_value)
 Returns a string stored in an optional named parameter. More...
 
static GlgIHHandlerInterface IHGetPrevHandlerInterface ()
 Retrieves a handler interface instance used to implement the parent handler of the currently active handler. More...
 
static GlgObject IHGetPrevIH ()
 Retrieves the currently active interface handler's parent handler. More...
 
static String IHGetSParameter (GlgObject ih, String name)
 Returns a string stored in a named parameter. More...
 
static int IHGetToken (GlgIHCallEvent call_event)
 Returns a token associated with the MESSAGE_EVENT event. More...
 
static GlgCallEventType IHGetType (GlgIHCallEvent call_event)
 Returns an event's type. More...
 
static void IHInit ()
 Initializes installable handler utilities, must be invoked before any installable handler methods are used. More...
 
static GlgObject IHInstall (GlgIHHandlerInterface handler_interface)
 A low-level method that creates and installs an interface handler with the specified handler interface. More...
 
static GlgObject IHInstallAsInterface (Function entry_point)
 Provides a simplified interface to the IHInstall method. More...
 
static void IHPassToken (GlgIHHandlerInterface handler_interface, int token, boolean uninstall)
 Installs a handler, starts it and invokes its entry point with the specified token. More...
 
static void IHResetup (GlgObject ih)
 Reinitializes the current handler that have already been installed to "restart" its logic. More...
 
static void IHSetBParameter (GlgObject ih, String name, boolean value)
 Creates and stores a named boolean parameter. More...
 
static void IHSetDParameter (GlgObject ih, String name, double value)
 Creates and stores a named string parameter. More...
 
static void IHSetIParameter (GlgObject ih, String name, int value)
 Creates and stores a named integer parameter. More...
 
static void IHSetNParameter (GlgObject ih, String name, Object value)
 Creates and stores a named parameter that holds any native object. More...
 
static void IHSetOParameter (GlgObject ih, String name, GlgObject value)
 Creates and stores a named parameter that holds a GLG object. More...
 
static void IHSetOParameterFromD (GlgObject ih, String name, double value)
 Creates and stores a named double parameter that is stored as a GLG Data object of the D type. More...
 
static void IHSetOParameterFromG (GlgObject ih, String name, double value1, double value2, double value3)
 Creates and stores a named parameter that keeps X, Y and Z or R, G and B values stored as a GLG Data object of the G type. More...
 
static void IHSetOParameterFromGPoint (GlgObject ih, String name, GlgPoint point)
 Creates and stores a named parameter that contains geometrical (XYZ) or color (RGB) data and is stored as a GLG Data object of the G type. More...
 
static void IHSetSParameter (GlgObject ih, String name, String value)
 Creates and stores a named string parameter. More...
 
static void IHStart ()
 Initializes and starts the current handler after it has been installed with IHInstallAsInterface or IHInstall. More...
 
static void IHTerminate ()
 Terminates installable handler utilities. More...
 
static void IHUninstall ()
 Uninstalls the current handler (the last handler on the handler stack). More...
 
static void IHUninstallWithEvent (GlgIHCallEvent call_event)
 Uninstalls the current handler and passes an event to the previous handler. More...
 
static void IHUninstallWithToken (int token)
 Uninstalls the current handler and passes a token to the previous handler. More...
 
static boolean IsDemo ()
 Queries the type of the GLG library. More...
 
static void LoadAsset (String url, GlgHTTPRequestResponseType request_type, Function callback, Object user_data, String user, String password)
 Loads an asset from a URL. More...
 
static GlgObject LoadObject (Object data, String encoding, String base_path, GlgObject rebind_ref)
 Loads a GLG object from raw data using the specified encoding. More...
 
static void LoadObjectFromURL (String url, String encoding, Function callback, Object user_data, function abort_func, GlgObject rebind_ref)
 Loads a GLG object from a URL using the specified encoding, with an ability to abort or rebind. More...
 
static GlgObject LoadWidget (Object data, String encoding, String base_path)
 Loads a viewport named $Widget from raw data using the specified encoding. More...
 
static GlgObject LoadWidgetFromObject (GlgObject glg_object)
 Finds a viewport named $Widget inside an object and returns it. More...
 
static void LoadWidgetFromURL (String url, String encoding, Function callback, Object user_data, function abort_func)
 Loads a viewport named $Widget from a URL using the specified encoding. More...
 
static boolean ObjectsEqual (GlgObject object1, GlgObject object2)
 Performs equality comparison between two GLG objects. More...
 
static String PrintfD (String format, double value)
 C-style printf method for formatting double values. More...
 
static String PrintfI (String format, int value)
 C-style printf method for formatting integer values. More...
 
static String PrintfS (String format, String value)
 C-style printf method for formatting strings. More...
 
static double Rand (double low, double high)
 Returns a random number in the specified range. More...
 
static ReleaseToCache (Object object)
 ADVANCED: Releases an object to a cache for reuse, minimizing garbage collection. More...
 
static boolean RootToScreenCoord (GlgObject viewport, GlgPoint point)
 Converts screen coordinates relative to the page to the screen coordinates in the specified viewport. More...
 
static void SendMessageToParent (GlgObject viewport, GlgObject message_obj, String action, String subaction)
 Sends a message to the Input callback. More...
 
static GlgAlarmHandler SetAlarmHandler (GlgAlarmHandler alarm_handler)
 Installs a global alarm handler that will be invoked to process alarms. More...
 
static boolean SetAttachmentMoveMode (boolean state)
 Changes the global attachment point move mode and returns the previous mode state. More...
 
static void SetCanvasScale (double scale, double text_scale, double native_text_scale, double pixel_offset_scale, double screen_coord_scale)
 Specifies parameters of the coordinate scaling used to render GLG drawings in HTML canvas on mobile devices. More...
 
static void SetCustomLoadFunc (Function custom_load_func)
 ADVANCED: Sets a custom load function callback. More...
 
static void SetCustomSetupHandler (GlgCustomSetupHandler handler)
 Installs a custom setup handler that will be invoked to perform custom processing of objects tagged using the CustomSetup flag in the GLG drawing. More...
 
static void SetCustomURLFormatter (Function formatter_func)
 ADVANCED: Sets a custom URL formatter. More...
 
static boolean SetEditMode (GlgObject viewport, String resource_name, boolean edit_mode)
 Sets the viewport's edit mode to disable input objects in the viewport while the drawing is being edited. More...
 
static GlgErrorHandler SetErrorHandler (GlgErrorHandler new_handler)
 Replaces the GLG Toolkit error handler and returns the previous error handler. More...
 
static void SetHandlerData (GlgObject viewport, Object data)
 Stores data used by the custom handler instance. More...
 
static void SetLocale (String locale)
 Sets locale used to display dates and numbers. More...
 
static GlgTooltipFormatter SetTooltipFormatter (GlgTooltipFormatter formatter)
 Supplies a custom tooltip formatter. More...
 
static void SetTouchMode ()
 Enables handling of touch events. More...
 
static void ThrowExceptionOnError (boolean user_error, boolean internal_error, boolean detect_null_strings)
 Controls throwing an exception on an error to assist debugging. More...
 
static boolean TraceObject (GlgObject object, boolean state, boolean is_widget, GlgObject top_parent, Function action)
 Highlights all objects in the drawing that depend on the tag or resource object that is being traced. More...
 
static boolean TranslatePointOrigin (GlgObject from_viewport, GlgObject to_viewport, GlgPoint point)
 Converts screen coordinates of a point in one viewport to the screen coordinates of another viewport. More...