VSTGUI  4.10
Graphical User Interface Framework not only for VST plugins
CTooltipSupport Class Reference

Generic Tooltip Support class. More...

+ Inheritance diagram for CTooltipSupport:

Public Member Functions

 CTooltipSupport (CFrame *frame, uint32_t delay=1000)
 
void onMouseEntered (CView *view)
 
void onMouseExited (CView *view)
 
void onMouseMoved (const CPoint &where)
 
void onMouseDown (const CPoint &where)
 
void hideTooltip ()
 
CBaseObjectnewCopy () const override
 
- Public Member Functions inherited from CBaseObject
 CBaseObject ()=default
 
 ~CBaseObject () noexcept override=default
 
 CBaseObject (const CBaseObject &o)
 
CBaseObjectoperator= (const CBaseObject &obj)
 
- Public Member Functions inherited from ReferenceCounted< T >
 ReferenceCounted ()=default
 
virtual ~ReferenceCounted () noexcept=default
 
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
void forget () override
 decrease refcount and delete object if refcount == 0 More...
 
void remember () override
 increase refcount More...
 
virtual int32_t getNbReference () const
 get refcount More...
 
virtual void beforeDelete ()
 

Protected Types

enum  {
  kHidden, kVisible, kHiding, kShowing,
  kForceVisible
}
 

Protected Member Functions

 ~CTooltipSupport () noexcept override
 
bool showTooltip ()
 
CMessageResult notify (CBaseObject *sender, IdStringPtr msg) override
 

Protected Attributes

SharedPointer< CVSTGUITimertimer
 
CFrameframe
 
SharedPointer< CViewcurrentView
 
uint32_t delay
 
int32_t state
 
CPoint lastMouseMove
 

Detailed Description

Generic Tooltip Support class.

A generic way to add tooltip support to VSTGUI.

Example

Adding a tooltip to a view

UTF8StringPtr tooltipText = "This is a tooltip";
view->setAttribute (kCViewTooltipAttribute, strlen (tooltipText)+1, tooltipText);

Adding CTooltipSupport is done via VSTGUI::CFrame::enableTooltips (true)

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
kHidden 
kVisible 
kHiding 
kShowing 
kForceVisible 

Constructor & Destructor Documentation

◆ CTooltipSupport()

CTooltipSupport ( CFrame frame,
uint32_t  delay = 1000 
)
Parameters
frameCFrame object
delaytooltip delay time in milliseconds

◆ ~CTooltipSupport()

~CTooltipSupport ( )
overrideprotectednoexcept

Member Function Documentation

◆ hideTooltip()

void hideTooltip ( )

◆ newCopy()

CBaseObject* newCopy ( ) const
inlineoverride

◆ notify()

CMessageResult notify ( CBaseObject sender,
IdStringPtr  msg 
)
overrideprotectedvirtual

Reimplemented from CBaseObject.

◆ onMouseDown()

void onMouseDown ( const CPoint where)

◆ onMouseEntered()

void onMouseEntered ( CView view)

◆ onMouseExited()

void onMouseExited ( CView view)

◆ onMouseMoved()

void onMouseMoved ( const CPoint where)

◆ showTooltip()

bool showTooltip ( )
protected

Member Data Documentation

◆ currentView

SharedPointer<CView> currentView
protected

◆ delay

uint32_t delay
protected

◆ frame

CFrame* frame
protected

◆ lastMouseMove

CPoint lastMouseMove
protected

◆ state

int32_t state
protected

◆ timer

SharedPointer<CVSTGUITimer> timer
protected

The documentation for this class was generated from the following files: