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