xref: /haiku/docs/user/interface/AbstractLayout.dox (revision 2b76973fa2401f7a5edf68e6470f3d3210cbcff3)
1/*
2 * Copyright 2010 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Alex Wilson, yourpalal2@gmail.com
7 *
8 * Corresponds to:
9 *		headers/os/interface/AbstractLayout.h	rev 39055
10 *		src/kits/inteface/AbstractLayout.cpp	rev 39055
11 */
12
13
14/*!
15	\class BAbstractLayout
16	\ingroup interface
17	\ingroup layout
18	\ingroup libbe
19
20	\brief BLayout subclass providing convenience methods for derived
21	implementations.
22
23	This class is designed to reduce the amount of boilerplate code required to
24	write a BLayout subclass. In most cases, you classes should derive from
25	BAbstractLayout rather than BLayout.
26
27	When a BAbstractLayout is attached to a BView, many of the methods provided
28	by the BAbstractLayout class are forwarded to the BAbstractLayout's
29	owner BView. When a BAbstractLayout is viewless, these methods are handled
30	locally.
31
32	\warning This class is not yet finalized, if you use it in your software
33	assume that it will break some time in the future.
34*/
35
36
37/*!
38	\name Constructors
39
40	@{
41*/
42
43
44/*!
45	\fn BAbstractLayout::BAbstractLayout()
46	\brief Construct a BAbstractLayout.
47*/
48
49
50/*!
51	\fn BAbstractLayout::BAbstractLayout(BMessage* from);
52	\brief Archive constructor.
53*/
54
55
56//@}
57
58
59/*!
60	\fn BSize BAbstractLayout::MinSize()
61	\copydoc BLayoutItem::MinSize()
62
63	The return value for this method is composed (using
64	BLayoutUtils::ComposeSize()) from the values returned by BaseMinSize() and
65	ExplicitMinSize().
66*/
67
68
69/*!
70	\fn BSize BAbstractLayout::MaxSize()
71	\copydoc BLayoutItem::MaxSize()
72
73	The return value for this method is composed (using
74	BLayoutUtils::ComposeSize()) from the values returned by BaseMaxSize() and
75	ExplicitMaxSize().
76*/
77
78
79/*!
80	\fn BSize BAbstractLayout::PreferredSize()
81	\copydoc BLayoutItem::PreferredSize()
82
83	The return value for this method is composed (using
84	BLayoutUtils::ComposeSize()) from the values returned by BasePreferredSize()
85	and ExplicitPreferredSize().
86*/
87
88
89/*!
90	\fn BAlignment BAbstractLayout::Alignment()
91	\copydoc BLayoutItem::Alignment()
92
93	The return value for this method is composed (using
94	BLayoutUtils::ComposeAlignment()) from the values returned by
95	BaseAlignment() and
96	ExplicitAlignment()
97*/
98
99
100/*!
101	\name BAbstractLayout hooks
102
103	@{
104*/
105
106
107/*!
108	\fn BSize BAbstractLayout::BaseMinSize()
109	\brief Method to be implemented in derived classes return the minimum size
110	constraint for this BAbstractLayout.
111*/
112
113
114/*!
115	\fn BSize BAbstractLayout::BaseMaxSize()
116	\brief Method to be implemented in derived classes return the maximum size
117	constraint for this BAbstractLayout.
118*/
119
120
121/*!
122	\fn BSize BAbstractLayout::BasePreferredSize()
123	\brief Method to be implemented in derived classes return the preferred size
124	constraint for this BAbstractLayout.
125*/
126
127
128/*!
129	\fn BAlignment BAbstractLayout::BaseAlignment()
130	\brief Method to be implemented in derived classes return the preferred
131	alignment for this BAbstractLayout.
132*/
133
134
135//@}
136