/* * Copyright 2020 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * Niels Sascha Reedijk, niels.reedijk@gmail.com * * Corresponds to: * headers/os/interface/LayoutBuilder.h rev 49977 */ /*! \class BLayoutBuilder::Split<> \ingroup layout \ingroup libbe \brief BLayoutBuilder::Base subclass for building BSplitViews. \since Haiku R1 A BSplitView consists of elements, for which in between there are dividers that the user can manipulate to alter the division of space between each of the element.s For a detailed view on the properties, see the \link BSplitView class description\endlink. */ /*! \typedef BLayoutBuilder::Split::ThisBuilder \copydoc BLayoutBuilder::Group::ThisBuilder */ /*! \typedef BLayoutBuilder::Split::GroupBuilder \copydoc BLayoutBuilder::Group::GroupBuilder */ /*! \typedef BLayoutBuilder::Split::GridBuilder \copydoc BLayoutBuilder::Group::GridBuilder */ /*! \typedef BLayoutBuilder::Split::SplitBuilder \copydoc BLayoutBuilder::Group::SplitBuilder */ /*! \typedef BLayoutBuilder::Split::CardBuilder \copydoc BLayoutBuilder::Group::CardBuilder */ /*! \name Constructors */ //! @{ /*! \fn BLayoutBuilder::Split::Split(orientation orientation, float spacing) \brief Creates a builder for a new BSplitView. \param orientation The orientation for the new BSplitView. \param spacing The spacing for the new BSplitView. \since Haiku R1 */ /*! \fn BLayoutBuilder::Split::Split(BSplitView *view) \brief Creates a builder for an existing BSplitView \param view The existing view to operate on. \since Haiku R1 */ //! @} /*! \name Accessors */ //! @{ /*! \fn BSplitView* BLayoutBuilder::Split::View() const \copydoc BLayoutBuilder::Group::View() */ /*! \fn ThisBuilder& BLayoutBuilder::Split::GetView( BView** _view) \copydoc BLayoutBuilder::Group::GetView() */ /*! \fn ThisBuilder& BLayoutBuilder::Split::GetSplitView( BSplitView** _view) \brief Get a pointer to the SplitBView this builder is attached to. \param[out] _view The BSplitView this builder' is attached to. */ /*! \fn BLayoutBuilder::Split::operator BSplitView*() \brief Cast this builder into the layout object it represents. \since Haiku R1 */ //! @} /*! \name Adding BViews and BLayoutItems */ //! @{ /*! \fn ThisBuilder& BLayoutBuilder::Split::Add(BView* view) \brief Add a \a view to the underlying BSplitView. The \a view will be added to the right or the bottom of the existing elements. \param view The BView to be added. The underlying BSplitView will take ownership of the object. \see BSplitView::Add(BView*) \since Haiku R1 */ /*! \fn ThisBuilder& BLayoutBuilder::Split::Add(BView* view, float weight) \brief Add a \a view with a \a weight to the underlying BSplitView. The \a view will be added to the right or the bottom of the existing elements. \param view The BView to be added. The underlying BSplitView will take ownership of the object. \param weight The weight of the view. \see BSplitView::Add(BView*, float) \since Haiku R1 */ /*! \fn ThisBuilder& BLayoutBuilder::Split::Add( BLayoutItem* item) \brief Add a \a item to the underlying BSplitView. The layout item will be added to the right or the bottom of the existing elements. \param item The BLayoutItem to be added. The underlying BSplitView will take ownership of the object. \see BSplitView::Add(BLayoutItem*) \since Haiku R1 */ /*! \fn ThisBuilder& BLayoutBuilder::Split::Add( BLayoutItem* item, float weight) \brief Add an \a item with a \a weight to the underlying BSplitView. The layout item will be added to the right or the bottom of the existing elements. \param item The BLayoutItem to be added. The underlying BSplitView will take ownership of the object. \param weight The weight of the item. \see BSplitView::Add(BLayoutItem*, float) \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::Split::AddGroup( orientation orientation, float spacing, float weight) \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. \param weight The weight for the new BGroupLayout in the BGroupLayout this builder represents. \returns A GroupBuilder representing the newly created BGroupLayout. \since Haiku R1 */ /*! \fn GroupBuilder BLayoutBuilder::Split::AddGroup(BGroupView* groupView, float weight) \copybrief GroupBuilder BLayoutBuilder::Group::AddGroup(BGroupView* groupView, float weight) \param groupView The BGroupView to be added. \param weight The weight for \a groupView in the BGroupLayout this builder represents. \returns A GroupBuilder representing the layout of the \a groupView. \since Haiku R1 */ /*! \fn GroupBuilder BLayoutBuilder::Split::AddGroup( BGroupLayout* groupLayout, float weight) \copybrief GroupBuilder BLayoutBuilder::Group::AddGroup( BGroupLayout* groupLayout, float weight) \param groupLayout The BGroupLayout to be added. \param weight The weight for \a groupLayout in the BGroupLayout this builder represents. \returns A GroupBuilder representing the \a groupLayout. \since Haiku R1 */ /*! \fn GridBuilder BLayoutBuilder::Split::AddGrid( float horizontalSpacing = 0.0f, float verticalSpacing = 0.0f, float weight = 1.0f) \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. \param weight The weight for the new BGridLayout in the BSplitView this builder represents. \returns A GridBuilder representing the newly created BGridLayout. \since Haiku R1 */ /*! \fn GridBuilder BLayoutBuilder::Split::AddGrid( BGridLayout* gridLayout, float weight = 1.0f) \copybrief GridBuilder BLayoutBuilder::Group::AddGrid( BGridLayout* gridLayout, float weight) \param gridLayout The BGridLayout to be added and used to construct the returned GridBuilder. \param weight The weight for \a gridLayout in the BSplitView this builder represents. \returns A GridBuilder representing the \a gridLayout. \since Haiku R1 */ /*! \fn GridBuilder BLayoutBuilder::Split::AddGrid( BGridView* gridView, float weight = 1.0f) \copybrief GridBuilder BLayoutBuilder::Group::AddGrid( BGridView* gridView, float weight) \param gridView The BGridView to be added and used to construct the returned GridBuilder. \param weight The weight for \a gridView in the BSplitView this builder represents. \returns A GridBuilder representing the layout of the \a gridView. \since Haiku R1 */ /*! \fn SplitBuilder BLayoutBuilder::Split::AddSplit( orientation orientation, float spacing, float weight) \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. \param weight The weight, in this BSplitView for the new BSplitView. \returns A SplitBuilder representing the new BSplitView. \since Haiku R1 */ /*! \fn SplitBuilder BLayoutBuilder::Split::AddSplit( BSplitView* splitView, float weight = 1.0f) \copybrief SplitBuilder BLayoutBuilder::Group::AddSplit( BSplitView* splitView, float weight) \param splitView The BSplitView to be added. \param weight The weight of the BSplitView in the BSplitView this builder represents. \returns A SplitBuilder representing the \a splitView. \since Haiku R1 */ /*! \fn CardBuilder BLayoutBuilder::Split::AddCards( float weight) \copybrief CardBuilder BLayoutBuilder::Group::AddCards( float weight) \param weight The weight of the BCardLayout in the BSplitView this builder represents. \returns A CardBuilder representing the new BCardLayout. \since Haiku R1 */ /*! \fn CardBuilder BLayoutBuilder::Split::AddCards( BCardLayout* cardLayout, float weight) \copybrief CardBuilder BLayoutBuilder::Group::AddCards( BCardLayout* cardLayout, float weight) \param cardLayout The existing layout that will be added to the underlying BSplitView. \param weight The weight of the BCardLayout in the BSplitView this builder represents. \returns A CardBuilder representing the \a cardLayout. \since Haiku R1 */ /*! \fn CardBuilder BLayoutBuilder::Split::AddCards( BCardView* cardView, float weight) \copybrief CardBuilder BLayoutBuilder::Group::AddCards( BCardView* cardView, float weight) \param cardView The existing view that will be added to the underlying BSplitView. \param weight The weight of the BCardLayout in the BSplitView this builder represents. \returns A CardBuilder representing the layout of t he \a cardView. \since Haiku R1 */ //! @} /*! \name Collapsability of elements */ //! @{ /*! \fn ThisBuilder& BLayoutBuilder::Split::SetCollapsible( bool collapsible) \copydoc BSplitView::SetCollapsible(bool) \see BSplitView::SetCollapsible(bool) */ /*! \fn ThisBuilder& BLayoutBuilder::Split::SetCollapsible( int32 index, bool collapsible) \copydoc BSplitView::SetCollapsible(int32, bool) \see BSplitView::SetCollapsible(int32, bool) */ /*! \fn ThisBuilder& BLayoutBuilder::Split::SetCollapsible( int32 first, int32 last, bool collapsible) \copydoc BSplitView::SetCollapsible(int32, int32, bool) \see BSplitView::SetCollapsible(int32, int32, bool) */ //! @} /*! \name Insets */ //! @{ /*! \fn ThisBuilder& BLayoutBuilder::Split::SetInsets( float left, float top, float right, float bottom) \copydoc BSplitView::SetInsets(float, float, float, float) \see BSplitView::SetInsets(float, float, float, float) */ /*! \fn ThisBuilder& BLayoutBuilder::Split::SetInsets( float horizontal, float vertical) \copydoc BSplitView::SetInsets(float, float) \see BSplitView::SetInsets(float, float) */ /*! \fn ThisBuilder& BLayoutBuilder::Split::SetInsets( float insets) \copydoc BSplitView::SetInsets(float) \see BSplitView::SetInsets(float) */ //! @}