LeftAlignment.h
Go to the documentation of this file.00001 #ifndef LEFTALIGNMENT_H_
00002 #define LEFTALIGNMENT_H_
00003
00004 #include <gtk/gtkalignment.h>
00005
00006 namespace gtkutil
00007 {
00008
00024 class LeftAlignment
00025 {
00026
00027 GtkWidget* _widget;
00028
00029 public:
00030
00046 LeftAlignment (GtkWidget* w, int indent = 0, float expand = 0.0) :
00047 _widget(gtk_alignment_new(0.0, 0.5, expand, 1.0))
00048 {
00049 gtk_alignment_set_padding(GTK_ALIGNMENT(_widget), 0, 0, indent, 0);
00050 gtk_container_add(GTK_CONTAINER(_widget), w);
00051 }
00052
00056 operator GtkWidget* ()
00057 {
00058 return _widget;
00059 }
00060 };
00061
00062 }
00063
00064 #endif