1 /* 2 * Copyright 2006, Haiku Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _SPACE_LAYOUT_ITEM_H 6 #define _SPACE_LAYOUT_ITEM_H 7 8 #include <LayoutItem.h> 9 10 11 class BSpaceLayoutItem : public BLayoutItem { 12 public: 13 BSpaceLayoutItem(BSize minSize, BSize maxSize, 14 BSize preferredSize, BAlignment alignment); 15 virtual ~BSpaceLayoutItem(); 16 17 static BSpaceLayoutItem* CreateGlue(); 18 static BSpaceLayoutItem* CreateHorizontalStrut(float width); 19 static BSpaceLayoutItem* CreateVerticalStrut(float height); 20 21 virtual BSize MinSize(); 22 virtual BSize MaxSize(); 23 virtual BSize PreferredSize(); 24 virtual BAlignment Alignment(); 25 26 virtual void SetExplicitMinSize(BSize size); 27 virtual void SetExplicitMaxSize(BSize size); 28 virtual void SetExplicitPreferredSize(BSize size); 29 virtual void SetExplicitAlignment(BAlignment alignment); 30 31 virtual bool IsVisible(); 32 virtual void SetVisible(bool visible); 33 34 virtual BRect Frame(); 35 virtual void SetFrame(BRect frame); 36 37 private: 38 BRect fFrame; 39 BSize fMinSize; 40 BSize fMaxSize; 41 BSize fPreferredSize; 42 BAlignment fAlignment; 43 bool fVisible; 44 }; 45 46 #endif // _SPACE_LAYOUT_ITEM_H 47