GLG Toolkit, JavaScript Library  Version 4.2
GlgHierarchyListener Class Reference

Detailed Description

GlgHierarchyListener is an object used by the GlgObject::AddListener method to attach listeners of the HIERARCHY_CB type (defined in the GlgCallbackType enum).

These listeners handle hierarchy events generated by subwindows and subdrawings when their templates are loaded, and may be used to attach different input listeners to viewports displayed in a subwindow, as well as to initialize template drawing after it has been loaded.

The object's HierarchyCallback method defines the type signature of the function that needs to be passed as a parameter of the GlgObject::AddListener method to add a hierarhy listener.

Public Member Functions

void HierarchyCallback (GlgObject glg_object, GlgHierarchyData hierarchy_info)

Member Function Documentation

◆ HierarchyCallback()

void HierarchyCallback ( GlgObject  glg_object,
GlgHierarchyData  hierarchy_info 

Method for handling hierarchy events from subwindows and subdrawings.

This method is invoked before and after setup of the template drawing.

glg_objectTop-level viewport object to which the hierarchy listener is attached.
hierarchy_infoGlgHierarchyData object containing detailed event information, such as condition (before or after the setup), subwindow or subdrawing object that loaded the template (object member variable) and the template (subobject member variable)