19ecf9d1cSIngo Weinhold /* 289208c77SStephan Aßmus * Copyright 2006, Haiku, Inc. All rights reserved. 39ecf9d1cSIngo Weinhold * Distributed under the terms of the MIT License. 49ecf9d1cSIngo Weinhold */ 59ecf9d1cSIngo Weinhold #ifndef _SPACE_LAYOUT_ITEM_H 69ecf9d1cSIngo Weinhold #define _SPACE_LAYOUT_ITEM_H 79ecf9d1cSIngo Weinhold 89ecf9d1cSIngo Weinhold #include <LayoutItem.h> 99ecf9d1cSIngo Weinhold 109ecf9d1cSIngo Weinhold 119ecf9d1cSIngo Weinhold class BSpaceLayoutItem : public BLayoutItem { 129ecf9d1cSIngo Weinhold public: 139ecf9d1cSIngo Weinhold BSpaceLayoutItem(BSize minSize, BSize maxSize, 149ecf9d1cSIngo Weinhold BSize preferredSize, BAlignment alignment); 1539c72631SIngo Weinhold BSpaceLayoutItem(BMessage* archive); 169ecf9d1cSIngo Weinhold virtual ~BSpaceLayoutItem(); 179ecf9d1cSIngo Weinhold 189ecf9d1cSIngo Weinhold static BSpaceLayoutItem* CreateGlue(); 199ecf9d1cSIngo Weinhold static BSpaceLayoutItem* CreateHorizontalStrut(float width); 209ecf9d1cSIngo Weinhold static BSpaceLayoutItem* CreateVerticalStrut(float height); 219ecf9d1cSIngo Weinhold 229ecf9d1cSIngo Weinhold virtual BSize MinSize(); 239ecf9d1cSIngo Weinhold virtual BSize MaxSize(); 249ecf9d1cSIngo Weinhold virtual BSize PreferredSize(); 259ecf9d1cSIngo Weinhold virtual BAlignment Alignment(); 269ecf9d1cSIngo Weinhold 279ecf9d1cSIngo Weinhold virtual void SetExplicitMinSize(BSize size); 289ecf9d1cSIngo Weinhold virtual void SetExplicitMaxSize(BSize size); 299ecf9d1cSIngo Weinhold virtual void SetExplicitPreferredSize(BSize size); 309ecf9d1cSIngo Weinhold virtual void SetExplicitAlignment(BAlignment alignment); 319ecf9d1cSIngo Weinhold 329ecf9d1cSIngo Weinhold virtual bool IsVisible(); 339ecf9d1cSIngo Weinhold virtual void SetVisible(bool visible); 349ecf9d1cSIngo Weinhold 359ecf9d1cSIngo Weinhold virtual BRect Frame(); 369ecf9d1cSIngo Weinhold virtual void SetFrame(BRect frame); 379ecf9d1cSIngo Weinhold 3839c72631SIngo Weinhold virtual status_t Archive(BMessage* into, bool deep = true) const; 3939c72631SIngo Weinhold static BArchivable* Instantiate(BMessage* from); 4039c72631SIngo Weinhold 419ecf9d1cSIngo Weinhold private: 42*182e2ee9SAlex Wilson // FBC padding 43*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem1(); 44*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem2(); 45*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem3(); 46*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem4(); 47*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem5(); 48*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem6(); 49*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem7(); 50*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem8(); 51*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem9(); 52*182e2ee9SAlex Wilson virtual void _ReservedSpaceLayoutItem10(); 53*182e2ee9SAlex Wilson 54*182e2ee9SAlex Wilson // forbidden methods 55*182e2ee9SAlex Wilson BSpaceLayoutItem(const BSpaceLayoutItem&); 56*182e2ee9SAlex Wilson void operator =(const BSpaceLayoutItem&); 57*182e2ee9SAlex Wilson 589ecf9d1cSIngo Weinhold BRect fFrame; 599ecf9d1cSIngo Weinhold BSize fMinSize; 609ecf9d1cSIngo Weinhold BSize fMaxSize; 619ecf9d1cSIngo Weinhold BSize fPreferredSize; 629ecf9d1cSIngo Weinhold BAlignment fAlignment; 639ecf9d1cSIngo Weinhold bool fVisible; 6453617d36SAlex Wilson 6553617d36SAlex Wilson uint32 _reserved[2]; 669ecf9d1cSIngo Weinhold }; 679ecf9d1cSIngo Weinhold 689ecf9d1cSIngo Weinhold #endif // _SPACE_LAYOUT_ITEM_H 69