元编程参考文档

图形界面框架

预览

由控件组成的窗口:布局只描述一次,之后按名称修改控件

Methodox Wiki 上的使用指南

1 个类别,共 37 个节点

所属发行版
元编程(教育版)元编程(专业版)
支持等级
第 2 级(拟定)
所属包
图形界面应用
图形界面应用

把图形界面应用构建为控件组合的框架,适用于表单、对话框与小工具。

图形界面应用

图形界面应用添加按钮Add a button.添加分隔线Add a hairline rule.添加标签Add a line of text.添加间隔Add empty room: a fixed number of pixels, or with no size, whatever room is free.添加文本框Add a line of text the person can edit.开始卡片Open a card: a raised surface with an optional heading, holding its children in a column.开始列Open a column: everything added until the matching End stacks top to bottom.开始网格Open a grid of equal cells.开始行Open a row: everything added until the matching End runs left to right.关闭Ask to stop.结束Close the innermost open container.期望的窗口大小How big a window to open.期望的窗口标题The window's title.获取已用时间Time the current frame represents, in milliseconds.获取文本What a named element says right now - for a text box, what the person has typed.是否有该元素Whether the screen has an element of this name.放入网格Put the element added most recently in a particular cell of the grid it is in.按下Act on an intent as if a button meaning it had been pressed - what a keyboard shortcut does.重新构建Ask for the screen to be described again: Build runs afresh before the next frame, and the widgets设置启用Whether a named element can be used.设置内边距Set the room inside the edge of the container opened most recently.设置大小Fix the size of the element added most recently.设置拉伸Give the element added most recently a share of the free room in its column or row.设置文本Change what a named element says: a label's text, a button's caption, a text box's content.设置文字自适应Draw the text of the element added most recently as large as fits it, growing and shrinking with the room it is given - or, for a container, the text of every label and button inside it.设置可见Whether a named element is shown at all.设置窗口大小Set the size the window opens at.设置窗口标题Set the window's title.显示通知Show a brief notice in the corner of the window.是否被点击Whether a button meaning this was pressed during the current frame.是否按下了键Whether this key was pressed during the current frame.构建Describe the screen: open containers, add labels and buttons, close containers.已点击A button was pressed.已按键A key was pressed.启动Divooka procedural program entry, equivalent to "Main" in many programming languages.更新Called once per frame, after that frame's presses have been delivered.