HaikuBook: Add documentation for BCardLayout
This adds documentation for BCardView, BCardLayout and BLayoutBuilder::Cards. There is also a bit of cleanup for the BSplitView documentation. It also makes explicit when a developer passes an invalid argument to BCardLayout::SetVisibleItem(), by making that a debugger() call. Change-Id: I17ac52cc773bb76c4f81beaa76f72af62a9e10f4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2460 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
a7725a42a9
commit
5cfca119fb
@@ -1,9 +1,12 @@
|
||||
/*
|
||||
* Copyright 2019 Haiku, Inc. All rights reserved.
|
||||
* Copyright 2020 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Name, email@email.com
|
||||
* Niels Sascha Reedijk, niels.reedijk@gmail.com
|
||||
*
|
||||
* Reviewers:
|
||||
* Adrien Destugues, [email protected]
|
||||
*
|
||||
* Corresponds to:
|
||||
* headers/os/interface/CardLayout.h hrev43514
|
||||
@@ -13,8 +16,9 @@
|
||||
|
||||
/*!
|
||||
\file CardLayout.h
|
||||
\ingroup interface
|
||||
\ingroup layout
|
||||
\brief Undocumented file.
|
||||
\brief Provides the BCardLayout class.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -24,7 +28,26 @@
|
||||
\class BCardLayout
|
||||
\ingroup layout
|
||||
\ingroup libbe
|
||||
\brief Undocumented class.
|
||||
\brief 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.
|
||||
|
||||
Once you have set up the items in the container, you can select which one
|
||||
is visible using the SetVisibleItem() methods on this class. When there is
|
||||
no item on top, the system's default grey background is shown.
|
||||
|
||||
This view is useful when you have a number of pre-loaded UI elements, and
|
||||
you want to be able to swap between them quickly, while retaining the
|
||||
underlying state. The container itself will retain a fixed size, so from a
|
||||
visual perspective, it is imperative that the items in the stack have
|
||||
comparable dimensions.
|
||||
|
||||
An example usage is for a configuration wizard, where the user will need to
|
||||
complete a number of steps to perform an action. Because you want to the
|
||||
user to experience all these steps as a smooth flow within one window, you
|
||||
can set up the individual pages as views, and add these as cards to the
|
||||
card layout. Then you tie the \em Next and \em Previous buttons to switch
|
||||
between the visible cards using the BCardLayout::SetVisible() methods.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -32,10 +55,7 @@
|
||||
|
||||
/*!
|
||||
\fn BCardLayout::BCardLayout()
|
||||
\brief Undocumented public method
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\brief Create a new card layout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -43,12 +63,13 @@
|
||||
|
||||
/*!
|
||||
\fn BCardLayout::BCardLayout(BMessage *from)
|
||||
\brief Undocumented public method
|
||||
\brief Constructs a BCardLayout \a from an archive message.
|
||||
|
||||
\param from Undocumented
|
||||
This method is usually not called directly, if you want to build a
|
||||
check box from an archived message you should call Instantiate() instead
|
||||
because it can handle errors properly.
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\param from The \ref BMessage that contains the card layout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -56,10 +77,7 @@
|
||||
|
||||
/*!
|
||||
\fn virtual virtual BCardLayout::~BCardLayout()
|
||||
\brief Undocumented public method
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\brief Destructor.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -67,10 +85,10 @@
|
||||
|
||||
/*!
|
||||
\fn BLayoutItem* BCardLayout::VisibleItem() const
|
||||
\brief Undocumented public method
|
||||
\brief Get a pointer to the currently visible item.
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\return This method returns a pointer to the currently visible
|
||||
layout item, or \c NULL if there is no card visible.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -78,10 +96,9 @@
|
||||
|
||||
/*!
|
||||
\fn int32 BCardLayout::VisibleIndex() const
|
||||
\brief Undocumented public method
|
||||
\brief Get the index of the currently visible item.
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\return Returns the zero-based index, or -1 if there is no item visible.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -89,9 +106,12 @@
|
||||
|
||||
/*!
|
||||
\fn void BCardLayout::SetVisibleItem(int32 index)
|
||||
\brief Undocumented public method
|
||||
\brief Set the current visible item to the item at \a index.
|
||||
|
||||
\param index Undocumented
|
||||
\param index This is a zero-based index for the item you want to display.
|
||||
If the item does not exist (it is lower than 0 or it is higher than
|
||||
the number of items), no item will be displayed and the view will reset
|
||||
to the default grey background.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -99,217 +119,153 @@
|
||||
|
||||
/*!
|
||||
\fn void BCardLayout::SetVisibleItem(BLayoutItem *item)
|
||||
\brief Undocumented public method
|
||||
\brief Set the current visible item to \a item.
|
||||
|
||||
\param item Undocumented
|
||||
\param item A pointer to an item that is already added to this
|
||||
layout. When a reference to an item not on the stack, or \c NULL is
|
||||
passed, then no item will be displayed and the view will reset to the
|
||||
default grey background.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual BSize BCardLayout::BaseMinSize()
|
||||
\brief Undocumented public method
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual BSize BCardLayout::BaseMinSize()
|
||||
\brief Overridden hook method from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual BSize BCardLayout::BaseMaxSize()
|
||||
\brief Undocumented public method
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual BSize BCardLayout::BaseMaxSize()
|
||||
\brief Overridden hook method from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual BSize BCardLayout::BasePreferredSize()
|
||||
\brief Undocumented public method
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual BSize BCardLayout::BasePreferredSize()
|
||||
\brief Overridden hook method from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual BAlignment BCardLayout::BaseAlignment()
|
||||
\brief Undocumented public method
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual BAlignment BCardLayout::BaseAlignment()
|
||||
\brief Overridden hook method from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual bool BCardLayout::HasHeightForWidth()
|
||||
\brief Undocumented public method
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual bool BCardLayout::HasHeightForWidth()
|
||||
\brief Overridden hook method from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BCardLayout::GetHeightForWidth(float width, float *min, float *max, float *preferred)
|
||||
\brief Undocumented public method
|
||||
|
||||
\param width Undocumented
|
||||
\param min Undocumented
|
||||
\param max Undocumented
|
||||
\param preferred Undocumented
|
||||
\fn virtual void BCardLayout::GetHeightForWidth(float width, float *min, float *max, float *preferred)
|
||||
\brief Overridden hook method from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BCardLayout::Archive(BMessage *into, bool deep=true) const
|
||||
\brief Undocumented public method
|
||||
\fn virtual status_t BCardLayout::Archive(BMessage *into, bool deep=true) const
|
||||
\brief Archive this layout \a into a BMessage.
|
||||
|
||||
\param into Undocumented
|
||||
\param deep Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\param into The message to which to archive into.
|
||||
\param deep When \c true, the children of this layout will also be added.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BCardLayout::Perform(perform_code d, void *arg)
|
||||
\brief Undocumented public method
|
||||
|
||||
\param d Undocumented
|
||||
\param arg Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual status_t BCardLayout::Perform(perform_code d, void *arg)
|
||||
\brief Overridden hook method from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn static static BArchivable* BCardLayout::Instantiate(BMessage *from)
|
||||
\brief Undocumented public method
|
||||
|
||||
\param from Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn static BArchivable* BCardLayout::Instantiate(BMessage *from)
|
||||
\brief Instantiate a BCardLayout object from message \a from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BCardLayout::AllArchived(BMessage *archive) const
|
||||
\brief Undocumented protected method
|
||||
|
||||
\param archive Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual status_t BCardLayout::AllArchived(BMessage *archive) const
|
||||
\brief Hook method overridden from BArchivable.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BCardLayout::AllUnarchived(const BMessage *from)
|
||||
\brief Undocumented protected method
|
||||
|
||||
\param from Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual status_t BCardLayout::AllUnarchived(const BMessage *from)
|
||||
\brief Hook method overridden from BArchivable.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BCardLayout::ItemArchived(BMessage *into, BLayoutItem *item, int32 index) const
|
||||
\brief Undocumented protected method
|
||||
|
||||
\param into Undocumented
|
||||
\param item Undocumented
|
||||
\param index Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual status_t BCardLayout::ItemArchived(BMessage *into,
|
||||
BLayoutItem *item, int32 index) const
|
||||
\brief Hook method overridden from BArchivable.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BCardLayout::ItemUnarchived(const BMessage *from, BLayoutItem *item, int32 index)
|
||||
\brief Undocumented protected method
|
||||
|
||||
\param from Undocumented
|
||||
\param item Undocumented
|
||||
\param index Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual status_t BCardLayout::ItemUnarchived(const BMessage *from,
|
||||
BLayoutItem *item, int32 index)
|
||||
\brief Hook method overridden from BArchivable.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BCardLayout::LayoutInvalidated(bool children=false)
|
||||
\brief Undocumented protected method
|
||||
|
||||
\param children Undocumented
|
||||
\fn virtual void BCardLayout::LayoutInvalidated(bool children=false)
|
||||
\brief Hook method overridden from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BCardLayout::DoLayout()
|
||||
\brief Undocumented protected method
|
||||
\fn virtual void BCardLayout::DoLayout()
|
||||
\brief Hook method overridden from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual bool BCardLayout::ItemAdded(BLayoutItem *item, int32 atIndex)
|
||||
\brief Undocumented protected method
|
||||
|
||||
\param item Undocumented
|
||||
\param atIndex Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual bool BCardLayout::ItemAdded(BLayoutItem *item, int32 atIndex)
|
||||
\brief Hook method overridden from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BCardLayout::ItemRemoved(BLayoutItem *item, int32 fromIndex)
|
||||
\brief Undocumented protected method
|
||||
|
||||
\param item Undocumented
|
||||
\param fromIndex Undocumented
|
||||
\fn virtual void BCardLayout::ItemRemoved(BLayoutItem *item, int32 fromIndex)
|
||||
\brief Hook method overridden from BAbstractLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
/*
|
||||
* Copyright 2019 Haiku, Inc. All rights reserved.
|
||||
* Copyright 2020 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Name, email@email.com
|
||||
* Niels Sascha Reedijk, niels.reedijk@gmail.com
|
||||
*
|
||||
* Reviewers:
|
||||
* Adrien Destugues, [email protected]
|
||||
*
|
||||
* Corresponds to:
|
||||
* headers/os/interface/CardView.h hrev49943
|
||||
@@ -11,12 +14,10 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
\file CardView.h
|
||||
\ingroup layout
|
||||
\brief Undocumented file.
|
||||
\brief Provides the BCardView class.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -26,7 +27,19 @@
|
||||
\class BCardView
|
||||
\ingroup layout
|
||||
\ingroup libbe
|
||||
\brief Undocumented class.
|
||||
\brief Container view for a stack of alternating child views.
|
||||
|
||||
This class is a convencience class, that creates a BView with a BCardLayout
|
||||
set up by default.
|
||||
|
||||
The card container holds zero or more child views and organizes them like a
|
||||
stack of cards. Each child view is a card, and only one card can be on top,
|
||||
meaning that it is visible and available for interaction by the user. When
|
||||
there are no cards, or no card is on top, then the system's default gray
|
||||
background is displayed.
|
||||
|
||||
\see BCardLayout for more information on how and when to use this
|
||||
type of container.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -34,10 +47,7 @@
|
||||
|
||||
/*!
|
||||
\fn BCardView::BCardView()
|
||||
\brief Undocumented public method
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\brief Creates a new card view.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -45,12 +55,9 @@
|
||||
|
||||
/*!
|
||||
\fn BCardView::BCardView(const char *name)
|
||||
\brief Undocumented public method
|
||||
\brief Creates a new card view with the given \a name.
|
||||
|
||||
\param name Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\param name The name for the card view.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -58,33 +65,28 @@
|
||||
|
||||
/*!
|
||||
\fn BCardView::BCardView(BMessage *from)
|
||||
\brief Undocumented public method
|
||||
\brief Unarchive a card view.
|
||||
|
||||
\param from Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\param from The \ref BMessage that contains the card view.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual BCardView::~BCardView()
|
||||
\brief Undocumented public method
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn virtual BCardView::~BCardView()
|
||||
\brief Destructor
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BCardView::SetLayout(BLayout *layout)
|
||||
\brief Undocumented public method
|
||||
\fn virtual void BCardView::SetLayout(BLayout *layout)
|
||||
\brief Adopt a given card \a layout.
|
||||
|
||||
\param layout Undocumented
|
||||
\param layout The layout to set to. This must be a BCardLayout, or a
|
||||
derivative. Any other layout types will be ignored.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -92,37 +94,25 @@
|
||||
|
||||
/*!
|
||||
\fn BCardLayout* BCardView::CardLayout() const
|
||||
\brief Undocumented public method
|
||||
\brief Get a pointer to the underlying BCardLayout.
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\return A pointer to the underlying card layout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BCardView::Perform(perform_code d, void *arg)
|
||||
\brief Undocumented public method
|
||||
\fn virtual status_t BCardView::Perform(perform_code d, void *arg)
|
||||
\brief Perform some action. (Internal Method)
|
||||
|
||||
\param d Undocumented
|
||||
\param arg Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
|
||||
\since Haiku R1
|
||||
Reimplemented from BView::Perform()
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn static static BArchivable* BCardView::Instantiate(BMessage *from)
|
||||
\brief Undocumented public method
|
||||
|
||||
\param from Undocumented
|
||||
|
||||
\return Undocumented
|
||||
\retval <value> Undocumented
|
||||
\fn static BArchivable* BCardView::Instantiate(BMessage *from)
|
||||
\brief Instantiate the view from the message \a from.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,467 @@
|
||||
/*
|
||||
* Copyright 2020 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Niels Sascha Reedijk, [email protected]
|
||||
*
|
||||
* Reviewers:
|
||||
* Adrien Destugues, [email protected]
|
||||
*
|
||||
* 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<ParentBuilder>::ThisBuilder
|
||||
\brief Shorthand representing the type of \c this.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\typedef BLayoutBuilder::Cards<ThisBuilder>::GroupBuilder
|
||||
\brief Shorthand for builders returned by this builder's AddGroup() methods.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\typedef BLayoutBuilder::Cards<ThisBuilder>::GridBuilder
|
||||
\brief Shorthand for builders returned by this builder's AddGrid() methods.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\typedef BLayoutBuilder::Cards<ThisBuilder>::SplitBuilder
|
||||
\brief Shorthand for builders returned by this builder's AddSplit() methods.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\typedef BLayoutBuilder::Cards<ThisBuilder>::CardBuilder
|
||||
\brief Shorthand for builders returned by this builder's AddCards()
|
||||
methods.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\name Constructors
|
||||
*/
|
||||
|
||||
|
||||
//! @{
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLayoutBuilder::Cards<ParentBuilder>::Cards()
|
||||
\brief Creates a builder for BCardLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLayoutBuilder::Cards<ParentBuilder>::Cards(BWindow* window)
|
||||
\brief Creates a new builder for BCardLayout, and attaches it to a
|
||||
\a window.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLayoutBuilder::Cards<ParentBuilder>::Cards(BView* view)
|
||||
\brief Creates a new builder for BCardLayout, and attaches it to a
|
||||
\a view.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLayoutBuilder::Cards<ParentBuilder>::Cards(BCardLayout* layout)
|
||||
\brief Creates a builder targeting an existing BCardLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLayoutBuilder::Cards<ParentBuilder>::Cards(BCardLayout* layout)
|
||||
\brief Creates a builder targeting an existing BCardView.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*!
|
||||
\name Accessors
|
||||
*/
|
||||
|
||||
|
||||
//! @{
|
||||
|
||||
|
||||
/*!
|
||||
\fn BCardLayout* BLayoutBuilder::Cards<ParentBuilder>::Layout() const
|
||||
\brief Get a pointer to the underlying BCardLayout
|
||||
|
||||
\returns A pointer to the underlying BCardLayout
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BView* BLayoutBuilder::Cards<ParentBuilder>::View() const
|
||||
\brief Get a pointer to the underlying BView.
|
||||
|
||||
\returns A pointer to the underlying BView
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::GetLayout(
|
||||
BCardLayout** _layout)
|
||||
\brief Get a pointer to the underlying view.
|
||||
|
||||
\param[out] _layout Location to store the underlying BCardView reference.
|
||||
|
||||
\return The method returns a self reference, so that calls to the builder
|
||||
may be chained.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::GetView(
|
||||
BView** _view)
|
||||
\brief Get a pointer to the underlying view.
|
||||
|
||||
\param[out] _view Location to store the underlying BView reference.
|
||||
|
||||
\return The method returns a self reference, so that calls to the builder
|
||||
may be chained.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLayoutBuilder::Cards<ParentBuilder>::operator BCardLayout*()
|
||||
\brief Cast this builder into the BCardLayout it represents.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*!
|
||||
\name Adding BViews and BLayoutItems
|
||||
*/
|
||||
|
||||
|
||||
//! @{
|
||||
|
||||
|
||||
/*!
|
||||
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::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<ParentBuilder>::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<ParentBuilder>::AddGroup(
|
||||
orientation orientation, float spacing)
|
||||
\brief Construct and add a viewless BGroupLayout, then return a GroupBuilder
|
||||
representing the newly added layout.
|
||||
|
||||
\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<ParentBuilder>::AddGroup(
|
||||
BGroupView* groupView)
|
||||
\brief Add BGroupView and return a builder representing the newly added
|
||||
BGroupView.
|
||||
|
||||
\param groupView The BGroupView to be added.
|
||||
|
||||
\returns A GroupBuilder representing \a groupView.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn GroupBuilder BLayoutBuilder::Cards<ParentBuilder>::AddGroup(
|
||||
BGroupLayout* groupLayout)
|
||||
\brief Add a BGroupLayout and return a builder representing the newly added
|
||||
BGroupLayout.
|
||||
|
||||
\param groupLayout The BGroupLayout to be added.
|
||||
|
||||
\returns A GroupBuilder representing \a groupLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn GridBuilder BLayoutBuilder::Cards<ParentBuilder>::AddGrid(
|
||||
float horizontalSpacing, float verticalSpacing)
|
||||
\brief Create and add a viewless BGridLayout, then return a builder
|
||||
representing the newly created BGridLayout.
|
||||
|
||||
\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<ParentBuilder>::AddGrid(
|
||||
BGridLayout* gridLayout)
|
||||
\brief Add a BGridLayout, then return a builder the newly added BGridLayout.
|
||||
|
||||
\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<ParentBuilder>::AddGrid(
|
||||
BGridView* gridView)
|
||||
\brief Add a BGridView, then return a builder the newly added BGridView.
|
||||
|
||||
\param gridView The BGridView to be added and used to construct the
|
||||
returned GridBuilder.
|
||||
|
||||
\returns A GridBuilder representing \a gridView.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn SplitBuilder BLayoutBuilder::Cards<ParentBuilder>::AddSplit(
|
||||
orientation orientation, float spacing)
|
||||
\brief Create and add a new BSplitView with a weight of \c weight, then
|
||||
return a SplitBuilder representing the new BSplitView.
|
||||
|
||||
\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<ParentBuilder>::AddSplit(
|
||||
BSplitView* splitView)
|
||||
\brief Add a BSplitView to the BSplitView this builder represents and
|
||||
return a SplitBuilder representing the BSplitView.
|
||||
|
||||
\param splitView The BSplitView to be added.
|
||||
|
||||
\returns A SplitBuilder representing the new BSplitView.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn CardBuilder BLayoutBuilder::Cards<ParentBuilder>::AddCards()
|
||||
\brief Add a new BCardLayout as a child of the BCardLayout this builder
|
||||
represents and return a CardBuilder representing the new layout.
|
||||
|
||||
\returns A CardBuilder representing the new BCardLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn CardBuilder BLayoutBuilder::Cards<ParentBuilder>::AddCards(
|
||||
BCardLayout* cardLayout)
|
||||
\brief Add a new BCardLayout as a child of the BCardLayout this builder
|
||||
represents and return a CardBuilder representing the new layout.
|
||||
|
||||
\param cardLayout The existing layout that will be added to the underlying
|
||||
BSplitView.
|
||||
|
||||
\returns A CardBuilder representing the new BCardLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn CardBuilder BLayoutBuilder::Cards<ParentBuilder>::AddCards(
|
||||
BCardView* cardView)
|
||||
\brief Add a new BCardLayout as a child of the BCardLayout this builder
|
||||
represents and return a CardBuilder representing the new layout.
|
||||
|
||||
\param cardView The existing view that will be added to the underlying
|
||||
BSplitView.
|
||||
|
||||
\returns A CardBuilder representing the new BCardLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*!
|
||||
\name Setting Explicit Sizes
|
||||
*/
|
||||
|
||||
|
||||
//! @{
|
||||
|
||||
|
||||
/*!
|
||||
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::SetExplicitMinSize(
|
||||
BSize size)
|
||||
\brief Set the explicit minimum size of the underlying layout item.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::SetExplicitMaxSize(
|
||||
BSize size)
|
||||
\brief Set the explicit maximum size of the underlying layout item.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::SetExplicitPreferredSize(
|
||||
BSize size)
|
||||
\brief Set the explicit preferred size of the underlying layout item.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::SetExplicitAlignment(
|
||||
BAlignment alignment)
|
||||
\brief Set the explicit alignment of the underlying layout item.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
|
||||
/*!
|
||||
\name Visible Item
|
||||
*/
|
||||
|
||||
|
||||
//! @{
|
||||
|
||||
|
||||
/*!
|
||||
\fn ThisBuilder& BLayoutBuilder::Cards<ParentBuilder>::SetVisibleItem(
|
||||
int32 index)
|
||||
\brief Set the current visible item to the item at \a index.
|
||||
|
||||
\see BCardLayout::SetVisibleItem(int32)
|
||||
*/
|
||||
|
||||
|
||||
//! @}
|
||||
@@ -88,18 +88,6 @@
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLayoutBuilder::Split<ParentBuilder>::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<ParentBuilder>::Split(BSplitView *view)
|
||||
\brief Creates a builder for an existing BSplitView
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual BSplitView::~BSplitView()
|
||||
\fn virtual BSplitView::~BSplitView()
|
||||
\brief Destructor.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -460,7 +460,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BSplitView::AttachedToWindow()
|
||||
\fn virtual void BSplitView::AttachedToWindow()
|
||||
\brief Hook method overridden from BView.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -468,7 +468,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BSplitView::Draw(BRect updateRect)
|
||||
\fn virtual void BSplitView::Draw(BRect updateRect)
|
||||
\brief Hook method overridden from BView.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -476,7 +476,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BSplitView::DrawAfterChildren(BRect updateRect)
|
||||
\fn virtual void BSplitView::DrawAfterChildren(BRect updateRect)
|
||||
\brief Hook method overridden from BView.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -484,7 +484,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BSplitView::MouseDown(BPoint where)
|
||||
\fn virtual void BSplitView::MouseDown(BPoint where)
|
||||
\brief Hook method overridden from BView.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -492,7 +492,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BSplitView::MouseUp(BPoint where)
|
||||
\fn virtual void BSplitView::MouseUp(BPoint where)
|
||||
\brief Hook method overridden from BView.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -500,7 +500,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BSplitView::MouseMoved(BPoint where, uint32 transit, const BMessage *message)
|
||||
\fn virtual void BSplitView::MouseMoved(BPoint where, uint32 transit, const BMessage *message)
|
||||
\brief Hook method overridden from BView.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -508,7 +508,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BSplitView::MessageReceived(BMessage *message)
|
||||
\fn virtual void BSplitView::MessageReceived(BMessage *message)
|
||||
\brief Hook method overridden from BView.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -516,7 +516,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BSplitView::SetLayout(BLayout *layout)
|
||||
\fn virtual void BSplitView::SetLayout(BLayout *layout)
|
||||
\brief Hook method overridden from BView.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -524,13 +524,13 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BSplitView::Archive(BMessage *into, bool deep=true) const
|
||||
\fn virtual status_t BSplitView::Archive(BMessage *into, bool deep=true) const
|
||||
\copydoc BArchivable::Archive()
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BSplitView::Perform(perform_code d, void *arg)
|
||||
\fn virtual status_t BSplitView::Perform(perform_code d, void *arg)
|
||||
\brief Hook method overridden from BView.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -538,7 +538,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn static static BArchivable* BSplitView::Instantiate(BMessage *from)
|
||||
\fn static BArchivable* BSplitView::Instantiate(BMessage *from)
|
||||
\brief Instantiate the view from the message \a from.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -546,7 +546,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BSplitView::AllArchived(BMessage *into) const
|
||||
\fn virtual status_t BSplitView::AllArchived(BMessage *into) const
|
||||
\brief Hook method overridden from BArchivable.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -554,7 +554,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual status_t BSplitView::AllUnarchived(const BMessage *from)
|
||||
\fn virtual status_t BSplitView::AllUnarchived(const BMessage *from)
|
||||
\brief Hook method overridden from BArchivable.
|
||||
|
||||
\since Haiku R1
|
||||
@@ -562,7 +562,7 @@
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual virtual void BSplitView::DrawSplitter(BRect frame, const BRect &updateRect, orientation orientation, bool pressed)
|
||||
\fn virtual void BSplitView::DrawSplitter(BRect frame, const BRect &updateRect, orientation orientation, bool pressed)
|
||||
\brief Hook method called when the splitter needs to be drawn.
|
||||
|
||||
This method is called in the context of a \ref BView::Draw() operation.
|
||||
|
||||
@@ -4351,6 +4351,9 @@ SetViewColor(Parent()->ViewColor());
|
||||
\fn status_t BView::Perform(perform_code code, void* _data)
|
||||
\brief Perform some action. (Internal Method)
|
||||
|
||||
This method is available to allow classes to be extended while maintaining
|
||||
binary compatibility.
|
||||
|
||||
The following perform codes are recognized:
|
||||
- \c PERFORM_CODE_MIN_SIZE:
|
||||
- \c PERFORM_CODE_MAX_SIZE:
|
||||
|
||||
Reference in New Issue
Block a user