gntlabel.h

Go to the documentation of this file.
00001 
00005 /*
00006  * GNT - The GLib Ncurses Toolkit
00007  *
00008  * GNT is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This library is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  */
00026 
00027 #ifndef GNT_LABEL_H
00028 #define GNT_LABEL_H
00029 
00030 #include "gnt.h"
00031 #include "gntwidget.h"
00032 #include "gnttextview.h"
00033 
00034 #define GNT_TYPE_LABEL              (gnt_label_get_gtype())
00035 #define GNT_LABEL(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_LABEL, GntLabel))
00036 #define GNT_LABEL_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_LABEL, GntLabelClass))
00037 #define GNT_IS_LABEL(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_LABEL))
00038 #define GNT_IS_LABEL_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_LABEL))
00039 #define GNT_LABEL_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_LABEL, GntLabelClass))
00040 
00041 typedef struct _GntLabel            GntLabel;
00042 typedef struct _GntLabelClass   GntLabelClass;
00043 
00044 struct _GntLabel
00045 {
00046     GntWidget parent;
00047 
00048     char *text;
00049     GntTextFormatFlags flags;
00050 
00051     void (*gnt_reserved1)(void);
00052     void (*gnt_reserved2)(void);
00053     void (*gnt_reserved3)(void);
00054     void (*gnt_reserved4)(void);
00055 };
00056 
00057 struct _GntLabelClass
00058 {
00059     GntWidgetClass parent;
00060 
00061     void (*gnt_reserved1)(void);
00062     void (*gnt_reserved2)(void);
00063     void (*gnt_reserved3)(void);
00064     void (*gnt_reserved4)(void);
00065 };
00066 
00067 G_BEGIN_DECLS
00068 
00072 GType gnt_label_get_gtype(void);
00073 
00081 GntWidget * gnt_label_new(const char *text);
00082 
00091 GntWidget * gnt_label_new_with_format(const char *text, GntTextFormatFlags flags);
00092 
00099 void gnt_label_set_text(GntLabel *label, const char *text);
00100 
00101 G_END_DECLS
00102 
00103 #endif /* GNT_LABEL_H */
00104