update docs

This commit is contained in:
jim 2018-03-10 22:01:10 +08:00
parent 9a0590ba59
commit f17fc5cef6
10 changed files with 127 additions and 109 deletions

View File

@ -78,3 +78,13 @@ demos\demo1
## 文档
* [LFTK脚本绑定的实现原理 - lua绑定](docs/binding_lua.md)
## 任务完成情况
[TODO.md](TODO.md)
## 最新动态
* 2018/03/10
* lua绑定及相关示例完成。
* 支持从UI描述文件创建界面。
G

23
TODO
View File

@ -1,23 +0,0 @@
* main loop done
* clip done
* emitter done
* image load manager done
* image loader test done
* widget impl done
* theme done
* dirty rect done
* font generator done
* image generator done
* button done
* image done
* label done
* progressbar done
* checkbox done
* dialog style
* grab/ungrab
* test
* json
* ui loader
* rtthread
* stm32

57
TODO.md Normal file
View File

@ -0,0 +1,57 @@
## 已完成:
* main loop
* clip
* emitter
* image load manager
* image loader
* widget
* theme
* dirty rect
* font generator
* image generator
* button
* image
* label
* progressbar
* checkbox
* groupbox
* dialog
* lua binging
* binarry ui loader
* xml ui loader
* api doc
## 短期计划(顺序不定)
* 基本layout功能
* Qt界面文件转换器
* 微软Rc界面文件转换器
* API doc到PDF转换工具
* draw 9patch image
* combobox
* listbox
* tableview
* edit
* slider
* tab控件
* python binging
* jerryscript binging
* 软键盘
* 中文输入法
* 键盘导航
* stm32 移植(完善)
* rtthread移植
* sylixos移植
* djyos移植
* 用LFTK实现界面编辑器
* 支持tween动画
* 支持窗口动画
* 支持粒子产生器
* 支持骨骼动画
## 长期计划
* flash播放器支持
* android移植
* ios移植
* 在浏览器中运行
* 微信小程序类的开发方法

14
demos/README.md Normal file
View File

@ -0,0 +1,14 @@
## Demo程序
### 示例介绍
* demo1 按传统方式创建界面。
* demoui 从UI资源文件中创建界面。
### 源代码介绍
* demo1\_app.c 按传统方式创建界面。
* demo\_ui\_app.c 从UI资源文件中创建界面。
* demo\_main.c 所有入口函数。
* resource.c 资源初始化代码。
* common.c 公共代码。

42
demos/common.c Normal file
View File

@ -0,0 +1,42 @@
static ret_t on_timer(const timer_info_t* timer) {
widget_t* progress_bar = (widget_t*)timer->ctx;
uint8_t value = (PROGRESS_BAR(progress_bar)->value + 10) % 100;
progress_bar_set_value(progress_bar, value);
return RET_REPEAT;
}
static ret_t on_inc(void* ctx, event_t* e) {
widget_t* progress_bar = (widget_t*)ctx;
uint8_t value = (PROGRESS_BAR(progress_bar)->value + 10) % 100;
progress_bar_set_value(progress_bar, value);
(void)e;
return RET_OK;
}
static ret_t on_dec(void* ctx, event_t* e) {
widget_t* progress_bar = (widget_t*)ctx;
uint8_t value = (PROGRESS_BAR(progress_bar)->value + 90) % 100;
progress_bar_set_value(progress_bar, value);
(void)e;
return RET_OK;
}
static ret_t on_ok(void* ctx, event_t* e) {
widget_t* dialog = (widget_t*)ctx;
dialog_quit(dialog, 0);
(void)e;
mem_info_dump();
return RET_OK;
}
static ret_t on_cancel(void* ctx, event_t* e) {
widget_t* dialog = (widget_t*)ctx;
dialog_quit(dialog, 1);
(void)e;
mem_info_dump();
return RET_OK;
}

View File

@ -32,48 +32,7 @@
#include "base/utils.h"
#include "base/utf8.h"
#include "base/window.h"
static ret_t on_timer(const timer_info_t* timer) {
widget_t* progress_bar = (widget_t*)timer->ctx;
uint8_t value = (PROGRESS_BAR(progress_bar)->value + 10) % 100;
progress_bar_set_value(progress_bar, value);
return RET_REPEAT;
}
static ret_t on_inc(void* ctx, event_t* e) {
widget_t* progress_bar = (widget_t*)ctx;
uint8_t value = (PROGRESS_BAR(progress_bar)->value + 10) % 100;
progress_bar_set_value(progress_bar, value);
(void)e;
return RET_OK;
}
static ret_t on_dec(void* ctx, event_t* e) {
widget_t* progress_bar = (widget_t*)ctx;
uint8_t value = (PROGRESS_BAR(progress_bar)->value + 90) % 100;
progress_bar_set_value(progress_bar, value);
(void)e;
return RET_OK;
}
static ret_t on_ok(void* ctx, event_t* e) {
widget_t* dialog = (widget_t*)ctx;
dialog_quit(dialog, 0);
(void)e;
mem_info_dump();
return RET_OK;
}
static ret_t on_cancel(void* ctx, event_t* e) {
widget_t* dialog = (widget_t*)ctx;
dialog_quit(dialog, 1);
(void)e;
mem_info_dump();
return RET_OK;
}
#include "common.c"
static ret_t on_show_dialog(void* ctx, event_t* e) {
uint32_t code = 0;

View File

@ -1,7 +1,7 @@
/**
* File: demo1_main.c
* File: demo_main.c
* Author: Li XianJing <xianjimli@hotmail.com>
* Brief: demo1 main
* Brief: demo main
*
* Copyright (c) 2018 - 2018 Li XianJing <xianjimli@hotmail.com>
*

View File

@ -31,48 +31,7 @@
#include "base/utils.h"
#include "base/window.h"
#include "ui_loader/ui_builder_default.h"
static ret_t on_timer(const timer_info_t* timer) {
widget_t* progress_bar = (widget_t*)timer->ctx;
uint8_t value = (PROGRESS_BAR(progress_bar)->value + 10) % 100;
progress_bar_set_value(progress_bar, value);
return RET_REPEAT;
}
static ret_t on_inc(void* ctx, event_t* e) {
widget_t* progress_bar = (widget_t*)ctx;
uint8_t value = (PROGRESS_BAR(progress_bar)->value + 10) % 100;
progress_bar_set_value(progress_bar, value);
(void)e;
return RET_OK;
}
static ret_t on_dec(void* ctx, event_t* e) {
widget_t* progress_bar = (widget_t*)ctx;
uint8_t value = (PROGRESS_BAR(progress_bar)->value + 90) % 100;
progress_bar_set_value(progress_bar, value);
(void)e;
return RET_OK;
}
static ret_t on_ok(void* ctx, event_t* e) {
widget_t* dialog = (widget_t*)ctx;
dialog_quit(dialog, 0);
(void)e;
mem_info_dump();
return RET_OK;
}
static ret_t on_cancel(void* ctx, event_t* e) {
widget_t* dialog = (widget_t*)ctx;
dialog_quit(dialog, 1);
(void)e;
mem_info_dump();
return RET_OK;
}
#include "common.c"
static ret_t on_show_dialog(void* ctx, event_t* e) {
uint32_t code = 0;

BIN
demos/demoui Executable file

Binary file not shown.

BIN
tools/ui_gen/demo1.rc Executable file

Binary file not shown.