Пример #1
0
 /// <summary>
 /// <para>Method that is called when the mouse pointer leaves
 /// this widget.</para>
 /// </summary>
 ///
 /// <param name="child">
 /// <para>The child widget that contained the previous or final
 /// position, or <see langword="null"/> if no applicable child
 /// widget.</para>
 /// </param>
 ///
 /// <param name="x">
 /// <para>The X co-ordinate of the pointer position.</para>
 /// </param>
 ///
 /// <param name="y">
 /// <para>The Y co-ordinate of the pointer position.</para>
 /// </param>
 ///
 /// <param name="modifiers">
 /// <para>Button and shift flags that were active.</para>
 /// </param>
 ///
 /// <param name="mode">
 /// <para>The notification mode value from the event.</para>
 /// </param>
 ///
 /// <param name="detail">
 /// <para>The notification detail value from the event.</para>
 /// </param>
 protected virtual void OnLeave(Widget child, int x, int y,
                                ModifierMask modifiers,
                                CrossingMode mode,
                                CrossingDetail detail)
 {
     // Nothing to do in this class.
 }
Пример #2
0
 // Override the mouse leave event from Xsharp.
 protected override void OnLeave(Widget child, int x, int y,
                                 ModifierMask modifiers,
                                 CrossingMode mode,
                                 CrossingDetail detail)
 {
     if (sink != null)
     {
         sink.ToolkitMouseLeave();
     }
 }
	/// <summary>
	/// <para>Method that is called when the mouse pointer leaves
	/// this widget.</para>
	/// </summary>
	///
	/// <param name="child">
	/// <para>The child widget that contained the previous or final
	/// position, or <see langword="null"/> if no applicable child
	/// widget.</para>
	/// </param>
	///
	/// <param name="x">
	/// <para>The X co-ordinate of the pointer position.</para>
	/// </param>
	///
	/// <param name="y">
	/// <para>The Y co-ordinate of the pointer position.</para>
	/// </param>
	///
	/// <param name="modifiers">
	/// <para>Button and shift flags that were active.</para>
	/// </param>
	///
	/// <param name="mode">
	/// <para>The notification mode value from the event.</para>
	/// </param>
	///
	/// <param name="detail">
	/// <para>The notification detail value from the event.</para>
	/// </param>
	protected virtual void OnLeave(Widget child, int x, int y,
								   ModifierMask modifiers,
								   CrossingMode mode,
								   CrossingDetail detail)
			{
				// Nothing to do in this class.
			}
	// Override the mouse leave event from Xsharp.
	protected override void OnLeave(Widget child, int x, int y,
								    ModifierMask modifiers,
								    CrossingMode mode,
								    CrossingDetail detail)
			{
				if(sink != null)
				{
					sink.ToolkitMouseLeave();
				}
			}
	// Handle pointer leaves.
	protected override void OnLeave(Widget child, int x, int y,
								   ModifierMask modifiers,
								   CrossingMode mode,
								   CrossingDetail detail)
			{
				if(clickMode == HitTest.Outside)
				{
					Cursor = null;
				}
			}
	// Handle pointer enters.
	protected override void OnEnter(Widget child, int x, int y,
								   ModifierMask modifiers,
								   CrossingMode mode,
								   CrossingDetail detail)
			{
				if(clickMode == HitTest.Outside)
				{
					SetCursor(x, y);
				}
			}