# 14. 附录四:控件的内存和 ROM 占用详细表格

控件名称 ROM 占用 最少内存占用 需要开启的功能模块
dialog 大约 1.2KB 424B 绘制高亮需要开启对话框高亮模块
window 567B 412B
dialog_title 249B 148B
dialog_client 270B 148B
image 大约 1KB 168B 旋转和缩放需要开启矢量画布模块
button 大约 1.7B 160B
label 大约 3.3KB 148B 换行需要开启标准的UNICODE换行模块
progress_bar 大约 2.5KB 160B
slider 大约 4.5KB 224B
check_button 大约 1.6KB 140B
radio_button 大约 1.6KB 140B
pages 大约 2.1KB 264B 若使用vpage,则需要开启控件动画模块
button_group 225B 136B
popup 大约 1.4KB 424B
color_tile 大约 2KB 168B
clip_view 558B 136B
group_box 222B 136B
system_bar 983B 444B
system_bar_bottom 983B 444B
calibration_win 大约 1KB 480B
view 509B 140B
overlay 732B 412B
edit 大约 19.5KB 868B 若支持软键盘输入,则需要开启对应的输入法模块
tab_control 224B 136B
tab_button 大约 2.5KB 240B
tab_button_group 大约 1.2KB 220B
spin_box 528B 大约 1.4KB
dragger 大约 1.4KB 172B
combo_box 大约 5.5KB 大约 1.2KB
combo_box_item 大约 1.3KB 144B
grid 208B 136B
grid_item 208B 136B
row 208B 136B
column 211B 136B
app_bar 212B 136B
digit_clock 928B 368B
rich_text 大约 7.3KB 228B 控件动画模块
rich_text_view 863B 144B
color_picker 大约 3.7KB 180B
color_component 大约 2.4KB 168B
scroll_view 大约 6.6KB 272B 控件动画模块
list_view 大约 3KB 160B 控件动画模块
list_view_h 大约 1KB 148B 控件动画模块
list_item 大约 1KB 152B
scroll_bar 大约 5.8KB 164B 控件动画模块
scroll_bar_d 大约 5.8KB 920B 控件动画模块
scroll_bar_m 大约 5.8KB 164B 控件动画模块
slide_view 大约 7.3KB 344B 控件动画模块、矢量画布模块
slide_indicator 大约 8.3KB 268B 控件动画模块、矢量画布模块
slide_indicator_arc 大约 8.3KB 268B 控件动画模块、矢量画布模块
keyboard 大约 2.1KB 528B 输入法模块
lang_indicator 739B 180B 输入法模块
candidates 大约 2.8KB 244B
time_clock 大约 4.3KB 376B 矢量画布模块
gauge 794B 144B
gauge_pointer 大约 2.4KB 180B 矢量画布模块
text_selector 大约 6.9KB 232B 控件动画模块
switch 大约 3.1KB 196B 控件动画模块、圆角需要矢量画布模块
image_animation 大约 3.5KB 184B
progress_circle 大约 3KB 176B 矢量画布模块
svg 大约 19KB 168B 矢量画布模块
gif 951B 176B stb 图片解码模块
canvas 211B 136B
image_value 大约 2.3KB 184B
slide_menu 大约 5KB 196B 控件动画模块
mutable_image 大约 1.3KB 316B 旋转需要开启矢量画布模块
mledit 大约 6.9KB 大约 7.4KB 若支持软键盘输入,则需要开启对应的输入法模块
line_number 大约 1KB 160B
hscroll_label 大约 3.5KB 360B
combo_box_ex 601B 大约 1.4KB
draggable 大约 1.9KB 280B

需要注意的是:

  1. 上表中的内存是创建一个控件的内存。
  2. 有部分控件会因为属性配置不同,内存也会有所变化,这里只列出一般默认情况下的内存大小,也可以简单理解为最少的内存占用。
  3. AWTK 支持动态增加自定义属性和增加 inline_style 属性以及增加字符串属性等,都可能导致控件的内存变大,比如说给某个控件设置 text 属性或 name 属性(这两个属性都是字符串类型的),控件的内存占用也会增加。
  4. 如果风格中使用圆角边框或者缩放,则需要开启矢量画布模块。
  5. 如果控件中用到 file:// 绝对路径加载资源,则需要支持文件系统模块。
  6. 如果使用了控件动画中的旋转/缩放动画,则需要开启矢量画布模块。

上述功能模块的详细说明以及开启/关闭的方法可以查阅本文附录二:AWTK 可裁剪的功能模块。