Table of Contents

Interface IInfoProvider

Namespace
CADability.UserInterface
Assembly
CADability.dll

Implemented by controls that want more control over what the info popup (tooltip) shows, e.g. texts that change dynamically or different texts depending on the position of the cursor.

public interface IInfoProvider

Methods

GetInfoText(int, InfoLevelMode)

Returns the text to show in the info popup for the given position index and level of detail.

string GetInfoText(int Index, InfoLevelMode Level)

Parameters

Index int

the position index from GetPositionIndex(Point)

Level InfoLevelMode

the level of detail (short or detailed)

Returns

string

the text to show

GetPositionIndex(Point)

Returns an index that tells which of several texts is to be shown at the cursor position.

int GetPositionIndex(Point ScreenCursorPosition)

Parameters

ScreenCursorPosition Point

the position of the cursor in screen coordinates

Returns

int

the index of the text, 0 when there is only one text, or -1 when nothing is to be shown at this position

GetVerticalPosition(int)

Retursn a preferred position for the InfoPopup (tooltip) relative to the cursor position. If 0 is returned, the InfoPopup will find a default position. A positive value is the number of pixels below the cursor position, a negative value above the cursor position.

int GetVerticalPosition(int Index)

Parameters

Index int

Returns

int