2 * Copyright 2006-2010, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
8 #include <AbstractLayout.h>
11 class BCardLayout
: public BAbstractLayout
{
14 BCardLayout(BMessage
* from
);
15 virtual ~BCardLayout();
17 BLayoutItem
* VisibleItem() const;
18 int32
VisibleIndex() const;
19 void SetVisibleItem(int32 index
);
20 void SetVisibleItem(BLayoutItem
* item
);
22 virtual BSize
BaseMinSize();
23 virtual BSize
BaseMaxSize();
24 virtual BSize
BasePreferredSize();
25 virtual BAlignment
BaseAlignment();
27 virtual bool HasHeightForWidth();
28 virtual void GetHeightForWidth(float width
, float* min
,
29 float* max
, float* preferred
);
31 virtual status_t
Archive(BMessage
* into
, bool deep
= true) const;
32 static BArchivable
* Instantiate(BMessage
* from
);
34 virtual status_t
Perform(perform_code d
, void* arg
);
37 virtual status_t
AllArchived(BMessage
* archive
) const;
38 virtual status_t
AllUnarchived(const BMessage
* from
);
40 virtual status_t
ItemArchived(BMessage
* into
, BLayoutItem
* item
,
42 virtual status_t
ItemUnarchived(const BMessage
* from
,
43 BLayoutItem
* item
, int32 index
);
45 virtual void LayoutInvalidated(bool children
= false);
46 virtual void DoLayout();
47 virtual bool ItemAdded(BLayoutItem
* item
, int32 atIndex
);
48 virtual void ItemRemoved(BLayoutItem
* item
, int32 fromIndex
);
52 void _ValidateMinMax();
55 virtual void _ReservedCardLayout1();
56 virtual void _ReservedCardLayout2();
57 virtual void _ReservedCardLayout3();
58 virtual void _ReservedCardLayout4();
59 virtual void _ReservedCardLayout5();
60 virtual void _ReservedCardLayout6();
61 virtual void _ReservedCardLayout7();
62 virtual void _ReservedCardLayout8();
63 virtual void _ReservedCardLayout9();
64 virtual void _ReservedCardLayout10();
67 BCardLayout(const BCardLayout
&);
68 void operator =(const BCardLayout
&);
73 BLayoutItem
* fVisibleItem
;
79 #endif // _CARD_LAYOUT_H