GLG Toolkit, C# Class Library  Version 4.3
GLG Toolkit, C# Class Library Documentation

This online documentation provides a list of GLG classes and methods and is intended to serve only as a quick reference. Refer to the GLG documentation for details of the GLG Toolkit and its usage.


The GLG C# Class Library is a C#-based object engine that renders GLG objects in the C# environment. The Toolkit takes care of the low-level details of the rendering process, such as optimized damage repair, screen-resolution independent coordinate conversion, transparent zooming and panning, double-buffering and other coding-intensive driver-level tasks.

The Toolkit provides a high-level graphical object model which allows an application developer to concentrate on the logic of the application, speeding up the development process and dramatically increasing the developer's productivity.

The Toolkit contains the Graphics Builder, a graphical editor used to create graphical objects and define their attributes and dynamic properties without tedious programming. The resulting drawing is then saved into a file and loaded into a C# application using a provided GLG's C# DLL.

Class Hierarchy Overview

The GlgControl and GlgObject are the main classes of the GLG package. There are also a few utility classes (GlgPoint, GlgCube, GlgTraceData, etc.) that provide convenient functionality.

The rest of the classes extend the generic GlgObject class providing specific functionality of graphical objects available in the GLG Toolkit. These classes are mostly for internal use. The only time they are used in an application is when their constructors are invoked to create various GLG objects (i.e. GlgArc, GlgPolygon, etc.) using the Extended API.

The GlgControl class is used for embedding GLG drawings into a C# application, in which case the GLG Control is used as a container which loads and displays a GLG drawing and provides programmatic access to the GLG objects in the drawing.

The GlgObject class is a generic GLG superclass that provides API methods for all GLG objects. It provides an application with a way to create and manipulate individual objects directly, without a need to create a GLG control.

Global Configuration Resources

Global configuration resources may be used to control some aspects of the GLG Toolkit run-time behavior. Refer to the Appendix A: Global Configuration Resources chapter of the GLG Programming Reference Manual for a list of the global configuration resources.

Standard, Intermediate and Extended APIs

The Toolkit provides three levels of a programming interface: Standard, Intermediate and Extended APIs.

  • The Standard API (Glg.Net.dll) provides methods for loading the drawing created in the Graphics Builder, displaying and updating it with dynamic data, as well as handling user interaction (selecting objects with the mouse, pressing buttons, etc.)

  • The Extended API (Glg.NetExt.dll) provides methods for creating objects programmatically, as well as methods for extended object manipulation (adding or deleting objects at run time, dragging objects with the mouse, traversing the object hierarchy, querying a list of object resources, etc.), supplying an application with all the functionality available in the Graphics Builder at run-time.

  • The Intermediate API (Glg.NetInt.dll) provides all functionality of the Extended API except the dynamic object creation.

Common methods of the GLG Standard, Intermediate and Extended APIs are implemented for both GlgControl and GlgObject classes. The GlgObject class provides access to the API methods of individual objects, while the GlgControl class implements the same set of methods at the control level and provides a centralized way to invoke API methods for any GLG object rendered inside the control. The GlgObject class also provides some additional API methods not available at the GlgControl level.

GLG Graphics Server for ASP.NET

Glg.NetServer.dll provides a GLG Graphics Server that is used to implement server-side ASP.NET Web applications. This library has the same interface as the rest of the GLG API with two additional classes (GlgHttpRequestProcessor and GlgHttpRequestData) and a few additional methods (GlgObject::SetImageSize, GlgObject::GetImageWidth and GlgObject::GetImageHeight) to be used in the ASP.NET environment.

The GLG JavaScript Library may be used for client-side HTML5 & JavaScript Web applications used on web pages in a web browser.

Free Community Edition

Glg.NetCE.dll provides a free Community Edition of the GLG C# Class Library and includes all GLG APIs.

Glg.NetServerCE.dll provides a free Community Edition of the GLG Graphics Server for ASP.NET.