summaryrefslogtreecommitdiff
path: root/components/rtgui/doc
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2013-02-01 10:27:10 +0800
committerGrissiom <[email protected]>2013-02-01 10:27:10 +0800
commitf06c70feed0941b5bceedcecf89e9aa22034aca8 (patch)
tree89fd3a989b4d88fc72b39eaad6567de3a3d23874 /components/rtgui/doc
parent4f02e67bef7eacee5102d7730356663d9c889e15 (diff)
sync with rtgui-0.6
Diffstat (limited to 'components/rtgui/doc')
-rw-r--r--components/rtgui/doc/ANNOUNCE.0.6.md69
-rw-r--r--components/rtgui/doc/historical/road_map.txt (renamed from components/rtgui/doc/road_map.txt)0
-rw-r--r--components/rtgui/doc/mv-model.dox81
3 files changed, 150 insertions, 0 deletions
diff --git a/components/rtgui/doc/ANNOUNCE.0.6.md b/components/rtgui/doc/ANNOUNCE.0.6.md
new file mode 100644
index 0000000000..8d65c0a812
--- /dev/null
+++ b/components/rtgui/doc/ANNOUNCE.0.6.md
@@ -0,0 +1,69 @@
+RTGUI 0.6版发布纪要
+
+# 为什么是 0.6?
+
+RTGUI 是作为 RT-Thread 的一个组件存在的。这次新发布的版本是在原 RTGUI 基础上重
+构而来的。原 RTGUI 没有独立的版本号。暂设其为 0.5。所以本版本号取 0.6,为在原有
+基础上改进之意。以后我们会每个月发布一个新版本。下一个版本号会是 0.6.1。
+
+# 运行环境
+
+理论上原来可以运行 RTGUI 的设备上都可以运行新的 RTGUI。本版本自带一个 Windows
+模拟器,用来方便地评估运行效果。默认的运行环境是 realtouch。RT-Thread 中的模拟
+器也是可以运作的。
+
+# 新版本有什么特点?
+
+0. 新版本的 GUI 摒弃了原有的 workbench/view/window 的工作方式。转换成全面向
+ window的工作方式。原有的 workbench/view 可以用 notebook 来实现。
+0. 用 `rtgui_app` 对线程进行了抽象。
+0. 事件驱动更彻底:
+ 0. 将事件处理机制集成进 `rtgui_object`。
+ 0. 添加了`RTGUI_EVENT_SHOW` 和 `RTGUI_EVENT_HIDE` 来通知控件将要被显示/隐藏。
+ 0. 底层代码中对事件的应用更加彻底。
+0. 重构了自动布局方式。使得控件的摆放更加方便。
+
+# 增强
+
+- 添加了 TJPGD 引擎。使得小内存系统解码 jpeg 图片成为可能。(onelife)
+- 添加了对单色屏的支持(onelife)
+- bmp 图像引擎的重构(onelife)
+- bmp 图像的旋转/缩放,以及功能性增强(amsl)
+- 增加屏幕快照功能(amsl)
+- PNG 引擎增加 Alpha 通道支持(amsl)
+- 新增 edit 多行文本编辑控件。(amsl)
+- 增加了 Model/View 的编程框架。(Grissiom)
+- 添加了缩减字库的特性,开启后可以自动添加用到的汉字,不用的汉字字形不会加入到
+ 字库当中。使得 GUI 能够在小 ROM 系统上得以应用。(Grissiom)
+- 新增 digtube 七段码显示控件(prife)
+- demo/benchmark 新增了 FPS 输出(amsl)
+- 新增 box/panel/groupbox,支持自动布局(Bernard)
+
+# API 变化
+
+除了 workbench/view 的消失以外,还有如下的 API 变化:
+
+- c05a301, 68e3e30: `rtgui_{menu,win}_hiden` 被重命名为 `rtgui_{menu,win}_hide`。
+- 05e4894: 将 `struct rtgui_widget` 中的 `mini_{height,width}` 重命名为 `min_{height,width}`。
+- 等等……
+
+今后很长时间内,新版本的 RTGUI 会与此版本的 API 尽量只增不减,保持兼容。
+
+# Bug fixes
+
+- 00a6690: 解决了 `rtgui_notebook_set_current_by_index` 中重绘标签页的 bug。感
+ 谢 prife 提交 bug 信息和补丁。
+- 6850ff2: 解决了 `last_mevent_widget` 引起的事件传送失败。感谢 heryon 提交bug
+ 报告。
+- 9143e11: 解决了 jpeg 引擎中的内存泄漏。感谢 Young 提供 bug 信息。
+- fbd567c: 解决了 `rtgui_textbox_set_line_length` 的 bug。
+- 9b67b66: 修复了窗口标题栏渐变效果的绘制。
+- fc3abbf: 修复了 `rtgui_label_set_text`。感谢 tanghong668 提供 bug 信息。
+- d41586c: 修复了窗口激活时重复刷新的问题。感谢 onelife 提供 bug 信息。
+- ab08de6: 修复了字库缓存的 bug。感谢 rtt\_fans 提供 bug 信息。
+- 等等……
+
+除了上面提到的,luoyuncong2012, lgnq, shaolin 也有贡献。上面的列表也必然是不完
+整的。感谢编写了第一版 RTGUI 的 Bernard 和其他大侠们,没有他们的辛勤劳动,也不
+会有今天的版本。感谢各位使用和支持RTGUI的开发人员,是你们 RTGUI 体现了 RTGUI 的
+价值。
diff --git a/components/rtgui/doc/road_map.txt b/components/rtgui/doc/historical/road_map.txt
index c14e519251..c14e519251 100644
--- a/components/rtgui/doc/road_map.txt
+++ b/components/rtgui/doc/historical/road_map.txt
diff --git a/components/rtgui/doc/mv-model.dox b/components/rtgui/doc/mv-model.dox
new file mode 100644
index 0000000000..15975c4625
--- /dev/null
+++ b/components/rtgui/doc/mv-model.dox
@@ -0,0 +1,81 @@
+/** @~english
+ @page pg-mv-model Model-View framework
+
+ @brief A overview of the Model-View framework
+
+ @section Glossary
+
+ @li view: widget dedicated to show the data. It could be a graph, list etc.
+ @li model: abstraction and combination of data.
+ @li data: things that needed to be delivered or shown. It could be a array of
+ votage values which is sampled from a AD in an interval. Or it could be the
+ attributes of all the files in a folder.
+
+ @section Design considerations and implementations
+
+ @li one model can respond to more than one views. one view can connect to
+ more than one models.
+ @li It is guaranteed that the change events of a model will be sent to all
+ the registered views.
+ @li Because there are so many formats of data, Model-View neither specify the
+ format data is stored nor try to abstract them. The only thing stored in
+ model is a pointer to the underlaying data. It is the responsibility of
+ inherited classed to implement the boxing/un-boxing operations.
+ @li Data can be multi-dimensional. The "dimension" does not only means
+ dimension geometry. It can also means attributes. For example, a folder could
+ have two attributes which are name and icon. So it's two-dimensional. If take
+ the size into consideration, it will be three-dimensional. The size of
+ dimension is saved in model. Each dimension is correspond to a pointer to some
+ sort of data. Model can save many of them. As above, model does not make
+ assumptions on the underlaying data structure. It only provide mechanism, not
+ policy and leave that to the inherited classes.
+
+ @section Events
+
+ @li model has a record of registered views. When data changes, model notify
+ views the change by sending events. The event contains the id of the model,
+ the id of target view, the scope of changed data.
+ @li views can handle the event by retrieve data from model, and update
+ themselves according to the scope that data has changed. The connected model
+ views should have the same presentation of data structure. Views should also
+ restore all the models it interested. In the case of repainting, it should
+ re-retrieve data from those models.
+ @li model send events by rtgui_send. So it's suitable for the synchronization
+ between threads and even could be used in ISR.
+*/
+
+/** @~chinese
+ @page pg-mv-model Model-View 框架
+
+ @brief 对于 Model-View 框架的简介
+
+ @section 名词解释
+
+ @li view:用于显示数据的控件。可以是诸如图表控件、列表控件的控件。
+ @li model:对于数据的组合和抽象。
+ @li 数据:需要显示或传递的数据。它可以是每隔一段时间就从AD读取的电压值,也可
+ 以是一个目录下所有文件的属性列表。
+
+ @section 设计原则和实现
+
+ @li 一个 model 可以对应多个view。一个view可以对应多个 model。
+ @li 保证 model 的更新事件会同时发送到所有注册的 view 上。
+ @li 因为数据的形式与内容千差万别,所以 Model-View 不规定数据的存储形式,也不对其进
+ 行抽象。只在 model 中保留指向第一个数据的指针。打包/解包由从m odel/view 派生出
+ 的子类实现。
+ @li 数据源可以是多维的。这里的维度指的不只是几何的维度,而且可以是属性。比如
+ 一个目录,它可以有名称、图标两个属性,那么它就是两维的。如果加入大小这个属性
+ ,就是三维的。 model 内部存储数据的维度大小。一个维度对应一个数据首地址的指针
+ 。model 中可以存储多个数据首地址。model 对底层数据结构不作假设。只提供机制,不
+ 提供策略。只保证能够多维,但把具体的实现方式留给子类实现。
+
+ @subsection 事件
+
+ @li model 内部记录对自己感兴趣的 view。在数据变化时,用事件通知所有相关 view。事
+ 件内容包含:自己的 id;目标 view 的 id;所变化数据的 index 范围。
+ @li view 收到事件之后通过 model id 拿到数据并根据事件中的变化范围更新自己。对于
+ 指针的数据类型转换需要自己实现并保证和 model 一致。view 内部保存与自己相关的
+ model id,在需要重绘的时候要从所有相关 model 提取数据。
+ @li model 通过 rtgui_send 给 view 发送事件。使得这个模型适用于线程间同步,也
+ 可以在中断上下文里通知事件的发生。
+*/