Make UEFI boot-platform build again
[haiku.git] / headers / private / interface / ToolTip.h
blobf29f29c08f0c11006b96aee77b1f9c40f49429ec
1 /*
2 * Copyright 2009, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _TOOL_TIP_H
6 #define _TOOL_TIP_H
9 #include <Alignment.h>
10 #include <Archivable.h>
11 #include <Point.h>
12 #include <Referenceable.h>
15 class BView;
16 class BTextView;
19 class BToolTip : public BArchivable, public BReferenceable {
20 public:
21 BToolTip();
22 BToolTip(BMessage* archive);
23 virtual ~BToolTip();
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();
40 protected:
41 bool Lock();
42 void Unlock();
44 private:
45 BToolTip(const BToolTip& other);
46 BToolTip& operator=(const BToolTip &other);
48 void _InitData();
50 private:
51 bool fLockedLooper;
52 bool fIsSticky;
53 BPoint fRelativeLocation;
54 BAlignment fAlignment;
58 class BTextToolTip : public BToolTip {
59 public:
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);
73 private:
74 void _InitData(const char* text);
76 private:
77 BTextView* fTextView;
81 #endif // _TOOL_TIP_H