2 * Copyright 2005-2015 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
12 class BBox
: public BView
{
14 BBox(BRect frame
, const char* name
= NULL
,
15 uint32 resizingMode
= B_FOLLOW_LEFT_TOP
,
16 uint32 flags
= B_WILL_DRAW
| B_FRAME_EVENTS
18 border_style border
= B_FANCY_BORDER
);
19 BBox(const char* name
,
20 uint32 flags
= B_WILL_DRAW
| B_FRAME_EVENTS
22 border_style border
= B_FANCY_BORDER
,
24 BBox(border_style border
, BView
* child
);
28 BBox(BMessage
* archive
);
29 static BArchivable
* Instantiate(BMessage
* archive
);
30 virtual status_t
Archive(BMessage
* archive
, bool deep
= true) const;
32 virtual void SetBorder(border_style border
);
33 border_style
Border() const;
35 float TopBorderOffset();
38 void SetLabel(const char* string
);
39 status_t
SetLabel(BView
* viewLabel
);
41 const char* Label() const;
42 BView
* LabelView() const;
44 virtual void Draw(BRect updateRect
);
45 virtual void AttachedToWindow();
46 virtual void DetachedFromWindow();
47 virtual void AllAttached();
48 virtual void AllDetached();
49 virtual void FrameResized(float width
, float height
);
50 virtual void MessageReceived(BMessage
* message
);
51 virtual void MouseDown(BPoint point
);
52 virtual void MouseUp(BPoint point
);
53 virtual void WindowActivated(bool active
);
54 virtual void MouseMoved(BPoint point
, uint32 transit
,
55 const BMessage
* dragMessage
);
56 virtual void FrameMoved(BPoint newLocation
);
58 virtual BHandler
* ResolveSpecifier(BMessage
* message
,
59 int32 index
, BMessage
* specifier
,
60 int32 what
, const char* property
);
62 virtual void ResizeToPreferred();
63 virtual void GetPreferredSize(float* _width
, float* _height
);
64 virtual void MakeFocus(bool focused
= true);
65 virtual status_t
GetSupportedSuites(BMessage
* message
);
67 virtual status_t
Perform(perform_code d
, void* arg
);
69 virtual BSize
MinSize();
70 virtual BSize
MaxSize();
71 virtual BSize
PreferredSize();
72 virtual BAlignment
LayoutAlignment();
75 virtual void LayoutInvalidated(bool descendants
= false);
76 virtual void DoLayout();
81 virtual void _ReservedBox1();
82 virtual void _ReservedBox2();
84 BBox
&operator=(const BBox
&);
86 void _InitObject(BMessage
* data
= NULL
);
87 void _DrawPlain(BRect labelBox
);
88 void _DrawFancy(BRect labelBox
);
91 BView
* _Child() const;
92 void _ValidateLayoutData();
98 LayoutData
* fLayoutData
;