update doc for HelloAnimation

This commit is contained in:
idea4good 2018-12-24 10:39:41 +08:00
parent a04a26658b
commit 770a954fe3
4 changed files with 11 additions and 10 deletions

View File

@ -17,10 +17,10 @@
- 我们不推荐开发者全盘使用GuiLite鼓励开发者在吃透代码后根据自身业务特点修改出更加丰富、个性的界面或者发展出适合自己的UI框架。
- 为了聚焦UI核心原理GuiLite会一直保持单片机的代码体量。
## 新功能:滑屏demo -- HelloSlide
![HelloSlide](doc/HelloSlide.gif)
## 新功能:动画demo -- HelloAnimation
![HelloAnimation](doc/HelloAnimation.gif)
**信不信由你代码只有100+行!**[查阅代码](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloSlide/UIcode/UIcode.cpp)
**信不信由你代码只有100+行!**[查阅代码](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloAnimation/UIcode/UIcode.cpp)
## 功能介绍
### 卓越的跨平台能力
@ -68,6 +68,7 @@ GuiLite只是一个框架本身并不能生成UI。为了能够展示如何
| --- | --- | --- | --- | --- |
| HelloGuiLite | Windows, Linux | 初始化GuiLite加载资源布局界面元素按钮响应 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloGuiLite/README.md) | 初级 |
| HelloFont | Windows, Linux | 显示多种语言(不限:中、英文) | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloFont/README.md) | 初级 |
| HelloAnimation | Windows, Linux | 动画的应用 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloAnimation/README.md) | 初级 |
| HelloSlide | Windows, Linux | 滑屏界面的应用 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloSlide/README.md) | 中级 |
| HostMonitor | iOS, Mac, Android, Windows, Linux | 创建复杂界面,扩展自定义控件,适配全平台 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HostMonitor/README.md) | 高级 |
## 开发文档

View File

@ -24,7 +24,7 @@ typedef struct struct_wnd_tree
{
c_wnd* p_wnd;
unsigned int resource_id;
char* str;
const char* str;
short x;
short y;
short width;
@ -39,9 +39,9 @@ public:
c_wnd();
virtual ~c_wnd() {};
virtual const char* get_class_name() const { return "c_wnd"; }
virtual int connect(c_wnd *parent, unsigned short resource_id, char* str,
virtual int connect(c_wnd *parent, unsigned short resource_id, const char* str,
short x, short y, short width, short height, WND_TREE* p_child_tree = NULL);
virtual c_wnd* connect_clone(c_wnd *parent, unsigned short resource_id, char* str,
virtual c_wnd* connect_clone(c_wnd *parent, unsigned short resource_id, const char* str,
short x, short y, short width, short height, WND_TREE* p_child_tree = NULL);
void disconnect();
virtual c_wnd* clone() = 0;
@ -55,7 +55,7 @@ public:
unsigned int get_style() const { return m_style; }
virtual void modify_style(unsigned int add_style = 0, unsigned int remove_style = 0);
void set_str(char* str) { m_str = str; }
void set_str(const char* str) { m_str = str; }
int is_focus_wnd() const;
void set_font_color(unsigned int color) { m_font_color = color; }
@ -125,7 +125,7 @@ protected:
c_wnd* m_top_child;
c_wnd* m_prev_sibling;
c_wnd* m_next_sibling;
char* m_str;
const char* m_str;
const FONT_INFO* m_font_type;
unsigned int m_font_color;

View File

@ -17,7 +17,7 @@ void c_wnd::pre_create_wnd()
m_style = GL_ATTR_VISIBLE | GL_ATTR_FOCUS;
}
int c_wnd::connect(c_wnd *parent, unsigned short resource_id, char* str,
int c_wnd::connect(c_wnd *parent, unsigned short resource_id, const char* str,
short x, short y, short width, short height, WND_TREE* p_child_tree )
{
if(0 == resource_id)
@ -94,7 +94,7 @@ int c_wnd::load_child_wnd(WND_TREE *p_child_tree)
return sum;
}
c_wnd* c_wnd::connect_clone(c_wnd *parent, unsigned short resource_id, char* str,
c_wnd* c_wnd::connect_clone(c_wnd *parent, unsigned short resource_id, const char* str,
short x, short y, short width, short height, WND_TREE* p_child_tree )
{
if(0 == resource_id)

BIN
doc/HelloAnimation.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB