MFC Grid manual

ITooltip Class Reference

Interface determining a content of the tooltip. More...

#include <Dapfor/GUI/ITooltip.h>

Inheritance diagram for ITooltip:

IAutoDelete CTooltip CHtmlTooltip

List of all members.


Public Member Functions

virtual bool CanShow (const CGrid &grid, const CGridCell &cell) const =0
 Indicates whether the tooltip can be shown at a given cell.
virtual TString GetText (const CGrid &grid, const CGridCell &cell) const =0
 Gets text to display it in the tooltip.

Detailed Description

Interface determining a content of the tooltip.

The interface determines content that is displayed in the tooltip window. GUI library presents two implementations CTooltip and CHtmlTooltip representing information in form of text or text with html tags. When the grid displays information in the tooltip window, it first searches for the implementation established by the CGrid::SetTooltip() function. If the programmer has not set his tooltip implementation, the grid tries to get default ITooltip interface by calling ITooltipCtrl::GetDefaultToolip().


Member Function Documentation

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

Indicates whether the tooltip can be shown at a given cell.

Parameters:
[in] grid The grid where the tooptip is displayed
[in] cell The cell in the grid, the tooltip is displayed on
Returns:
True if the tooltip can be shown. Otherwise false.

Implemented in CTooltip.

TString GetText ( const CGrid grid,
const CGridCell cell 
) const [pure virtual]

Gets text to display it in the tooltip.

Parameters:
[in] grid The grid where the tooptip is displayed
[in] cell The cell in the grid, the tooltip is displayed on
Returns:
Text to be displayed in the tooltip.

Implemented in CHtmlTooltip, and CTooltip.