元编程参考文档

即时图形界面框架

预览

每帧重新声明的界面,适合控件随数据变化的工具

Methodox Wiki 上的使用指南

1 个类别,共 70 个节点

所属发行版
元编程(教育版)元编程(专业版)
支持等级
第 2 级(拟定)
所属包
即时模式界面
即时模式界面

每一帧重新绘制的即时模式界面,适用于界面外观动态变化的工具。

即时图形界面应用

即时图形界面应用添加按钮添加说明文字A quieter line, for a unit or an explanation.添加复选框添加下拉框添加标签The graph-facing widgets: a value goes in and the new value comes out.添加列表添加菜单项添加到同一行Put the next widget on the same line as the previous one.添加段落A paragraph, broken to the width available.添加主按钮The one action a person most likely came for.添加进度条添加单选按钮添加分隔线添加滑块添加间距添加文本框添加标题A heading.添加标题栏A drag handle and a close button for a window with no frame of its own.开始绘图区域Reserves a box of the given height and answers where it is, for a graph that draws its own picture.开始菜单One title on the menu bar.开始菜单栏A strip of menu titles.开始面板Opens a floating panel.开始屏幕The whole window as one region with no panel chrome: what a single-screen tool declares.关闭Ask to stop after this frame.释放绘制圆绘制图像绘制直线绘制矩形A filled rectangle, in surface pixels.绘制圆角矩形A filled rectangle with rounded corners.绘制文字A run of text with its left edge and baseline named exactly.按指定大小绘制文字A run of text at an exact pixel size, for a headline a role could not name.按指定大小绘制自动换行文字Text at an exact pixel size, broken into lines no wider than a width, every line centred and the block centred on a point: an overlay's sentence, which has to fit the screen it stands on.结束绘图区域结束菜单结束菜单栏结束面板已请求关闭Whether the application has asked to stop.已用时间Milliseconds the last frame took.界面The interface itself: every widget, the layout and the theme.宿主The host running this application, attached by whatever is running it.上一帧What the most recent frame answered.存储Per-run storage a node can keep something in.绘图表面The pixels.主题The theme the interface reads.窗口选项What the window was asked to be.获取点击次数How many clicks this press was the last of: one, two for a double click, three for a triple.获取已用时间获取指针位置Where the pointer is, in surface pixels.获取上一帧的指针位置Where the pointer was on the previous frame, in surface pixels - the other end of a segment whose near end is ImmediateGUIApplication.GetPointerPosition.获取输入的文字What the keyboard typed on this frame, as characters, or nothing on the frames nobody typed.获取窗口大小How big the drawing surface actually is, which is what the person can see rather than what was asked for.按键是否按下Whether a key is held right now.指针是否按下Whether a mouse button is held right now, which is what a drag asks.测量文字How wide a run of text draws at a pixel size, so a graph can centre it.设置始终置顶设置无边框No frame, no title bar.设置深色主题The dark palette rather than the light one.设置全屏设置叠加窗口A borderless, transparent, always-on-top window that stays out of the taskbar: the desktop overlay.设置透明背景The window's background shows the desktop through it, where the platform allows.设置窗口大小The window's size, in pixels.设置窗口标题是否按下了键Whether a key went down on this frame, whatever was held with it.指针是否按下过Whether a mouse button went down on this frame, which is what a click asks.指针是否已释放Whether a mouse button came up on this frame.帧Declare the whole interface.已初始化The window exists.启动Divooka procedural program entry, equivalent to "Main" in many programming languages.