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 * Reviewers: 9 * Adrien Destugues, pulkomandy@pulkomandy.tk 10 * 11 * Corresponds to: 12 * headers/os/interface/CardView.h hrev49943 13 * src/kits/interface/CardView.cpp hrev49977 14 */ 15 16 17/*! 18 \file CardView.h 19 \ingroup layout 20 \brief Provides the BCardView class. 21 22 \since Haiku R1 23*/ 24 25 26/*! 27 \class BCardView 28 \ingroup layout 29 \ingroup libbe 30 \brief Container view for a stack of alternating child views. 31 32 This class is a convencience class, that creates a BView with a BCardLayout 33 set up by default. 34 35 The card container holds zero or more child views and organizes them like a 36 stack of cards. Each child view is a card, and only one card can be on top, 37 meaning that it is visible and available for interaction by the user. When 38 there are no cards, or no card is on top, then the system's default gray 39 background is displayed. 40 41 \see BCardLayout for more information on how and when to use this 42 type of container. 43 44 \since Haiku R1 45*/ 46 47 48/*! 49 \fn BCardView::BCardView() 50 \brief Creates a new card view. 51 52 \since Haiku R1 53*/ 54 55 56/*! 57 \fn BCardView::BCardView(const char *name) 58 \brief Creates a new card view with the given \a name. 59 60 \param name The name for the card view. 61 62 \since Haiku R1 63*/ 64 65 66/*! 67 \fn BCardView::BCardView(BMessage *from) 68 \brief Unarchive a card view. 69 70 \param from The \ref BMessage that contains the card view. 71 72 \since Haiku R1 73*/ 74 75 76/*! 77 \fn virtual BCardView::~BCardView() 78 \brief Destructor 79 80 \since Haiku R1 81*/ 82 83 84/*! 85 \fn virtual void BCardView::SetLayout(BLayout *layout) 86 \brief Adopt a given card \a layout. 87 88 \param layout The layout to set to. This must be a BCardLayout, or a 89 derivative. Any other layout types will be ignored. 90 91 \since Haiku R1 92*/ 93 94 95/*! 96 \fn BCardLayout* BCardView::CardLayout() const 97 \brief Get a pointer to the underlying BCardLayout. 98 99 \return A pointer to the underlying card layout. 100 101 \since Haiku R1 102*/ 103 104 105/*! 106 \fn virtual status_t BCardView::Perform(perform_code d, void *arg) 107 \brief Perform some action. (Internal Method) 108 109 Reimplemented from BView::Perform() 110*/ 111 112 113/*! 114 \fn static BArchivable* BCardView::Instantiate(BMessage *from) 115 \brief Instantiate the view from the message \a from. 116 117 \since Haiku R1 118*/ 119