pidgin  2.13.0
About: Pidgin is a chat program (multi-protocol instant messaging client) which lets you log in to accounts on multiple chat networks simultaneously (old name "gaim").
  Fossies Dox: pidgin-2.13.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

gntbox.h
Go to the documentation of this file.
1 
5 /*
6  * GNT - The GLib Ncurses Toolkit
7  *
8  * GNT is the legal property of its developers, whose names are too numerous
9  * to list here. Please refer to the COPYRIGHT file distributed with this
10  * source distribution.
11  *
12  * This library is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25  */
26 
27 #ifndef GNT_BOX_H
28 #define GNT_BOX_H
29 
30 #include "gnt.h"
31 #include "gntwidget.h"
32 
33 #define GNT_TYPE_BOX (gnt_box_get_gtype())
34 #define GNT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_BOX, GntBox))
35 #define GNT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_BOX, GntBoxClass))
36 #define GNT_IS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_BOX))
37 #define GNT_IS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BOX))
38 #define GNT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BOX, GntBoxClass))
39 
40 typedef struct _GntBox GntBox;
41 typedef struct _GntBoxClass GntBoxClass;
42 
43 typedef enum
44 {
45  /* These for vertical boxes */
48 
50 
51  /* These for horizontal boxes */
54 } GntAlignment;
55 
56 struct _GntBox
57 {
59 
60  gboolean vertical;
61  gboolean homogeneous;
62  gboolean fill;
63  GList *list; /* List of widgets */
64 
66  int pad; /* Number of spaces to use between widgets */
67  GntAlignment alignment; /* How are the widgets going to be aligned? */
68 
69  char *title;
70  GList *focus; /* List of widgets to cycle focus (only valid for parent boxes) */
71 
72  void (*gnt_reserved1)(void);
73  void (*gnt_reserved2)(void);
74  void (*gnt_reserved3)(void);
75  void (*gnt_reserved4)(void);
76 };
77 
79 {
81 
82  void (*gnt_reserved1)(void);
83  void (*gnt_reserved2)(void);
84  void (*gnt_reserved3)(void);
85  void (*gnt_reserved4)(void);
86 };
87 
88 G_BEGIN_DECLS
89 
94 GType gnt_box_get_gtype(void);
95 
96 #define gnt_vbox_new(homo) gnt_box_new(homo, TRUE)
97 #define gnt_hbox_new(homo) gnt_box_new(homo, FALSE)
98 
108 GntWidget * gnt_box_new(gboolean homo, gboolean vert);
109 
117 
124 void gnt_box_set_title(GntBox *box, const char *title);
125 
132 void gnt_box_set_pad(GntBox *box, int pad);
133 
142 void gnt_box_set_toplevel(GntBox *box, gboolean set);
143 
149 void gnt_box_sync_children(GntBox *box);
150 
157 void gnt_box_set_alignment(GntBox *box, GntAlignment alignment);
158 
166 
172 void gnt_box_remove_all(GntBox *box);
173 
180 void gnt_box_readjust(GntBox *box);
181 
188 void gnt_box_set_fill(GntBox *box, gboolean fill);
189 
197 void gnt_box_move_focus(GntBox *box, int dir);
198 
206 
207 G_END_DECLS
208 
209 #endif /* GNT_BOX_H */
210 
_GntBox::list
GList * list
Definition: gntbox.h:63
_GntBox::focus
GList * focus
Definition: gntbox.h:70
gnt_box_readjust
void gnt_box_readjust(GntBox *box)
Definition: gntbox.c:810
_GntBox::pad
int pad
Definition: gntbox.h:66
_GntBoxClass::gnt_reserved4
void(* gnt_reserved4)(void)
Definition: gntbox.h:85
gnt_box_move_focus
void gnt_box_move_focus(GntBox *box, int dir)
Definition: gntbox.c:854
_GntBox::alignment
GntAlignment alignment
Definition: gntbox.h:67
GNT_ALIGN_TOP
Definition: gntbox.h:52
set
static void set(PurpleDesktopItem *item, const char *key, const char *value)
Definition: desktopitem.c:206
_GntBox::vertical
gboolean vertical
Definition: gntbox.h:60
gnt_box_add_widget
void gnt_box_add_widget(GntBox *box, GntWidget *widget)
Definition: gntbox.c:674
widget
GtkWidget * widget
Definition: pidgintooltip.c:38
_GntWidget
Definition: gntwidget.h:98
gnt.h
_GntBox::gnt_reserved2
void(* gnt_reserved2)(void)
Definition: gntbox.h:73
GNT_ALIGN_MID
Definition: gntbox.h:49
gnt_box_give_focus_to_child
void gnt_box_give_focus_to_child(GntBox *box, GntWidget *widget)
Definition: gntbox.c:881
gnt_box_remove_all
void gnt_box_remove_all(GntBox *box)
Definition: gntbox.c:799
GNT_ALIGN_BOTTOM
Definition: gntbox.h:53
GNT_ALIGN_RIGHT
Definition: gntbox.h:47
_GntBoxClass::gnt_reserved1
void(* gnt_reserved1)(void)
Definition: gntbox.h:82
gnt_box_set_toplevel
void gnt_box_set_toplevel(GntBox *box, gboolean set)
Definition: gntbox.c:701
_GntBox::title
char * title
Definition: gntbox.h:69
_GntBox
Definition: gntbox.h:56
gnt_box_set_alignment
void gnt_box_set_alignment(GntBox *box, GntAlignment alignment)
Definition: gntbox.c:775
gnt_box_new
GntWidget * gnt_box_new(gboolean homo, gboolean vert)
Definition: gntbox.c:662
gnt_box_remove
void gnt_box_remove(GntBox *box, GntWidget *widget)
Definition: gntbox.c:780
gnt_box_set_title
void gnt_box_set_title(GntBox *box, const char *title)
Definition: gntbox.c:680
_GntBoxClass::gnt_reserved2
void(* gnt_reserved2)(void)
Definition: gntbox.h:83
_GntBox::gnt_reserved4
void(* gnt_reserved4)(void)
Definition: gntbox.h:75
_GntWidgetClass
Definition: gntwidget.h:113
_GntBox::parent
GntWidget parent
Definition: gntbox.h:58
gntwidget.h
_GntBox::gnt_reserved1
void(* gnt_reserved1)(void)
Definition: gntbox.h:72
_GntBoxClass
Definition: gntbox.h:78
_GntBox::fill
gboolean fill
Definition: gntbox.h:62
_GntBox::homogeneous
gboolean homogeneous
Definition: gntbox.h:61
gnt_box_get_gtype
G_BEGIN_DECLS GType gnt_box_get_gtype(void)
Definition: gntbox.c:635
gnt_box_set_fill
void gnt_box_set_fill(GntBox *box, gboolean fill)
Definition: gntbox.c:849
gnt_box_sync_children
void gnt_box_sync_children(GntBox *box)
Definition: gntbox.c:716
_GntBoxClass::parent
GntWidgetClass parent
Definition: gntbox.h:80
_GntBox::active
GntWidget * active
Definition: gntbox.h:65
GNT_ALIGN_LEFT
Definition: gntbox.h:46
gnt_box_set_pad
void gnt_box_set_pad(GntBox *box, int pad)
Definition: gntbox.c:695
_GntBoxClass::gnt_reserved3
void(* gnt_reserved3)(void)
Definition: gntbox.h:84
_GntBox::gnt_reserved3
void(* gnt_reserved3)(void)
Definition: gntbox.h:74
GntAlignment
GntAlignment
Definition: gntbox.h:43