Add to git.
[monolith.git] / src / ml_flow_layout.h
1 /* Monolith flow layout class.
2  * - by Richard W.M. Jones <rich@annexia.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library 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 GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  *
18  * $Id: ml_flow_layout.h,v 1.2 2002/08/30 14:28:46 rich Exp $
19  */
20
21 #ifndef ML_FLOW_LAYOUT_H
22 #define ML_FLOW_LAYOUT_H
23
24 #include <ml_widget.h>
25
26 struct ml_flow_layout;
27 typedef struct ml_flow_layout *ml_flow_layout;
28
29 /* Function: new_ml_flow_layout - monolith flow_layout widget
30  * Function: ml_flow_layout_push_back
31  * Function: ml_flow_layout_pop_back
32  * Function: ml_flow_layout_push_front
33  * Function: ml_flow_layout_pop_front
34  * Function: ml_flow_layout_get
35  * Function: ml_flow_layout_insert
36  * Function: ml_flow_layout_replace
37  * Function: ml_flow_layout_erase
38  * Function: ml_flow_layout_clear
39  * Function: ml_flow_layout_size
40  * Function: ml_flow_layout_pack
41  *
42  * A flow layout widget is the simplest type of layout widget. It
43  * contains an ordered list of widgets, and it simply arranges them
44  * one after another (in other words with no "layout" at all).
45  *
46  * @code{new_ml_flow_layout} creates a new flow layout widget.
47  *
48  * Underlying the flow layout widget is a simple c2lib vector, and the
49  * other access functions use the same notation as the equivalent
50  * c2lib @code{vector_*} functions. Go to the SEE ALSO section
51  * below to see how to manipulate widgets within a flow layout.
52  *
53  * @code{ml_flow_layout_pack} is equivalent to @code{ml_flow_layout_push_back}:
54  * it appends the widget to the end of the current vector of widgets.
55  *
56  * See also: @ref{vector_push_back(3)}, @ref{vector_pop_back(3)},
57  * @ref{vector_push_front(3)}, @ref{vector_pop_front(3)},
58  * @ref{vector_get(3)}, @ref{vector_insert(3)}, @ref{vector_replace(3)},
59  * @ref{vector_erase(3)}, @ref{vector_clear(3)}, @ref{vector_size(3)}.
60  */
61 extern ml_flow_layout new_ml_flow_layout (pool pool);
62 extern void ml_flow_layout_push_back (ml_flow_layout, ml_widget);
63 extern ml_widget ml_flow_layout_pop_back (ml_flow_layout);
64 extern void ml_flow_layout_push_front (ml_flow_layout, ml_widget);
65 extern ml_widget ml_flow_layout_pop_front (ml_flow_layout);
66 extern ml_widget ml_flow_layout_get (ml_flow_layout, int i);
67 extern void ml_flow_layout_insert (ml_flow_layout, int i, ml_widget);
68 extern void ml_flow_layout_replace (ml_flow_layout, int i, ml_widget);
69 extern void ml_flow_layout_erase (ml_flow_layout, int i);
70 extern void ml_flow_layout_clear (ml_flow_layout);
71 extern int ml_flow_layout_size (ml_flow_layout);
72 extern void ml_flow_layout_pack (ml_flow_layout, ml_widget);
73
74 #endif /* ML_FLOW_LAYOUT_H */