代码拉取完成,页面将自动刷新
system_bar窗口。
system_bar窗口是一种特殊的窗口,独占LCD顶部区域,用来显示当前窗口的标题和关闭按钮等内容。
system_bar窗口需要在打开第一个应用程序窗口之前打开。
system_bar对两个子控件会做特殊处理:
system_bar_t是window_base_t的子类控件, window_base_t的函数均适用于system_bar_t控件。
在xml中使用"system_bar"标签创建system_bar窗口。如:
<system_bar h="30">
<column x="0" y="0" w="-40" h="100%">
<label style="title" x="10" y="m" w="55%" h="100%" name="title"/>
<digit_clock style="time" x="r" y="m" w="40%" h="100%" format="hh:mm"/>
</column>
<button style="close" x="r:5" y="m" w="26" h="26" name="close" text="x"/>
</system_bar>
更多用法请参考: system_bar
在c代码中使用函数system_bar_create创建system_bar窗口。如:
widget_t* win = system_bar_create(NULL, 0, 0, 320, 30);
创建之后,和使用普通窗口是一样的。
可用通过style来设置控件的显示风格,如背景颜色等等。如:
<system_bar>
<style name="default">
<normal bg_color="#a0a0a0"/>
</style>
</system_bar>
更多用法请参考: system_bar.xml
函数名称 | 说明 |
---|---|
system_bar_cast | 转换为system_bar对象(供脚本语言使用)。 |
system_bar_create | 创建system_bar对象。 |
转换为system_bar对象(供脚本语言使用)。
widget_t* system_bar_cast (widget_t* widget);
参数 | 类型 | 说明 |
---|---|---|
返回值 | widget_t* | system_bar对象。 |
widget | widget_t* | system_bar对象。 |
创建system_bar对象。
widget_t* system_bar_create (widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h);
参数 | 类型 | 说明 |
---|---|---|
返回值 | widget_t* | system_bar对象。 |
parent | widget_t* | 父控件 |
x | xy_t | x坐标 |
y | xy_t | y坐标 |
w | wh_t | 宽度 |
h | wh_t | 高度 |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。