收藏订阅
Graphics Builder
The GLG Graphics Builder uses a point and click interface and is geared towards application development. It allows the developer to not only draw graphical objects, but also attach 2D and 3D dynamic animation, define object and resource hierarchies, setup constraints, etc. The Builder also provides a way to prototype the drawing with dynamic data to test the drawing's behavior.
The governing principle of the Toolkit is to allow developers to define as much of the graphical aspects of the application in the Builder as possible, leaving the code to handle only the application logic. In the beginning, the Builder is used to draw graphical objects, edit their shapes, define colors, gradients, shadows and other rendering attributes, attach dynamics for animation and layout the graphics in the drawing.
Furthermore, the Builder allows developers to assign custom names to objects and their attributes. They become resources for the application to access. The Toolkit organizes resources into tree-like hierarchies, resembling the way files are organized in a file system. This decreases the number of resources visible on each level of the hierarchy, making dealing with large drawings easier. The resource hierarchy of the drawing may be tuned interactively with the Builder to minimize later programming efforts.
The Builder provides two ways to access objects: by selecting objects and traversing their hierarchies, or by browsing resources directly. Object selection provides immediate access to objects for editing, while the resource interface views the hierarchy as the application sees it, and is convenient for debugging resource access errors.
The produced drawing encapsulates the graphical appearance of the objects, and is completely separate from the application code. As a result, the application does not need to be recompiled when the drawing changes, as long as the resource hierarchy remains intact. This feature is useful when providing multiple versions of the drawing, all of which contain identical resource hierarchies, but may differ in appearance. For example, some versions of the drawing may contain much more elaborate graphics, while those with simple graphics result in faster updates.
Widgets and Custom Components
The Toolkit provides a vast library of pre-built widgets: dials and meters, graphs, avionic gauges, process control widgets and other graphical components. All widgets are built on top of the Toolkit's object engine and their behavior is encapsulated in the component's drawing. Each component's drawing can be loaded into the Graphics Builder and extensively customized, including not only editing its resources, but also changing the shape of its graphical elements. Custom components can be created and added to the Builder's palette.