1 /* 2 * Copyright 2006, Haiku Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _VIEW_LAYOUT_ITEM_H 6 #define _VIEW_LAYOUT_ITEM_H 7 8 #include <LayoutItem.h> 9 10 11 class BViewLayoutItem : public BLayoutItem { 12 public: 13 BViewLayoutItem(BView* view); 14 virtual ~BViewLayoutItem(); 15 16 virtual BSize MinSize(); 17 virtual BSize MaxSize(); 18 virtual BSize PreferredSize(); 19 virtual BAlignment Alignment(); 20 21 virtual void SetExplicitMinSize(BSize size); 22 virtual void SetExplicitMaxSize(BSize size); 23 virtual void SetExplicitPreferredSize(BSize size); 24 virtual void SetExplicitAlignment(BAlignment alignment); 25 26 virtual bool IsVisible(); 27 virtual void SetVisible(bool visible); 28 29 virtual BRect Frame(); 30 virtual void SetFrame(BRect frame); 31 32 virtual bool HasHeightForWidth(); 33 virtual void GetHeightForWidth(float width, float* min, 34 float* max, float* preferred); 35 36 virtual BView* View(); 37 38 virtual void InvalidateLayout(); 39 40 private: 41 BView* fView; 42 }; 43 44 #endif // _VIEW_LAYOUT_ITEM_H 45