Ejemplo n.º 1
0
 /// <summary> Handle the Enter event. </summary>
 /// <param name="source"> The widget, the Enter event is assigned to. <see cref="XrwRectObj"/> </param>
 /// <param name="e"> The event data. <see cref="XrwCrossingEvent"/> </param>
 /// <remarks> Set XrwCrossingEvent. Set result to nonzero to stop further event processing. </remarks>
 protected void HandleEnterDefault(XrwRectObj source, XrwCrossingEvent e)
 {
     _focused = true;
     if (XrwObject.SendExposeEvent(_display, _window, _window) == 0)
     {
         Console.WriteLine(CLASS_NAME + "::HandleFocusIn () ERROR. Can not send expose event.");
     }
     e.Result = 1;
 }
Ejemplo n.º 2
0
        /// <summary> Handle the Enter event. </summary>
        /// <param name="e"> The event data. <see cref="XawCrossingEvent"/> </param>
        /// <remarks> Set XawCrossingEvent. Set result to nonzero to stop further event processing. </remarks>
        internal virtual void OnEnter(XrwCrossingEvent e)
        {
            EnterDelegate enter = Enter;

            if (enter != null)
            {
                enter(this, e);
            }
        }
Ejemplo n.º 3
0
        /// <summary> Handle the Leave event. </summary>
        /// <param name="e"> The event data. <see cref="XawCrossingEvent"/> </param>
        /// <remarks> Set XawCrossingEvent. Set result to nonzero to stop further event processing. </remarks>
        internal virtual void OnLeave(XrwCrossingEvent e)
        {
            LeaveDelegate leave = Leave;

            if (leave != null)
            {
                leave(this, e);
            }
        }
Ejemplo n.º 4
0
        /// <summary> Handle the Leave event. </summary>
        /// <param name="source"> The widget, the Leave event is assigned to. <see cref="XrwRectObj"/> </param>
        /// <param name="e"> The event data. <see cref="XrwCrossingEvent"/> </param>
        /// <remarks> Set XrwCrossingEvent. Set result to nonzero to stop further event processing. </remarks>
        protected void HandleLeaveDefault(XrwRectObj source, XrwCrossingEvent e)
        {
            _focused = false;
            _pressed = false;

            if (XrwObject.SendExposeEvent(_display, _window, _window) == 0)
            {
                Console.WriteLine(CLASS_NAME + "::HandleFocusOut () ERROR. Can not send expose event.");
            }
            OnSwitchedOff();
            e.Result = 1;
        }
Ejemplo n.º 5
0
        /// <summary> Handle the Leave event. </summary>
        /// <param name="source"> The widget, the FocusIn event is assigned to. <see cref="XrwRectObj"/> </param>
        /// <param name="e"> The event data. <see cref="XCrossingEvent"/> </param>
        /// <remarks> Set XrwCrossingEvent. Set result to nonzero to stop further event processing. </remarks>
        private void HandleLeaveDefault(XrwRectObj source, XrwCrossingEvent e)
        {
            _focused = false;
            XrwApplicationShell appShell = ApplicationShell;

            if (appShell != null)
            {
                if (XrwObject.SendExposeEvent(_display, _window, _window) == 0)
                {
                    Console.WriteLine(CLASS_NAME + "::HandleFocusOut () ERROR. Can not send expose event.");
                }
            }
            else
            {
                Console.WriteLine(CLASS_NAME + "::HandleFocusOut () ERROR. Can not investigate application shell.");
            }
            e.Result = 1;
        }