2 * Copyright 2010, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _ABSTRACT_LAYOUT_H
6 #define _ABSTRACT_LAYOUT_H
12 class BAbstractLayout
: public BLayout
{
15 BAbstractLayout(BMessage
* from
);
16 virtual ~BAbstractLayout();
18 virtual BSize
MinSize();
19 virtual BSize
MaxSize();
20 virtual BSize
PreferredSize();
21 virtual BAlignment
Alignment();
23 virtual void SetExplicitMinSize(BSize size
);
24 virtual void SetExplicitMaxSize(BSize size
);
25 virtual void SetExplicitPreferredSize(BSize size
);
26 virtual void SetExplicitAlignment(BAlignment alignment
);
28 virtual BSize
BaseMinSize();
29 virtual BSize
BaseMaxSize();
30 virtual BSize
BasePreferredSize();
31 virtual BAlignment
BaseAlignment();
33 virtual BRect
Frame();
34 virtual void SetFrame(BRect frame
);
36 virtual bool IsVisible();
37 virtual void SetVisible(bool visible
);
39 virtual status_t
Archive(BMessage
* into
, bool deep
= true) const;
41 virtual status_t
Perform(perform_code d
, void* arg
);
44 // Archiving hook methods
45 virtual status_t
AllArchived(BMessage
* archive
) const;
46 virtual status_t
AllUnarchived(const BMessage
* from
);
48 virtual status_t
ItemArchived(BMessage
* into
, BLayoutItem
* item
,
50 virtual status_t
ItemUnarchived(const BMessage
* from
,
51 BLayoutItem
* item
, int32 index
);
53 virtual bool ItemAdded(BLayoutItem
* item
, int32 atIndex
);
54 virtual void ItemRemoved(BLayoutItem
* item
, int32 fromIndex
);
55 virtual void LayoutInvalidated(bool children
);
56 virtual void OwnerChanged(BView
* was
);
58 // BLayoutItem hook methods
59 virtual void AttachedToLayout();
60 virtual void DetachedFromLayout(BLayout
* layout
);
61 virtual void AncestorVisibilityChanged(bool shown
);
64 virtual void _ReservedAbstractLayout1();
65 virtual void _ReservedAbstractLayout2();
66 virtual void _ReservedAbstractLayout3();
67 virtual void _ReservedAbstractLayout4();
68 virtual void _ReservedAbstractLayout5();
69 virtual void _ReservedAbstractLayout6();
70 virtual void _ReservedAbstractLayout7();
71 virtual void _ReservedAbstractLayout8();
72 virtual void _ReservedAbstractLayout9();
73 virtual void _ReservedAbstractLayout10();
76 BAbstractLayout(const BAbstractLayout
&);
77 void operator =(const BAbstractLayout
&);
87 #endif // _ABSTRACT_LAYOUT_ITEM_H