GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Alignment.H
Go to the documentation of this file.
1 /* Copyright 2000-2013 Matt Flax <flatmax@flatmax.org>
2  This file is part of GTK+ IOStream class set
3 
4  GTK+ IOStream is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  GTK+ IOStream is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You have received a copy of the GNU General Public License
15  along with GTK+ IOStream
16  */
17 #ifndef ALIGNMENT_H_
18 #define ALIGNMENT_H_
19 
20 #include <gtk/gtk.h>
21 
22 #include "Box.H"
23 
26 class Alignment : public Box {
30  virtual void pack(GtkWidget *obj) {
31  Container::pack(obj);
32  }
33 public:
40  Alignment(void) {
41  Container::widget=gtk_alignment_new(0.5,0.5,1.,1.);
42  }
43 
50  Alignment(gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale) {
51  Container::widget=gtk_alignment_new(xalign, yalign, xscale, yscale);
52  }
53 
60  void set(gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale){
61  gtk_alignment_set(GTK_ALIGNMENT(widget), xalign, yalign, xscale, yscale);
62  }
63 
70  void padding(guint padding_top, guint padding_bottom, guint padding_left, guint padding_right){
71  gtk_alignment_set_padding(GTK_ALIGNMENT(widget), padding_top, padding_bottom, padding_left, padding_right);
72  }
73 };
74 #endif //ALIGNMENT_H_