2 * Copyright 2006, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _ABSTRACT_LAYOUT_ITEM_H
6 #define _ABSTRACT_LAYOUT_ITEM_H
9 #include <LayoutItem.h>
13 class BAbstractLayoutItem
: public BLayoutItem
{
15 BAbstractLayoutItem();
16 BAbstractLayoutItem(BMessage
* from
);
17 virtual ~BAbstractLayoutItem();
19 virtual BSize
MinSize();
20 virtual BSize
MaxSize();
21 virtual BSize
PreferredSize();
22 virtual BAlignment
Alignment();
24 virtual void SetExplicitMinSize(BSize size
);
25 virtual void SetExplicitMaxSize(BSize size
);
26 virtual void SetExplicitPreferredSize(BSize size
);
27 virtual void SetExplicitAlignment(BAlignment alignment
);
29 virtual BSize
BaseMinSize();
30 virtual BSize
BaseMaxSize();
31 virtual BSize
BasePreferredSize();
32 virtual BAlignment
BaseAlignment();
34 virtual status_t
Archive(BMessage
* into
, bool deep
= true) const;
36 virtual status_t
Perform(perform_code d
, void* arg
);
39 // various hook methods
41 virtual status_t
AllUnarchived(const BMessage
* archive
);
42 virtual status_t
AllArchived(BMessage
* archive
) const;
44 virtual void LayoutInvalidated(bool children
);
46 virtual void AttachedToLayout();
47 virtual void DetachedFromLayout(BLayout
* layout
);
49 virtual void AncestorVisibilityChanged(bool shown
);
52 virtual void _ReservedAbstractLayoutItem1();
53 virtual void _ReservedAbstractLayoutItem2();
54 virtual void _ReservedAbstractLayoutItem3();
55 virtual void _ReservedAbstractLayoutItem4();
56 virtual void _ReservedAbstractLayoutItem5();
57 virtual void _ReservedAbstractLayoutItem6();
58 virtual void _ReservedAbstractLayoutItem7();
59 virtual void _ReservedAbstractLayoutItem8();
60 virtual void _ReservedAbstractLayoutItem9();
61 virtual void _ReservedAbstractLayoutItem10();
64 BAbstractLayoutItem(const BAbstractLayoutItem
&);
65 void operator =(const BAbstractLayoutItem
&);
70 BAlignment fAlignment
;
75 #endif // _ABSTRACT_LAYOUT_ITEM_H