2 * Copyright 2009, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
10 #include <Archivable.h>
12 #include <Referenceable.h>
19 class BToolTip
: public BArchivable
, public BReferenceable
{
22 BToolTip(BMessage
* archive
);
25 virtual status_t
Archive(BMessage
* archive
,
26 bool deep
= true) const;
28 virtual BView
* View() const = 0;
30 virtual void SetSticky(bool enable
);
31 bool IsSticky() const;
32 virtual void SetMouseRelativeLocation(BPoint location
);
33 BPoint
MouseRelativeLocation() const;
34 virtual void SetAlignment(BAlignment alignment
);
35 BAlignment
Alignment() const;
37 virtual void AttachedToWindow();
38 virtual void DetachedFromWindow();
45 BToolTip(const BToolTip
& other
);
46 BToolTip
& operator=(const BToolTip
&other
);
53 BPoint fRelativeLocation
;
54 BAlignment fAlignment
;
58 class BTextToolTip
: public BToolTip
{
60 BTextToolTip(const char* text
);
61 BTextToolTip(BMessage
* archive
);
62 virtual ~BTextToolTip();
64 static BTextToolTip
* Instantiate(BMessage
* archive
);
65 virtual status_t
Archive(BMessage
* archive
,
66 bool deep
= true) const;
68 virtual BView
* View() const;
70 const char* Text() const;
71 void SetText(const char* text
);
74 void _InitData(const char* text
);