internal override void Write(XmlWriter writer) { base.Write(writer); writer.WriteAttributeString("id", item.Id); writer.WriteAttributeString("visible", visibleFlag.ToString()); writer.WriteAttributeString("status", status.ToString()); if (status == DockItemStatus.AutoHide) { writer.WriteAttributeString("autoHidePosition", barDocPosition.ToString()); } if (autoHideSize != -1) { writer.WriteAttributeString("autoHideSize", autoHideSize.ToString()); } if (!floatRect.Equals(Gdk.Rectangle.Zero)) { writer.WriteAttributeString("floatX", floatRect.X.ToString()); writer.WriteAttributeString("floatY", floatRect.Y.ToString()); writer.WriteAttributeString("floatWidth", floatRect.Width.ToString()); writer.WriteAttributeString("floatHeight", floatRect.Height.ToString()); } }
protected override void OnSizeAllocated(Gdk.Rectangle allocation) { base.OnSizeAllocated(allocation); if (!lastAllocation.Equals(allocation)) { ((IWidgetSurface)Frontend).Reallocate(); } lastAllocation = allocation; foreach (var cr in children) { var r = cr.Value; cr.Key.SizeAllocate(new Gdk.Rectangle((int)r.X, (int)r.Y, (int)r.Width, (int)r.Height)); } }
protected override void OnSizeAllocated(Gdk.Rectangle allocation) { base.OnSizeAllocated(allocation); if (!lastAllocation.Equals(allocation)) { ((IWidgetSurface)Backend.Frontend).Reallocate(); } lastAllocation = allocation; var dx = VisibleWindow ? 0 : allocation.X; var dy = VisibleWindow ? 0 : allocation.Y; foreach (var cr in children.ToArray()) { var r = cr.Value; var w = (int)Math.Max(r.Width, 0); var h = (int)Math.Max(r.Height, 0); cr.Key.SizeAllocate(new Gdk.Rectangle(dx + (int)r.X, dy + (int)r.Y, w, h)); } }