gntlabel.h
Go to the documentation of this file.
1
5 /*
6 * GNT - The GLib Ncurses Toolkit
7 *
8 * GNT is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
11 *
12 * This library is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25 */
26
27 #ifndef GNT_LABEL_H
28 #define GNT_LABEL_H
29
30 #include "gnt.h"
31 #include "gntwidget.h"
32 #include "gnttextview.h"
33
34 #define GNT_TYPE_LABEL (gnt_label_get_gtype())
35 #define GNT_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_LABEL, GntLabel))
36 #define GNT_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_LABEL, GntLabelClass))
37 #define GNT_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_LABEL))
38 #define GNT_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_LABEL))
39 #define GNT_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_LABEL, GntLabelClass))
40
41 typedef struct _GntLabel GntLabel;
42 typedef struct _GntLabelClass GntLabelClass;
43
44 struct _GntLabel
45 {
46 GntWidget parent;
47
48 char *text;
49 GntTextFormatFlags flags;
50
51 void (*gnt_reserved1)(void);
52 void (*gnt_reserved2)(void);
53 void (*gnt_reserved3)(void);
54 void (*gnt_reserved4)(void);
55 };
56
57 struct _GntLabelClass
58 {
59 GntWidgetClass parent;
60
61 void (*gnt_reserved1)(void);
62 void (*gnt_reserved2)(void);
63 void (*gnt_reserved3)(void);
64 void (*gnt_reserved4)(void);
65 };
66
67 G_BEGIN_DECLS
68
72 GType gnt_label_get_gtype(void);
73
81 GntWidget * gnt_label_new(const char *text);
82
91 GntWidget * gnt_label_new_with_format(const char *text, GntTextFormatFlags flags);
92
99 void gnt_label_set_text(GntLabel *label, const char *text);
100
101 G_END_DECLS
102
103 #endif /* GNT_LABEL_H */
104
gnt_label_get_gtype
G_BEGIN_DECLS GType gnt_label_get_gtype(void)
gntwidget.h
Widget API.
_GntLabel
Definition: gntlabel.h:44
gnt.h
GNT API.
gnt_label_set_text
void gnt_label_set_text(GntLabel *label, const char *text)
Change the text of a label.
gnttextview.h
Textview API.
_GntLabelClass
Definition: gntlabel.h:57
gnt_label_new
GntWidget * gnt_label_new(const char *text)
Create a new GntLabel.
_GntWidgetClass
Definition: gntwidget.h:113
_GntWidget
Definition: gntwidget.h:98
gnt_label_new_with_format
GntWidget * gnt_label_new_with_format(const char *text, GntTextFormatFlags flags)
Create a new label with specified text attributes.