public void SetPanel(int panel, IWidgetBackend widget, bool resize, bool shrink) { IMacViewBackend view = (IMacViewBackend)widget; Widget.AddSubview(view.View); Widget.AdjustSubviews(); view.NotifyPreferredSizeChanged(); }
void IWindowBackend.SetChild(IWidgetBackend child) { if (this.child != null) { this.child.View.RemoveFromSuperview(); } this.child = (IMacViewBackend)child; if (child != null) { ContentView.AddSubview(this.child.View); SetPadding(frontend.Padding.Left, frontend.Padding.Top, frontend.Padding.Right, frontend.Padding.Bottom); this.child.View.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable; } }
void IWindowBackend.SetChild(IWidgetBackend child) { if (this.child != null) { this.child.View.RemoveFromSuperview(); } this.child = (IMacViewBackend)child; if (child != null) { ContentView.AddSubview(this.child.View); UpdateLayout(); this.child.View.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable; } }
public void Show(Xwt.Popover.Position orientation, Xwt.Widget referenceWidget, Xwt.Rectangle positionRect, Xwt.Widget child) { var controller = new FactoryViewController(child); popover = new NSPopover(); popover.Behavior = NSPopoverBehavior.Transient; popover.ContentViewController = controller; IMacViewBackend backend = (IMacViewBackend)Xwt.Engine.WidgetRegistry.GetBackend(referenceWidget); var reference = backend.View; popover.Show(System.Drawing.RectangleF.Empty, reference, ToRectEdge(orientation)); }
public void SetChild(IWidgetBackend child) { IMacViewBackend backend = (IMacViewBackend)child; if (backend.EventSink.SupportsCustomScrolling()) { var vs = new ScrollAdjustmentBackend(Widget, true); var hs = new ScrollAdjustmentBackend(Widget, false); CustomClipView clipView = new CustomClipView(hs, vs); Widget.ContentView = clipView; clipView.DocumentView = backend.View; backend.EventSink.SetScrollAdjustments(hs, vs); backend.View.Frame = new System.Drawing.RectangleF(0, 0, 500, 500); } else { Widget.DocumentView = backend.View; backend.View.Frame = Widget.ContentView.DocumentRect; } }
void IWindowBackend.SetChild(IWidgetBackend child) { if (this.child != null) { this.child.View.RemoveFromSuperview (); } this.child = (IMacViewBackend) child; if (child != null) { ContentView.AddSubview (this.child.View); SetPadding (frontend.Padding.Left, frontend.Padding.Top, frontend.Padding.Right, frontend.Padding.Bottom); this.child.View.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable; } }
public override object GetNativeWidget(Widget w) { IMacViewBackend wb = (IMacViewBackend)Xwt.Engine.WidgetRegistry.GetBackend(w); return(wb.View); }
public void Add(IWidgetBackend widget) { IMacViewBackend b = (IMacViewBackend)widget; Widget.AddSubview(b.View); }
void IWindowBackend.SetChild(IWidgetBackend child) { if (this.child != null) { this.child.View.RemoveFromSuperview (); } this.child = (IMacViewBackend) child; if (child != null) { ContentView.AddSubview (this.child.View); UpdateLayout (); this.child.View.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable; } }