2013-02-07 06:05:00 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2010 Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Alex Wilson, yourpalal2@gmail.com
|
2017-01-28 21:22:53 +03:00
|
|
|
*
|
2013-02-07 06:05:00 +04:00
|
|
|
* Corresponds to:
|
|
|
|
* headers/os/interface/AbstractLayout.h rev 39055
|
|
|
|
* src/kits/inteface/AbstractLayout.cpp rev 39055
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2010-10-23 06:33:08 +04:00
|
|
|
/*!
|
|
|
|
\class BAbstractLayout
|
|
|
|
\ingroup layout
|
|
|
|
\ingroup libbe
|
|
|
|
\brief BLayout subclass providing convenience methods for derived
|
2014-06-14 01:25:02 +04:00
|
|
|
implementations.
|
|
|
|
\since Haiku R1
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2010-10-23 06:33:08 +04:00
|
|
|
This class is designed to reduce the amount of boilerplate code required to
|
|
|
|
write a BLayout subclass. In most cases, you classes should derive from
|
|
|
|
BAbstractLayout rather than BLayout.
|
|
|
|
|
|
|
|
When a BAbstractLayout is attached to a BView, many of the methods provided
|
|
|
|
by the BAbstractLayout class are forwarded to the BAbstractLayout's
|
|
|
|
owner BView. When a BAbstractLayout is viewless, these methods are handled
|
|
|
|
locally.
|
|
|
|
|
|
|
|
\warning This class is not yet finalized, if you use it in your software
|
2014-06-14 01:25:02 +04:00
|
|
|
assume that it will break some time in the future.
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\name Constructors
|
|
|
|
|
|
|
|
@{
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BAbstractLayout::BAbstractLayout()
|
|
|
|
\brief Construct a BAbstractLayout.
|
2014-06-14 01:25:02 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BAbstractLayout::BAbstractLayout(BMessage* from);
|
|
|
|
\brief Archive constructor.
|
2014-06-14 01:25:02 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//@}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BSize BAbstractLayout::MinSize()
|
|
|
|
\copydoc BLayoutItem::MinSize()
|
2014-06-14 01:25:02 +04:00
|
|
|
\since Haiku R1
|
2010-10-23 06:33:08 +04:00
|
|
|
|
|
|
|
The return value for this method is composed (using
|
|
|
|
BLayoutUtils::ComposeSize()) from the values returned by BaseMinSize() and
|
|
|
|
ExplicitMinSize().
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BSize BAbstractLayout::MaxSize()
|
|
|
|
\copydoc BLayoutItem::MaxSize()
|
|
|
|
|
|
|
|
The return value for this method is composed (using
|
|
|
|
BLayoutUtils::ComposeSize()) from the values returned by BaseMaxSize() and
|
|
|
|
ExplicitMaxSize().
|
2014-06-14 01:25:02 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BSize BAbstractLayout::PreferredSize()
|
|
|
|
\copydoc BLayoutItem::PreferredSize()
|
|
|
|
|
|
|
|
The return value for this method is composed (using
|
|
|
|
BLayoutUtils::ComposeSize()) from the values returned by BasePreferredSize()
|
|
|
|
and ExplicitPreferredSize().
|
2014-06-14 01:25:02 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BAlignment BAbstractLayout::Alignment()
|
|
|
|
\copydoc BLayoutItem::Alignment()
|
|
|
|
|
|
|
|
The return value for this method is composed (using
|
|
|
|
BLayoutUtils::ComposeAlignment()) from the values returned by
|
2014-06-14 01:25:02 +04:00
|
|
|
BaseAlignment() and ExplicitAlignment()
|
|
|
|
|
|
|
|
\since Haiku R1
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-14 01:25:02 +04:00
|
|
|
\name Hook Methods
|
2010-10-23 06:33:08 +04:00
|
|
|
|
|
|
|
@{
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BSize BAbstractLayout::BaseMinSize()
|
|
|
|
\brief Method to be implemented in derived classes return the minimum size
|
2014-06-14 01:25:02 +04:00
|
|
|
constraint for this BAbstractLayout.
|
|
|
|
|
|
|
|
\since Haiku R1
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BSize BAbstractLayout::BaseMaxSize()
|
|
|
|
\brief Method to be implemented in derived classes return the maximum size
|
2014-06-14 01:25:02 +04:00
|
|
|
constraint for this BAbstractLayout.
|
|
|
|
|
|
|
|
\since Haiku R1
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BSize BAbstractLayout::BasePreferredSize()
|
|
|
|
\brief Method to be implemented in derived classes return the preferred size
|
2014-06-14 01:25:02 +04:00
|
|
|
constraint for this BAbstractLayout.
|
|
|
|
|
|
|
|
\since Haiku R1
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BAlignment BAbstractLayout::BaseAlignment()
|
|
|
|
\brief Method to be implemented in derived classes return the preferred
|
2014-06-14 01:25:02 +04:00
|
|
|
alignment for this BAbstractLayout.
|
2010-10-23 06:33:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//@}
|