GLG Extended API is an optional component of the GLG Toolkit, which provides advanced dynamic configuration and editing features at run time. The GLG Extended API provides an application with capabilities to create drawings on the fly based on the current configuration data. It may be also used to add graphical objects to the drawing dynamically at run time, which is important for applications that display variable number of dynamic icons, such as moving airplane icons on the map. Another example of using the Extended API is a custom diagramming application that creates objects interactively based on user input. In addition to the methods for creating and deleting objects, the Extended API also provides advanced introspection capabilities, which can be used to traverse objects in the drawing and dynamically determine the drawing's content at run time. The Extended API provides programming access to all operations available in the Graphics Builder, regardless of the chosen deployment option: C/C++, Java or ActiveX.
While the Graphics Builder is used for interactive design of drawings, the Programming API provides a way for the program to interact with the drawing from a program. The API is the second crucial element of the Toolkit, and provides programming access to objects created in the Builder when the drawing is embedded into an application.
The Toolkit provides a number of native programming containers for deploying the Toolkit's graphics in an application, both C/C++ and Java, Unix, Linux and Windows: a Motif/Gtk/Qt widget, an MFC class, Windows custom control, a Java bean and class library, an ActiveX Control and more. Click here for more information on available programming containers and deployment options.
A developer will only need to use a single SetResource function call or method to set any of the drawing's resources, which is a result of the resource based Programming API. The programmer needs to know only the name of a given resource, either an intuitive default such as FillColor, or any custom name given to the resource.
The Programming API may be used to modify resources of the drawing at run-time and supply dynamic data for real-time updates. The application needs to concern itself only with supplying new resource values, and the Toolkit's engine handles all details of the low-level graphics and damage repair. The updates are data-driven, so no CPU time is consumed if the data does not change. Click here for more information.
The API may also be used to handle user interaction, such as object selection or interaction with buttons, sliders and other controls. The object selection is handled transparently by the Toolkit, regardless of the screen size or zooming state, and the program's callback is invoked with all selection information every time an object of interest is selected. Click here for more information.