/* * Copyright 2020 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * Niels Sascha Reedijk, niels.reedijk@gmail.com * * Reviewers: * Adrien Destugues, pulkomandy@pulkomandy.tk * * Corresponds to: * headers/os/interface/LayoutBuilder.h rev 49977 */ /*! \class BLayoutBuilder::Cards<> \ingroup layout \ingroup libbe \brief BLayoutBuilder::Base subclass for building BCardLayouts. \since Haiku R1 The BCardLayout class is a simple BLayout subclass that arranges the items as a stack of cards with only one card being on top and visible to the user. For a detailed view on the properties, see the \link BCardLayout class description\endlink. */ /*! \typedef BLayoutBuilder::Cards::ThisBuilder \copydoc BLayoutBuilder::Group::ThisBuilder */ /*! \typedef BLayoutBuilder::Cards::GroupBuilder \copydoc BLayoutBuilder::Group::GroupBuilder */ /*! \typedef BLayoutBuilder::Cards::GridBuilder \copydoc BLayoutBuilder::Group::GridBuilder */ /*! \typedef BLayoutBuilder::Cards::SplitBuilder \copydoc BLayoutBuilder::Group::SplitBuilder */ /*! \typedef BLayoutBuilder::Cards::CardBuilder \copydoc BLayoutBuilder::Group::CardBuilder */ /*! \name Constructors */ //! @{ /*! \fn BLayoutBuilder::Cards::Cards() \brief Creates a builder for BCardLayout. \since Haiku R1 */ /*! \fn BLayoutBuilder::Cards::Cards(BWindow* window) \brief Creates a new builder for BCardLayout, and attaches it to a \a window. \since Haiku R1 */ /*! \fn BLayoutBuilder::Cards::Cards(BView* view) \brief Creates a new builder for BCardLayout, and attaches it to a \a view. \since Haiku R1 */ /*! \fn BLayoutBuilder::Cards::Cards(BCardLayout* layout) \brief Creates a builder targeting an existing BCardLayout. \since Haiku R1 */ /*! \fn BLayoutBuilder::Cards::Cards(BCardView* view) \brief Creates a builder targeting an existing BCardView. \since Haiku R1 */ //! @} /*! \name Accessors */ //! @{ /*! \fn BCardLayout* BLayoutBuilder::Cards::Layout() const \copydoc BLayoutBuilder::Group::Layout() */ /*! \fn BView* BLayoutBuilder::Cards::View() const \copydoc BLayoutBuilder::Group::View() */ /*! \fn ThisBuilder& BLayoutBuilder::Cards::GetLayout( BCardLayout** _layout) \copydoc BLayoutBuilder::Group::GetLayout() */ /*! \fn ThisBuilder& BLayoutBuilder::Cards::GetView( BView** _view) \copydoc BLayoutBuilder::Group::GetView() */ /*! \fn BLayoutBuilder::Cards::operator BCardLayout*() \brief Cast this builder into the layout object it represents. \since Haiku R1 */ //! @} /*! \name Adding BViews and BLayoutItems */ //! @{ /*! \fn ThisBuilder& BLayoutBuilder::Cards::Add(BView* view) \brief Add a \a view to the underlying BCardLayout. The layout item will be added as a card at the end of the stack. \param view The BView to be added. The underlying BCardLayout will take ownership of the object. \since Haiku R1 */ /*! \fn ThisBuilder& BLayoutBuilder::Cards::Add( BLayoutItem* item) \brief Add a \a item to the underlying BCardLayout. The layout item will be added as a card at the end of the stack. \param item The BLayoutItem to be added. The underlying BCardLayout will take ownership of the object. \since Haiku R1 */ //! @} /*! \name Adding BLayouts and their BView Pairs A set of methods that add a BLayout or BView subclass and return a BLayoutBuilder::Base subclass representing the newly added object. These methods push a new builder on top of the stack, you will not be using \c this builder again until you call End(). */ //! @{ /*! \fn GroupBuilder BLayoutBuilder::Cards::AddGroup( orientation orientation, float spacing) \copybrief GroupBuilder BLayoutBuilder::Group::AddGroup( orientation orientation, float spacing, float weight) \param orientation The orientation to use for the new BGroupLayout. \param spacing The spacing to use for the new BGroupLayout. \returns A GroupBuilder representing the newly created BGroupLayout. \since Haiku R1 */ /*! \fn GroupBuilder BLayoutBuilder::Cards::AddGroup( BGroupView* groupView) \copybrief GroupBuilder BLayoutBuilder::Group::AddGroup( BGroupLayout* groupLayout, float weight) \param groupView The BGroupView to be added. \returns A GroupBuilder representing the layout of the \a groupView. \since Haiku R1 */ /*! \fn GroupBuilder BLayoutBuilder::Cards::AddGroup( BGroupLayout* groupLayout) \copybrief GroupBuilder BLayoutBuilder::Group::AddGroup(BGroupView* groupView, float weight) \param groupLayout The BGroupLayout to be added. \returns A GroupBuilder representing the \a groupLayout. \since Haiku R1 */ /*! \fn GridBuilder BLayoutBuilder::Cards::AddGrid( float horizontalSpacing, float verticalSpacing) \copydoc GridBuilder BLayoutBuilder::Group::AddGrid( float horizontalSpacing, float verticalSpacing, float weight) \param horizontalSpacing The horizontal spacing for the new BGridLayout. \param verticalSpacing The vertical spacing for the new BGridLayout. \returns A GridBuilder representing the newly created BGridLayout. \since Haiku R1 */ /*! \fn GridBuilder BLayoutBuilder::Cards::AddGrid( BGridLayout* gridLayout) \copybrief GridBuilder BLayoutBuilder::Group::AddGrid( BGridLayout* gridLayout, float weight) \param gridLayout The BGridLayout to be added and used to construct the returned GridBuilder. \returns A GridBuilder representing \a gridLayout. \since Haiku R1 */ /*! \fn GridBuilder BLayoutBuilder::Cards::AddGrid( BGridView* gridView) \copybrief GridBuilder BLayoutBuilder::Group::AddGrid( BGridView* gridView, float weight) \param gridView The BGridView to be added and used to construct the returned GridBuilder. \returns A GridBuilder representing the layout of the \a gridView. \since Haiku R1 */ /*! \fn SplitBuilder BLayoutBuilder::Cards::AddSplit( orientation orientation, float spacing) \copybrief SplitBuilder BLayoutBuilder::Group::AddSplit( orientation orientation, float spacing, float weight) \param orientation The orientation of the new BSplitView. \param spacing The spacing of the new BSplitView. \returns A SplitBuilder representing the new BSplitView. \since Haiku R1 */ /*! \fn SplitBuilder BLayoutBuilder::Cards::AddSplit( BSplitView* splitView) \copybrief SplitBuilder BLayoutBuilder::Group::AddSplit( BSplitView* splitView, float weight) \param splitView The BSplitView to be added. \returns A SplitBuilder representing the \a splitView. \since Haiku R1 */ /*! \fn CardBuilder BLayoutBuilder::Cards::AddCards() \copybrief CardBuilder BLayoutBuilder::Group::AddCards( float weight) \returns A CardBuilder representing the new BCardLayout. \since Haiku R1 */ /*! \fn CardBuilder BLayoutBuilder::Cards::AddCards( BCardLayout* cardLayout) \copybrief CardBuilder BLayoutBuilder::Group::AddCards( BCardLayout* cardLayout, float weight) \param cardLayout The existing layout that will be added to the underlying BSplitView. \returns A CardBuilder representing the \a cardLayout. \since Haiku R1 */ /*! \fn CardBuilder BLayoutBuilder::Cards::AddCards( BCardView* cardView) \copybrief CardBuilder BLayoutBuilder::Group::AddCards( BCardView* cardView, float weight) \param cardView The existing view that will be added to the underlying BSplitView. \returns A CardBuilder representing the layout of t he \a cardView. \since Haiku R1 */ //! @} /*! \name Explicit Sizes and Alignment */ //! @{ /*! \fn ThisBuilder& BLayoutBuilder::Cards::SetExplicitMinSize( BSize size) \copydoc BLayoutBuilder::Group::SetExplicitMinSize() */ /*! \fn ThisBuilder& BLayoutBuilder::Cards::SetExplicitMaxSize( BSize size) \copydoc BLayoutBuilder::Group::SetExplicitMaxSize() */ /*! \fn ThisBuilder& BLayoutBuilder::Cards::SetExplicitPreferredSize( BSize size) \copydoc BLayoutBuilder::Group::SetExplicitPreferredSize() */ /*! \fn ThisBuilder& BLayoutBuilder::Cards::SetExplicitAlignment( BAlignment alignment) \copydoc BLayoutBuilder::Group::SetExplicitAlignment() */ //! @} /*! \name Visible Item */ //! @{ /*! \fn ThisBuilder& BLayoutBuilder::Cards::SetVisibleItem( int32 index) \brief Set the current visible item to the item at \a index. \see BCardLayout::SetVisibleItem(int32) */ //! @}