Editor Extensions
Extensions are standard VL patches saved with a .HDE.vl suffix. They run automatically when open in the editor.
File Naming
| Context | Required Name |
|---|
| Standalone extension | INLINECODE1 |
| Extension-only NuGet |
VL.MyExtension.HDE (package ID) |
| Mixed NuGet main doc |
VL.MyPackage.vl |
| Mixed NuGet extension doc |
VL.MyPackage.HDE.vl |
Required NuGet References
- - VL.HDE — provides
Command node, window types, INLINECODE6 - VL.Lang — provides API nodes under the
Session category
Command Node
Registers a command in the editor menu:
| Pin | Purpose |
|---|
| INLINECODE8 | Menu text |
| INLINECODE9 |
Show/hide the command |
|
Shortcut | Keyboard binding |
| Output | Triggers (bang) on activation |
Multiple Command nodes can live in one .HDE.vl document.
Warning: A runtime error in one command may affect all others in the same document.
Window Types
| Type | Behavior |
|---|
| INLINECODE13 | Slimmed-down Skia renderer window |
| INLINECODE14 |
Always-on-top, no focus steal |
Docking
Wrap window with WindowFactory node. Connect WindowContext and Window pins.
Template: INLINECODE18
API Access
Access hovered/selected nodes, read/write pins via VL.Lang Session category nodes. Browse available API in the HelpBrowser's API section.
Developer Shortcuts
- - Shift+F9 — restarts all extensions simultaneously
Limitations
- - Settings panel integration is not yet possible
- Extensions only run in the editor, not in exported applications
编辑器扩展
扩展是保存为.HDE.vl后缀的标准VL补丁。在编辑器中打开时会自动运行。
文件命名
| 上下文 | 必需名称 |
|---|
| 独立扩展 | VL.MyExtension.HDE.vl |
| 纯扩展NuGet |
VL.MyExtension.HDE(包ID) |
| 混合NuGet主文档 | VL.MyPackage.vl |
| 混合NuGet扩展文档 | VL.MyPackage.HDE.vl |
必需的NuGet引用
- - VL.HDE — 提供Command节点、窗口类型、WindowFactory
- VL.Lang — 提供Session类别下的API节点
Command节点
在编辑器菜单中注册命令:
显示/隐藏命令 |
| Shortcut | 键盘绑定 |
| 输出 | 激活时触发(bang) |
一个.HDE.vl文档中可以存在多个Command节点。
警告:一个命令中的运行时错误可能会影响同一文档中的所有其他命令。
窗口类型
| 类型 | 行为 |
|---|
| SkiaWindow | 精简版Skia渲染器窗口 |
| SkiaWindowTopMost |
始终置顶,不抢夺焦点 |
停靠
使用WindowFactory节点包裹窗口。连接WindowContext和Window引脚。
模板:VL.HDE/Template.HDE.vl
API访问
通过VL.Lang的Session类别节点访问悬停/选中的节点、读写引脚。在HelpBrowser的API部分浏览可用API。
开发者快捷键
限制
- - 尚无法集成设置面板
- 扩展仅在编辑器中运行,不适用于导出的应用程序