| |
1 /** |
| |
2 * GNT - The GLib Ncurses Toolkit |
| |
3 * |
| |
4 * GNT is the legal property of its developers, whose names are too numerous |
| |
5 * to list here. Please refer to the COPYRIGHT file distributed with this |
| |
6 * source distribution. |
| |
7 * |
| |
8 * This library is free software; you can redistribute it and/or modify |
| |
9 * it under the terms of the GNU General Public License as published by |
| |
10 * the Free Software Foundation; either version 2 of the License, or |
| |
11 * (at your option) any later version. |
| |
12 * |
| |
13 * This program is distributed in the hope that it will be useful, |
| |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| |
16 * GNU General Public License for more details. |
| |
17 * |
| |
18 * You should have received a copy of the GNU General Public License |
| |
19 * along with this program; if not, write to the Free Software |
| |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| |
21 */ |
| |
22 |
| 1 #ifndef GNT_BOX_H |
23 #ifndef GNT_BOX_H |
| 2 #define GNT_BOX_H |
24 #define GNT_BOX_H |
| 3 |
25 |
| 4 #include "gnt.h" |
26 #include "gnt.h" |
| 5 #include "gntwidget.h" |
27 #include "gntwidget.h" |
| 59 void (*gnt_reserved4)(void); |
81 void (*gnt_reserved4)(void); |
| 60 }; |
82 }; |
| 61 |
83 |
| 62 G_BEGIN_DECLS |
84 G_BEGIN_DECLS |
| 63 |
85 |
| |
86 /** |
| |
87 * |
| |
88 * |
| |
89 * @return |
| |
90 */ |
| 64 GType gnt_box_get_gtype(void); |
91 GType gnt_box_get_gtype(void); |
| 65 |
92 |
| 66 #define gnt_vbox_new(homo) gnt_box_new(homo, TRUE) |
93 #define gnt_vbox_new(homo) gnt_box_new(homo, TRUE) |
| 67 #define gnt_hbox_new(homo) gnt_box_new(homo, FALSE) |
94 #define gnt_hbox_new(homo) gnt_box_new(homo, FALSE) |
| 68 |
95 |
| 69 GntWidget *gnt_box_new(gboolean homo, gboolean vert); |
96 /** |
| |
97 * |
| |
98 * @param homo |
| |
99 * @param vert |
| |
100 * |
| |
101 * @return |
| |
102 */ |
| |
103 GntWidget * gnt_box_new(gboolean homo, gboolean vert); |
| 70 |
104 |
| |
105 /** |
| |
106 * |
| |
107 * @param box |
| |
108 * @param widget |
| |
109 */ |
| 71 void gnt_box_add_widget(GntBox *box, GntWidget *widget); |
110 void gnt_box_add_widget(GntBox *box, GntWidget *widget); |
| 72 |
111 |
| |
112 /** |
| |
113 * |
| |
114 * @param box |
| |
115 * @param title |
| |
116 */ |
| 73 void gnt_box_set_title(GntBox *box, const char *title); |
117 void gnt_box_set_title(GntBox *box, const char *title); |
| 74 |
118 |
| |
119 /** |
| |
120 * |
| |
121 * @param box |
| |
122 * @param pad |
| |
123 */ |
| 75 void gnt_box_set_pad(GntBox *box, int pad); |
124 void gnt_box_set_pad(GntBox *box, int pad); |
| 76 |
125 |
| |
126 /** |
| |
127 * |
| |
128 * @param box |
| |
129 * @param set |
| |
130 */ |
| 77 void gnt_box_set_toplevel(GntBox *box, gboolean set); |
131 void gnt_box_set_toplevel(GntBox *box, gboolean set); |
| 78 |
132 |
| |
133 /** |
| |
134 * |
| |
135 * @param box |
| |
136 */ |
| 79 void gnt_box_sync_children(GntBox *box); |
137 void gnt_box_sync_children(GntBox *box); |
| 80 |
138 |
| |
139 /** |
| |
140 * |
| |
141 * @param box |
| |
142 * @param alignment |
| |
143 */ |
| 81 void gnt_box_set_alignment(GntBox *box, GntAlignment alignment); |
144 void gnt_box_set_alignment(GntBox *box, GntAlignment alignment); |
| 82 |
145 |
| 83 void gnt_box_remove(GntBox *box, GntWidget *widget); /* XXX: does NOT destroy widget */ |
146 /** |
| |
147 * |
| |
148 * @param box |
| |
149 * @param widget |
| |
150 */ |
| |
151 void gnt_box_remove(GntBox *box, GntWidget *widget); |
| 84 |
152 |
| 85 void gnt_box_remove_all(GntBox *box); /* Removes AND destroys all the widgets in it */ |
153 /* XXX: does NOT destroy widget */ |
| 86 |
154 |
| |
155 /** |
| |
156 * |
| |
157 * @param box |
| |
158 */ |
| |
159 void gnt_box_remove_all(GntBox *box); |
| |
160 |
| |
161 /* Removes AND destroys all the widgets in it */ |
| |
162 |
| |
163 /** |
| |
164 * |
| |
165 * @param box |
| |
166 */ |
| 87 void gnt_box_readjust(GntBox *box); |
167 void gnt_box_readjust(GntBox *box); |
| 88 |
168 |
| |
169 /** |
| |
170 * |
| |
171 * @param box |
| |
172 * @param fill |
| |
173 */ |
| 89 void gnt_box_set_fill(GntBox *box, gboolean fill); |
174 void gnt_box_set_fill(GntBox *box, gboolean fill); |
| 90 |
175 |
| 91 void gnt_box_move_focus(GntBox *box, int dir); /* +1 to move forward, -1 for backward */ |
176 /** |
| |
177 * |
| |
178 * @param box |
| |
179 * @param dir |
| |
180 */ |
| |
181 void gnt_box_move_focus(GntBox *box, int dir); |
| 92 |
182 |
| |
183 /* +1 to move forward, -1 for backward */ |
| |
184 |
| |
185 /** |
| |
186 * |
| |
187 * @param box |
| |
188 * @param widget |
| |
189 */ |
| 93 void gnt_box_give_focus_to_child(GntBox *box, GntWidget *widget); |
190 void gnt_box_give_focus_to_child(GntBox *box, GntWidget *widget); |
| 94 |
191 |
| 95 G_END_DECLS |
192 G_END_DECLS |
| 96 |
193 |
| 97 #endif /* GNT_BOX_H */ |
194 #endif /* GNT_BOX_H */ |