/// <summary> /// Triggered when the drawing area is configured. /// </summary> private void OnConfigure( object obj, ConfigureEventArgs args) { // Pull out some fields EventConfigure ev = args.Event; Window window = ev.Window; int width = Allocation.Width; int height = Allocation.Height; int min = Math.Min(width, height); viewport.Height = height; viewport.Width = width; // Create the backing pixmap pixmap = new Pixmap(window, width, height, -1); // Update the current pane if (Sprite != null) { Sprite.Height = Sprite.Width = ((int)(min * 0.75)); } // Mark ourselves as done args.RetVal = true; }
protected override bool OnConfigureEvent(EventConfigure evnt) { var result = base.OnConfigureEvent(evnt); _renderer.Window.SetSize(AllocatedWidth, AllocatedHeight); return(result); }
/// <summary> /// Called whenever the widget is resized. /// </summary> /// <param name="evnt"></param> /// <returns></returns> protected override bool OnConfigureEvent(EventConfigure evnt) { bool result = base.OnConfigureEvent(evnt); _GraphicsContext?.Update(_WindowInfo); return(result); }
protected override bool OnConfigureEvent(EventConfigure evnt) { var result = base.OnConfigureEvent(evnt); Gdk.Monitor monitor = Display.GetMonitorAtWindow(Window); _renderer.Window.SetSize(evnt.Width * monitor.ScaleFactor, evnt.Height * monitor.ScaleFactor); return(result); }
protected override bool OnConfigureEvent(EventConfigure evnt) { if (NativeWindow == null) { NativeWindow = RetrieveNativeWindow(); WaitEvent.Set(); } return(base.OnConfigureEvent(evnt)); }
protected override bool OnConfigureEvent(EventConfigure ev) { if (surface != null) { surface.Dispose(); } surface = ev.Window.CreateSimilarSurface(Cairo.Content.Color, AllocatedWidth, AllocatedHeight); ClearSurface(); return(true); }
protected override bool OnConfigureEvent(EventConfigure evnt) { var newSize = new Size(evnt.Width, evnt.Height); if (newSize != _clientSize) { Resized(newSize); } return(true); }
protected override bool OnConfigureEvent(EventConfigure evnt) { bool result = base.OnConfigureEvent(evnt); Gdk.Monitor monitor = Display.GetMonitorAtWindow(Window); _windowWidth = evnt.Width * monitor.ScaleFactor; _windowHeight = evnt.Height * monitor.ScaleFactor; Renderer?.Window?.SetSize(_windowWidth, _windowHeight); return(result); }
/// <summary> /// Called when [configure event]. /// </summary> /// <param name="evnt">The evnt.</param> /// <returns>Configured success</returns> protected override bool OnConfigureEvent(EventConfigure evnt) { bool result = base.OnConfigureEvent(evnt); this.isResized = true; if (this.gameApp != null && evnt.Width > 1 && evnt.Height > 1) { this.gameApp.ResizeScreen(evnt.Width, evnt.Height); } this.isResized = false; return(result); }
protected override bool OnConfigureEvent(EventConfigure ev) { foreach (Device d in GdkWindow.Display.ListDevices()) { if (d.Source == InputSource.Pen || d.Source == InputSource.Eraser || d.Source == InputSource.Mouse) { d.SetMode(InputMode.Screen); } } return(true); }
protected override void OnConfigure(object o, ConfigureEventArgs args) { EventConfigure eventConfigure = args.Event; Gdk.Window window = eventConfigure.Window; pixmap = new Pixmap(window, Allocation.Width, Allocation.Height, -1); // Initialize the pixmap to white pixmap.DrawRectangle(Style.WhiteGC, true, 0, 0, Allocation.Width, Allocation.Height); // We've handled the configure event, no need for further processing. args.RetVal = true; }
protected override bool OnConfigureEvent(EventConfigure evnt) { if (win != null) { int x, y; GetPosition(out x, out y); win.Move(x, y + margin); win.WidthRequest = evnt.Width; win.HeightRequest = evnt.Height; ShowAll(); win.KeepAbove = true; } return(base.OnConfigureEvent(evnt)); }
/// <summary> /// Triggered when the drawing area is configured. /// </summary> private void OnConfigure( object obj, ConfigureEventArgs args) { // Pull out some fields and figure out the sizes EventConfigure ev = args.Event; Window window = ev.Window; int width = Allocation.Width; int height = Allocation.Height; int min = Math.Min(width, height); // Figure out the tile height tileSize = min / Game.Board.Size; log.Info("New tile size: {0}px", tileSize); // Adjust the viewport height viewport.Height = height; viewport.Width = width; // Create the backing pixmap pixmap = new Pixmap(window, width, height, -1); // We moved, so rapid move the tiles foreach (ISprite sprite in sprites) { ContainerSprite cs = sprite as ContainerSprite; if (cs != null) { cs.FireInvalidate(); cs.X = cs.TokenSprite.X = tileSize * cs.TokenSprite.Token.Column; cs.FireInvalidate(); } } // Mark ourselves as done QueueDraw(); args.RetVal = true; }
/// <summary> /// Triggered when the drawing area is configured. /// </summary> private void OnConfigure( object obj, ConfigureEventArgs args) { // Pull out some fields EventConfigure ev = args.Event; Window window = ev.Window; int width = Allocation.Width; int height = Allocation.Height; // Create the backing pixmap pixmap = new Pixmap(window, width, height, -1); // Update the current pane // TODO, there is a bug with this and I don't know why if (currentPane != null) { currentPane.Configure(width, height - 50); } // Mark ourselves as done args.RetVal = true; }
protected override bool OnConfigureEvent(EventConfigure evnt) { base.OnConfigureEvent(evnt); return(false); }
protected override bool OnConfigureEvent(EventConfigure evnt) { ((DefaultWorkbench)IdeApp.Workbench.RootWindow).SetActiveWidget(Focus); return(base.OnConfigureEvent(evnt)); }
protected override bool OnConfigureEvent(EventConfigure evnt) { UpdateRotationCenter(); EnsureInitialDrawn(); return(base.OnConfigureEvent(evnt)); }
protected override bool OnConfigureEvent(EventConfigure evnt) { pixmap = null; return(base.OnConfigureEvent(evnt)); }
protected override bool OnConfigureEvent(EventConfigure evnt) { Refresh(); return(base.OnConfigureEvent(evnt)); }