private static void HandleConfigureEvent(object o, Gtk.ConfigureEventArgs args)
        {
            // HACK Haven't found another way to get both position and size update information to
            // try to retain the 'restored' window size, so we do this hacky thing. The hacky thing
            // is more extensively documented in the ConfigureUpdateEventTimer class.
            var window = o as Gtk.Window;

            ConfigureUpdateEventTimer.Validate(window);
        }
예제 #2
0
 void HandleConfigureEvent(object o, Gtk.ConfigureEventArgs args)
 {
     currentLocation = new Point(args.Event.X, args.Event.Y);
     if (Control.IsRealized && Widget.Loaded && oldLocation != currentLocation)
     {
         Widget.OnLocationChanged(EventArgs.Empty);
         oldLocation = currentLocation;
     }
     currentLocation = null;
 }
예제 #3
0
            public void HandleConfigureEvent(object o, Gtk.ConfigureEventArgs args)
            {
                var handler = Handler;

                handler.currentLocation = new Point(args.Event.X, args.Event.Y);
                if (handler.Control.IsRealized && handler.Widget.Loaded && oldLocation != handler.currentLocation)
                {
                    handler.Callback.OnLocationChanged(handler.Widget, EventArgs.Empty);
                    oldLocation = handler.currentLocation;
                }
                handler.currentLocation = null;
            }
예제 #4
0
        void OnConfigureEvent(object o, Gtk.ConfigureEventArgs args)
        {
            var evnt = args.Event;

            args.RetVal = true;
            var newSize = new Size(evnt.Width, evnt.Height);

            if (newSize != _lastClientSize)
            {
                Resized(newSize);
                _lastClientSize = newSize;
            }
        }
예제 #5
0
파일: GtkWindow.cs 프로젝트: wnf0000/Eto
            public void HandleConfigureEvent(object o, Gtk.ConfigureEventArgs args)
            {
                var handler = Handler;

                if (handler == null)
                {
                    return;
                }
                handler.currentLocation = new Point(args.Event.X, args.Event.Y);
                if (handler.Control.IsRealized && handler.Widget.Loaded && oldLocation != handler.currentLocation)
                {
                    handler.Callback.OnLocationChanged(handler.Widget, EventArgs.Empty);
                    if (handler.WindowState == WindowState.Normal)
                    {
                        handler.restoreBounds = handler.Widget.Bounds;
                    }
                    oldLocation = handler.currentLocation;
                }
                handler.currentLocation = null;
            }
예제 #6
0
        void OnConfigureEvent(object o, Gtk.ConfigureEventArgs args)
        {
            var evnt = args.Event;

            args.RetVal = true;
            var newSize = new Size(evnt.Width, evnt.Height);

            if (newSize != _lastClientSize)
            {
                Resized(newSize);
                _lastClientSize = newSize;
            }

            var newPosition = new Point(evnt.X, evnt.Y);

            if (newPosition != _lastPosition)
            {
                PositionChanged(newPosition);
                _lastPosition = newPosition;
            }
        }
예제 #7
0
 void HandleConfigureEvent(object o, Gtk.ConfigureEventArgs args)
 {
     ApplicationContext.InvokeUserCode(delegate {
         EventSink.OnBoundsChanged(Bounds);
     });
 }
예제 #8
0
 void HandleConfigureEvent(object o, Gtk.ConfigureEventArgs args)
 {
     controller.HandleEvent(args.Event);
 }