LeftAlignedLabel.h

Go to the documentation of this file.
00001 #ifndef LEFTALIGNEDLABEL_H_
00002 #define LEFTALIGNEDLABEL_H_
00003 
00004 #include <string>
00005 #include <gtk/gtklabel.h>
00006 
00007 namespace gtkutil
00008 {
00009 
00013     class LeftAlignedLabel
00014     {
00015             // The label
00016             GtkWidget* _label;
00017 
00018         public:
00019 
00022             LeftAlignedLabel (const std::string& text) :
00023                 _label(gtk_label_new(NULL))
00024             {
00025                 gtk_label_set_markup(GTK_LABEL(_label), text.c_str());
00026             }
00027 
00030             operator GtkWidget* ()
00031             {
00032                 gtk_misc_set_alignment(GTK_MISC(_label), 0.0, 0.5);
00033                 return _label;
00034             }
00035     };
00036 }
00037 
00038 #endif /*LEFTALIGNEDLABEL_H_*/

Generated by  doxygen 1.6.2