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