GLG工具包是為開發(fā)高級圖形的動態(tài)界面而設(shè)計的藝術(shù)化的框架:它不僅僅是簡單的按鍵與菜單,它是全動態(tài)的能顯示動態(tài)數(shù)據(jù)以及能反映用戶互動的圖片對象。它不僅僅是能制作“漂亮圖片”繪制工具(它還具有很多其他功能),而是能使開發(fā)人員定義圖片對象以及與程序中的對象互動的圖形引擎。它的使用對象主要針對應(yīng)用程序開發(fā)人員,能將乏味的低級別圖片代碼編譯工作轉(zhuǎn)化成高級的互動設(shè)計行為。
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里面扮演著核心的角色。生成器允許開發(fā)人員來定義外觀界面的獨立功能,而且可以在任何時候,不觸及代碼下改變它,避免耗時的編譯鏈接周期(compile-link cycles)。它可方便地進入任何以及所有先進功能的GLG圖形項目,包括限制、二維和三維動態(tài)、自定義事件、視口(viewport)和圖像項目、分層和subdrawings、團體和對象層級。
主要特點
-
可定義動態(tài)行為和附加數(shù)據(jù)源
-
提供預(yù)先構(gòu)建的小部件的調(diào)色板
-
可自定義符號,并將它們作為可重用組件添加到調(diào)色板中
-
創(chuàng)建和編輯圖形都是在交互式點擊中完成,無需編程
-
可附加2D和3D動態(tài)動畫,定義對象和資源層次結(jié)構(gòu),設(shè)置約束等
-
資源與代碼分離及快速迭代
-
強大的原型與調(diào)試能力
-
跨平臺兼容性與渲染適配
HMI配置器
HMI 配置器是一個簡化的 HMI 編輯器,供最終用戶使用。其目標(biāo)是為最終用戶提供易于使用的編輯器,通過拖放預(yù)制組件庫,以最小的學(xué)習(xí)曲線快速生成個性化界面。通過 HMI 配置器,操作員可:
-
可視化操作:從提供的組件庫中拖放儀表盤、圖表等預(yù)制組件,或繪制多邊形、圓弧、文本等圖形基元;
-
動態(tài)交互:編輯對象外觀(顏色、尺寸)、添加 2D/3D 動畫、綁定實時數(shù)據(jù)源,并實時預(yù)覽運行效果;
-
權(quán)限可控:僅能修改應(yīng)用程序設(shè)計師開放的組件屬性(如隱藏高級設(shè)置),避免誤操作;
-
深度集成:直接嵌入到應(yīng)用程序中,支持 OEM 廠商自定義菜單、圖標(biāo)、數(shù)據(jù)瀏覽器及行業(yè)專屬對話框(如化工設(shè)備參數(shù)配置);
-
靈活擴展:定義組件動態(tài)行為(如動畫觸發(fā)條件)和企業(yè)專屬調(diào)色板,適配不同行業(yè)需求。
該工具與 GLG 圖形構(gòu)建器形成互補:構(gòu)建器面向開發(fā)者,支持復(fù)雜動態(tài)邏輯設(shè)計;配置器面向終端用戶,專注于零代碼快速迭代
OME擴展功能
圖形構(gòu)建器和人機界面(HMI)配置器均支持通過可加載的動態(tài)鏈接庫(DLL)擴展程序(在 Linux/Unix 系統(tǒng)上為共享庫)進行原始設(shè)備制造商(OEM)定制。這兩款編輯器都可進行定制,以便添加自定義圖標(biāo)、菜單項,以及針對特定應(yīng)用任務(wù)的自定義對話框、自定義數(shù)據(jù)瀏覽器、運行模式下的自定義動畫模塊,還有自定義動態(tài)操作和調(diào)色板。有一個原始設(shè)備制造商(OEM)示例提供了一個自定義動態(tài)鏈接庫(DLL)樣本,該樣本允許用戶在人機界面(HMI)配置器中為對象添加自定義操作。監(jiān)控和數(shù)據(jù)采集(SCADA)查看器演示展示了在運行時處理自定義操作的一個示例。
小部件和自定義組件
GLG Toolkit 提供了一個龐大的預(yù)構(gòu)建小部件庫:刻度盤、儀表、圖表、航空電子儀表、過程控制小部件以及其他圖形組件。所有小部件均構(gòu)建在 Toolkit 的對象引擎之上,其行為邏輯完全封裝于組件的繪圖文件中。每個組件的繪圖可直接加載至圖形構(gòu)建器進行深度定制 —— 不僅能編輯其資源屬性(如顏色、動態(tài)綁定),還可修改圖形元素的幾何形狀(如調(diào)整儀表指針弧度)。開發(fā)者可創(chuàng)建自定義組件并添加到構(gòu)建器的調(diào)色板中,實現(xiàn)跨項目復(fù)用。
OEM 版本的圖形構(gòu)建器支持通過定義公共屬性創(chuàng)建專屬定制組件。這些自定義組件可無縫集成至HMI 配置器中,為終端用戶提供簡化的編輯界面,例如限制用戶僅能修改組件的外觀參數(shù)(如儀表盤配色),而保留底層動態(tài)邏輯不變。
GIG工具包功能
-
內(nèi)在動態(tài)特性
-
無限的幾何動態(tài)效果
-
可縮放矢量圖形
-
可選擇 OpenGL 或原生 GDI 渲染器
-
圖像和 DXF 文件導(dǎo)入
-
約束條件
-
高級圖形功能
-
適用于 Windows、Unix 和 Linux 系統(tǒng)的跨平臺 C/C++ 語言支持
-
Java 類庫
-
C#/.NET 類庫
-
網(wǎng)頁部署:JavaScript/React/Angular/Next.js
-
用于傳統(tǒng)網(wǎng)頁部署的 AJAX 圖形服務(wù)器
-
編程應(yīng)用程序接口(API)
-
動態(tài)配置和編輯應(yīng)用程序接口(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.