diff options
Diffstat (limited to 'components/rtgui_win/include/rtgui/widgets/label.h')
| -rw-r--r-- | components/rtgui_win/include/rtgui/widgets/label.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/components/rtgui_win/include/rtgui/widgets/label.h b/components/rtgui_win/include/rtgui/widgets/label.h new file mode 100644 index 0000000000..ddc447edc3 --- /dev/null +++ b/components/rtgui_win/include/rtgui/widgets/label.h @@ -0,0 +1,48 @@ +/*
+ * File : label.h
+ * This file is part of RT-Thread RTOS
+ * COPYRIGHT (C) 2006 - 2009, 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
+ *
+ * Change Logs:
+ * Date Author Notes
+ * 2009-10-16 Bernard first version
+ */
+#ifndef __RTGUI_LABEL_H__
+#define __RTGUI_LABEL_H__
+
+#include <rtgui/rtgui.h>
+#include <rtgui/widgets/widget.h>
+
+/** Gets the type of a button */
+#define RTGUI_LABEL_TYPE (rtgui_label_type_get())
+/** Casts the object to an rtgui_label_t */
+#define RTGUI_LABEL(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_LABEL_TYPE, rtgui_label_t))
+/** Checks if the object is an rtgui_label_t */
+#define RTGUI_IS_LABEL(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_LABEL_TYPE))
+
+/*
+ * the label widget
+ */
+struct rtgui_label
+{
+ rtgui_widget_t parent;
+ /* label */
+ char* text;
+};
+typedef struct rtgui_label rtgui_label_t;
+
+rtgui_type_t *rtgui_label_type_get(void);
+
+rtgui_label_t* rtgui_label_create(PVOID wdt, const char* text, int left, int top, int w, int h);
+void rtgui_label_destroy(rtgui_label_t* label);
+
+rt_bool_t rtgui_label_event_handler(PVOID wdt, rtgui_event_t* event);
+
+void rtgui_label_set_text(rtgui_label_t* label, const char* text);
+char* rtgui_label_get_text(rtgui_label_t* label);
+
+#endif
|
