11d6c7b6cSAlex Wilson /* 21d6c7b6cSAlex Wilson * Copyright 2010, Haiku, Inc. All rights reserved. 31d6c7b6cSAlex Wilson * Distributed under the terms of the MIT License. 41d6c7b6cSAlex Wilson */ 51d6c7b6cSAlex Wilson #ifndef _ABSTRACT_LAYOUT_H 61d6c7b6cSAlex Wilson #define _ABSTRACT_LAYOUT_H 71d6c7b6cSAlex Wilson 81d6c7b6cSAlex Wilson #include <Alignment.h> 91d6c7b6cSAlex Wilson #include <Layout.h> 101d6c7b6cSAlex Wilson #include <Size.h> 111d6c7b6cSAlex Wilson 121d6c7b6cSAlex Wilson class BAbstractLayout : public BLayout { 131d6c7b6cSAlex Wilson public: 141d6c7b6cSAlex Wilson BAbstractLayout(); 151d6c7b6cSAlex Wilson BAbstractLayout(BMessage* from); 161d6c7b6cSAlex Wilson virtual ~BAbstractLayout(); 171d6c7b6cSAlex Wilson 181d6c7b6cSAlex Wilson virtual BSize MinSize(); 191d6c7b6cSAlex Wilson virtual BSize MaxSize(); 201d6c7b6cSAlex Wilson virtual BSize PreferredSize(); 211d6c7b6cSAlex Wilson virtual BAlignment Alignment(); 221d6c7b6cSAlex Wilson 231d6c7b6cSAlex Wilson virtual void SetExplicitMinSize(BSize size); 241d6c7b6cSAlex Wilson virtual void SetExplicitMaxSize(BSize size); 251d6c7b6cSAlex Wilson virtual void SetExplicitPreferredSize(BSize size); 261d6c7b6cSAlex Wilson virtual void SetExplicitAlignment(BAlignment alignment); 271d6c7b6cSAlex Wilson 281d6c7b6cSAlex Wilson virtual BSize BaseMinSize(); 291d6c7b6cSAlex Wilson virtual BSize BaseMaxSize(); 301d6c7b6cSAlex Wilson virtual BSize BasePreferredSize(); 311d6c7b6cSAlex Wilson virtual BAlignment BaseAlignment(); 321d6c7b6cSAlex Wilson 331d6c7b6cSAlex Wilson virtual BRect Frame(); 341d6c7b6cSAlex Wilson virtual void SetFrame(BRect frame); 351d6c7b6cSAlex Wilson 361d6c7b6cSAlex Wilson virtual bool IsVisible(); 371d6c7b6cSAlex Wilson virtual void SetVisible(bool visible); 381d6c7b6cSAlex Wilson 391d6c7b6cSAlex Wilson virtual status_t Archive(BMessage* into, bool deep = true) const; 401d6c7b6cSAlex Wilson virtual status_t AllUnarchived(const BMessage* from); 411d6c7b6cSAlex Wilson 42a851b3adSAlex Wilson virtual status_t Perform(perform_code d, void* arg); 43a851b3adSAlex Wilson 441d6c7b6cSAlex Wilson protected: 451d6c7b6cSAlex Wilson virtual void OwnerChanged(BView* was); 461d6c7b6cSAlex Wilson virtual void AncestorVisibilityChanged(bool shown); 471d6c7b6cSAlex Wilson 481d6c7b6cSAlex Wilson private: 498151838eSAlex Wilson virtual void _ReservedAbstractLayout1(); 508151838eSAlex Wilson virtual void _ReservedAbstractLayout2(); 518151838eSAlex Wilson virtual void _ReservedAbstractLayout3(); 528151838eSAlex Wilson virtual void _ReservedAbstractLayout4(); 538151838eSAlex Wilson virtual void _ReservedAbstractLayout5(); 548151838eSAlex Wilson virtual void _ReservedAbstractLayout6(); 558151838eSAlex Wilson virtual void _ReservedAbstractLayout7(); 568151838eSAlex Wilson virtual void _ReservedAbstractLayout8(); 578151838eSAlex Wilson virtual void _ReservedAbstractLayout9(); 588151838eSAlex Wilson virtual void _ReservedAbstractLayout10(); 598151838eSAlex Wilson 60*e044d51aSAlex Wilson // forbidden methods 61*e044d51aSAlex Wilson BAbstractLayout(const BAbstractLayout&); 62*e044d51aSAlex Wilson void operator =(const BAbstractLayout&); 63*e044d51aSAlex Wilson 641d6c7b6cSAlex Wilson struct Proxy; 651d6c7b6cSAlex Wilson struct ViewProxy; 661d6c7b6cSAlex Wilson struct DataProxy; 671d6c7b6cSAlex Wilson 681d6c7b6cSAlex Wilson Proxy* fExplicitData; 698151838eSAlex Wilson uint32 _reserved[4]; 701d6c7b6cSAlex Wilson }; 711d6c7b6cSAlex Wilson 721d6c7b6cSAlex Wilson #endif // _ABSTRACT_LAYOUT_ITEM_H 73