1/* 2 * Copyright 2020 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Niels Sascha Reedijk, niels.reedijk@gmail.com 7 * 8 * Corresponds to: 9 * headers/os/interface/SplitLayoutBuilder.h hrev45833 10 * src/kits/interface/SplitLayoutBuilder.cpp hrev45833 11 */ 12 13 14/*! 15 \file SplitLayoutBuilder.h 16 \ingroup layout 17 \ingroup libbe 18 \brief Provides \b deprecated SplitLayoutBuilder class. 19 20 \since Haiku R1 21*/ 22 23 24/*! 25 \class BSplitLayoutBuilder 26 \ingroup libbe 27 \brief \b Deprecated helper class that helps building a \ref BSplitView. 28 29 The modern builder can be found in \ref BLayoutBuilder::Split<>. 30 31 \warning This class is deprecated and should not be used in new projects. 32 It may be removed in newer releases. 33 34 \since Haiku R1 35*/ 36 37 38/*! 39 \fn BSplitLayoutBuilder::BSplitLayoutBuilder(orientation orientation=B_HORIZONTAL, float spacing=B_USE_DEFAULT_SPACING) 40 \brief Create a new layout builder with an underlying \ref BSplitView. 41 42 \param orientation The orientation of the split view. 43 \param spacing The spacing of items within the split view. 44 45 \since Haiku R1 46*/ 47 48 49/*! 50 \fn BSplitLayoutBuilder::BSplitLayoutBuilder(BSplitView *view) 51 \brief Create a new layout builder that operates on an existing \a view. 52 53 \param view The existing view you want the builder to alter. 54 55 \since Haiku R1 56*/ 57 58 59/*! 60 \fn BSplitView* BSplitLayoutBuilder::SplitView() const 61 \brief Get a reference to the underlying \ref BSplitView. 62 63 \return A borrowed pointer to the current underlaying view. 64 65 \since Haiku R1 66*/ 67 68 69/*! 70 \fn BSplitLayoutBuilder& BSplitLayoutBuilder::GetSplitView(BSplitView **view) 71 \brief Get a reference to the underlying \ref BSplitView. 72 73 \param[out] view The variable to store a borrowed pointer to the 74 underlying view. 75 76 \return The method returns a self reference, so that calls to the builder 77 may be chained. 78 79 \since Haiku R1 80*/ 81 82 83/*! 84 \fn BSplitLayoutBuilder& BSplitLayoutBuilder::Add(BView *view) 85 \brief Add a \a view to the underlying \ref BSplitView. 86 87 \param view The \ref BView to add. 88 89 \return The method returns a self reference, so that calls to the builder 90 may be chained. 91 92 \since Haiku R1 93*/ 94 95 96/*! 97 \fn BSplitLayoutBuilder& BSplitLayoutBuilder::Add(BView *view, float weight) 98 \brief Add a \a view to the underlying \ref BSplitView. 99 100 \param view The \ref BView to add. 101 \param weight The weight of the item. 102 103 \return The method returns a self reference, so that calls to the builder 104 may be chained. 105 106 \since Haiku R1 107*/ 108 109 110/*! 111 \fn BSplitLayoutBuilder& BSplitLayoutBuilder::Add(BLayoutItem *item) 112 \brief Add a \ref BLayoutItem to the underlying \ref BSplitView. 113 114 \param item The \ref BLayoutItem to add. 115 116 \return The method returns a self reference, so that calls to the builder 117 may be chained. 118 119 \since Haiku R1 120*/ 121 122 123/*! 124 \fn BSplitLayoutBuilder& BSplitLayoutBuilder::Add(BLayoutItem *item, float weight) 125 \brief Add a \ref BLayoutItem to the underlying \ref BSplitView. 126 127 \param item The \ref BLayoutItem to add. 128 \param weight The weight of the \a item. 129 130 \return The method returns a self reference, so that calls to the builder 131 may be chained. 132 133 \since Haiku R1 134*/ 135 136 137/*! 138 \fn BSplitLayoutBuilder& BSplitLayoutBuilder::SetCollapsible(bool collapsible) 139 \brief Set the collapsability of the most recently added item. 140 141 \param collapsible \c true if the item is collapsible, \c false otherwise. 142 143 \return The method returns a self reference, so that calls to the builder 144 may be chained. 145 146 \since Haiku R1 147*/ 148 149 150/*! 151 \fn BSplitLayoutBuilder& BSplitLayoutBuilder::SetInsets(float left, float top, float right, float bottom) 152 \brief Set the insets of the underlying \ref BSplitView. 153 154 \param left The left inset. 155 \param top The top inset. 156 \param right The right inset. 157 \param bottom The bottom inset. 158 159 \return The method returns a self reference, so that calls to the builder 160 may be chained. 161 162 \since Haiku R1 163*/ 164 165 166/*! 167 \fn BSplitLayoutBuilder::operator BSplitView *() 168 \brief Cast the builder to the underlying \ref BSplitView. 169 170 Convenience method for the \ref SplitView() method. 171 172 \since Haiku R1 173*/ 174