1 /* 2 * Copyright 2006, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _ABSTRACT_LAYOUT_ITEM_H 6 #define _ABSTRACT_LAYOUT_ITEM_H 7 8 #include <Alignment.h> 9 #include <LayoutItem.h> 10 #include <Size.h> 11 12 13 class BAbstractLayoutItem : public BLayoutItem { 14 public: 15 BAbstractLayoutItem(); 16 BAbstractLayoutItem(BMessage* from); 17 virtual ~BAbstractLayoutItem(); 18 19 virtual BSize MinSize(); 20 virtual BSize MaxSize(); 21 virtual BSize PreferredSize(); 22 virtual BAlignment Alignment(); 23 24 virtual void SetExplicitMinSize(BSize size); 25 virtual void SetExplicitMaxSize(BSize size); 26 virtual void SetExplicitPreferredSize(BSize size); 27 virtual void SetExplicitAlignment(BAlignment alignment); 28 29 virtual BSize BaseMinSize(); 30 virtual BSize BaseMaxSize(); 31 virtual BSize BasePreferredSize(); 32 virtual BAlignment BaseAlignment(); 33 34 virtual status_t Archive(BMessage* into, bool deep = true) const; 35 36 private: 37 BSize fMinSize; 38 BSize fMaxSize; 39 BSize fPreferredSize; 40 BAlignment fAlignment; 41 }; 42 43 #endif // _ABSTRACT_LAYOUT_ITEM_H 44