mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 03:58:33 +08:00
update docs
This commit is contained in:
parent
93e6b1ffd3
commit
c82de9b06c
@ -23,7 +23,7 @@
|
||||
|
||||
```c
|
||||
widget_t* guage_pointer = guage_pointer_create(guage, 10, 10, 100, 30);
|
||||
guage_pointer_set_image(guage_pointer, "guage_pointer");
|
||||
guage_pointer_set_image(guage_pointer, "guage_pointer");
|
||||
```
|
||||
|
||||
> 创建之后,需要用guage\_pointer\_set\_image设置仪表指针图片。
|
||||
|
@ -15,7 +15,7 @@
|
||||
```
|
||||
|
||||
> 更多用法请参考:
|
||||
[guage.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/guages.xml)
|
||||
[guage.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/guage.xml)
|
||||
|
||||
在c代码中使用函数guage\_create创建表盘控件。如:
|
||||
|
||||
|
@ -41,7 +41,8 @@
|
||||
```
|
||||
|
||||
> 更多用法请参考:
|
||||
[theme default](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/styles/default.xml#L144)
|
||||
[theme
|
||||
default](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/styles/default.xml#L144)
|
||||
|
||||
### 函数
|
||||
<p id="label_t_methods">
|
||||
|
@ -43,7 +43,7 @@ BEGIN_C_DECLS
|
||||
* ```
|
||||
*
|
||||
* > 更多用法请参考:
|
||||
* [guage.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/guages.xml)
|
||||
* [guage.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/guage.xml)
|
||||
*
|
||||
* 在c代码中使用函数guage\_create创建表盘控件。如:
|
||||
*
|
||||
|
@ -23793,7 +23793,7 @@
|
||||
}
|
||||
],
|
||||
"header": "guage/guage_pointer.h",
|
||||
"desc": " 仪表指针控件。\r\n\r\n 仪表指针就是一张旋转的图片,图片可以是普通图片也可以是SVG图片。\r\n\r\n 在嵌入式平台上,对于旋转的图片,SVG图片的效率比位图高数倍,所以推荐使用SVG图片。\r\n\r\n guage\\_pointer\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于guage\\_pointer\\_t控件。\r\n\r\n 在xml中使用\"guage\\_pointer\"标签创建仪表指针控件。如:\r\n\r\n ```xml\r\n <guage_pointer x=\"c\" y=\"50\" w=\"24\" h=\"140\" value=\"-128\" image=\"guage_pointer\" />\r\n ```\r\n\r\n > 更多用法请参考:\r\n [guage.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/guage.xml)\r\n\r\n 在c代码中使用函数guage\\_pointer\\_create创建仪表指针控件。如:\r\n\r\n ```c\r\n widget_t* guage_pointer = guage_pointer_create(guage, 10, 10, 100, 30);\r\n guage_pointer_set_image(guage_pointer, \"guage_pointer\"); \r\n ```\r\n\r\n > 创建之后,需要用guage\\_pointer\\_set\\_image设置仪表指针图片。\r\n\r\n\r\n",
|
||||
"desc": " 仪表指针控件。\r\n\r\n 仪表指针就是一张旋转的图片,图片可以是普通图片也可以是SVG图片。\r\n\r\n 在嵌入式平台上,对于旋转的图片,SVG图片的效率比位图高数倍,所以推荐使用SVG图片。\r\n\r\n guage\\_pointer\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于guage\\_pointer\\_t控件。\r\n\r\n 在xml中使用\"guage\\_pointer\"标签创建仪表指针控件。如:\r\n\r\n ```xml\r\n <guage_pointer x=\"c\" y=\"50\" w=\"24\" h=\"140\" value=\"-128\" image=\"guage_pointer\" />\r\n ```\r\n\r\n > 更多用法请参考:\r\n [guage.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/guage.xml)\r\n\r\n 在c代码中使用函数guage\\_pointer\\_create创建仪表指针控件。如:\r\n\r\n ```c\r\n widget_t* guage_pointer = guage_pointer_create(guage, 10, 10, 100, 30);\r\n guage_pointer_set_image(guage_pointer, \"guage_pointer\");\r\n ```\r\n\r\n > 创建之后,需要用guage\\_pointer\\_set\\_image设置仪表指针图片。\r\n\r\n\r\n",
|
||||
"name": "guage_pointer_t",
|
||||
"parent": "widget_t",
|
||||
"annotation": {
|
||||
@ -23939,7 +23939,7 @@
|
||||
}
|
||||
],
|
||||
"header": "guage/guage.h",
|
||||
"desc": " 表盘控件。\r\n\r\n 表盘控件就是一张图片。\r\n\r\n guage\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于guage\\_t控件。\r\n\r\n 在xml中使用\"guage\"标签创建表盘控件。如:\r\n\r\n ```xml\r\n <guage x=\"c\" y=\"10\" w=\"240\" h=\"240\" image=\"guage_bg\" >\r\n ```\r\n\r\n > 更多用法请参考:\r\n [guage.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/guages.xml)\r\n\r\n 在c代码中使用函数guage\\_create创建表盘控件。如:\r\n\r\n ```c\r\n widget_t* guage = guage_create(win, 10, 10, 200, 200);\r\n guage_set_image(guage, \"guage_bg\");\r\n ```\r\n\r\n 可用通过style来设置控件的显示风格,如背景和边框等。如:\r\n\r\n ```xml\r\n <guage>\r\n <style name=\"border\">\r\n <normal border_color=\"#000000\" bg_color=\"#e0e0e0\" text_color=\"black\"/>\r\n </style>\r\n </guage>\r\n ```\r\n\r\n > 更多用法请参考:\r\n [theme default](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/styles/default.xml)\r\n\r\n",
|
||||
"desc": " 表盘控件。\r\n\r\n 表盘控件就是一张图片。\r\n\r\n guage\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于guage\\_t控件。\r\n\r\n 在xml中使用\"guage\"标签创建表盘控件。如:\r\n\r\n ```xml\r\n <guage x=\"c\" y=\"10\" w=\"240\" h=\"240\" image=\"guage_bg\" >\r\n ```\r\n\r\n > 更多用法请参考:\r\n [guage.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/guage.xml)\r\n\r\n 在c代码中使用函数guage\\_create创建表盘控件。如:\r\n\r\n ```c\r\n widget_t* guage = guage_create(win, 10, 10, 200, 200);\r\n guage_set_image(guage, \"guage_bg\");\r\n ```\r\n\r\n 可用通过style来设置控件的显示风格,如背景和边框等。如:\r\n\r\n ```xml\r\n <guage>\r\n <style name=\"border\">\r\n <normal border_color=\"#000000\" bg_color=\"#e0e0e0\" text_color=\"black\"/>\r\n </style>\r\n </guage>\r\n ```\r\n\r\n > 更多用法请参考:\r\n [theme default](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/styles/default.xml)\r\n\r\n",
|
||||
"name": "guage_t",
|
||||
"parent": "widget_t",
|
||||
"annotation": {
|
||||
@ -27945,7 +27945,7 @@
|
||||
}
|
||||
],
|
||||
"header": "widgets/label.h",
|
||||
"desc": "\r\n 文本控件。用于显示一行或多行文本。\r\n\r\n 文本控件不会根据文本的长度自动换行,只有文本内容包含换行符时才会换行。\r\n\r\n 如需自动换行请使用[rich\\_text\\_t](rich_text_t.md)控件。\r\n\r\n label\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于label\\_t控件。\r\n\r\n 在xml中使用\"label\"标签创建文本控件。如:\r\n\r\n ```xml\r\n <label style=\"center\" text=\"center\"/>\r\n ```\r\n\r\n > 更多用法请参考:\r\n [label.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/label.xml)\r\n\r\n 在c代码中使用函数label\\_create创建文本控件。如:\r\n\r\n ```c\r\n widget_t* label = label_create(win, 10, 10, 128, 30);\r\n widget_set_text(label, L\"hello awtk!\");\r\n ```\r\n\r\n > 创建之后,需要用widget\\_set\\_text或widget\\_set\\_text\\_utf8设置文本内容。\r\n\r\n > 完整示例请参考:\r\n [label demo](https://github.com/zlgopen/awtk-c-demos/blob/master/demos/label.c)\r\n\r\n 可用通过style来设置控件的显示风格,如字体的大小和颜色等等。如:\r\n\r\n ```xml\r\n <style name=\"left\">\r\n <normal text_color=\"red\" text_align_h=\"left\" border_color=\"#a0a0a0\" margin=\"4\" />\r\n </style>\r\n ```\r\n\r\n > 更多用法请参考:\r\n [theme default](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/styles/default.xml#L144)\r\n\r\n",
|
||||
"desc": "\r\n 文本控件。用于显示一行或多行文本。\r\n\r\n 文本控件不会根据文本的长度自动换行,只有文本内容包含换行符时才会换行。\r\n\r\n 如需自动换行请使用[rich\\_text\\_t](rich_text_t.md)控件。\r\n\r\n label\\_t是[widget\\_t](widget_t.md)的子类控件,widget\\_t的函数均适用于label\\_t控件。\r\n\r\n 在xml中使用\"label\"标签创建文本控件。如:\r\n\r\n ```xml\r\n <label style=\"center\" text=\"center\"/>\r\n ```\r\n\r\n > 更多用法请参考:\r\n [label.xml](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/ui/label.xml)\r\n\r\n 在c代码中使用函数label\\_create创建文本控件。如:\r\n\r\n ```c\r\n widget_t* label = label_create(win, 10, 10, 128, 30);\r\n widget_set_text(label, L\"hello awtk!\");\r\n ```\r\n\r\n > 创建之后,需要用widget\\_set\\_text或widget\\_set\\_text\\_utf8设置文本内容。\r\n\r\n > 完整示例请参考:\r\n [label demo](https://github.com/zlgopen/awtk-c-demos/blob/master/demos/label.c)\r\n\r\n 可用通过style来设置控件的显示风格,如字体的大小和颜色等等。如:\r\n\r\n ```xml\r\n <style name=\"left\">\r\n <normal text_color=\"red\" text_align_h=\"left\" border_color=\"#a0a0a0\" margin=\"4\" />\r\n </style>\r\n ```\r\n\r\n > 更多用法请参考:\r\n [theme\r\n default](https://github.com/zlgopen/awtk/blob/master/demos/assets/raw/styles/default.xml#L144)\r\n\r\n",
|
||||
"name": "label_t",
|
||||
"parent": "widget_t",
|
||||
"annotation": {
|
||||
|
Loading…
Reference in New Issue
Block a user