haiku/docs/user/interface/CardView.dox
Niels Sascha Reedijk 5cfca119fb 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 <waddlesplash@gmail.com>
2020-04-14 08:00:13 +00:00

119 lines
2.3 KiB
Plaintext

/*
* 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/CardView.h hrev49943
* src/kits/interface/CardView.cpp hrev49977
*/
/*!
\file CardView.h
\ingroup layout
\brief Provides the BCardView class.
\since Haiku R1
*/
/*!
\class BCardView
\ingroup layout
\ingroup libbe
\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
*/
/*!
\fn BCardView::BCardView()
\brief Creates a new card view.
\since Haiku R1
*/
/*!
\fn BCardView::BCardView(const char *name)
\brief Creates a new card view with the given \a name.
\param name The name for the card view.
\since Haiku R1
*/
/*!
\fn BCardView::BCardView(BMessage *from)
\brief Unarchive a card view.
\param from The \ref BMessage that contains the card view.
\since Haiku R1
*/
/*!
\fn virtual BCardView::~BCardView()
\brief Destructor
\since Haiku R1
*/
/*!
\fn virtual void BCardView::SetLayout(BLayout *layout)
\brief Adopt a given card \a layout.
\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
*/
/*!
\fn BCardLayout* BCardView::CardLayout() const
\brief Get a pointer to the underlying BCardLayout.
\return A pointer to the underlying card layout.
\since Haiku R1
*/
/*!
\fn virtual status_t BCardView::Perform(perform_code d, void *arg)
\brief Perform some action. (Internal Method)
Reimplemented from BView::Perform()
*/
/*!
\fn static BArchivable* BCardView::Instantiate(BMessage *from)
\brief Instantiate the view from the message \a from.
\since Haiku R1
*/