diff options
| author | [email protected] <[email protected]> | 2010-12-28 00:06:05 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2010-12-28 00:06:05 +0000 |
| commit | 97cc2b9e4cdc80b883827f6f6326c93c7caf87ca (patch) | |
| tree | a68ae48e5d5dc73ed99d56b023acc9557f108051 /components/rtgui/include | |
| parent | 04727cb1db71547ffef44a7897ea9a71e3fb2330 (diff) | |
update notebook control; fix rtgui_widget_hide issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1226 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/include')
| -rw-r--r-- | components/rtgui/include/rtgui/widgets/notebook.h | 12 | ||||
| -rw-r--r-- | components/rtgui/include/rtgui/widgets/widget.h | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/components/rtgui/include/rtgui/widgets/notebook.h b/components/rtgui/include/rtgui/widgets/notebook.h index 477150c014..ea203599a9 100644 --- a/components/rtgui/include/rtgui/widgets/notebook.h +++ b/components/rtgui/include/rtgui/widgets/notebook.h @@ -2,7 +2,7 @@ #define __RTGUI_NOTEBOOK_H__
#include <rtgui/rtgui.h>
-#include <rtgui/widgets/widget.h>
+#include <rtgui/widgets/container.h>
/** Gets the type of a notebook */
#define RTGUI_NOTEBOOK_TYPE (rtgui_notebook_type_get())
@@ -11,6 +11,10 @@ /** Checks if the object is a notebook control */
#define RTGUI_IS_NOTEBOOK(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_NOTEBOOK_TYPE))
+#define RTGUI_NOTEBOOK_TOP 0x00
+#define RTGUI_NOTEBOOK_BOTTOM 0x01
+#define RTGUI_NOTEBOOK_NOTAB 0x02
+
struct rtgui_notebook_tab
{
char* title;
@@ -20,7 +24,9 @@ typedef struct rtgui_notebook_tab rtgui_notebook_tab_t; struct rtgui_notebook
{
- struct rtgui_widget parent;
+ struct rtgui_container parent;
+
+ rt_uint8_t flag;
/* widget private data */
rtgui_notebook_tab_t* childs;
@@ -31,7 +37,7 @@ typedef struct rtgui_notebook rtgui_notebook_t; rtgui_type_t *rtgui_notebook_type_get(void);
-rtgui_notebook_t* rtgui_notebook_create(const rtgui_rect_t* rect);
+rtgui_notebook_t* rtgui_notebook_create(const rtgui_rect_t* rect, rt_uint8_t style);
void rtgui_notebook_destroy(rtgui_notebook_t* notebook);
void rtgui_notebook_add(rtgui_notebook_t* notebook, const char* label, rtgui_widget_t* child);
diff --git a/components/rtgui/include/rtgui/widgets/widget.h b/components/rtgui/include/rtgui/widgets/widget.h index dc58cac76d..93bc333237 100644 --- a/components/rtgui/include/rtgui/widgets/widget.h +++ b/components/rtgui/include/rtgui/widgets/widget.h @@ -157,6 +157,8 @@ void rtgui_widget_set_miniwidth(rtgui_widget_t* widget, int width); void rtgui_widget_set_miniheight(rtgui_widget_t* widget, int height); #endif +void rtgui_widget_set_parent(rtgui_widget_t* widget, rtgui_widget_t* parent); + /* get the physical position of a logic point on widget */ void rtgui_widget_point_to_device(rtgui_widget_t * widget, rtgui_point_t * point); /* get the physical position of a logic rect on widget */ |
