GLG廣泛的 dials and meters、gauges、graphs、process control widgets 以及其它圖片控件的庫被放置在工具包對象引擎的頂端 – 是一個與傳統的編程控件創建完全不同的方法。
GLG's? extensive library of dials? and meters, gauges, graphs, process control? widgets and other graphical components is built on top of the Toolkit's? object engine - an approach radically different from the traditional methods of? creating programming components.
自定義外觀與感覺
該工具包提供了多個預置widget包:
-
實時圖表
-
2D圖片
-
3D圖片
-
控制組件
-
航空儀表
-
Avionics度量器
-
進程控制圖標
-
獨特的Widgets
每個 widget 包都包含數十個到上百個的widget。每個widget都是用圖形構建器創建的簡單繪圖。
控件的繪圖能加載到圖片創建程序中以瀏覽它的資源或進行交互式的編輯。因為該控件是一個圖片對象的集合,所以它非常靈活。控制組件的外觀(色彩、外形以及對象的位置等)能通過使用創建程序的點選式界面進行修改并且修改后的控件能保存以備以后使用。能運行如編輯新標簽、圖例以及axe的自定義操作。點這里查看更多關于圖片創建程序的信息。
因為視覺外觀被壓縮在繪圖里,所以每當繪圖改變時,應用程序不需要進行重新編譯。這可通過除去耗時的編譯連接周期以實現快速的原型化。
  所有的控件外觀能通過創建程序進行完全自定義,這消除了控件源代碼的概念。這是因為繪圖的功能就象是對對象外觀及行為的完整描述。
圖片創建程序能讓開發人員為控件屬性創建自定義名稱。這使您能非常輕易地訪問任何的控件屬性,這在基于代碼的控件中是不可能實現的,除非在代碼中處理的屬性本身能夠訪問。這些被命名的屬性變成了資源并能在運行時從程序中訪問以改變控件的外觀或提供動態的實時數據。
該圖片創建程序同樣能用于創建控制面板或包含多個控件的面板或儀表盤。簡單地創建新畫板、實現拖放功能、使用鼠標進行定位與調整尺寸大小、為每個控制組件命名以訪問它的資源并保存繪圖。該控制面板已準備好在應用程序中使用。它同樣能通過創建程序中的模擬程序進行原型化操作。
創建新的自定義控件
可根據暫存通過使用圖片創建程序的專業版或企業版創建新的自定義控件。同樣可使用現有的控件作為模板然后進行修改。例如,通過復制一個刻度盤的指針然后將該指針粘貼到該刻度盤上以在該刻度盤上添加第二個指針。在第二個指針被重新命名后,它就能被程序的數據所驅動。因為該指針對象集合了所有它的控制參數,所以不需要再做其它的工作。該指針的動態參數將被復制。在右邊顯示的模擬面板使用avionics gauges widget包以及是自定義控件的一個
很好的例子。
新創建的自定義控件能整合到圖片創建程序中,它們將出現在創建程序的控件調色板中。
自定義控件不僅僅只限于圖片、計量器或刻度盤。一個自定義控件能象一個用于將化學過程狀態視覺化的動態進程控制繪圖工具一樣復雜。控制繪圖動態的參數能象資源一樣導出并能用于通過實時數據更新繪圖功能。
圖片創建程序的專業版能提供根據暫存創建自定義繪圖所需的功能。創建程序的企業版可用于為處理詳細的用戶交互添加自定義事件或顯示對象的提示信息。
編程API
GLG簡單實用的編程API是基于資源的。與其不停地為控件的資源學習不同的程序,還不如使用一個簡單的SetResource程序來設置任何資源,甚至是用戶自己創建的自定義屬性。程序員唯一需要知道的就是給出資源的名稱,不需要知道直觀的如FillColor的默認設置或開發人員自己命名的資源的名稱。
該工具包能通過使用多種編程環境進行部署,如硬件與軟件平臺。GLG控件可使用交叉平臺或本地特定平臺編程存儲器進行部署。能以獨立平臺方式在Unix/Linux與Windows上使用交叉平臺C/C++ API,這能使應用程序在不更改任何源代碼的情況下在所有平臺上進行編譯和運行。
  Windows的MFC類與Unix/Linux的Motif, Gtk or Qt widget可為不同的編程環境提供本地部署存儲器。同樣提供了Java開發的Java bean與Java類以及C#以及VB.NET部署的ActiveX 控制組件。HTML5 JavaScript 庫提供了一種 Web 部署選項,其中包含可集成到 React、Angular 和 Next.js 框架中的 React、Angular 和 Next.js 組件。,了解有關可用編程容器和部署選項的更多信息。
