Vega Prime入门教程17.01:模块界面

Vega Prime入门教程索引:Vega Prime入门教程索引

GCF

GCF, GUI Configuration File,图形化配置文件。

下图右侧的下半部分就是API,上半部分就是图形化API,而GCF就是创建自定义API的工具。

GUI

xsd

打开C:\Presagis\Suite22\Vega_Prime_22_0\config\vegaprime\common文件夹

xsd文件

从中选一个复制并修改vpglstudio.xsd。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema targetNamespace="urn://feater.top/vpGLStudio"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:vp="urn://www.presagis.com/vp"
xmlns="urn://feater.top/vpGLStudio"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xsd:import namespace="urn://www.presagis.com/vp" schemaLocation="vp.xsd" />

<!--
//
// GLStudioSettings
//
-->
<xsd:complexType name="GLStudioSettings">
<xsd:sequence>
<xsd:element name="setCollisionVolumesEnable" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:appinfo>
<aptool disable="postconfig"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>

<xsd:element name="GLStudioSettings" type="GLStudioSettings">
<xsd:annotation>
<xsd:appinfo>
<singleton />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="GLStudioSettings.Ref">
<xsd:attribute name="refTo" type="xsd:string" use="required" />
</xsd:complexType>

</xsd:schema>

要想gcf/xsd在Vega Prime标准模式下可用,需要将xsd加入mpi.xsd中,直接终端运行

1
2
MPIXsdMgr.exe -build
info -> MPI xsd manager - mpi.xsd has been successfully modified!

工具会自动将新建xsd文件添加到mpi.xsd的合适的位置。

其实就是在mpi.xsd文件头部添加了一行

1
<xsd:import namespace="urn://feater.top/vpGLStudio" schemaLocation="vpglstudio.xsd"/>

测试1

打开Vega Prime,点击新建实例

新建实例

新建后,可以看到此实例只有下半部分的非GUI API

新建实例

GCF模式

以GCF模式打开Vega Prime

1
LynxPrime -g

gcf模式

可以看到界面与普通模式不一样。

新建的实例也改变了

实例

就是类似于Qt的下拉框、标签、文本框等控件。

在所有的实例中GcfPanel是顶级实例,其余控件都要依附于它以组成一个完整的界面。

实例

Panel的名称要和xsd中一样

在独立控件中可以进行配置

实例

API Call字段要和xsd中一样

将此gcf文件保存至同名xsd目录

点击预览

实例

xsd/gcf内容是匹配的,否则无法正常运行

测试2

再次打开Vega Prime,同样新建实例,这次的效果为

实例


Vega Prime入门教程17.01:模块界面
https://feater.top/vegaprime/gcf-xsd-of-new-module/
作者
JackeyLea
发布于
2023年12月27日
许可协议