ASPiK SDK
ctooltipsupport.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #ifndef __ctooltipsupport__
6 #define __ctooltipsupport__
7 
8 #include "vstguifwd.h"
9 #include "cpoint.h"
10 
11 namespace VSTGUI {
12 
13 //-----------------------------------------------------------------------------
14 // CTooltipSupport Declaration
16 //-----------------------------------------------------------------------------
18 {
19 public:
20  CTooltipSupport (CFrame* frame, uint32_t delay = 1000);
21 
22  void onMouseEntered (CView* view);
23  void onMouseExited (CView* view);
24  void onMouseMoved (const CPoint& where);
25  void onMouseDown (const CPoint& where);
26 
27  void hideTooltip ();
28  //-------------------------------------------
29  CLASS_METHODS_NOCOPY(CTooltipSupport, CBaseObject)
30 protected:
31  ~CTooltipSupport () noexcept override;
32  bool showTooltip ();
33 
34  enum {
35  kHidden,
36  kVisible,
37  kHiding,
38  kShowing,
39  kForceVisible
40  };
41 
42  // CBaseObject
43  CMessageResult notify (CBaseObject* sender, IdStringPtr msg) override;
44 
46  CFrame* frame;
47  SharedPointer<CView> currentView;
48 
49  uint32_t delay;
50  int32_t state;
51  CPoint lastMouseMove;
52 };
53 
54 } // namespace
55 
56 #endif
57 
Definition: vstguibase.h:299
Base Object with reference counter.
Definition: vstguibase.h:276
Definition: customcontrols.cpp:8
CTooltipSupport(CFrame *frame, uint32_t delay=1000)
Definition: ctooltipsupport.cpp:31
Base Class of all view objects.
Definition: cview.h:44
Generic Tooltip Support class.
Definition: ctooltipsupport.h:17
Point structure.
Definition: cpoint.h:17
The CFrame is the parent container of all views.
Definition: cframe.h:32