gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
Alignment.H
Go to the documentation of this file.
1 /* Copyright 2000-2018 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:
37  Alignment(void) {
38  Container::widget=gtk_alignment_new(0.5,0.5,1.,1.);
39  }
40 
47  Alignment(gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale) {
48  Container::widget=gtk_alignment_new(xalign, yalign, xscale, yscale);
49  }
50 
57  void set(gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale){
58  gtk_alignment_set(GTK_ALIGNMENT(widget), xalign, yalign, xscale, yscale);
59  }
60 
67  void padding(guint padding_top, guint padding_bottom, guint padding_left, guint padding_right){
68  gtk_alignment_set_padding(GTK_ALIGNMENT(widget), padding_top, padding_bottom, padding_left, padding_right);
69  }
70 };
71 #endif //ALIGNMENT_H_
virtual void pack(GtkWidget *obj)
Definition: Alignment.H:30
Alignment(gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale)
Definition: Alignment.H:47
void padding(guint padding_top, guint padding_bottom, guint padding_left, guint padding_right)
Definition: Alignment.H:67
virtual void pack(GtkWidget *obj)
Definition: Container.H:33
GtkWidget * widget
The container based widget.
Definition: Widget.H:33
Definition: Box.H:153
Alignment(void)
Definition: Alignment.H:37
gtkIOStream: /tmp/gtkiostream/include/Alignment.H Source File
GTK+ IOStream  Beta