MFC Grid manual

ITooltipCtrl Class Reference

Interface to handle tooltip location in the grid. More...

#include <Dapfor/GUI/ITooltipCtrl.h>

Inheritance diagram for ITooltipCtrl:

IAutoDelete CTooltipCtrl CHtmlTooltipCtrl CInPlaceTooltipCtrl

List of all members.


Public Member Functions

virtual ~ITooltipCtrl ()
 Virtual destructor.
virtual bool Attach (CGrid &grid)=0
 Attaches a tooltip window to the grid.
virtual void Detach ()=0
 Detaches a tooltip window from the grid.
virtual bool Activate (const CGrid &grid, CGridCell &cell)=0
 Makes a tooltip window visible.
virtual void Desactivate ()=0
 Makes a tooltip window invisible.
virtual const ITooltipGetDefaultToolip () const =0
 Gets default ITooltip implementation to display a grid's content.

Detailed Description

Interface to handle tooltip location in the grid.

It is used for handling the tooltip window, its location and visibility. The grid supports two types of tooltips. The first is a usual window that appears above grid cell if the cursor does not move for a certain time interval and disappears upon a certain time interval, set in the grid parameters. The second type is a built-in window, appearing above a cell when the cell is so small that text information doesn't fit in it. In this case the grid shows this window precisely above the cell and displays all cell text inside it, applying the same font, size, text alignment as in the cell. GUI library has some implementations of ITooltipCtrl interface. CTooltipCtrl and CTooltip classes display text information in a window. CHtmlTooltipCtrl and CHtmlTooltip implementations display a cell content in the Internet browser in the form of a html text. CInPlaceTooltipCtrl implementation displays partially visible text above a cell. It is also possible to implement arbitrary tooltips, representing information by means of MFC coltrols, or by means of the same grid.


Member Function Documentation

bool Attach ( CGrid grid  )  [pure virtual]

Attaches a tooltip window to the grid.

Parameters:
[in] grid The grid
Returns:
True if the tooltip window has been successfully attached to the grid. Otherwse - false.

Implemented in CHtmlTooltipCtrl, and CTooltipCtrl.

bool Activate ( const CGrid grid,
CGridCell cell 
) [pure virtual]

Makes a tooltip window visible.

Parameters:
[in] grid The grid
[in] cell Value indicates location and content of the tooltip

Implemented in CHtmlTooltipCtrl, CInPlaceTooltipCtrl, and CTooltipCtrl.

const ITooltip & GetDefaultToolip (  )  const [pure virtual]

Gets default ITooltip implementation to display a grid's content.

Returns:
Default implementation to display a grid's content

Implemented in CHtmlTooltipCtrl, and CTooltipCtrl.