update readme

This commit is contained in:
idea4good 2020-09-16 00:24:52 +08:00
parent 1fb8366906
commit b6140dd6e4
3 changed files with 38 additions and 41 deletions

View File

@ -119,7 +119,7 @@ struct GL_MSG_ENTRY
c_cmd_target* object; c_cmd_target* object;
msgCallback callBack; msgCallback callBack;
}; };
#define ON_GL_USER_MSG(msgId, func) \ #define ON_GL_USER_MSG(msgId, func) \
{MSG_TYPE_USR, msgId, 0, msgCallback(&func)}, {MSG_TYPE_USR, msgId, 0, msgCallback(&func)},
#define GL_DECLARE_MESSAGE_MAP() \ #define GL_DECLARE_MESSAGE_MAP() \
protected: \ protected: \
@ -133,7 +133,7 @@ const GL_MSG_ENTRY* theClass::get_msg_entries() const \
} \ } \
const GL_MSG_ENTRY theClass::m_msg_entries[] = \ const GL_MSG_ENTRY theClass::m_msg_entries[] = \
{ {
#define GL_END_MESSAGE_MAP() \ #define GL_END_MESSAGE_MAP() \
{MSG_TYPE_INVALID, 0, 0, 0}}; {MSG_TYPE_INVALID, 0, 0, 0}};
class c_cmd_target class c_cmd_target
{ {
@ -365,9 +365,9 @@ private:
#define SURFACE_CNT_MAX 6//root + pages #define SURFACE_CNT_MAX 6//root + pages
typedef enum typedef enum
{ {
Z_ORDER_LEVEL_0,//view/wave/page Z_ORDER_LEVEL_0,//lowest graphic level
Z_ORDER_LEVEL_1,//dialog Z_ORDER_LEVEL_1,//middle graphic level
Z_ORDER_LEVEL_2,//editbox/spinbox/listbox/keyboard Z_ORDER_LEVEL_2,//highest graphic level
Z_ORDER_LEVEL_MAX Z_ORDER_LEVEL_MAX
}Z_ORDER_LEVEL; }Z_ORDER_LEVEL;
struct EXTERNAL_GFX_OP struct EXTERNAL_GFX_OP
@ -432,19 +432,19 @@ private:
int m_width; //in pixels int m_width; //in pixels
int m_height; //in pixels int m_height; //in pixels
int m_color_bytes; //16 bits, 32 bits only int m_color_bytes; //16 bits, 32 bits only
void* m_phy_fb; void* m_phy_fb; //physical framebuffer
int m_phy_read_index; int m_phy_read_index;
int m_phy_write_index; int m_phy_write_index;
c_surface* m_surface_group[SURFACE_CNT_MAX]; c_surface* m_surface_group[SURFACE_CNT_MAX];
int m_surface_cnt; int m_surface_cnt; //surface count
int m_surface_index; int m_surface_index;
}; };
class c_layer class c_layer
{ {
public: public:
c_layer() { fb = 0; } c_layer() { fb = 0; }
void* fb; void* fb; //framebuffer
c_rect rect; c_rect rect; //framebuffer area
}; };
class c_surface { class c_surface {
friend class c_display; friend class c_bitmap; friend class c_display; friend class c_bitmap;
@ -772,15 +772,15 @@ protected:
int m_height; //in pixels int m_height; //in pixels
int m_color_bytes; //16 bits, 32 bits only int m_color_bytes; //16 bits, 32 bits only
void* m_fb; //frame buffer you could see void* m_fb; //frame buffer you could see
c_layer m_layers[Z_ORDER_LEVEL_MAX];//Top layber fb always be 0 c_layer m_layers[Z_ORDER_LEVEL_MAX];//all graphic layers
bool m_is_active; bool m_is_active; //active flag
Z_ORDER_LEVEL m_max_zorder; Z_ORDER_LEVEL m_max_zorder; //the highest graphic layer the surface will have
Z_ORDER_LEVEL m_top_zorder; Z_ORDER_LEVEL m_top_zorder; //the current highest graphic layer the surface have
void* m_phy_fb; void* m_phy_fb; //physical framebufer
int* m_phy_write_index; int* m_phy_write_index;
c_display* m_display; c_display* m_display;
}; };
class c_surface_no_fb : public c_surface {//No physical framebuffer class c_surface_no_fb : public c_surface {//No physical framebuffer, render with external graphic interface
friend class c_display; friend class c_display;
public: public:
c_surface_no_fb(unsigned int width, unsigned int height, unsigned int color_bytes, struct EXTERNAL_GFX_OP* gfx_op, Z_ORDER_LEVEL max_zorder = Z_ORDER_LEVEL_0, c_rect overlpa_rect = c_rect()) : c_surface(width, height, color_bytes, max_zorder, overlpa_rect), m_gfx_op(gfx_op) {} c_surface_no_fb(unsigned int width, unsigned int height, unsigned int color_bytes, struct EXTERNAL_GFX_OP* gfx_op, Z_ORDER_LEVEL max_zorder = Z_ORDER_LEVEL_0, c_rect overlpa_rect = c_rect()) : c_surface(width, height, color_bytes, max_zorder, overlpa_rect), m_gfx_op(gfx_op) {}
@ -1342,14 +1342,14 @@ typedef enum
}TOUCH_ACTION; }TOUCH_ACTION;
typedef struct struct_wnd_tree typedef struct struct_wnd_tree
{ {
c_wnd* p_wnd; c_wnd* p_wnd;//window instance
unsigned int resource_id; unsigned int resource_id;//ID
const char* str; const char* str;//caption
short x; short x;//position x
short y; short y;//position y
short width; short width;
short height; short height;
struct struct_wnd_tree* p_child_tree; struct struct_wnd_tree* p_child_tree;//sub tree
}WND_TREE; }WND_TREE;
class c_wnd : public c_cmd_target class c_wnd : public c_cmd_target
{ {
@ -1757,18 +1757,18 @@ protected:
protected: protected:
WND_STATUS m_status; WND_STATUS m_status;
WND_ATTRIBUTION m_attr; WND_ATTRIBUTION m_attr;
c_rect m_wnd_rect;// position relative to parent wnd. c_rect m_wnd_rect; //position relative to parent window.
c_wnd* m_parent; c_wnd* m_parent; //parent window
c_wnd* m_top_child; c_wnd* m_top_child; //the first sub window would be navigated
c_wnd* m_prev_sibling; c_wnd* m_prev_sibling; //previous brother
c_wnd* m_next_sibling; c_wnd* m_next_sibling; //next brother
const char* m_str; const char* m_str; //caption
const FONT_INFO* m_font_type; const FONT_INFO* m_font_type;
unsigned int m_font_color; unsigned int m_font_color;
unsigned int m_bg_color; unsigned int m_bg_color;
unsigned short m_id; unsigned short m_id;
int m_z_order; int m_z_order; //the graphic level for rendering
c_wnd* m_focus_child;//current focused wnd c_wnd* m_focus_child; //current focused window
c_surface* m_surface; c_surface* m_surface;
private: private:
c_wnd(const c_wnd &win); c_wnd(const c_wnd &win);
@ -1793,9 +1793,8 @@ private:
#endif #endif
#ifndef GUILITE_WIDGETS_INCLUDE_BUTTON_H #ifndef GUILITE_WIDGETS_INCLUDE_BUTTON_H
#define GUILITE_WIDGETS_INCLUDE_BUTTON_H #define GUILITE_WIDGETS_INCLUDE_BUTTON_H
#define GL_BN_CLICKED 0x1111 #define GL_BN_CLICKED 0x1111
#define ON_GL_BN_CLICKED(func) \ #define ON_GL_BN_CLICKED(func) {MSG_TYPE_WND, GL_BN_CLICKED, 0, msgCallback(&func)},
{MSG_TYPE_WND, GL_BN_CLICKED, 0, msgCallback(&func)},
typedef struct struct_bitmap_info BITMAP_INFO; typedef struct struct_bitmap_info BITMAP_INFO;
class c_button : public c_wnd class c_button : public c_wnd
{ {
@ -2426,8 +2425,7 @@ protected:
#define MAX_ITEM_NUM 4 #define MAX_ITEM_NUM 4
#define GL_LIST_CONFIRM 0x1 #define GL_LIST_CONFIRM 0x1
#define ITEM_HEIGHT 45 #define ITEM_HEIGHT 45
#define ON_LIST_CONFIRM(func) \ #define ON_LIST_CONFIRM(func) {MSG_TYPE_WND, GL_LIST_CONFIRM, 0, msgCallback(&func)},
{MSG_TYPE_WND, GL_LIST_CONFIRM, 0, msgCallback(&func)},
class c_list_box : public c_wnd class c_list_box : public c_wnd
{ {
public: public:
@ -2981,11 +2979,10 @@ inline void c_slide_group::on_touch(int x, int y, TOUCH_ACTION action)
#endif #endif
#ifndef GUILITE_WIDGETS_INCLUDE_SPINBOX_H #ifndef GUILITE_WIDGETS_INCLUDE_SPINBOX_H
#define GUILITE_WIDGETS_INCLUDE_SPINBOX_H #define GUILITE_WIDGETS_INCLUDE_SPINBOX_H
#define ID_BT_ARROW_UP 0x1111 #define ID_BT_ARROW_UP 0x1111
#define ID_BT_ARROW_DOWN 0x2222 #define ID_BT_ARROW_DOWN 0x2222
#define GL_SPIN_CHANGE 0x3333 #define GL_SPIN_CHANGE 0x3333
#define ON_SPIN_CHANGE(func) \ #define ON_SPIN_CHANGE(func) {MSG_TYPE_WND, GL_SPIN_CHANGE, 0, msgCallback(&func)},
{MSG_TYPE_WND, GL_SPIN_CHANGE, 0, msgCallback(&func)},
class c_spin_box; class c_spin_box;
class c_spin_button : public c_button class c_spin_button : public c_button
{ {

View File

@ -136,6 +136,6 @@ Thanks for the help from the community, you all make GuiLite better! And welcome
<tr> <tr>
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=qfvGGAa7"><img src="documents/qq.group-1.jpg" width="240px;"/><br /><sub><b>大群527251257</b></sub></a> <td align="center"><a href="https://jq.qq.com/?_wv=1027&k=qfvGGAa7"><img src="documents/qq.group-1.jpg" width="240px;"/><br /><sub><b>大群527251257</b></sub></a>
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=yKnUJj1B"><img src="documents/qq.group-2.jpg" width="240px;"/><br /><sub><b>中群841031761</b></sub></a> <td align="center"><a href="https://jq.qq.com/?_wv=1027&k=yKnUJj1B"><img src="documents/qq.group-2.jpg" width="240px;"/><br /><sub><b>中群841031761</b></sub></a>
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=5hc3qwj"><img src="documents/qq.group-3.jpg" width="240px;"/><br /><sub><b>717471210</b></sub></a> <td align="center"><a href="https://jq.qq.com/?_wv=1027&k=5hc3qwj"><img src="documents/qq.group-3.jpg" width="240px;"/><br /><sub><b>免费717471210</b></sub></a>
</tr> </tr>
</table> </table>

View File

@ -133,6 +133,6 @@
<tr> <tr>
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=qfvGGAa7"><img src="documents/qq.group-1.jpg" width="240px;"/><br /><sub><b>大群527251257</b></sub></a> <td align="center"><a href="https://jq.qq.com/?_wv=1027&k=qfvGGAa7"><img src="documents/qq.group-1.jpg" width="240px;"/><br /><sub><b>大群527251257</b></sub></a>
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=yKnUJj1B"><img src="documents/qq.group-2.jpg" width="240px;"/><br /><sub><b>中群841031761</b></sub></a> <td align="center"><a href="https://jq.qq.com/?_wv=1027&k=yKnUJj1B"><img src="documents/qq.group-2.jpg" width="240px;"/><br /><sub><b>中群841031761</b></sub></a>
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=5hc3qwj"><img src="documents/qq.group-3.jpg" width="240px;"/><br /><sub><b>717471210</b></sub></a> <td align="center"><a href="https://jq.qq.com/?_wv=1027&k=5hc3qwj"><img src="documents/qq.group-3.jpg" width="240px;"/><br /><sub><b>免费717471210</b></sub></a>
</tr> </tr>
</table> </table>