GLG工具包是為開發高級圖形的動態界面而設計的藝術化的框架:它不僅僅是簡單的按鍵與菜單,它是全動態的能顯示動態數據以及能反映用戶互動的圖片對象。它不僅僅是能制作“漂亮圖片”繪制工具(它還具有很多其他功能),而是能使開發人員定義圖片對象以及與程序中的對象互動的圖形引擎。它的使用對象主要針對應用程序開發人員,能將乏味的低級別圖片代碼編譯工作轉化成高級的互動設計行為。
GLG Toolkit is a state-of-the-art framework for developing highly graphical dynamic interfaces: not just simple buttons and menus, but fully animated graphical objects that show dynamic data and react to users' interactions. It is not just a drawing tool for creating "pretty pictures" (there are plenty), but a graphical engine that allows developers to define graphical objects and interact with them from a program. It is uniquely targeted towards an application developer, converting a tedious job of coding low-level graphics into an engaging interactive design of high-level behavior.
圖形編輯器
圖形編輯器(Graphics Builder)在GLG Toolkit里面扮演著核心的角色。生成器允許開發人員來定義外觀界面的獨立功能,而且可以在任何時候,不觸及代碼下改變它,避免耗時的編譯鏈接周期(compile-link cycles)。它可方便地進入任何以及所有先進功能的GLG圖形項目,包括限制、二維和三維動態、自定義事件、視口(viewport)和圖像項目、分層和subdrawings、團體和對象層級。
主要特點
-
可定義動態行為和附加數據源
-
提供預先構建的小部件的調色板
-
可自定義符號,并將它們作為可重用組件添加到調色板中
-
創建和編輯圖形都是在交互式點擊中完成,無需編程
-
可附加2D和3D動態動畫,定義對象和資源層次結構,設置約束等
-
資源與代碼分離及快速迭代
-
強大的原型與調試能力
-
跨平臺兼容性與渲染適配
HMI配置器
HMI 配置器是一個簡化的 HMI 編輯器,供最終用戶使用。其目標是為最終用戶提供易于使用的編輯器,通過拖放預制組件庫,以最小的學習曲線快速生成個性化界面。通過 HMI 配置器,操作員可:
-
可視化操作:從提供的組件庫中拖放儀表盤、圖表等預制組件,或繪制多邊形、圓弧、文本等圖形基元;
-
動態交互:編輯對象外觀(顏色、尺寸)、添加 2D/3D 動畫、綁定實時數據源,并實時預覽運行效果;
-
權限可控:僅能修改應用程序設計師開放的組件屬性(如隱藏高級設置),避免誤操作;
-
深度集成:直接嵌入到應用程序中,支持 OEM 廠商自定義菜單、圖標、數據瀏覽器及行業專屬對話框(如化工設備參數配置);
-
靈活擴展:定義組件動態行為(如動畫觸發條件)和企業專屬調色板,適配不同行業需求。
該工具與 GLG 圖形構建器形成互補:構建器面向開發者,支持復雜動態邏輯設計;配置器面向終端用戶,專注于零代碼快速迭代
OME擴展功能
圖形構建器和人機界面(HMI)配置器均支持通過可加載的動態鏈接庫(DLL)擴展程序(在 Linux/Unix 系統上為共享庫)進行原始設備制造商(OEM)定制。這兩款編輯器都可進行定制,以便添加自定義圖標、菜單項,以及針對特定應用任務的自定義對話框、自定義數據瀏覽器、運行模式下的自定義動畫模塊,還有自定義動態操作和調色板。有一個原始設備制造商(OEM)示例提供了一個自定義動態鏈接庫(DLL)樣本,該樣本允許用戶在人機界面(HMI)配置器中為對象添加自定義操作。監控和數據采集(SCADA)查看器演示展示了在運行時處理自定義操作的一個示例。
小部件和自定義組件
GLG Toolkit 提供了一個龐大的預構建小部件庫:刻度盤、儀表、圖表、航空電子儀表、過程控制小部件以及其他圖形組件。所有小部件均構建在 Toolkit 的對象引擎之上,其行為邏輯完全封裝于組件的繪圖文件中。每個組件的繪圖可直接加載至圖形構建器進行深度定制 —— 不僅能編輯其資源屬性(如顏色、動態綁定),還可修改圖形元素的幾何形狀(如調整儀表指針弧度)。開發者可創建自定義組件并添加到構建器的調色板中,實現跨項目復用。
OEM 版本的圖形構建器支持通過定義公共屬性創建專屬定制組件。這些自定義組件可無縫集成至HMI 配置器中,為終端用戶提供簡化的編輯界面,例如限制用戶僅能修改組件的外觀參數(如儀表盤配色),而保留底層動態邏輯不變。
GIG工具包功能
-
內在動態特性
-
無限的幾何動態效果
-
可縮放矢量圖形
-
可選擇 OpenGL 或原生 GDI 渲染器
-
圖像和 DXF 文件導入
-
約束條件
-
高級圖形功能
-
適用于 Windows、Unix 和 Linux 系統的跨平臺 C/C++ 語言支持
-
Java 類庫
-
C#/.NET 類庫
-
網頁部署:JavaScript/React/Angular/Next.js
-
用于傳統網頁部署的 AJAX 圖形服務器
-
編程應用程序接口(API)
-
動態配置和編輯應用程序接口(API)
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.