GLG Toolkit, JavaScript Library
Version 4.2
|
Superclass of all GLG objects. Provides the GLG API functionality (Standard, Intermediate and Extended) for all GLG objects.
PROGRAMMING NOTES
Public Member Functions | |
void | AbortGISRequest (String res_name) |
GlgObject | AddAnnotation (String res_name, GlgObject annotation, double position_x, double position_y, boolean add_box) |
GlgObject | AddAttachmentPoint (double dx, double dy, double dz) |
void | AddListener (GlgCallbackType type, function callback) |
boolean | AddObjectAt (Object obj, int index) |
boolean | AddObjectToBottom (Object obj) |
boolean | AddObjectToTop (Object obj) |
GlgObject | AddPlot (String res_name, GlgObject plot) |
void | AddPlotDataSample (double value, double time_stamp, boolean valid, float marker_visibility, boolean quick_mode) |
GlgObject | AddTimeLine (String res_name, GlgObject time_line, double time_stamp) |
void | ChangeObject (String res_name) |
boolean | ClearDataBuffer (String res_name) |
GlgObject | CloneObject (GlgCloneType clone_type) |
boolean | ConstrainObject (GlgObject to_attribute) |
boolean | ContainsObject (Object obj) |
GlgObject | CopyObject () |
GlgObject | CreateAlarmList () |
GlgObject | CreateChartSelection (GlgObject plot, double x, double y, double dx, double dy, boolean screen_coord, boolean include_invalid, boolean x_priority) |
GlgObject | CreateInversedMatrix () |
GlgObject | CreatePointArray (GlgControlPointType type) |
GlgObject | CreateResourceList (boolean list_named_res, boolean list_def_attr, boolean list_aliases) |
GlgObject | CreateTagList (boolean unique_tag_sources) |
String | CreateTooltipString (double x, double y, double dx, double dy, String format) |
boolean | DeleteAnnotation (String res_name, GlgObject annotation, double position_x, double position_y) |
boolean | DeleteBottomObject () |
boolean | DeleteObjectAt (int index) |
boolean | DeletePlot (String res_name, GlgObject plot) |
boolean | DeleteTags (GlgTagType tag_type_mask) |
boolean | DeleteThisObject (Object obj) |
boolean | DeleteTimeLine (String res_name, GlgObject time_line, double time_stamp) |
boolean | DeleteTopObject () |
boolean | Equals (GlgObject object) |
Object | ExportStrings (String separator1, String separator2) |
Object | ExportTags (String separator1, String separator2) |
Object | FindMatchingObjects (GlgObjectMatchType match_type, boolean find_parents, 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 | FitObject (GlgCoordType coord_type, GlgCube box, boolean 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, boolean enabled_only) |
GlgObject | GetAlarmObject (String alarm_label, boolean single_alarm) |
GlgCube | GetBox () |
GlgMinMax | GetChartDataExtent (String res_name, boolean time, boolean visible_only) |
GlgMinMax | GetDataExtent (String res_name, boolean time) |
GlgDataType | GetDataType () |
GlgObject | GetDrawingMatrix () |
double | GetDResource (String resource_name) |
double | GetDTag (String tag_source) |
Object | GetElement (int index) |
GlgGISRequestObserver | GetGISRequestInfo (String res_name) |
GlgPoint | GetGResource (String resource_name) |
GlgPoint | GetGTag (String tag_source) |
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 (boolean 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, boolean by_name, boolean unique_tags, boolean single_tag, GlgTagType tag_type_mask) |
boolean | GISConvert (String res_name, GlgCoordType coord_type, boolean coord_to_lat_lon, GlgPoint in_point, GlgPoint out_point) |
boolean | GISCreateSelection (String res_name, String layers, double x, double y, GlmLabelSelectionMode select_labels, function callback) |
boolean | GISGetElevation (String res_name, String layer_name, double lon, double lat, function callback) |
boolean | HasResourceObject (String resource_name) |
boolean | HasTag (String tag_name, GlgTagType tag_type_mask) |
boolean | HasTagName (String tag_name) |
boolean | HasTagSource (String tag_source) |
int | ImportStrings (String data, boolean verbose) |
int | ImportTags (String data, boolean verbose) |
void | InitialDraw () |
boolean | InstallGISRequest (String res_name) |
void | Inverse () |
boolean | IsAt (GlgPositionType position) |
boolean | IsDrawable () |
Object | Iterate () |
Object | IterateBack () |
boolean | LayoutObjects (GlgObject sel_elem, GlgLayoutType type, double distance, boolean use_box, boolean process_subobjects) |
boolean | MoveObject (GlgCoordType coord_type, GlgPoint start_point, GlgPoint end_point) |
boolean | MoveObjectBy (GlgCoordType coord_type, double x, double y, double z) |
boolean | MoveObjectByPoint (GlgCoordType coord_type, GlgPoint point) |
boolean | PositionObject (GlgCoordType coord_type, GlgAnchoringType anchoring, double x, double y, double z) |
boolean | PositionObjectByPoint (GlgCoordType coord_type, GlgAnchoringType anchoring, GlgPoint position) |
double | PositionToValue (String res_name, double x, double y, boolean outside_x, boolean outside_y) |
GlgObject | QueryTags (GlgTagType tag_type_mask) |
void | ReleaseObject (GlgObject suspend_info) |
boolean | ReorderElement (int current_index, int new_index) |
boolean | 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) |
boolean | RequestGISZoom (String res_name, char type, double value, GlgGISRequestObserver request_observer) |
boolean | Reset () |
void | ResetHierarchy () |
boolean | RotateObject (GlgCoordType coord_type, GlgPoint center, double x, double y, double z) |
Uint8List | SaveObject (String encoding) |
boolean | ScaleObject (GlgCoordType coord_type, GlgPoint center, double x, double y, double z) |
boolean | ScreenToWorld (boolean inside_vp, GlgPoint in_point, GlgPoint out_point) |
Object | SendMessageToObject (String res_name, String message, Object param1, Object param2, Object param3, Object param4) |
boolean | SetDResource (String resource_name, double value) |
boolean | SetDResourceIf (String resource_name, double value, boolean if_changed) |
boolean | SetDTag (String tag_source, double value, boolean if_changed) |
boolean | SetElement (int index, Object new_object) |
void | SetEnd () |
void | SetFocus (String res_name) |
boolean | SetGResource (String resource_name, double g_value1, double g_value2, double g_value3) |
boolean | SetGResourceFromPoint (String resource_name, GlgPoint g_value) |
boolean | SetGResourceFromPointIf (String resource_name, GlgPoint g_value, boolean if_changed) |
boolean | SetGResourceIf (String resource_name, double g_value1, double g_value2, double g_value3, boolean if_changed) |
boolean | SetGTag (String tag_source, double g_value1, double g_value2, double g_value3, boolean if_changed) |
boolean | SetGTagObj (String tag_source, GlgPoint g_value, boolean if_changed) |
boolean | SetLabelFormatter (String res_name, GlgLabelFormatter formatter) |
boolean | SetLinkedAxis (String res_name, GlgObject axis_object, String axis_res_name) |
void | SetMatrixData (GlgMatrixData matrix_data) |
void | SetParentElement (String element_id) |
boolean | SetResource (String resource_name, Object value) |
boolean | SetResourceFromObject (String resource_name, GlgObject o_value) |
boolean | SetResourceFromObjectIf (String resource_name, GlgObject o_value, boolean if_changed) |
boolean | SetResourceObject (String resource_name, GlgObject value) |
GlgGISRequestObserver | SetScrollbarObserver (String res_name, GlgGISRequestObserver request_observer) |
boolean | SetSResource (String resource_name, String s_value) |
boolean | SetSResourceFromD (String resource_name, String format, double d_value) |
boolean | SetSResourceFromDIf (String resource_name, String format, double d_value, boolean if_changed) |
boolean | SetSResourceIf (String resource_name, String s_value, boolean if_changed) |
boolean | SetSTag (String tag_source, String s_value, boolean if_changed) |
boolean | SetSTagFromD (String tag_source, String format, double d_value, boolean if_changed) |
void | SetStart () |
void | SetTemplate (GlgObject template) |
void | SetupHierarchy () |
boolean | SetXform (GlgObject xform) |
boolean | SetZoom (String res_name, char type, double value) |
boolean | SetZoomMode (String res_name, GlgObject zoom_object, String zoom_object_name, GlgZoomMode zoom_mode) |
GlgObject | SuspendObject () |
boolean | TransformObject (GlgObject xform, GlgCoordType coord_type, GlgObject parent) |
void | TransformPoint (GlgPoint in_point, GlgPoint out_point) |
void | TraverseObjects (function enter_action, function exit_action) |
boolean | UnconstrainObject () |
boolean | Update () |
boolean | UpdateImmediately () |
void | UpdateSize () |
boolean | WorldToScreen (boolean inside_vp, GlgPoint in_point, GlgPoint out_point) |
Static Public Member Functions | |
static void | AddDataSample (GlgObject plot, GlgDataSample datasample) |
static void | AddGlobalListener (GlgCallbackType type, function callback) |
static void | Bell () |
static void | BellExt (double volume, double frequency, double duration) |
static String | ConcatResNames (String resource_name1, String resource_name2) |
static GlgObject | ConvertViewportType (GlgObject obj) |
static String | CreateIndexedName (String template_name, int resource_index) |
static GlgObject | CreateObject (GlgObjectType type, Object param1, Object param2, Object param3, Object param4) |
static GlgObject | CreateSelection (GlgObject top_vp, GlgCube rectangle, GlgObject selected_vp) |
static GlgObject | CreateSelectionFromEvent (int x, int y, 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 | CreateSelectionNamesFromEvent (int x, int y, int delta, GlgObject top_vp, GlgObject selected_vp) |
static boolean | EnableAttachmentPoints (boolean state) |
static void | EnableMultiTouchDefaultAction (bool state) |
static boolean | EnableTimerXforms (boolean state) |
static void | Error (GlgErrorType error_type, String message, Object exception) |
static String | GetLibraryVersion () |
static boolean | GetModifierState (GlgModifierType modifier) |
static int | GetPendingInstances () |
static int | GetPendingTemplates () |
static GlgObject | GetReference (GlgObject object) |
static GlgObject | GetSelectedPlot () |
static String | GetStackTraceAsString () |
static boolean | GetTouchMode () |
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) |
static boolean | IHCallCurrIH (GlgCallEvent call_event) |
static boolean | IHCallCurrIHWithModifToken (GlgCallEvent call_event, int token) |
static boolean | IHCallCurrIHWithToken (int token) |
static void | IHCallPrevIHWithModifToken (GlgCallEvent call_event, int token) |
static void | IHCallPrevIHWithToken (int token) |
static void | IHChangeBParameter (GlgObject ih, String name, boolean 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 boolean | 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 boolean | IHGetOptBParameter (GlgObject ih, String name, boolean 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 GlgObject | IHInstallAsInterface (function entry_point) |
static void | IHPassToken (GlgIHHandlerInterface handler_interface, int token, boolean uninstall) |
static void | IHResetup (GlgObject ih) |
static void | IHSetBParameter (GlgObject ih, String name, boolean 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, double value1, double value2, double value3) |
static void | IHSetOParameterFromGPoint (GlgObject ih, String name, GlgPoint point) |
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 boolean | IsDemo () |
static void | LoadAsset (String url, GlgHTTPRequestResponseType request_type, function callback, Object user_data) |
static GlgObject | LoadObject (Object data, String encoding, String path, GlgObject rebind_ref) |
static void | LoadObjectFromURL (String url, String encoding, function callback, Object user_data, function abort_func, GlgObject rebind_ref) |
static GlgObject | LoadWidget (Object data, String encoding, String path) |
static GlgObject | LoadWidgetFromObject (GlgObject glg_object) |
static void | LoadWidgetFromURL (String url, String encoding, function callback, Object user_data, function abort_func) |
static boolean | ObjectsEqual (GlgObject object1, GlgObject object2) |
static String | PrintfD (String format, double value) |
static String | PrintfI (String format, int value) |
static String | PrintfS (String format, String value) |
static double | Rand (double low, double high) |
static | ReleaseToCache (Object object) |
static boolean | RootToScreenCoord (GlgObject viewport, GlgPoint root_coord) |
static GlgAlarmHandler | SetAlarmHandler (GlgAlarmHandler alarm_handler) |
static boolean | SetAttachmentMoveMode (boolean state) |
static void | SetCanvasScale (double scale, double text_scale, double native_text_scale) |
static void | SetCustomLoadFunc (Function(String, String, int, Function(int, Object)) func) |
static boolean | SetEditMode (GlgObject viewport, String res_name, boolean edit_mode) |
static GlgErrorHandler | SetErrorHandler (GlgErrorHandler new_handler) |
static void | SetLocale (String locale) |
static GlgTooltipFormatter | SetTooltipFormatter (GlgTooltipFormatter formatter) |
static void | SetTouchMode () |
static void | Terminate () |
static void | ThrowExceptionOnError (boolean user_error, boolean internal_error, boolean detect_null_strings) |
static boolean | TraceObject (GlgObject object, boolean state, boolean is_widget, GlgObject top_parent, function action) |
static void | TranslatePointOrigin (GlgObject from_viewport, GlgObject to_viewport, GlgPoint point) |
Static Public Attributes | |
static GlgObject | IH_CURR = null |
static GlgObject | IH_GLOBAL = null |
static GlgObject | IH_NEW = null |
void AbortGISRequest | ( | String | res_name | ) |
Intermediate API: Aborts the GIS request in progress, if any.
res_name | If is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used. |
GlgObject AddAnnotation | ( | String | res_name, |
GlgObject | annotation, | ||
double | position_x, | ||
double | position_y, | ||
boolean | add_box | ||
) |
Adds an annotation to a chart.
res_name | The resource path of a child chart to add the annotation to, or null to add to this chart object. |
annotation | The annotation object to add, or null to create a new annotation. |
position_x | The annotation's X position. |
position_y | The annotation's Y position. |
add_box | If set to true, a text box will be added to the annotation label if the new annnotation is created. |
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.
dx | X offset |
dy | Y offset |
dz | Z offset |
|
static |
Deprecated, use AddDataSampleNode.
|
static |
Adds a global listener for TemplateLoad events.
type | Callback type: TEMPLATE_LOAD_CB |
callback | A callback function with the type signature matching the type signature of the GlgTemplateLoadListener::TemplateLoadCallback method. This function will be invoked to handle TemplateLoad events generated by subwindows and subdrawings when their templates are loaded. |
void AddListener | ( | GlgCallbackType | type, |
function | 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.
type | Callback type: SELECT_CB, INPUT_CB, TRACE_CB or TRACE2_CB. (defined in the GlgCallbackType enum). |
callback | A callback function with the type signature matching the type signature of the methods of the corresponding listener objects:
|
This function will be invoked to handle events of the requested listener type.
boolean AddObjectAt | ( | Object | obj, |
int | index | ||
) |
Extended API: Adds object to the container at the specified position.
obj | Object to add |
index | Position index |
boolean AddObjectToBottom | ( | Object | obj | ) |
Extended API: Adds object to the bottom of the container.
obj | Object to add |
boolean AddObjectToTop | ( | Object | obj | ) |
Extended API: Adds object to the top of the container.
obj | Object to add |
Adds a plot line to a chart.
res_name | The resource path of a child chart to add the plot to, or null to add to this chart object. |
plot | The plot object. It null is specified, the method creates a plot with default parameters. |
void AddPlotDataSample | ( | double | value, |
double | time_stamp, | ||
boolean | valid, | ||
float | marker_visibility, | ||
boolean | quick_mode | ||
) |
Intermediate API, ADVANCED: Adds a new datasample with the supplied values to this plot's data buffer. If the plot uses a cache, and the cache is not empty, the new datasample will be taken from the plot's cache. NOTE: Adds GlgDataSample, not an extended data sample (GlgDataSampleExt).
value | The datasample value. |
time_stamp | The time stamp. |
valid | The valid flag. |
marker_visibility | The marker visibility in the range [0;1]. |
quick_mode | Enables 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. |
Adds a time line to a chart.
res_name | The resource path of a child chart to add the time line to, or null to add to this chart object. |
time_line | The time line object to add, or null to create a new time line. |
time_stamp | The time stamp to assign to the added time line. |
|
static |
Emits an audio beep. See BellExt for more control over the audio beep parameters.
|
static |
Emits a beeping sound with the specified parameters.
The Bell method uses this method with the following parameters:
BellExt( 0.03, 520, 0.1 )
volume | The sound volume |
frequency | The sound frequency |
duration | The sound duration |
void ChangeObject | ( | String | res_name | ) |
Forces a change event for an object.
boolean 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.
res_name | The resource path of a child chart or a child's plot to clear the buffer of, or null to clear this object. |
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.
|
static |
Concatenates two resource names, inserting the "/" separator if necessary.
resource_name1 | Resource path |
resource_name2 | Resource name |
boolean ConstrainObject | ( | GlgObject | to_attribute | ) |
Intermediate API: Constrains the attribute object.
to_attribute | The object to constrain to |
boolean ContainsObject | ( | Object | obj | ) |
Intermediate API: Checks if the object is contained in the container.
obj | The object to search for. |
Extended API: Converts viewport to a light viewport, or a light viewport to a viewport.
obj | Object to be converted: viewport or light viewport. |
GlgObject CopyObject | ( | ) |
Extended API: Creates a copy of an object using FULL_CLONE copy method.
GlgObject CreateAlarmList | ( | ) |
Returns a list of all alarms defined in the object.
GlgObject CreateChartSelection | ( | GlgObject | plot, |
double | x, | ||
double | y, | ||
double | dx, | ||
double | dy, | ||
boolean | screen_coord, | ||
boolean | include_invalid, | ||
boolean | x_priority | ||
) |
Intermediate API, ADVANCED: Returns chart selection corresponding to the screen point.
plot | The plot to create selection for, or null to query all plots of this chart. |
x | The x/time coordinate. |
y | The y coordinate. |
dx | The x distance around the point. Datasamples with greater x distances from the point will not be considered. |
dy | The y distance around the point. Datasamples with greater y distances from the point will not be considered. not be considered. |
screen_coord | If 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_invalid | If set to true, invalid samples will be reported if their time stamp matches the x coordinate. |
x_priority | If set to true, a point with the smallest x deviation will be selected, otherwise a point with the smallest xy distance will be selected. |
|
static |
Creates an indexed name by inserting a number into the first % character of the name template.
GlgObject CreateInversedMatrix | ( | ) |
Intermediate API, ADVANCED: Creates and returns a matrix that is an inverse of this matrix.
|
static |
Extended API: Creates a GlgObject of the requested type.
type | GLG object type |
param1 | An optional object creation parameter that depends on the object type. |
param2 | An optional object creation parameter that depends on the object type. |
param3 | An optional object creation parameter that depends on the object type. |
param4 | An optional object creation parameter that depends on the object type. |
Refer to the Using GlgCreateObject section of the C/C++ Extended API in the GLG Programming Reference Manual for description of parameter values.
GlgObject CreatePointArray | ( | GlgControlPointType | type | ) |
Intermediate API, ADVANCED: Creates an array containing all of an object's control points.
type | Reserved for future use. |
GlgObject CreateResourceList | ( | boolean | list_named_res, |
boolean | list_def_attr, | ||
boolean | list_aliases | ||
) |
Intermediate API, ADVANCED: Queries object's resources.
Creates an array of all resource names of this object on one level of hierarchy.
list_named_res | Include named resources if true |
list_def_attr | Include default attributes if true |
list_aliases | Include aliases if true |
|
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.
top_vp | The top viewport of the drawing |
rectangle | Rectangle in screen coordinates of the selected_vp. |
selected_vp | The selection viewport. |
|
static |
Intermediate API, ADVANCED: Creates object selection from a mouse event.
x | X coordinate of the event |
y | Y coordinate of the event |
delta | Mouse sensitivity in pixels |
top_vp | The top viewport of the drawing |
selected_vp | The viewport of the mouse event. |
|
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.
top_vp | The top viewport of the drawing |
rectangle | Rectangle in screen coordinates of the selected_vp. |
selected_vp | The selection viewport in which rectangle coordinates are defined. |
selection_type | CLICK_SELECTION, MOVE_SELECTION or TOOLTIP_SELECTION. |
button | selection button for click selection or 0.0 |
|
static |
ADVANCED: Creates an array of objects selected by a rectangle.
top_vp | The top viewport of the drawing |
rectangle | Rectangle in screen coordinates of the selected_vp. |
selected_vp | The selection viewport in which rectangle coordinates are defined. |
|
static |
ADVANCED: Creates object selection from a mouse event.
This method is useful for use with the Trace callback to implement custom selection logic based on the mouse events.
x | X coordinate relative to the selected_vp. |
y | Y coordinate relative to the selected_vp. |
delta | Mouse sensitivity in pixels |
top_vp | The top viewport of the drawing |
selected_vp | The viewport of the mouse event. |
GlgObject CreateTagList | ( | boolean | unique_tag_sources | ) |
Returns a list of all tags of the DATA_TAG type defined in the object
unique_tag_sources | If 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. |
String CreateTooltipString | ( | double | x, |
double | y, | ||
double | dx, | ||
double | dy, | ||
String | format | ||
) |
Intermediate API, ADVANCED: Returns tooltip string corresponding to the screen point.
x | The x coordinate. |
y | The y coordinate. |
dx | The x distance around the point for chart tooltips. Datasamples with greater x distances from the point will not be considered. |
dy | The y distance around the point for chart tooltips. Datasamples with greater y distances from the point will not be considered. |
format | Tooltip format. Pass null to use default tooltip, pass "<single_line>" to use default tooltip without line breaks. |
boolean DeleteAnnotation | ( | String | res_name, |
GlgObject | annotation, | ||
double | position_x, | ||
double | position_y | ||
) |
Deletes an annotation from a chart.
res_name | The resource path of a child chart to delete the annotation from, or null to delete from this chart object. |
annotation | The annotation object to delete, or null to delete an annotation with the specified position_x and position_y parameters. |
position_x | The x position of the annotation to delete when the annotation parameter is null. |
boolean DeleteBottomObject | ( | ) |
Extended API: Deletes last object from the container.
boolean DeleteObjectAt | ( | int | index | ) |
Extended API: Deletes the object of the container at the specified position.
index | Index of the object to delete. |
boolean DeletePlot | ( | String | res_name, |
GlgObject | plot | ||
) |
Deletes a plot line from a chart.
res_name | The resource path of a child chart to delete the plot from, or null to delete from this chart object. |
plot | The plot object. |
boolean DeleteTags | ( | GlgTagType | tag_type_mask | ) |
Intermediate API: Delete all tags of a requested tag type.
tag_type_mask | Specifies the tag type(s) to search. Several tag types can be combined by ORing them together. |
boolean DeleteThisObject | ( | Object | obj | ) |
Extended API: Deletes the object from the container.
obj | Object to delete. |
boolean DeleteTimeLine | ( | String | res_name, |
GlgObject | time_line, | ||
double | time_stamp | ||
) |
Deletes a time line from a chart.
res_name | The resource path of a child chart to delete the time line from, or null to delete from this chart object. |
time_line | The time line object to delete, or null to delete a time line with the specified time stamp. |
time_stamp | The time stamp of the time line to delete when the time_line parameter is null. |
boolean DeleteTopObject | ( | ) |
Extended API: Deletes first object from the container.
|
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.
state | The new state of the attachment point use mode. |
|
static |
Enables or disables default browser actions on double touch when touch events are enabled.
If default browser actions on double touch are enabled (default), an application can use single touch for application activities, such as scrolling a real-time chart by touching and dragging, while letting the browser scroll or zoom the page when two fingers are used inside the GLG component. The double-touch events will be handled by the browser and will not be sent to the application's trace callback.
Default browser actions on double touch can be disabled for applications that either provide custom handling of double touch events or want to disable the default scrolling and zooming actions in response to the touch events inside the GLG component. Default browser actions on double touch are disabled by passing false as a function parameter, in which case all touch events will be passed to the application's trace callback regardless of the number of simultaneous touches.
state | true to enable default browser actions on double touch or false to disable them. |
|
static |
Enables or disables all timer transformations defined inside GLG drawings.
state | The new enabled state. |
boolean Equals | ( | GlgObject | object | ) |
Performs equality comparison between the passed object and this object.
object | GlgObject to compare this object with. |
|
static |
Invokes a currently installed error handler to generate an error message.
error_type | Specifies an error type: INTERNAL_ERROR, USER_ERROR, WARNING, INFO or LOGGING. |
message | An error message |
exception | An optional exception that caused the error. If it is not null, it is used to print additional information by converting the exception to string. |
Object ExportStrings | ( | String | separator1, |
String | separator2 | ||
) |
Exports all strings defined in the (drawing) object.
separator1 | If not null, the first character of the string defines the first separator character, otherwise the quote character is used as the first separator. |
separator2 | If not null, the first character of the string defines the second separator character, otherwise the quote character is used as the second separator. |
Object ExportTags | ( | String | separator1, |
String | separator2 | ||
) |
Exports all tags defined in the (drawing) object.
separator1 | If not null, the first character of the string defines the first separator character, otherwise the quote character is used as the first separator. |
separator2 | If not null, the first character of the string defines the second separator character, otherwise the quote character is used as the second separator. |
Object FindMatchingObjects | ( | GlgObjectMatchType | match_type, |
boolean | find_parents, | ||
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 | ||
) |
Intermediate API: Finds object's parents or children that match the specified search criteria.
match_type | A bitwise mask of constants in the GlgObjectMatchType enum to specify the object matching criteria: OBJECT_TYPE_MATCH, OBJECT_NAME_MATCH, RESOURCE_MATCH, OBJECT_ID_MATCH or CUSTOM_MATCH. All of the criteria in the mask must be true in order for an object to match. |
find_parents | True to search parents, false to search children of the object. |
find_first_match | If true, stop the search after the first match and return the matching object. If false, returns all matching objects. |
search_inside | If false, don't search the object's children or parents if the object itself matches. |
search_drawable_only | Search only drawable objects (searching children only). Refer to the description of the IsDrawable method for more information. |
object_type | Object type for the object type search. |
object_name | Object name for the object name search. |
resource_name | Resource name for the resource search. |
object_id | Object ID for the object id search. |
custom_match | A function that will be invoked for each object to provide custom matching logic. The function should return true if the match was detected, and should have the following type signature: boolean custom_match( GlgObject object ); where:
|
boolean FitObject | ( | GlgCoordType | coord_type, |
GlgCube | box, | ||
boolean | keep_ratio | ||
) |
Intermediate API: Fits an object to the specified box.
coord_type | The 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. |
box | New object bounding box. |
keep_ratio | If set to true, the same scale factor is used for X, Y and Z scaling. |
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.
size | New size. |
GlgObject GetAction | ( | GlgActionType | action_type, |
GlgTriggerType | trigger_type, | ||
int | button, | ||
GlgArmedStateType | armed_state, | ||
GlgDoubleClickStateType | double_click_state, | ||
String | action, | ||
String | subaction, | ||
boolean | enabled_only | ||
) |
Intermediate API: Returns the first found action with the matching parameters attached to the object.
action_type | Specifies an action type. If zero, actions of any type will be considered. |
trigger_type | Specifies a trigger type. If zero, actions with any trigger type will be considered. |
button | Specifies a mouse button. If zero, actions that are activated by any mouse button will be considered. |
armed_state | Specifies settings of an action's ProcessArmed attribute, may be ANY_ARMED_STATE, ARMED_ONLY_STATE or UNARMED_ONLY_STATE. |
double_click_state | Specifies settings of an action's DoubleClick attribute, may be DOUBLE_CLICK_NONE, DOUBLE_CLICK_ONLY, SINGLE_CLICK_ONLY or SINGLE_AND_DOUBLE_CLICK. |
action | Specifies input action string for action objects with INPUT trigger. If null, action objects with any input action string will be considered. |
subaction | Specifies input subaction string for action objects with INPUT trigger. If null, action objects with any input subaction string will be considered. |
enabled_only | If set to true, only actions enabled by the settings of their Enabled attribute will be considered. |
GlgObject GetAlarmObject | ( | String | alarm_label, |
boolean | single_alarm | ||
) |
Intermediate API: Finds alarms based on their alarm label attribute.
alarm_label | Alarm label, may contain '*' and '?' wildcards. |
single_alarm | If set to true, the method returns the first found alarm object with the specified alarm label. |
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.
GlgMinMax GetChartDataExtent | ( | String | res_name, |
boolean | time, | ||
boolean | visible_only | ||
) |
Returns the extent of data accumulated in the chart in one direction.
res_name | The resource path of a child chart or a child's plot to query, or null to query this object. |
time | true 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_only | Controls 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. |
GlgMinMax GetDataExtent | ( | String | res_name, |
boolean | time | ||
) |
Deprecated, use GetChartDataExtent.
GlgDataType GetDataType | ( | ) |
Returns a data type of a data or attribute object.
GlgObject GetDrawingMatrix | ( | ) |
Intermediate API, ADVANCED: Returns the matrix object of the transformation used to draw the object on the screen.
double GetDResource | ( | String | resource_name | ) |
Returns value of a D (double) resource.
resource_name | Resource name |
double GetDTag | ( | String | tag_source | ) |
Returns value of a D (double) tag.
tag_source | Tag source |
Object GetElement | ( | int | index | ) |
Returns container's element at the specified position.
index | Position Index |
GlgGISRequestObserver GetGISRequestInfo | ( | String | res_name | ) |
Intermediate API: Obtains information about a GIS object's current GIS request being processed.
res_name | If is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used. |
GlgPoint GetGResource | ( | String | resource_name | ) |
Returns value of a G (geometrical or color) resource.
resource_name | Resource name |
GlgPoint GetGTag | ( | String | tag_source | ) |
Returns value of a G (geometrical or color) tag.
tag_source | Tag source |
int GetIndex | ( | Object | obj | ) |
Intermediate API: Returns the index of the first occurrence of the object in the container.
obj | The object to search for. |
GlgObject GetLegendSelection | ( | double | x, |
double | y | ||
) |
Intermediate API, ADVANCED: Returns a plot object corresponding to the legend item at the specified screen point.
x | The x coordinate. |
y | The y coordinate. |
|
static |
Queries GLG JavaScript library version.
GlgMatrixData GetMatrixData | ( | GlgMatrixData | matrix_data | ) |
Intermediate API, ADVANCED: Returns values of the matrix's coefficients
matrix_data | GlgMatrixData object to be filled with returned matrix data. If null is passed, a new GlgMatrixData object will be created. |
|
static |
Returns the current state of a modifier.
modifier | Specifies the modifier to query. |
GlgObject GetNamedObject | ( | String | name | ) |
Intermediate API: Returns container's element with the specified name
name | The element's name |
GlgObject GetNamedPlot | ( | String | res_name, |
String | plot_name | ||
) |
Finds a chart's plot by name.
res_name | The resource path of a child chart to query, or null to query this chart object. |
plot_name | The plot name. |
Object GetNativeComponent | ( | String | res_name, |
GlgComponentQueryType | type | ||
) |
Returns the native component of the viewport.
res_name | The resource name of the child object, or null to use this object. |
type | Specifies the type of the component to return. |
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.
String GetObjectName | ( | ) |
Returns an object's name.
GlgObjectType GetObjectType | ( | ) |
Returns an object's type.
GlgObject GetParent | ( | ) |
Intermediate API, ADVANCED: Returns object parent(s).
The type of the return value may be determined by using GetNumParents method.
GlgObject GetParentViewport | ( | boolean | 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.
heavy_weight | The 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. |
|
static |
Returns a number of subdrawing and subwindow objects that are waiting for their templates being loaded.
|
static |
Returns a number of subdrawing and subwindow templates that are in the process of being loaded.
Creates a GlgObject that may be used outside of a callback method.
object | GlgObject to reference |
Any object obtained inside a callback without a call to a GLG method that returns an object is not valid outside of a callback. The GetReference method should be used to assign such an object to a variable used outside the callback, as shown in the below example:
var StoredGlgObject = null;
function TraceCallback( viewport, trace_info )
{
// Incorrect: can't assign object received in a callback to a global variable.
StoredGlgObject = viewport;
// Incorrect: can't assign object received in a callback to a global variable.
StoredGlgObject = trace_info.viewport;
// Correct: using GetReference to assign to a global variable.
StoredGlgObject = GLG.GetReference( trace_info.viewport );
// Correct: assigning an object obtained via a GLG call.
StoredGlgObject = trace_info.viewport.GetResourceObject( "FillColor" );
}
Object GetResource | ( | String | resource_name | ) |
Intermediate API: Finds and returns a resource of an arbitrary type.
resource_name | Resource name |
GlgObject GetResourceObject | ( | String | resource_name | ) |
Intermediate API: Finds and returns a named resource or an attribute of the object.
resource_name | Resource name |
|
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.
int GetSize | ( | ) |
Returns container's size.
String GetSResource | ( | String | resource_name | ) |
Returns value of an S (string) resource.
resource_name | Resource name |
|
static |
Returns the current stack trace as a String.
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.
tag_source | Tag source |
int GetStringIndex | ( | String | search_string | ) |
Intermediate API: Returns the index of the first occurrence of the string in a string container.
search_string | The string to search for. |
GlgObject GetTagObject | ( | String | search_string, |
boolean | by_name, | ||
boolean | unique_tags, | ||
boolean | single_tag, | ||
GlgTagType | tag_type_mask | ||
) |
Intermediate API: Finds tags based on their TagName or TagSource attributes.
search_string | Tag name or source, may contain '*' and '?' wildcards. |
by_name | Search type: search for tag name if true, search for tag source (or category for export tags) if false. |
unique_tags | If 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_tag | If 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_mask | Specifies the types of tags to return, is formed by ORing the tag type constants. |
|
static |
Queries the state of the touch mode.
boolean GISConvert | ( | String | res_name, |
GlgCoordType | coord_type, | ||
boolean | 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.
res_name | The resource path of a child GIS object to query, or null to query this GIS object. |
coord_type | Coordinate system to use, SCREEN_COORD or OBJECT_COORD. For OBJECT_COORD, the world coordinate system of the GIS object is used. |
coord_to_lat_lon | Conversion type: x/y to lon/lat if true, lon/lat to x/y if false. |
in_point | Input values (x/y in the selected coordinate system or lon/lat). |
out_point | Converted output values (x/y in the selected coordinate system or lon/lat). |
boolean GISCreateSelection | ( | String | res_name, |
String | layers, | ||
double | x, | ||
double | y, | ||
GlmLabelSelectionMode | select_labels, | ||
function | callback | ||
) |
Queries information about GIS features located at the specified map position.
res_name | The resource path of a child GIS object to query or null to query this GIS object. |
layers | List of vector layers to query |
x | The X coordinate (in screen pixels) in the GIS object's parent viewport |
y | The Y coordinate (in screen pixels) in the GIS object's parent viewport |
select_labels | Controls text label selection. May have the following values:
|
callback | A function to be invoked with the received selection data, with the following type signature: void callback( GlgObject gis_object, double selection_message ) where:
|
boolean GISGetElevation | ( | String | res_name, |
String | layer_name, | ||
double | lon, | ||
double | lat, | ||
function | callback | ||
) |
Queries map server elevation data.
res_name | The resource path of a child GIS object to query or null to query this GIS object. |
layer_name | Name of the elevation layer to query |
lat | The Lat coordinate of the point |
lon | The Lon coordinate of the point |
callback | A function to be invoked with the received elevation data, with the following type signature: void callback( GlgObject gis_object, double elevation ) where:
|
|
static |
Low-level interface to the map server; performs GIS coordinate conversion.
projection | RECTANGULAR or ORTHOGRAPHIS |
stretch | If false, the map extent is adjusted to preserve X/Y ratio (for SCREEN_COORD coordinate type only). |
coord_type | Coordinate system to use. |
coord_to_lat_lon | Conversion type: x/y to lon/lat if true, lon/lat to x/y if false. |
center | Center of the map in lat/lon. |
extent | Extent of the map in lat/lon (rectangular projection) or in meters for orthogonal progection. |
angle | Angle of the map rotation. |
min_x | The extent of the GIS object in the selected coordinate system. |
min_y | The extent of the GIS object in the selected coordinate system. |
max_x | The extent of the GIS object in the selected coordinate system. |
max_y | The extent of the GIS object in the selected coordinate system. |
in_point | Input values (x/y in the selected coordinate system or lon/lat). |
out_point | Converted output values (x/y in the selected coordinate system or lon/lat). |
boolean HasResourceObject | ( | String | resource_name | ) |
Checks for the existence of the resource object.
resource_name | Resource name |
boolean 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.
tag_name | Tag name |
tag_type_mask | Specifies the types of tags to search, is formed by ORing the tag type constants. |
boolean HasTagName | ( | String | tag_name | ) |
Checks for an existence of a data tag object with the given tag name.
tag_name | Tag name |
boolean HasTagSource | ( | String | tag_source | ) |
Checks for an existence of a data tag object with the given tag source.
tag_source | Tag source |
|
static |
Intermediate API: Passes the event to the current handler.
call_event | The event to pass. |
|
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.
call_event | The event to use. |
token | The token to pass. |
|
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.
token | The token to pass. |
|
static |
Intermediate API: Same as IHCallPrevIHWithToken, but reuses the event object for efficiency, the same way as IHCallCurrIHWithModifToken.
call_event | The event to use. |
token | The token to pass. |
|
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.
token | The token to pass. |
|
static |
Intermediate API: Same as IHSetBParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.
|
static |
Intermediate API: Same as IHSetDParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.
|
static |
Intermediate API: Same as IHSetIParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.
|
static |
Intermediate API: Same as IHSetNParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.
Intermediate API: Same as IHSetOParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.
|
static |
Intermediate API: Same as IHSetSParameter, except that the named parameter must exist. If the parameter does not exist, a GLG error is generated.
|
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.
ih | The 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. |
name | Parameter name. |
|
static |
Intermediate API: Returns the ID of the currently active interaction handler.
|
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.
ih | The 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. |
name | Parameter name. |
|
static |
Intermediate API: Returns the instance of the handler interface used to implement the handler.
ih | The handler to query. IH_CURR can be used as the ih parameter to access the curent handler. |
|
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.
ih | The 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. |
name | Parameter 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.
ih | The 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. |
name | Parameter name. |
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.
ih | The 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. |
name | Parameter name. |
|
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.
ih | The 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. |
name | Parameter name. |
default_value | The 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.
ih | The 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. |
name | Parameter name. |
default_value | The 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.
ih | The 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. |
name | Parameter name. |
default_value | The 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.
ih | The 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. |
name | Parameter name. |
default_value | The default value. |
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.
ih | The 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. |
name | Parameter name. |
default_value | The 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.
ih | The 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. |
name | Parameter name. |
default_value | The default value. |
|
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.
|
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.
|
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.
ih | The 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. |
name | Parameter name. |
|
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.
call_event | The event to query. |
|
static |
Intermediate API: Returns event's type.
call_event | The event to query. |
|
static |
Intermediate API: Initializes installable handler utilities. Must be invoked after Init, but before installable handler methods.
|
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.
interface_handler | A user-defined interface handler. |
|
static |
Intermediate API: Provides a simplified interface to the IHInstall method. The method creates a GlgIHHandlerInterface object with a supplied function as a entry point, and installs a handler that uses this handler interface object.
entry_point | A function that implements the user interaction handler. The function's type signature must match the type signature of the GlgIHHandlerInterface::EntryPoint method. |
|
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.
handler_interface | The handler to pass the token to. |
token | The token to pass. |
uninstall | If 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. |
|
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.
ih | The handler to pass the event to. |
|
static |
Intermediate API: Creates a named boolean parameter.
ih | The 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. |
name | Parameter 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. |
value | Parameter value. |
|
static |
Intermediate API: Creates a named double parameter.
ih | The 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. |
name | Parameter 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. |
value | Parameter value. |
|
static |
Intermediate API: Creates a named integer parameter.
ih | The 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. |
name | Parameter 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. |
value | Parameter value. |
|
static |
Intermediate API: Creates a named parameter that stores a native object.
ih | The 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. |
name | Parameter 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. |
value | Parameter value. |
Intermediate API: Creates a named parameter that stores GlgObject.
ih | The 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. |
name | Parameter 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. |
value | Parameter value. |
|
static |
Intermediate API: Creates a GlgDataValue object parameter containing a double value.
ih | The 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. |
name | Parameter 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. |
value | Parameter value. |
|
static |
Intermediate API: Creates a GlgDataValue object parameter containing geometrical (XYZ) or color (RGB) data.
ih | The 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. |
name | Parameter 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. |
value1 | X value. |
value2 | Y value. |
value3 | Z value. |
Intermediate API: Creates a GlgDataValue object parameter containing geometrical (XYZ) or color (RGB) data.
ih | The 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. |
name | Parameter 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. |
point | Parameter value. |
|
static |
Intermediate API: Creates a named string parameter.
ih | The 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. |
name | Parameter 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. |
value | Parameter value. |
|
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.
|
static |
Intermediate API: Terminates installable handler utilities. All currently installed handlers must be uninstalled before invoking this method.
|
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.
|
static |
Intermediate API: Uninstalls the handler using IHUninstall and passes the event to the previous handler (which becomes current after IHUninstall is invoked).
call_event | The event to be passed. |
|
static |
Intermediate API: Uninstalls the handler using IHUninstall and invokes the previous handler (which becomes current after IHUninstall is invoked) with the specified token.
token | The token to pass. |
int ImportStrings | ( | String | data, |
boolean | verbose | ||
) |
Converts matching strings of the (drawing) object using the provided list of strings.
data | The string containing a list of strings to be converted. |
verbose | If set to true, generates a warning on the console for each string in the drawing that was not converted. |
int ImportTags | ( | String | data, |
boolean | verbose | ||
) |
Converts matching tags of the (drawing) object using the provided list of tags.
data | The string containing a list of tags to be converted. |
verbose | If set to true, generates a warning on the console for each tag in the drawing that was not converted. |
|
static |
Initializes GLG Toolkit.
void InitialDraw | ( | ) |
Draws a viewport object for the first time.
boolean 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.
res_name | If is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used. |
void Inverse | ( | ) |
Intermediate API: Reverses the order of objects in a container.
boolean IsAt | ( | GlgPositionType | position | ) |
Intermediate API: May be used to query if traversing reached the start or the end of a container.
position | The 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. |
|
static |
Returns true if a Community Edition version of the library is used.
boolean 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.
Object Iterate | ( | ) |
Intermediate API: Returns the next element of container.
Object IterateBack | ( | ) |
Intermediate API: Returns the previous element of container.
boolean LayoutObjects | ( | GlgObject | sel_elem, |
GlgLayoutType | type, | ||
double | distance, | ||
boolean | use_box, | ||
boolean | process_subobjects | ||
) |
Intermediate API: Performs layout action on an object or a group of objects.
sel_elem | Anchor element, may be set to null if not used. |
type | Type 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 |
distance | The distance in screen coordinates for positioning objects, depending on the layout action. |
use_box | Use object's control points if false, otherwise use object's bounding box. |
process_subobjects | If true, apply SET_VSIZE and SET_HSIZE actions to the subobjects of the group, otherwise apply the actions to the group itself. |
|
static |
Loads an asset from a URL. The asset data are loaded asynchronously and a callback is invoked when the data are ready.
url | Asset URL. |
request_type | A type of the asset to load: one of the values of the GlgHTTPRequestResponseType enum, such as GLG_DRAWING, TEXT, BLOB, UINT8_ARRAY, etc. |
callback | A callback to be invoked when the asset data has been loaded, with the following type signature: void callback( Object loaded_data, Object user_data, String load_path ) where:
|
user_data | An object that will be passed to the callback. |
|
static |
Loads an object from raw data using the specified encoding. The raw data may be obtained using the LoadAsset method with the GLG_DRAWING request type.
data | The raw data to load the object from (Uint8Array). |
encoding | Defines encoding to be used for string decoding, "ascii", "latin1" or "utf8". Pass null to use the default Latin1 encoding. The encoding is used to decode all input strings that do not have the UTF8 flag set. |
path | The drawing path for loading image and subdrawings relatively to (if any present in the drawing). |
rebind_ref | The reference object to use for rebinding is the loaded object will be used as a template, or null otherwise. |
|
static |
Loads an object from a URL using the specified encoding.
url | Defines a URL of the drawing. |
encoding | Defines encoding to be used for string decoding, "ascii", "latin1" or "utf8". Pass null to use the default Latin1 encoding. The encoding is used to decode all input strings that do not have the UTF8 flag set. |
callback | A callback to be invoked when the GLG object has been loaded, with the following type signature: void callback( GlgObject loaded_object, Object user_data, String load_path ) where:
|
user_data | User data to be passed to the callback. |
abort_func | An optional function used to check if the load request was cancelled while it was being processed, with the following type signature: boolean abort_callback( Object user_data ) where:
|
rebind_ref | The reference object to use for rebinding if the loaded object will be used as a template, or null otherwise. |
|
static |
Loads a viewport named "$Widget" from raw data using the specified encoding.
data | The raw data to load the widget from (Uint8Array). |
encoding | Defines encoding to be used for string decoding, "ascii", "latin1" or "utf8". Pass null to use the default Latin1 encoding. The encoding is used to decode all input strings that do not have the UTF8 flag set. |
path | The drawing path for loading image and subdrawings relatively to (if any present in the drawing). |
Finds a viewport named "$Widget" inside an object and returns it.
glg_object | An object containing the $Widget viewport |
|
static |
Loads a viewport named "$Widget" from a URL using the specified encoding.
url | Defines a URL of the drawing. |
encoding | Defines encoding to be used for string decoding, "ascii", "latin1" or "utf8". Pass null to use the default Latin1 encoding. The encoding is used to decode all input strings that do not have the UTF8 flag set. |
callback | A callback to be invoked when the widget has been loaded, with the following type signature: void callback( GlgObject viewport, Object user_data, String load_path ) where:
|
user_data | User data to be passed to the callback. |
abort_func | An optional function used to check if the load request was cancelled while it was being processed, with the following type signature: boolean abort_callback( Object user_data ) where:
|
boolean MoveObject | ( | GlgCoordType | coord_type, |
GlgPoint | start_point, | ||
GlgPoint | end_point | ||
) |
Intermediate API: Moves an object by specified vector.
coord_type | The 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_point | Start point of the move vector. |
end_point | End point of the move vector. |
boolean MoveObjectBy | ( | GlgCoordType | coord_type, |
double | x, | ||
double | y, | ||
double | z | ||
) |
Intermediate API: Moves an object by specified distance in x, y and z directions.
coord_type | The 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. |
x | The X move distance. |
y | The Y move distance. |
z | The Z move distance. |
boolean MoveObjectByPoint | ( | GlgCoordType | coord_type, |
GlgPoint | point | ||
) |
Intermediate API: Moves an object by specified distance in x, y and z directions.
coord_type | The 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. |
point | Point containing X, Y and Z distance values. |
Performs equality comparison between two GLG objects.
object1 | The first object to check, may be null. |
object2 | The second object to check, may be null. |
boolean PositionObject | ( | GlgCoordType | coord_type, |
GlgAnchoringType | anchoring, | ||
double | x, | ||
double | y, | ||
double | z | ||
) |
Intermediate API: Move object to the specified position.
coord_type | The 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. |
anchoring | Specifies 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. |
x | The X coordinates of the new position. |
y | The Y coordinates of the new position. |
z | The Z coordinates of the new position. |
boolean PositionObjectByPoint | ( | GlgCoordType | coord_type, |
GlgAnchoringType | anchoring, | ||
GlgPoint | position | ||
) |
Intermediate API: Moves an object to the specified position.
coord_type | The 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. |
anchoring | Specifies 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. |
position | New position |
double PositionToValue | ( | String | res_name, |
double | x, | ||
double | y, | ||
boolean | outside_x, | ||
boolean | 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.
res_name | The resource path of a child object to query, or null to query this object. |
x | The x screen coordinate (with pixel0 center at 0.5). |
y | The y screen coordinate (with pixel0 center at 0.5). |
outside_x | If set to true, the method returns null for points outside the object's x extent. |
outside_y | If set to true, the method returns null for points outside the object's y extent. |
|
static |
Utilty function: C-style printf.
|
static |
Utilty function: C-style printf.
|
static |
Utilty function: C-style printf.
GlgObject QueryTags | ( | GlgTagType | tag_type_mask | ) |
Intermediate API: Returns a list of all tags of the requested tag type defined in the object.
tag_type_mask | Specifies the tag type to search |
|
static |
Returns a random number in the specified range.
void ReleaseObject | ( | GlgObject | suspend_info | ) |
Intermediate API: Releases the object after suspending for editing.
suspend_info | Returned value of a previous call to SuspendObject. |
|
static |
ADVANCED: Releases an object to a cache for reuse, minimizing garbage collection.
object | An object to be released to the cache, must be an instance of GlgObject, GlgPoint, GlgCube, GlgMinMax or GlgMatrixData objects. |
The method can be used with any GlgObject, GlgPoint, GlgCube, GlgMinMax or GlgMatrixData objects that were obtained by a call to any GLG method. It cannot be used with objects obtained inside callbacks by using an assigment operator without a call to a GLG method (with the exception of load callbacks).
The method can yield performance improvements for applications with loops that invoke a large number of GLG methods returning GLG objects.
Since all GLG objects are wrappers around the internal representation of the GLG objects, releasing an instance of a wrapper to a cache does not affect the internal GLG object the wrapper represents. Note: releasing a GlgCube releases its GlgPoint objects.
The following example demonstrates correct uses of the method:
// Traverse all objects in a viewport.
var size = viewport.GetSize();
for( var i=0; i<size; ++i )
{
var object = viewport.GetElement( i ); // GLG Object
// Apply some action to the object.
...
GLG.ReleaseToCache( object );
}
// Traverse all points of a polygon.
var size = polygon.GetSize();
for( var i=0; i<size; ++i )
{
// Get polygon point values as GlgPoint.
var point = polygon.GetElement( i ).GetGResource( null );
// Examine point's x, y and z values as needed.
...
GLG.ReleaseToCache( point );
}
The example below shows both valid and invalid uses of the method:
function TraceCallback( viewport, trace_info )
{
// Incorrect: can't release an object received in a callback.
var trace_viewport = trace_info.viewport ); GLG.ReleaseToCache( trace_viewport );
// Correct: releasing an object obtained by calling a GLG method.
var fill_color = trace_info.viewport.GetResourceObject( "FillColor" );
GLG.ReleaseToCache( fill_color );
var line_width = trace_info.viewport.GetResourceObject( "LineWidth" );
GLG.ReleaseToCache( line_width );
// Incorrect: the object is used after being released.
line_width.SetDResource( null, 3 );
}
boolean ReorderElement | ( | int | current_index, |
int | new_index | ||
) |
Intermediate API: Moves the container's element from the current_index to the new_index position.
current_index | Index of the object to be reordered. |
new_index | Index of the new object position. |
boolean 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.
res_name | If is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used. |
extent_x | Specifies the new GIS x extent. |
extent_y | Specifies the new GIS y extent. |
center_x | Specifies the new GIS x center. |
center_y | Specifies the new GIS y center. |
angle | Specifies the new GIS angle. |
projection | Specifies the new GIS projection. |
layers | Specifies the new GIS layer string. |
flags | Controls 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_observer | Specifies an observer whose RequestUpdate method will be invoked with status updates. Refer to the description of GlgGISRequestObserver for more information. |
boolean 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.
res_name | If is not null, specifies the resource path of a child viewport to be zoomed, otherwise this viewport will be used. |
type | Specifies the zoom operation to perform. See the SetZoom method for a list of possible values. |
value | Specifies the amount to zoom or pan by. See the SetZoom method for more information. |
request_observer | Specifies an observer whose RequestUpdate method will be invoked with status updates. Refer to the description of GlgGISRequestObserver for more information. |
boolean Reset | ( | ) |
Resets the object hierarchy of a top-level viewport and then sets it up again.
void ResetHierarchy | ( | ) |
Resets object hierarchy.
Intermediate API: Converts screen coordinates relative to the root window to the screen coordinates of the specified viewport.
viewport | Viewport object |
root_coord | Root coordinates |
boolean RotateObject | ( | GlgCoordType | coord_type, |
GlgPoint | center, | ||
double | x, | ||
double | y, | ||
double | z | ||
) |
Intermediate API: Rotates an object around the X, Y or Z axis.
coord_type | The 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. |
center | Center of rotation. The center of the object's bounding box is used if null is passed. |
x | The X rotation angle. |
y | The Y rotation angle. |
z | The Z rotation angle. |
Uint8List SaveObject | ( | String | encoding | ) |
Intermediate API: Serializes an object into a byte array using the specified encoding.
encoding | Defines encoding to be used for string encoding, "ascii", "latin1" or "utf8". Pass null to use the default Latin1 encoding. |
boolean ScaleObject | ( | GlgCoordType | coord_type, |
GlgPoint | center, | ||
double | x, | ||
double | y, | ||
double | z | ||
) |
Intermediate API: Scale object in X, Y and Z dimensions
coord_type | The 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. |
center | Center of scaling. The center of the object's bounding box is used if null is passed. |
x | The X scale factor. |
y | The Y scale factor. |
z | The Z scale factor. |
Intermediate API: Converts a point from screen to world coordinates.
inside_vp | For 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_point | Point in screen coordinates. |
out_point | Calculated world coordinates. |
Object SendMessageToObject | ( | String | res_name, |
String | message, | ||
Object | param1, | ||
Object | param2, | ||
Object | param3, | ||
Object | param4 | ||
) |
Sends a message to object.
res_name | The resource path of a child object to send the message to, or null to send the the message to this object. |
message | Message type. |
param1 | Message-specific parameter |
param2 | Message-specific parameter |
param3 | Message-specific parameter |
param4 | Message-specific parameter |
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 GlgInteger objects created via the GlgInteger::CreateGlgInteger method.
|
static |
Installs a global alarm handler.
alarm_handler | New alarm hadler |
|
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.
state | The new state of the move mode. |
|
static |
Specifies coordinate scaling to be used to render the GLG drawing in HTML canvas on mobile devices.
scale | Specifies canvas coordinate scale. The screen coordinates used to draw graphics in the canvas will be bigger than the Cascading Style Sheet (CSS) pixel coordinates by the scale value. This is used for HTML pages with responsive design rendered on mobile devices with devicePixelRatio different from 1. If the scale is set to 1 (default) for such devices, each GLG screen coordinate will correspond to several physical pixels. As a result, thin lines with LineWidth=1 will be rendered several physical pixels thick, appearing not very thin. The drawing will also be rendered in a small size (in the GLG screen coordinates) equal to the size of the GLG area in CSS pixels. Setting the scale to a value bigger than 1 increases canvas resolution by the specified scale. For example, specifying a scale equal to devicePixelRatio on mobile devices causes each GLG screen coordinate to correspond to one physical pixel, resulting in very crisp rendering of thin lines. The drawing will also be rendered in a size in the GLG screen coordinates which is bigger (by the specified scale) than the size of the GLG area in CSS pixels. For example, if the width of the GLG area in CSS pixels is 300 and the value of devicePixelRatio=3 is passed as the scale parameter, the drawing will be rendered with width=900 in the GLG screen coordinates. The scale lower than devicePixelRatio can also be used to control the crispness of the rendering. For exampe, scale=2 can be used even if devicePixelRatio=3. If scale is set to a value different from 1, all values in the CSS pixel coordinates must be converted to the GLG screen coordinates by multiplying them by the scale before passing them to any GLG methods as GLG screen coordinates. For example, mouse_x and mouse_y coordinates of the mouse in the Trace callback are in CSS pixels, and must be multiplied by the scale before using them as GLG screen coordinates. The WidthHint, HeightHint, XHint and YHint parameters of the top-level viewports should also be set using the GLG screen coordinates. |
text_scale | Specifies a text scaling factor (default 1). When the canvas resolution is increased by setting scale > 1, it scales all text objects down by the same scale, because canvas text is rendered in screen coordinates. (The only exception are text objects with a TextScaling attribute that scales them on resize, since they are automatically scaled up when the drawing size in GLG screen coordinates is increased due to scale > 1). As a result, the appearance the text is proportional to other graphical objects in the drawing, which are also appearing scaled down by the same scale factor. However, the text may be too small to be readable. The text_scale parameter may be used to increase text size to make it more readable. Keep in mind that increasing text size makes it unproportional compared to other objects in the drawing, which may cause alignment propblems if the drawing does not allow enough space for the increased text size. |
native_text_scale | Specifies a scaling factor (default 1) for native text, such as text inside the buttons, checkboxes and other native HTML objects. Text in native HTML objects used in the drawing is not scaled and may appear unproportional to the size of the text objects drawn in the GLG drawing canvas. This parameter may be set to a value < 1 to adjust the text size of native objects to match the size of the text objects in the GLG drawing. |
The method should be invoked at the beginning of the program code before the first GLG drawing is setup or drawn. Refer to the code of the GLG JavaScript Demos for examples of the method's usage.
|
static |
Sets a custom load function.
The custom load function will be invoked to load data using a custom loading method instead of just loading from a URL. For example, an application may use axios.get method.
func | Custom load funcion. |
The function will be invoked every time GLG needs to load data, such as drawings, subdraings, images or map images. When the data has been loaded, the function must call the provided done_cb callback with the request status and request data parameters.
The custom load function is invoked with the following parameters:
url | URL to be loaded. |
request_type_string | Request type to be used for loading data. |
glg_request_type | GLG request type (GlgHTTPRequestResponseType enum) |
done_callback | Callback to be invoked when the data has been loaded. |
The load function may return false to let GLG load the data, or return true to indicate that the function will load the data and will invoke the done_callback when data is ready.
The done_callback must be invoked with the following parameters when the data is ready :
status | Returned status of XMLHttpRequest, 200 on success or a different value to indicate an error. |
data | Loaded data, or null in case of a load error. |
boolean SetDResource | ( | String | resource_name, |
double | value | ||
) |
Sets value of a D (double) resource.
resource_name | Resource name |
value | Resource value |
boolean SetDResourceIf | ( | String | resource_name, |
double | value, | ||
boolean | if_changed | ||
) |
Sets value of a D (double) resource.
resource_name | Resource name |
value | Resource value |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
boolean SetDTag | ( | String | tag_source, |
double | value, | ||
boolean | if_changed | ||
) |
Sets value of a D (double) tag. All tags with the specified tag_source will be set to the supplied value.
tag_source | Tag source |
value | Tag value |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
|
static |
Sets the edit mode to disable GLG input objects in the drawing area for editing.
viewport | The drawing area viewport, or the top viewport containing the drawing area if the res_name is not null. |
res_name | If not null, specifies the resource path of the drawing area inside the top viewport. |
edit_mode | Edit mode: true or false. |
boolean 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.
index | Index of the element |
new_object | New value |
void SetEnd | ( | ) |
Intermediate API: Initializes container for traversing in the reversed direction.
This method should be invoked before invoking the container's IterateBack method.
|
static |
Installs a custom error handler.
new_handler | New error hadler |
void SetFocus | ( | String | res_name | ) |
Sets focus to the object's viewport.
res_name | The resource name of the child object, or null to use this object. |
boolean SetGResource | ( | String | resource_name, |
double | g_value1, | ||
double | g_value2, | ||
double | g_value3 | ||
) |
Sets value of a G (geometrical or color) resource.
resource_name | Resource name |
g_value1 | the first value of the XYZ or RGB value triplet. |
g_value2 | the second value of the XYZ or RGB value triplet. |
g_value3 | the third value of the XYZ or RGB value triplet. |
boolean SetGResourceFromPoint | ( | String | resource_name, |
GlgPoint | g_value | ||
) |
Sets value of a G (geometrical or color) resource.
resource_name | Resource name |
g_value | XYZ or RGB resource values |
boolean SetGResourceFromPointIf | ( | String | resource_name, |
GlgPoint | g_value, | ||
boolean | if_changed | ||
) |
Sets value of a G (geometrical or color) resource.
resource_name | Resource name |
g_value | XYZ or RGB resource values |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
boolean SetGResourceIf | ( | String | resource_name, |
double | g_value1, | ||
double | g_value2, | ||
double | g_value3, | ||
boolean | if_changed | ||
) |
Sets value of a G (geometrical or color) resource.
resource_name | Resource name |
g_value1 | the first value of the XYZ or RGB value triplet. |
g_value2 | the second value of the XYZ or RGB value triplet. |
g_value3 | the third value of the XYZ or RGB value triplet. |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
boolean SetGTag | ( | String | tag_source, |
double | g_value1, | ||
double | g_value2, | ||
double | g_value3, | ||
boolean | 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.
tag_source | Tag source |
g_value1 | the first value of the XYZ or RGB value triplet. |
g_value2 | the second value of the XYZ or RGB value triplet. |
g_value3 | the third value of the XYZ or RGB value triplet. |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
boolean SetGTagObj | ( | String | tag_source, |
GlgPoint | g_value, | ||
boolean | 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.
tag_source | Tag source |
g_value | XYZ or RGB tag values |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
boolean SetLabelFormatter | ( | String | res_name, |
GlgLabelFormatter | formatter | ||
) |
Attaches a custom label formatter to an axis object.
res_name | The resource name of the object's child axis, or null to use this axis object. |
formatter | Custom label formatter. |
boolean SetLinkedAxis | ( | String | res_name, |
GlgObject | axis_object, | ||
String | axis_res_name | ||
) |
Associates a chart's plot or a level line with an Y axis.
res_name | The resource path of a chart's plot, level, time line, annotation object, or null to associate the axis with this object. |
axis_object | A 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_name | The 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. |
|
static |
Sets locale used to display dates and numbers.
locale | Locale name. |
void SetMatrixData | ( | GlgMatrixData | matrix_data | ) |
Intermediate API, ADVANCED: Sets matrix's coefficients to supplied values.
matrix_data | GlgMatrixData object containing new matrix values. |
void SetParentElement | ( | String | element_id | ) |
Specifies a parent DIV element to use for the GLG drawing.
element_id | Element ID for the getElementById method, for example "glg_area". |
boolean SetResource | ( | String | resource_name, |
Object | value | ||
) |
Intermediate API: Sets the new value of the object's attribute (of an Object type).
This method may be used for setting object's DataSlot attribute.
resource_name | Attribute name |
value | The object to set or replace. |
boolean SetResourceFromObject | ( | String | resource_name, |
GlgObject | o_value | ||
) |
Sets value of the data or matrix resource to the value of the data object.
resource_name | Resource name |
o_value | A GLG data object providing a value (must match the resource's data type). |
boolean SetResourceFromObjectIf | ( | String | resource_name, |
GlgObject | o_value, | ||
boolean | if_changed | ||
) |
Sets value of the data or matrix resource to the value of the data object.
resource_name | Resource name |
o_value | A GLG data object providing a value (must match the resource's data type) |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
boolean 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.
resource_name | Attribute name |
value | GlgObject to attach. |
GlgGISRequestObserver SetScrollbarObserver | ( | String | res_name, |
GlgGISRequestObserver | request_observer | ||
) |
Intermediate API: Controls the the way integrated scrollbars work for the GIS object.
res_name | If is not null, specifies the resource path of child GIS object, otherwise this GIS object will be used. |
request_observer | Specifies 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. |
boolean SetSResource | ( | String | resource_name, |
String | s_value | ||
) |
Sets value of an S (string) resource.
resource_name | Resource name |
s_value | Resource value |
boolean 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.
resource_name | Resource name |
format | C-style format (for example, "%.2f") |
d_value | Value |
boolean SetSResourceFromDIf | ( | String | resource_name, |
String | format, | ||
double | d_value, | ||
boolean | if_changed | ||
) |
Sets value of an S (string) resource from a double value, converting the value into a string using a C-style format.
resource_name | Resource name |
format | C-style format (for example, "%.2f") |
d_value | Value |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
boolean SetSResourceIf | ( | String | resource_name, |
String | s_value, | ||
boolean | if_changed | ||
) |
Sets value of an S (string) resource.
resource_name | Resource name |
s_value | Resource value |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
boolean SetSTag | ( | String | tag_source, |
String | s_value, | ||
boolean | if_changed | ||
) |
Sets value of an S (string) tag. All tags with the specified tag_source will be set to the supplied value.
tag_source | Tag source |
s_value | Tag value |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
boolean SetSTagFromD | ( | String | tag_source, |
String | format, | ||
double | d_value, | ||
boolean | 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.
tag_source | Tag source |
format | C-style format (for example, "%.2f") |
d_value | Value |
if_changed | If set to true, the graphics will be redrawn only if the new tag value is different from the old one. |
void SetStart | ( | ) |
Intermediate API: Initializes container for traversing.
This method should be invoked before invoking the container's Iterate method.
void SetTemplate | ( | GlgObject | template | ) |
Intermediate API: Sets a custom template for a subdrawing or subwindow.
template | The object to set as a template of this object. |
|
static |
Sets a custom tooltip formatter.
formatter | Custom tooltip formatter. |
|
static |
Enables handling of touch events,
The method may be invoked on the TOUCH_START event inside of the Trace callback to enable handing of the consequent TOUCH_MOVED, TOUCH_ENDED and TOUCH_CANCELLED events (defined in the GlgEventType enum).
If the touch mode is enabled, the default browser handling of touch events will be disabled, and the application will receive these events in the Trace callback to implement application-defined touch actions. For example, an application could use touch move events to drag objects or scroll the chart.
If the touch mode is not enabled, the browser will use touch events for scrolling or zooming the web page, and the application will not receive any touch events after the initial TOUCH_START event. The MOUSE_MOVED, MOUSE_PRESSED and MOUSE_RELEASED events will be received after the browser finished handling touch events.
The enabled state of touch mode is active only for the duration of one touch event sequence, and is reset when the touch ends or is cancelled.
GLG sliders and knob interaction handlers automatically activate the touch mode to handle dragging via the touch move events. The GlgSliderTouchDrag global configuration resource may be used to disable this feature if it interferes with the browser use of the touch events for scrolling and zooming the web page.
void SetupHierarchy | ( | ) |
Sets up object hierarchy.
boolean SetXform | ( | GlgObject | xform | ) |
Extended API: Sets the object's transformation to a constrained copy of the xform parameter.
xform | Transformation to attach to the object. |
boolean 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.
res_name | If is not null, specifies the resource path of child viewport to be zoomed. |
type | Specifies the zoom operation to perform. |
value | Specifies . |
boolean 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.
res_name | The resource path of a child viewport to zoom, or null to zoom this viewport. |
zoom_object | The 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_name | The resource name of the GIS or CHART object to be zoomed relative to the parent specified by the zoom_object parameter. |
zoom_mode | The Zoom mode: GRAPHICS_ZOOM_MODE, GIS_ZOOM_MODE or CHART_ZOOM_MODE. |
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).
|
static |
Destroys GLG Toolkit's internal objects.
|
static |
Controls throwing an exception on an error to assist debugging.
user_error | Set to true to throw exceptions on application errors, such as "Can't find resource". |
internal_error | Set to true to throw exceptions on internal GLG errors. |
detect_null_strings | Set to true to detect null strings being used as values of resources that are GLG data objects od S (String) type. Setting values of these attributes to null strings causes exceptions much later, when the objects are drawn. Setting this parameter to true makes it possible to detect such errors right at the line of code where the resource value is set. |
|
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.
object | Object to be traced. The object must be setup. |
state | If 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_widget | If set to true, the parents that have resource named IsWidget are highlighed. |
top_parent | If non-null, the parents that are direct children of top_parent are highlighed. |
action | An optional function that will be invoked for every parent of the object. If the method returns true, the parent will be highlighed. The function must have the following type signature: boolean custom_match( GlgObject object ); where:
|
boolean 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.
xform | Transformation object |
coord_type | The 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. |
parent | Object'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. |
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.
in_point | Point to transform with the matrix |
out_point | Point to receive transformed values |
|
static |
Intermediate API, ADVANCED: Translates screen point's coordinates from one viewport to another.
from_viewport | The viewport in which the screen coordinates of the point are defined. |
to_viewport | The viewport to convert screen coordinates of the point to. |
point | Supplies the screen coordinate values to be converted. |
void TraverseObjects | ( | function | enter_action, |
function | exit_action | ||
) |
Intermediate API: Traverses the object and all its subobjects and performs the specified actions on each of them.
enter_action | A function that will be invoked for each traversed object to perform a custom action before traversing its subobjects. If it returns false, the object's subobjects will not be traversed. The function must have the following type signature: boolean enter_action( GlgObject object ); where:
|
exit_action | An optional function that will be invoked for each traversed object to perform a custom action after traversing its subobjects. The function must have the same type signature as enter_action and must always return true. |
boolean UnconstrainObject | ( | ) |
Intermediate API: Unconstrains this attribute object.
boolean Update | ( | ) |
Updates the drawing of a viewport or a light viewport with the latest resource values.
boolean 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.
void UpdateSize | ( | ) |
Causes an immediate size update for top viewports embedded in the HTML glg_area.
Intermediate API: Converts a point from world to screen coordinates.
inside_vp | For 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_point | Point in world coordinates. |
out_point | Calculated screen coordinates. |
|
static |
ID of the current installable interface handler.
|
static |
ID of the global data cache of the installable interface handlers.
|
static |
ID of the last installed installable interface handler.