編程 API 可用于在運行時修改組件的資源,并使用實時數據使組件產生動態效果。它還可用于處理用戶交互。,了解有關使用該 API 提供數據的更多信息。
擴展 API 允許應用程序通過編程方式在圖形中創建對象并添加對象。如果在運行時才知道圖形的性質或對象的數量,那么這種方式會非常方便。擴展 API 還可用于實現圖形編輯器的功能(例如用鼠標拖動對象)。,了解更多信息。
Customizing Look and Feel
The toolkit provides several pre-built widget sets:
- 2D Graphs
- 3D Graphs
- Controls
- Avionics Gauges
- Process Control Symbols
- Special Widgets
Each widget set contains from ten to a hundred widgets. Each widget is simply a drawing created with the Graphics Builder.
The component's drawing can be loaded into the Graphics Builder for browsing its resources or interactive editing. Since the component is a collection of graphical objects, it is extremely flexible. The control's appearance (colors, shapes and position of objects, etc.) can be changed interactively using the Builder's point and click interface, and a modified component can be saved for later use. More extensive customization, such as adding new labels, legends, and axes can also be performed.
Since the visual appearance is encapsulated in the drawing, the application does not have to be recompiled every time the drawing changes. This enables fast prototyping by eliminating time-consuming compile-link cycles.
All aspects of the component may be completely customized with the Builder, which eliminates the notion of a component's source code, since the drawing serves as a complete description of the object's appearance and behavior.
The Graphics Builder allows the developer to give custom names to a component's attributes. This provides an easy access to any component's attribute, which is not possible for code-based components, whereas only attributes that were handled in the code are accessible. Such named attributes become resources and can be accessed from the program at run-time to alter a component's appearance or to supply dynamic real-time data.
The Graphics Builder can also be used to create panels or dashboards containing multiple controls. Simply create a new canvas, drag-and-drop, position and resize controls using the mouse, name each control to access its resources and save the drawing. The control panel is now ready to be used in an application. It can also be prototyped with simulated data in the Builder.
Creating New Custom Components
New custom components can be created from scratch using the Professional or Enterprise Editions of the Graphics Builder. It is also possible to use an existing component as a template and modify it. For example, a second needle may be added to a dial by copying the dial's needle and pasting the copy into the dial. After the second instance of the needle is renamed, it is ready to
be driven by program's data. Since the needle object encapsulates all its controlling parameters, no extra work is necessary. The needle's dynamics parameters will have been copied. The simulation panel shown on the right uses avionics gauges widget set and is a good example of a custom component.
Newly created custom components can be integrated into the Graphics Builder, in which case they will appear in the Builder's component palette.
Custom components are not limited to graphs, meters or dials. A custom component may be as complex as a dynamic process control drawing used to visualize the state of a chemical process. The parameters controlling a drawing's dynamics are exported as resources and may be used by the program to update the drawing with real-time data.
The Professional Edition of the Graphics Builder provides the functionality required to build such custom drawings from scratch. The Enterprise Edition of the Builder may be used to add custom events for handling elaborate user interaction, or to display object tooltips.
Programming API
GLG's easy-to-use Programming API is resource based. Instead of learning a separate method for each of the component's resources, a single SetResource method is used to set any of its resources, even custom attributes created by the user. All a programmer needs to know is the name of a given resource, either an intuitive default such as FillColor, or a custom name given to the resource by the developer.
The Toolkit can be deployed using a variety of programming environments, as well as the hardware and software platforms. GLG components may be deployed using either a cross-platform or a native platform-specific programming container. A cross-platform C/C++ API may be used in a platform-independent way on both Unix/Linux and Windows, enabling an application to be compiled and run on any platform without any changes to its source code.
An MFC class for Windows and a Motif, Gtk or Qt widget for Unix/Linux provide native deployment containers for the respective programming environments. A Java bean and Java class library for the Java development, and an ActiveX Control for the C# and VB.NET deployment are also provided.
The Programming API may be used to modify resources of components at run-time and animate the component with real-time data. It may also be used to handle user interaction.