C# 클래스 Smrf.GraphicsLib.ToolTipTrackerBase

Helper class for displaying tooltips.
This is meant for use by a Control object that displays various objects within its window and wants to show a tooltip for each object. The ToolTip class in the FCL makes it easy to show a single tooltip for an entire control, but it does not support different tooltips for different parts of the control's window.

To use ToolTipTracker, call OnMouseMoveOverObject from the control's MouseMove event handler. If the mouse is currently over an object that has a tooltip associated with it, pass the object as the method's oObjectToTrack parameter. Otherwise, pass null. Also, call OnMouseMoveOverObject with a null parameter from the control's MouseLeave event handler.

If the mouse remains over an object for a period of milliseconds, ToolTipTracker fires a event. The event arguments include the object being tracked.

A HideToolTip event is fired when the tooltip should be hidden. This occurs HideDelayMs after the event fires if the mouse remains over the object, or immediately if OnMouseMoveOverObject(null) is called.

Note that ToolTipTracker does not actually show or hide the tooltip; that's up to the application. The easiest way to do this is to create a child ToolTipPanel control and call its Show and Hide methods in response to the ShowToolTip and HideToolTip events.

If the mouse is moved to another object within ReshowDelayMs milliseconds, another ShowToolTip event is fired. Otherwise, the waiting period reverts to ShowDelayMs.

Call Reset to reset ToolTipTracker to its initial state. This forces a HideToolTip event if a tooltip is showing.

IMPORTANT

The control must call Dispose() from its own Dispose method. This prevents timer-based events from firing after the control no longer has a handle.

상속: Object, IDisposable
파일 보기 프로젝트 열기: 2014-sed-team3/term-project

보호된 프로퍼티들

프로퍼티 타입 설명
m_bDisposed System.Boolean
m_iHideDelayMs System.Int32
m_iReshowDelayMs System.Int32
m_iShowDelayMs System.Int32
m_iState State
m_oTimer IToolTipTimer
m_oTrackedObject Object

공개 메소드들

메소드 설명
Dispose ( ) : void
OnMouseMoveOverObject ( Object objectToTrack ) : void
Reset ( ) : void
ToolTipTrackerBase ( IToolTipTimer toolTipTimer ) : System

Initializes a new instance of the ToolTipTrackerBase class.

보호된 메소드들

메소드 설명
ChangeState ( State iState, Object oObjectToTrack ) : void
Dispose ( System.Boolean bDisposing ) : void
FireHideToolTipEvent ( Object oObject ) : void
FireShowToolTipEvent ( Object oObject ) : void
TimerTick ( Object oSource, EventArgs oEventArgs ) : void
ValidateDelayProperty ( Int32 iValue, String sPropertyName ) : void

비공개 메소드들

메소드 설명
AssertValid ( ) : void

메소드 상세

ChangeState() 보호된 메소드

protected ChangeState ( State iState, Object oObjectToTrack ) : void
iState State
oObjectToTrack Object
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( System.Boolean bDisposing ) : void
bDisposing System.Boolean
리턴 void

FireHideToolTipEvent() 보호된 메소드

protected FireHideToolTipEvent ( Object oObject ) : void
oObject Object
리턴 void

FireShowToolTipEvent() 보호된 메소드

protected FireShowToolTipEvent ( Object oObject ) : void
oObject Object
리턴 void

OnMouseMoveOverObject() 공개 메소드

public OnMouseMoveOverObject ( Object objectToTrack ) : void
objectToTrack Object
리턴 void

Reset() 공개 메소드

public Reset ( ) : void
리턴 void

TimerTick() 보호된 메소드

protected TimerTick ( Object oSource, EventArgs oEventArgs ) : void
oSource Object
oEventArgs System.EventArgs
리턴 void

ToolTipTrackerBase() 공개 메소드

Initializes a new instance of the ToolTipTrackerBase class.
public ToolTipTrackerBase ( IToolTipTimer toolTipTimer ) : System
toolTipTimer IToolTipTimer /// The timer to use internally. See the /// interface for details. ///
리턴 System

ValidateDelayProperty() 보호된 메소드

protected ValidateDelayProperty ( Int32 iValue, String sPropertyName ) : void
iValue System.Int32
sPropertyName String
리턴 void

프로퍼티 상세

m_bDisposed 보호되어 있는 프로퍼티

protected Boolean,System m_bDisposed
리턴 System.Boolean

m_iHideDelayMs 보호되어 있는 프로퍼티

protected Int32,System m_iHideDelayMs
리턴 System.Int32

m_iReshowDelayMs 보호되어 있는 프로퍼티

protected Int32,System m_iReshowDelayMs
리턴 System.Int32

m_iShowDelayMs 보호되어 있는 프로퍼티

protected Int32,System m_iShowDelayMs
리턴 System.Int32

m_iState 보호되어 있는 프로퍼티

protected State m_iState
리턴 State

m_oTimer 보호되어 있는 프로퍼티

protected IToolTipTimer m_oTimer
리턴 IToolTipTimer

m_oTrackedObject 보호되어 있는 프로퍼티

protected Object m_oTrackedObject
리턴 Object