1820dca4dSJohn Scipione/* 2820dca4dSJohn Scipione * Copyright 2010 Haiku, Inc. All rights reserved. 3820dca4dSJohn Scipione * Distributed under the terms of the MIT License. 4820dca4dSJohn Scipione * 5820dca4dSJohn Scipione * Authors: 6820dca4dSJohn Scipione * Alex Wilson, yourpalal2@gmail.com 7820dca4dSJohn Scipione * 8820dca4dSJohn Scipione * Corresponds to: 9820dca4dSJohn Scipione * headers/os/interface/AbstractLayout.h rev 39055 10820dca4dSJohn Scipione * src/kits/inteface/AbstractLayout.cpp rev 39055 11820dca4dSJohn Scipione */ 12820dca4dSJohn Scipione 13820dca4dSJohn Scipione 14cc19e7c0SAlex Wilson/*! 15cc19e7c0SAlex Wilson \class BAbstractLayout 16cc19e7c0SAlex Wilson \ingroup layout 17cc19e7c0SAlex Wilson \ingroup libbe 18cc19e7c0SAlex Wilson \brief BLayout subclass providing convenience methods for derived 19cc19e7c0SAlex Wilson implementations. 2047852bffSJohn Scipione \since Haiku R1 21cc19e7c0SAlex Wilson 22cc19e7c0SAlex Wilson This class is designed to reduce the amount of boilerplate code required to 23cc19e7c0SAlex Wilson write a BLayout subclass. In most cases, you classes should derive from 24cc19e7c0SAlex Wilson BAbstractLayout rather than BLayout. 25cc19e7c0SAlex Wilson 26cc19e7c0SAlex Wilson When a BAbstractLayout is attached to a BView, many of the methods provided 27cc19e7c0SAlex Wilson by the BAbstractLayout class are forwarded to the BAbstractLayout's 28cc19e7c0SAlex Wilson owner BView. When a BAbstractLayout is viewless, these methods are handled 29cc19e7c0SAlex Wilson locally. 30cc19e7c0SAlex Wilson 31cc19e7c0SAlex Wilson \warning This class is not yet finalized, if you use it in your software 32cc19e7c0SAlex Wilson assume that it will break some time in the future. 33cc19e7c0SAlex Wilson*/ 34cc19e7c0SAlex Wilson 35cc19e7c0SAlex Wilson 36cc19e7c0SAlex Wilson/*! 37cc19e7c0SAlex Wilson \name Constructors 38cc19e7c0SAlex Wilson 39cc19e7c0SAlex Wilson @{ 40cc19e7c0SAlex Wilson*/ 41cc19e7c0SAlex Wilson 42cc19e7c0SAlex Wilson 43cc19e7c0SAlex Wilson/*! 44cc19e7c0SAlex Wilson \fn BAbstractLayout::BAbstractLayout() 45cc19e7c0SAlex Wilson \brief Construct a BAbstractLayout. 4647852bffSJohn Scipione 4747852bffSJohn Scipione \since Haiku R1 48cc19e7c0SAlex Wilson*/ 49cc19e7c0SAlex Wilson 50cc19e7c0SAlex Wilson 51cc19e7c0SAlex Wilson/*! 52cc19e7c0SAlex Wilson \fn BAbstractLayout::BAbstractLayout(BMessage* from); 53cc19e7c0SAlex Wilson \brief Archive constructor. 5447852bffSJohn Scipione 5547852bffSJohn Scipione \since Haiku R1 56cc19e7c0SAlex Wilson*/ 57cc19e7c0SAlex Wilson 58cc19e7c0SAlex Wilson 59*ff1ee776SNiels Sascha Reedijk//! @} 60cc19e7c0SAlex Wilson 61cc19e7c0SAlex Wilson 62cc19e7c0SAlex Wilson/*! 63cc19e7c0SAlex Wilson \fn BSize BAbstractLayout::MinSize() 64cc19e7c0SAlex Wilson \copydoc BLayoutItem::MinSize() 6547852bffSJohn Scipione \since Haiku R1 66cc19e7c0SAlex Wilson 67cc19e7c0SAlex Wilson The return value for this method is composed (using 68cc19e7c0SAlex Wilson BLayoutUtils::ComposeSize()) from the values returned by BaseMinSize() and 69cc19e7c0SAlex Wilson ExplicitMinSize(). 70cc19e7c0SAlex Wilson*/ 71cc19e7c0SAlex Wilson 72cc19e7c0SAlex Wilson 73cc19e7c0SAlex Wilson/*! 74cc19e7c0SAlex Wilson \fn BSize BAbstractLayout::MaxSize() 75cc19e7c0SAlex Wilson \copydoc BLayoutItem::MaxSize() 76cc19e7c0SAlex Wilson 77cc19e7c0SAlex Wilson The return value for this method is composed (using 78cc19e7c0SAlex Wilson BLayoutUtils::ComposeSize()) from the values returned by BaseMaxSize() and 79cc19e7c0SAlex Wilson ExplicitMaxSize(). 8047852bffSJohn Scipione 8147852bffSJohn Scipione \since Haiku R1 82cc19e7c0SAlex Wilson*/ 83cc19e7c0SAlex Wilson 84cc19e7c0SAlex Wilson 85cc19e7c0SAlex Wilson/*! 86cc19e7c0SAlex Wilson \fn BSize BAbstractLayout::PreferredSize() 87cc19e7c0SAlex Wilson \copydoc BLayoutItem::PreferredSize() 88cc19e7c0SAlex Wilson 89cc19e7c0SAlex Wilson The return value for this method is composed (using 90cc19e7c0SAlex Wilson BLayoutUtils::ComposeSize()) from the values returned by BasePreferredSize() 91cc19e7c0SAlex Wilson and ExplicitPreferredSize(). 9247852bffSJohn Scipione 9347852bffSJohn Scipione \since Haiku R1 94cc19e7c0SAlex Wilson*/ 95cc19e7c0SAlex Wilson 96cc19e7c0SAlex Wilson 97cc19e7c0SAlex Wilson/*! 98cc19e7c0SAlex Wilson \fn BAlignment BAbstractLayout::Alignment() 99cc19e7c0SAlex Wilson \copydoc BLayoutItem::Alignment() 100cc19e7c0SAlex Wilson 101cc19e7c0SAlex Wilson The return value for this method is composed (using 102cc19e7c0SAlex Wilson BLayoutUtils::ComposeAlignment()) from the values returned by 10347852bffSJohn Scipione BaseAlignment() and ExplicitAlignment() 10447852bffSJohn Scipione 10547852bffSJohn Scipione \since Haiku R1 106cc19e7c0SAlex Wilson*/ 107cc19e7c0SAlex Wilson 108cc19e7c0SAlex Wilson 109cc19e7c0SAlex Wilson/*! 11047852bffSJohn Scipione \name Hook Methods 111cc19e7c0SAlex Wilson 112cc19e7c0SAlex Wilson @{ 113cc19e7c0SAlex Wilson*/ 114cc19e7c0SAlex Wilson 115cc19e7c0SAlex Wilson 116cc19e7c0SAlex Wilson/*! 117cc19e7c0SAlex Wilson \fn BSize BAbstractLayout::BaseMinSize() 118cc19e7c0SAlex Wilson \brief Method to be implemented in derived classes return the minimum size 119cc19e7c0SAlex Wilson constraint for this BAbstractLayout. 12047852bffSJohn Scipione 12147852bffSJohn Scipione \since Haiku R1 122cc19e7c0SAlex Wilson*/ 123cc19e7c0SAlex Wilson 124cc19e7c0SAlex Wilson 125cc19e7c0SAlex Wilson/*! 126cc19e7c0SAlex Wilson \fn BSize BAbstractLayout::BaseMaxSize() 127cc19e7c0SAlex Wilson \brief Method to be implemented in derived classes return the maximum size 128cc19e7c0SAlex Wilson constraint for this BAbstractLayout. 12947852bffSJohn Scipione 13047852bffSJohn Scipione \since Haiku R1 131cc19e7c0SAlex Wilson*/ 132cc19e7c0SAlex Wilson 133cc19e7c0SAlex Wilson 134cc19e7c0SAlex Wilson/*! 135cc19e7c0SAlex Wilson \fn BSize BAbstractLayout::BasePreferredSize() 136cc19e7c0SAlex Wilson \brief Method to be implemented in derived classes return the preferred size 137cc19e7c0SAlex Wilson constraint for this BAbstractLayout. 13847852bffSJohn Scipione 13947852bffSJohn Scipione \since Haiku R1 140cc19e7c0SAlex Wilson*/ 141cc19e7c0SAlex Wilson 142cc19e7c0SAlex Wilson 143cc19e7c0SAlex Wilson/*! 144cc19e7c0SAlex Wilson \fn BAlignment BAbstractLayout::BaseAlignment() 145cc19e7c0SAlex Wilson \brief Method to be implemented in derived classes return the preferred 146cc19e7c0SAlex Wilson alignment for this BAbstractLayout. 147cc19e7c0SAlex Wilson*/ 148cc19e7c0SAlex Wilson 149cc19e7c0SAlex Wilson 150*ff1ee776SNiels Sascha Reedijk//! @} 151