2 * Copyright (C) 2010 Stephan Aßmus <superstippi@gmx.de>
4 * All rights reserved. Distributed under the terms of the MIT License.
9 #include <AbstractLayoutItem.h>
16 class TabContainerView
;
25 virtual BSize
MinSize();
26 virtual BSize
PreferredSize();
27 virtual BSize
MaxSize();
29 void Draw(BRect updateRect
);
30 virtual void DrawBackground(BView
* owner
, BRect frame
,
31 const BRect
& updateRect
, bool isFirst
,
32 bool isLast
, bool isFront
);
33 virtual void DrawContents(BView
* owner
, BRect frame
,
34 const BRect
& updateRect
, bool isFirst
,
35 bool isLast
, bool isFront
);
37 virtual void MouseDown(BPoint where
, uint32 buttons
);
38 virtual void MouseUp(BPoint where
);
39 virtual void MouseMoved(BPoint where
, uint32 transit
,
40 const BMessage
* dragMessage
);
42 void SetIsFront(bool isFront
);
44 void SetIsLast(bool isLast
);
45 virtual void Update(bool isFirst
, bool isLast
,
48 BLayoutItem
* LayoutItem() const;
49 void SetContainerView(
50 TabContainerView
* containerView
);
51 TabContainerView
* ContainerView() const;
53 void SetLabel(const char* label
);
54 const BString
& Label() const;
59 float _LabelHeight() const;
62 TabContainerView
* fContainerView
;
63 TabLayoutItem
* fLayoutItem
;
73 class TabLayoutItem
: public BAbstractLayoutItem
{
75 TabLayoutItem(TabView
* parent
);
77 virtual bool IsVisible();
78 virtual void SetVisible(bool visible
);
80 virtual BRect
Frame();
81 virtual void SetFrame(BRect frame
);
83 virtual BView
* View();
85 virtual BSize
BaseMinSize();
86 virtual BSize
BaseMaxSize();
87 virtual BSize
BasePreferredSize();
88 virtual BAlignment
BaseAlignment();
90 TabView
* Parent() const;
91 void InvalidateContainer();
92 void InvalidateContainer(BRect frame
);