private void OnSizeAllocated(object sender, Gtk.SizeAllocatedArgs args) { if ((this.child != null)) { this.child.Allocation = args.Allocation; } }
// system event handlers protected virtual void OnWidgetResize(object o, Gtk.SizeAllocatedArgs args) { if (initted) { ResizeProjectionMatrix(args.Allocation); } }
static void Size_Allocated (object obj, SizeAllocatedArgs args) { Rectangle rect = args.Allocation; if (rect.Width == 0 || rect.Height == 0) Console.WriteLine ("ERROR: Allocation is null!"); Console.WriteLine ("Size: ({0}, {1})", rect.Width, rect.Height); }
void Child_SizeAllocated(object o, SizeAllocatedArgs args) { if (!alloction.Equals(args.Allocation)) { alloction = args.Allocation; JudgePostion(); } }
void HandleBarFrameSizeAllocated (object o, SizeAllocatedArgs args) { if (!lastFrameSize.Equals (args.Allocation.Size)) { lastFrameSize = args.Allocation.Size; if (autoShowFrame != null) bar.Frame.UpdateSize (bar, autoShowFrame); } }
protected virtual void OnScrolledInfoSizeAllocated(object o, Gtk.SizeAllocatedArgs args) { if (infoLabel.WidthRequest != scrolledInfo.Allocation.Width) { infoLabel.WidthRequest = scrolledInfo.Allocation.Width; labelTemplateTitle.WidthRequest = scrolledInfo.Allocation.Width; } }
protected void OnHpanedReportSizeAllocated(object o, Gtk.SizeAllocatedArgs args) { if (args.Allocation.Width != hpanedWidth) { hpanedWidth = args.Allocation.Width; SetHPanedPosition(); } }
private void CustomExpender_SizeAllocated(object o, SizeAllocatedArgs args) { if (this.Parent == null || this.Parent.Parent == null) { return; } this.Parent.Parent.QueueDraw(); }
void HandleViewTextEditorhandleSizeAllocated (object o, SizeAllocatedArgs args) { int newX = textEditor.Allocation.Width - this.Allocation.Width - 8; var containerChild = ((TextEditor.EditorContainerChild)textEditor [frame]); if (newX != containerChild.X) { this.entryLineNumber.WidthRequest = textEditor.Allocation.Width / 4; containerChild.X = newX; textEditor.QueueResize (); } }
void HandleViewTextEditorhandleSizeAllocated (object o, SizeAllocatedArgs args) { int newX = widget.TextEditor.Allocation.Width - this.Allocation.Width - 8; TextEditorContainer.EditorContainerChild containerChild = ((Mono.TextEditor.TextEditorContainer.EditorContainerChild)widget.TextEditorContainer[container]); if (newX != containerChild.X) { this.entryLineNumber.WidthRequest = widget.Vbox.Allocation.Width / 4; containerChild.X = newX; widget.TextEditorContainer.QueueResize (); } }
void OnSizeAllocated(object o, SizeAllocatedArgs args) { if (refreshed) { refreshed = false; return; } if (Allocation.Width != old_width) Refresh (); old_width = Allocation.Width; refreshed = true; }
protected void OnFixedBgSizeAllocated(object o, SizeAllocatedArgs args) { if (fixedBgAllocateFlag) { fixedBgAllocateFlag = false; return; } fixedBgAllocateFlag = true; Gtk.Requisition ireq = mainImageBg.SizeRequest (); Gtk.Fixed.FixedChild w = ((global::Gtk.Fixed.FixedChild) (fixedBg [mainImageBg])); w.X = args.Allocation.Width - ireq.Width; w.Y = args.Allocation.Height - ireq.Height + IMAGE_BG_OFFSSETY; }
private static void OnSizeAllocated(object obj, SizeAllocatedArgs args) { Window window = obj as Window; if (obj == null) return; Gdk.Rectangle allocation = args.Allocation; if (window.IsRealized) { window.GdkWindow.MoveResize (allocation.X, allocation.Y, allocation.Width, allocation.Height); } }
void HandleSizeAllocated(object o, SizeAllocatedArgs args) { width=args.Allocation.Width; height=args.Allocation.Height; if (oldwidth == width && oldheight == height) return; oldwidth = width; oldheight = height; if(baseimage.Pixbuf==null) return; dispimage.Pixbuf=baseimage.Pixbuf.ScaleSimple(args.Allocation.Width,args.Allocation.Height,InterpType.Bilinear); }
protected virtual void OnSizeAllocated(object o, Gtk.SizeAllocatedArgs args) { /* * int w; * Gdk.Rectangle a; * w = (hexTV.Allocation.Width+asciiTV.Allocation.Width); * a = hexTV.Allocation; * a.Height = 400; * a.Width = (w * 2) /3; * hexTV.Allocation = a; * a.X += a.Width; * a.Width /= 2; * asciiTV.Allocation=a; */ }
private void OnSizeAllocated(object o, Gtk.SizeAllocatedArgs e) { windowWidth = e.Allocation.Width; windowHeight = e.Allocation.Height; //table.Resize ((uint)windowWidth, (uint)windowHeight); uint width = (uint)(windowWidth / 3); uint height = (uint)(windowHeight / 3); foreach (CameraView view in views) { view.Resize(width, height); } //Console.WriteLine ("Resize " + windowWidth + "px " + windowHeight+" px"); }
private void MainResized(object obj, Gtk.SizeAllocatedArgs args) { // If the details pane pops up and covers the selected tile, // fix it. Gtk.Container mainChild = main.Child as Gtk.Container; if (mainChild != null) { Gtk.Widget focusChild = mainChild.FocusChild; mainChild.FocusChild = null; mainChild.FocusChild = focusChild; GroupView gv = mainChild as GroupView; if (gv != null) { gv.AdjustCategories(args.Allocation.Height); } } }
void OnResized(object s, Gtk.SizeAllocatedArgs a) { Stetic.Wrapper.Container cont = wrapper as Stetic.Wrapper.Container; if (cont != null) { if (cont.DesignHeight != DesignHeight) { cont.DesignHeight = DesignHeight; } if (cont.DesignWidth != DesignWidth) { cont.DesignWidth = DesignWidth; } } if (DesignSizeChanged != null) { DesignSizeChanged(this, a); } }
protected void OnStageVboxSizeAllocated(object o, Gtk.SizeAllocatedArgs args) { if (stage_vbox.Children.Length == 0) { stage_vbox.QueueDraw(); } else { int frame = 7; // Search for stages outer rect int l = stage_vbox.Children[0].Allocation.Left + frame; int t = stage_vbox.Children[0].Allocation.Top + frame; int r = stage_vbox.Children[0].Allocation.Right - frame; int b = stage_vbox.Children[0].Allocation.Bottom - frame; for (int i = 1; i < stage_vbox.Children.Length; i++) { if (stage_vbox.Children[i].Allocation.Left + frame < l) { l = stage_vbox.Children[i].Allocation.Left + frame; } if (stage_vbox.Children[i].Allocation.Top + frame < t) { t = stage_vbox.Children[i].Allocation.Top + frame; } if (stage_vbox.Children[i].Allocation.Right - frame > r) { r = stage_vbox.Children[i].Allocation.Right - frame; } if (stage_vbox.Children[i].Allocation.Bottom - frame > b) { b = stage_vbox.Children[i].Allocation.Bottom - frame; } } stage_vbox.QueueDrawArea(0, 0, stage_vbox.Allocation.Width, t); stage_vbox.QueueDrawArea(0, 0, l, stage_vbox.Allocation.Height); stage_vbox.QueueDrawArea(r, 0, stage_vbox.Allocation.Width, stage_vbox.Allocation.Height); stage_vbox.QueueDrawArea(0, b, stage_vbox.Allocation.Width, stage_vbox.Allocation.Height); } }
// This handler gets fired when the glArea widget is re-sized void OnSizeAllocated(object o, Gtk.SizeAllocatedArgs e) { height = e.Allocation.Height; width = e.Allocation.Width; float parentRel = (float)width / height; Console.WriteLine(parentRel); // Avoid devide-by-zero error if (height == 0) { height = 1; } gl.glViewport(0, 0, width, height); gl.glMatrixMode(gl.GL_PROJECTION); gl.glLoadIdentity(); glu.gluPerspective(45.0f, (float)width / (float)height, 1f, 100.0f); gl.glTranslatef(0.0f, 0.0f, -10.0f); gl.glMatrixMode(gl.GL_MODELVIEW); gl.glLoadIdentity(); }
protected virtual void OnDrawingareaSizeAllocated(object o, Gtk.SizeAllocatedArgs args) { // Center the source in the drawing area if its size // is smaller than the drawing area one if (args.Allocation.Width > sourceWidth) { xOffset = (Allocation.Width - sourceWidth) / 2; } else { xOffset = 0; } if (args.Allocation.Height > sourceHeight) { yOffset = (Allocation.Height - sourceHeight) / 2; } else { yOffset = 0; } }
void HandleSizeAllocated(object o, Gtk.SizeAllocatedArgs args) { if (SizeFunc != null) { var req = Math.Min(SizeFunc(), textEditor.Allocation.Width - border * 2); if (req != wRequest) { wRequest = req; QueueResize(); } } else { if (Allocation.Width > textEditor.Allocation.Width - border * 2) { if (textEditor.Allocation.Width - border * 2 > 0) { QueueResize(); } } } Resize(Allocation); }
public void ScrollToBottom(object sender, Gtk.SizeAllocatedArgs e) { RecvChatWidget.ScrollToIter(RecvChatWidget.Buffer.EndIter, 0, false, 0, 0); }
void HandleSwSizeAllocated (object o, SizeAllocatedArgs args) { if (!initialLogShow && outputView.Visible) { var val = (double) ((double) control.Position / (double) control.Allocation.Width); PropertyService.Set (logSeparatorPositionPropertyName, val); } }
private void ScrollToEnd(object sender, Gtk.SizeAllocatedArgs e) { textviewConsole.ScrollToIter(textviewConsole.Buffer.EndIter, 0, false, 0, 0); }
void HandleViewTextEditorhandleSizeAllocated (object o, SizeAllocatedArgs args) { if (frame == null || textEditor == null) return; int newX = textEditor.Allocation.Width - Allocation.Width - 8; TextEditor.EditorContainerChild containerChild = ((TextEditor.EditorContainerChild)textEditor [frame]); if (newX != containerChild.X) { searchEntry.WidthRequest = textEditor.Allocation.Width / 3; containerChild.X = newX; textEditor.QueueResize (); } }
protected void OnSizeAllocated(object o, SizeAllocatedArgs args) { Logger.Debug("Size was allocated"); if (!moving) { Logger.Debug("Setting up to resize"); GLib.Idle.Add (MovePreview); moving = true; } else moving = false; }
protected virtual void OnBoxInfoSizeAllocated(object o, Gtk.SizeAllocatedArgs args) { }
public void ScrollToBottomOnRender(object sender, Gtk.SizeAllocatedArgs e) { _textfieldOutput.ScrollToIter(_textfieldOutput.Buffer.EndIter, 0, true, 0, 0); }
private void OnSideSizeAllocated(object o, SizeAllocatedArgs args) { SetSizeRequest (-1, args.Allocation.Height + (Allocation.Height - args.Allocation.Height)); }
void onResize(object o, SizeAllocatedArgs args) { MainClass.win.setmapwidget(map1); if (requested == true) { if (args.Allocation.Width > 100) { requested = false; map1.SetAsWater(); // map1.set_optimal_size(args.Allocation.Width); map1.SetGridRegion(MainClass.client.Network.CurrentSim.Handle); } } }
void SelectionSizeAllocated(object obj, Gtk.SizeAllocatedArgs args) { PlaceSelectionBoxInternal(selectionWidget); }
private void on_app1_size_allocate(object obj, SizeAllocatedArgs args) { int width; int height; app1.GetSize(out width, out height); if(width >= 1000) normalGUI = true; else normalGUI = false; if(normalGUI != normalGUIOld) { Log.WriteLine("Change Size. New is normal? -> " + normalGUI.ToString()); normalGUIOld = normalGUI; changeGUIAspect(); } }
void HandleSizeAllocated(object o, Gtk.SizeAllocatedArgs args) { AdjustPositionInEditor(Allocation); }
private void ScrollMessages(object sender, Gtk.SizeAllocatedArgs e) { messages.ScrollToIter(messages.Buffer.EndIter, 0, false, 0, 0); }
//滚轮滚动到底部 protected void ScrollToEnd(object sender, Gtk.SizeAllocatedArgs e) { textview1.ScrollToIter(textview1.Buffer.EndIter, 0, false, 0, 0); }
void OnTreeSizeChanged (object s, SizeAllocatedArgs a) { int x, y, w, h; GetPosition (out x, out y); h = (int)sw.Vadjustment.Upper; w = (int)sw.Hadjustment.Upper; int dy = y + h - this.Screen.Height; int dx = x + w - this.Screen.Width; if (dy > 0 && sw.VscrollbarPolicy == PolicyType.Never) { sw.VscrollbarPolicy = PolicyType.Always; sw.HeightRequest = h - dy - 10; } else if (sw.VscrollbarPolicy == PolicyType.Always && sw.Vadjustment.Upper == sw.Vadjustment.PageSize) { sw.VscrollbarPolicy = PolicyType.Never; sw.HeightRequest = -1; } if (dx > 0 && sw.HscrollbarPolicy == PolicyType.Never) { sw.HscrollbarPolicy = PolicyType.Always; sw.WidthRequest = w - dx - 10; } else if (sw.HscrollbarPolicy == PolicyType.Always && sw.Hadjustment.Upper == sw.Hadjustment.PageSize) { sw.HscrollbarPolicy = PolicyType.Never; sw.WidthRequest = -1; } // Force a redraw of the whole window. This is a workaround for bug 7538 QueueDraw (); }
void onResize(object o,SizeAllocatedArgs args) { size=args.Allocation.Width<args.Allocation.Height?args.Allocation.Width:args.Allocation.Height; size=size/3; if(oldsize==size) return; oldsize=size; for(int x = 0; x < 9; x++) { maps[x].set_optimal_size(size); } }
protected void OnTextview1SizeAllocated (object o, SizeAllocatedArgs args) { vpaned1.Position = vpaned1.Allocation.Height; //add -50 for correct size of description box }
void OnTreeSizeChanged (object s, SizeAllocatedArgs a) { int x,y,w,h; GetPosition (out x, out y); h = (int) sw.Vadjustment.Upper; w = (int) sw.Hadjustment.Upper; int dy = y + h - this.Screen.Height; int dx = x + w - this.Screen.Width; if (dy > 0 && sw.VscrollbarPolicy == PolicyType.Never) { sw.VscrollbarPolicy = PolicyType.Always; sw.HeightRequest = h - dy - 10; } else if (sw.VscrollbarPolicy == PolicyType.Always && sw.Vadjustment.Upper == sw.Vadjustment.PageSize) { sw.VscrollbarPolicy = PolicyType.Never; sw.HeightRequest = -1; } if (dx > 0 && sw.HscrollbarPolicy == PolicyType.Never) { sw.HscrollbarPolicy = PolicyType.Always; sw.WidthRequest = w - dx - 10; } else if (sw.HscrollbarPolicy == PolicyType.Always && sw.Hadjustment.Upper == sw.Hadjustment.PageSize) { sw.HscrollbarPolicy = PolicyType.Never; sw.WidthRequest = -1; } }
void SizeAllocatedHandler (object obj, SizeAllocatedArgs args) { Gdk.Rectangle rect = args.Allocation; if (rect.Equals (Gdk.Rectangle.Zero)) Console.WriteLine ("ERROR: Allocation is null!"); int nrows = Allocation.Height / line_height; if (nrows != rows){ rows = nrows; Reload (); } if (args.Allocation.Width != old_width) ellipses.Clear (); old_width = args.Allocation.Width; }
static void SizeAllocatedHandler (object obj, SizeAllocatedArgs args) { rect = args.Allocation; }
private void OnSizeAllocated(object o, SizeAllocatedArgs args) { foreach(iFolderViewGroup group in viewGroups) { group.OnSizeAllocated(o, args); } }
void OnItemSizeChange (object o, SizeAllocatedArgs args) { if (gettingSize || !gotSize) return; int os; if (calculatedSizes.TryGetValue ((Gtk.Widget) o, out os)) { int ns = (Orientation == Orientation.Horizontal ? args.Allocation.Width : args.Allocation.Height); if (os != ns) { Gtk.Application.Invoke (delegate { OnItemChange (null, null); }); } } }
void SizeAllocatedHandler (object obj, SizeAllocatedArgs args) { Gdk.Rectangle rect = args.Allocation; if (rect.Equals (Gdk.Rectangle.Zero)) Console.WriteLine ("ERROR: Allocation is null!"); SizeChanged (rect.Width, rect.Height); }
protected void onSize(object o, SizeAllocatedArgs args) { if (circuit != null) circuit.draw(); }
void HandleSwSizeAllocated (object o, SizeAllocatedArgs args) { if (!initialLogShow && outputView.Visible) { var val = (double) ((double) control.Position / (double) control.Allocation.Width); LogSeparatorPosition.Value = val; } }
public void Scroll2(object sender, Gtk.SizeAllocatedArgs e) { logtextview.ScrollToIter(logtextview.Buffer.EndIter, 0, false, 0, 0); }
void HandleControlSizeAllocated (object o, SizeAllocatedArgs args) { if (initialLogShow && outputView.Visible) { SetInitialOutputViewSize (args.Allocation.Width); initialLogShow = false; } }
private void HandleHostSizeAllocated(object o, SizeAllocatedArgs args) { Relocate (); }
void SizeAllocatedHandler (object o, SizeAllocatedArgs args) { Render(); }
protected virtual void OnTextview(object o, Gtk.SizeAllocatedArgs args) { calcwidth(); }
void HandleSizeAllocated(object o, SizeAllocatedArgs args) { this.SetSizeRequest(400, 64); }
private void OnSizeAllocated(object o, SizeAllocatedArgs args) { // FIXME: Do we really need to do resizing this way? It blows. Gdk.Rectangle rect = args.Allocation; uint requested_columns = (uint) rect.Width/150; if (requested_columns == 0) requested_columns = 1; if (similar_items_table.NColumns != requested_columns) { // Need to clear the table before we resize it, apparently. foreach (Widget child in similar_items_table.Children) similar_items_table.Remove (child); similar_items_table.Resize (DEFAULT_SIMILAR_TABLE_ROWS, requested_columns); RenderSimilarArtists (); } }