VSTGUI  3.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CTooltipSupport Class Reference

Generic Tooltip Support class. More...

#include <ctooltipsupport.h>

+ Inheritance diagram for CTooltipSupport:

Public Member Functions

 CTooltipSupport (CFrame *frame, int delay=1000)
 
 ~CTooltipSupport ()
 
Reference Counting Methods
virtual void forget ()
 decrease refcount and delete object if refcount == 0 More...
 
virtual void remember ()
 increase refcount More...
 
long getNbReference () const
 get refcount More...
 

Protected Member Functions

void showTooltip ()
 
void hideTooltip ()
 
CMessageResult notify (CBaseObject *sender, const char *msg)
 
void onMouseEntered (CView *view, CFrame *frame)
 
void onMouseExited (CView *view, CFrame *frame)
 
void onMouseMoved (CFrame *frame, const CPoint &where)
 
void onMouseDown (CFrame *frame, const CPoint &where)
 

Protected Attributes

CVSTGUITimertimer
 
CFrameframe
 
CViewcurrentView
 
void * platformObject
 
int delay
 
int 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

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

Adding CTooltipSupport

CTooltipSupport* tooltipSupport = new CTooltipSupport (frame);

Constructor & Destructor Documentation

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

Member Function Documentation

virtual void forget ( )
inlinevirtualinherited

decrease refcount and delete object if refcount == 0

Reimplemented in CDrawContext.

long getNbReference ( ) const
inlineinherited

get refcount

void hideTooltip ( )
protected
CMessageResult notify ( CBaseObject sender,
const char *  msg 
)
protectedvirtual

Reimplemented from CBaseObject.

void onMouseDown ( CFrame frame,
const CPoint where 
)
protectedvirtual

Reimplemented from IMouseObserver.

void onMouseEntered ( CView view,
CFrame frame 
)
protectedvirtual

Implements IMouseObserver.

void onMouseExited ( CView view,
CFrame frame 
)
protectedvirtual

Implements IMouseObserver.

void onMouseMoved ( CFrame frame,
const CPoint where 
)
protectedvirtual

Reimplemented from IMouseObserver.

virtual void remember ( )
inlinevirtualinherited

increase refcount

void showTooltip ( )
protected

Member Data Documentation

CView* currentView
protected
int delay
protected
CFrame* frame
protected
CPoint lastMouseMove
protected
void* platformObject
protected
int state
protected
CVSTGUITimer* timer
protected

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