MGUI::CTRL_TOOLTIP Class Reference

#include <mgui/tooltip.h>

List of all members.

Public Member Functions

void Attach (Widget widget, bool DeleteOnCtrlDestroy=false)
bool CheckMotion (const XEvent &event, bool AutoHide=true)
bool CheckMotion (int x, int y, bool AutoHide=true)
 CTRL_TOOLTIP ()
void CTRL_TOOLTIP::Enable ()
void Detach ()
void Disable ()
INT32 GetDelay () const
int GetPixelDelta () const
int GetPriority () const
const STYLEGetStyle () const
const MISTRINGGetText () const
void Hide ()
bool IsDisabled () const
bool IsVisible () const
void SetDelay (INT32 delay)
void SetImage (const MGD::DEVICE &imgdev, const MGD::DEVICE_BINARY *maskdev=0, const LPOINT2D *pos=0)
void SetPixelDelta (int PixelDelta)
void SetPriority (int priority)
void SetStyle (const STYLE &style)
void SetText (const MISTRING &text)
void Show ()
virtual ~CTRL_TOOLTIP ()

Static Public Member Functions

static CTRL_TOOLTIPFindAttached (Widget widget)

Private Member Functions

virtual void v_OnHide ()
virtual void v_OnShow ()
virtual bool v_OnShowRequest (int x, int y)

Classes

struct  STYLE
 ToolTip style. More...


Detailed Description

Definition at line 55 of file tooltip.h.


Constructor & Destructor Documentation

MGUI::CTRL_TOOLTIP::CTRL_TOOLTIP (  ) 

Constructor.

virtual MGUI::CTRL_TOOLTIP::~CTRL_TOOLTIP (  )  [virtual]

Destructor.


Member Function Documentation

void MGUI::CTRL_TOOLTIP::Attach ( Widget  widget,
bool  DeleteOnCtrlDestroy = false 
)

Attach instance to Widget (X only).

Parameters:
widget  Widget to attach to
DeleteOnCtrlDestroy  Delete ToolTip instance when associated control is destroyed

bool MGUI::CTRL_TOOLTIP::CheckMotion ( const XEvent &  event,
bool  AutoHide = true 
)

bool MGUI::CTRL_TOOLTIP::CheckMotion ( int  x,
int  y,
bool  AutoHide = true 
)

void MGUI::CTRL_TOOLTIP::CTRL_TOOLTIP::Enable (  ) 

Enable automatic ToolTip display mechanism.

void MGUI::CTRL_TOOLTIP::Detach (  ) 

Detach instance from control.

void MGUI::CTRL_TOOLTIP::Disable (  ) 

Disable automatic ToolTip display mechanism.

ToolTip may still be shown by calling Show(). Does not hide ToolTip if presently showing. Each use of Disable() much be matched by call to Enable() to actually re-enable ToolTip

static CTRL_TOOLTIP* MGUI::CTRL_TOOLTIP::FindAttached ( Widget  widget  )  [static]

Find CTRL_TOOLTIP instance attached to Widget (X only).

Returns:
NULL if none attached.

INT32 MGUI::CTRL_TOOLTIP::GetDelay (  )  const [inline]

Get delay for automatic ToolTip display.

Returns:
Delay in milliseconds.

Definition at line 120 of file tooltip.h.

int MGUI::CTRL_TOOLTIP::GetPixelDelta (  )  const [inline]

Get amount of movement for automatically hiding ToolTip.

Returns:
Movement amount in pixels.

Definition at line 130 of file tooltip.h.

int MGUI::CTRL_TOOLTIP::GetPriority (  )  const [inline]

Get Priority for selecting amoung multiple ToolTips attached to same control.

Definition at line 134 of file tooltip.h.

const STYLE& MGUI::CTRL_TOOLTIP::GetStyle (  )  const [inline]

Get current style settings.

Definition at line 138 of file tooltip.h.

const MISTRING& MGUI::CTRL_TOOLTIP::GetText (  )  const [inline]

Get text to be displayed.

Returns:
Text string, will be blank if using label from attached control.

Definition at line 125 of file tooltip.h.

void MGUI::CTRL_TOOLTIP::Hide (  ) 

Hide ToolTip if visible.

This is usually done automatically unless disabled.

bool MGUI::CTRL_TOOLTIP::IsDisabled (  )  const [inline]

Determine if automatic display mechanism is disabled.

Manual display via Show/Hide is always allowed.

Definition at line 148 of file tooltip.h.

bool MGUI::CTRL_TOOLTIP::IsVisible (  )  const [inline]

Determine if ToolTip is presently visible.

Definition at line 152 of file tooltip.h.

void MGUI::CTRL_TOOLTIP::SetDelay ( INT32  delay  ) 

Set delay for automatic ToolTip display.

Parameters:
delay  ToolTip popup delay in milliseconds

void MGUI::CTRL_TOOLTIP::SetImage ( const MGD::DEVICE imgdev,
const MGD::DEVICE_BINARY maskdev = 0,
const LPOINT2D pos = 0 
)

Set image, optional mask and position for graphical ToolTip.

This does not actually display the ToolTip.

Parameters:
imgdev  Device containing associated image
maskdev  Optional device containing mask
pos  Optional position relative to cursor

void MGUI::CTRL_TOOLTIP::SetPixelDelta ( int  PixelDelta  )  [inline]

Set distance cursor must move to hide tooltip.

Note that if cursor moves outside attached control the tooltip will be hidden regardless of distance.

Parameters:
PixelDelta  Movement distance in screen pixels

Definition at line 171 of file tooltip.h.

void MGUI::CTRL_TOOLTIP::SetPriority ( int  priority  )  [inline]

Set priority if multiple CTRL_TOOLTIP instances are attached to the same control.

If multiple instances attached the one with the highest priority will be shown.

Parameters:
priority  Priority to set

Definition at line 177 of file tooltip.h.

void MGUI::CTRL_TOOLTIP::SetStyle ( const STYLE style  )  [inline]

Set style to use next time ToolTip text is shown.

Definition at line 182 of file tooltip.h.

void MGUI::CTRL_TOOLTIP::SetText ( const MISTRING text  ) 

Set text to show next time ToolTip is displayed.

Does not cause ToolTip to appear.

Parameters:
text  Text to show

void MGUI::CTRL_TOOLTIP::Show (  ) 

Show the ToolTip.

This is usually done automatically unless disabled.

virtual void MGUI::CTRL_TOOLTIP::v_OnHide (  )  [private, virtual]

Called after ToolTip is hidden.

Generally used to send notifications about action. Default implementation does nothing.

virtual void MGUI::CTRL_TOOLTIP::v_OnShow (  )  [private, virtual]

Called after ToolTip is shown.

Generally used to send notifications about action. Default implementation does nothing.

virtual bool MGUI::CTRL_TOOLTIP::v_OnShowRequest ( int  x,
int  y 
) [private, virtual]

Override to perform custom ToolTip creating.

When overriding, use SetText or SetImage to control what will be displayed.

Returns:
true to show ToolTip, false to not. Default implementation returns 'true' unless no text or image is available.


The documentation for this class was generated from the following file:
Generated on Thu Apr 26 04:48:29 2007 for TNTsdk by  doxygen 1.5.2