1/*
2 * Copyright 2015, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
4 */
5
6
7#include <CardLayout.h>
8#include <CardView.h>
9
10
11BCardView::BCardView()
12	:
13	BView(NULL, 0, new BCardLayout())
14{
15	AdoptSystemColors();
16}
17
18
19BCardView::BCardView(const char* name)
20	:
21	BView(name, 0, new BCardLayout())
22{
23	AdoptSystemColors();
24}
25
26
27BCardView::BCardView(BMessage* from)
28	:
29	BView(from)
30{
31	AdoptSystemColors();
32}
33
34
35BCardView::~BCardView()
36{
37}
38
39
40void
41BCardView::SetLayout(BLayout* layout)
42{
43	if (dynamic_cast<BCardLayout*>(layout) == NULL)
44		return;
45
46	BView::SetLayout(layout);
47}
48
49
50BCardLayout*
51BCardView::CardLayout() const
52{
53	return static_cast<BCardLayout*>(GetLayout());
54}
55
56
57BArchivable*
58BCardView::Instantiate(BMessage* from)
59{
60	if (validate_instantiation(from, "BCardView"))
61		return new BCardView(from);
62	return NULL;
63}
64
65
66status_t
67BCardView::Perform(perform_code d, void* arg)
68{
69	return BView::Perform(d, arg);
70}
71
72
73void BCardView::_ReservedCardView1() {}
74void BCardView::_ReservedCardView2() {}
75void BCardView::_ReservedCardView3() {}
76void BCardView::_ReservedCardView4() {}
77void BCardView::_ReservedCardView5() {}
78void BCardView::_ReservedCardView6() {}
79void BCardView::_ReservedCardView7() {}
80void BCardView::_ReservedCardView8() {}
81void BCardView::_ReservedCardView9() {}
82void BCardView::_ReservedCardView10() {}
83