summaryrefslogtreecommitdiff
path: root/components/gui/include/rtgui/widgets
diff options
context:
space:
mode:
authorbernard <[email protected]>2017-10-10 00:17:58 +0800
committerbernard <[email protected]>2017-10-10 00:17:58 +0800
commit01108b525294e1019fcab893dc991e8e17d1fa86 (patch)
treef52214cb4f76cffaeb8f4f5cf3c22f5c90604684 /components/gui/include/rtgui/widgets
parentf8a1bf6fd809be4ce53d17bde1a367aa6bae8187 (diff)
[GUI] Update GUI engine code and add Kconfig file.
Diffstat (limited to 'components/gui/include/rtgui/widgets')
-rw-r--r--components/gui/include/rtgui/widgets/box.h20
-rw-r--r--components/gui/include/rtgui/widgets/container.h20
-rw-r--r--components/gui/include/rtgui/widgets/title.h20
-rw-r--r--components/gui/include/rtgui/widgets/widget.h12
-rw-r--r--components/gui/include/rtgui/widgets/window.h29
5 files changed, 72 insertions, 29 deletions
diff --git a/components/gui/include/rtgui/widgets/box.h b/components/gui/include/rtgui/widgets/box.h
index 06486b958c..e4ea354478 100644
--- a/components/gui/include/rtgui/widgets/box.h
+++ b/components/gui/include/rtgui/widgets/box.h
@@ -1,11 +1,21 @@
/*
* File : box.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
+ * This file is part of RT-Thread GUI Engine
+ * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
diff --git a/components/gui/include/rtgui/widgets/container.h b/components/gui/include/rtgui/widgets/container.h
index fc89a14556..c45facca2d 100644
--- a/components/gui/include/rtgui/widgets/container.h
+++ b/components/gui/include/rtgui/widgets/container.h
@@ -1,11 +1,21 @@
/*
* File : container.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
+ * This file is part of RT-Thread GUI Engine
+ * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
diff --git a/components/gui/include/rtgui/widgets/title.h b/components/gui/include/rtgui/widgets/title.h
index 5394b9e880..128d1c3143 100644
--- a/components/gui/include/rtgui/widgets/title.h
+++ b/components/gui/include/rtgui/widgets/title.h
@@ -1,11 +1,21 @@
/*
* File : title.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
+ * This file is part of RT-Thread GUI Engine
+ * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
diff --git a/components/gui/include/rtgui/widgets/widget.h b/components/gui/include/rtgui/widgets/widget.h
index 13efcb7e5b..726bd4ae38 100644
--- a/components/gui/include/rtgui/widgets/widget.h
+++ b/components/gui/include/rtgui/widgets/widget.h
@@ -1,7 +1,7 @@
/*
* File : widget.h
- * This file is part of RT-Thread GUI
- * COPYRIGHT (C) 2006 - 2013, RT-Thread Development Team
+ * This file is part of RT-Thread GUI Engine
+ * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -110,6 +110,10 @@ struct rtgui_widget
/* the widget extent */
rtgui_rect_t extent;
+ /* the visiable extent (includes the rectangles of children) */
+ rtgui_rect_t extent_visiable;
+ /* the rect clip information */
+ rtgui_region_t clip;
/* minimal width and height of widget */
rt_int16_t min_width, min_height;
@@ -117,13 +121,10 @@ struct rtgui_widget
rt_int32_t align;
rt_uint16_t border;
rt_uint16_t border_style;
- /* the rect clip */
- rtgui_region_t clip;
/* call back */
rt_bool_t (*on_focus_in)(struct rtgui_object *widget, struct rtgui_event *event);
rt_bool_t (*on_focus_out)(struct rtgui_object *widget, struct rtgui_event *event);
- rt_bool_t (*on_paint)(struct rtgui_object *widget, struct rtgui_event *event);
/* user private data */
rt_uint32_t user_data;
@@ -142,7 +143,6 @@ void rtgui_widget_unfocus(rtgui_widget_t *widget);
/* event handler for each command */
void rtgui_widget_set_onfocus(rtgui_widget_t *widget, rtgui_event_handler_ptr handler);
void rtgui_widget_set_onunfocus(rtgui_widget_t *widget, rtgui_event_handler_ptr handler);
-void rtgui_widget_set_onpaint(rtgui_widget_t *widget, rtgui_event_handler_ptr handler);
/* get and set rect of widget */
void rtgui_widget_get_rect(rtgui_widget_t *widget, rtgui_rect_t *rect);
diff --git a/components/gui/include/rtgui/widgets/window.h b/components/gui/include/rtgui/widgets/window.h
index 635e3bced9..3623426296 100644
--- a/components/gui/include/rtgui/widgets/window.h
+++ b/components/gui/include/rtgui/widgets/window.h
@@ -1,11 +1,21 @@
/*
* File : window.h
- * This file is part of RTGUI in RT-Thread RTOS
- * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
+ * This file is part of RT-Thread GUI Engine
+ * COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rt-thread.org/license/LICENSE
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
@@ -80,6 +90,7 @@ struct rtgui_win
/* drawing count */
rt_base_t drawing;
+ struct rtgui_rect drawing_rect;
/* parent window. RT_NULL if the window is a top level window */
struct rtgui_win *parent_window;
@@ -135,9 +146,9 @@ rtgui_win_t *rtgui_mainwin_create(struct rtgui_win *parent_window, const char *t
void rtgui_win_destroy(rtgui_win_t *win);
int rtgui_win_init(struct rtgui_win *win, struct rtgui_win *parent_window,
- const char *title,
- rtgui_rect_t *rect,
- rt_uint16_t style);
+ const char *title,
+ rtgui_rect_t *rect,
+ rt_uint16_t style);
int rtgui_win_fini(struct rtgui_win* win);
/** Close window.
@@ -183,6 +194,8 @@ struct rtgui_dc *rtgui_win_get_drawing(rtgui_win_t * win);
struct rtgui_win* rtgui_win_get_topmost_shown(void);
struct rtgui_win* rtgui_win_get_next_shown(void);
+void rtgui_theme_draw_win(struct rtgui_wintitle *wint);
+
#ifdef __cplusplus
}
#endif