Exemple #1
0
 internal void Connect(NSViewContainer2 container)
 {
     this.container = container;
     cw             = new WidgetWithNativeWindow2(this);
     cw.Add(embeddedWidget);
     container.Add(cw);
     cw.Show();
 }
Exemple #2
0
 public override void RemoveFromSuperview()
 {
     base.RemoveFromSuperview();
     if (container != null)
     {
         container.Remove(cw);
         container = null;
     }
 }
Exemple #3
0
        public override void ViewDidMoveToSuperview()
        {
            base.ViewDidMoveToSuperview();
            var c = NSViewContainer2.GetContainer(Superview);

            if (c != null)
            {
                Connect(c);
            }
        }
Exemple #4
0
        protected override MonoDevelop.Components.Control GetNativeControl()
        {
            var editorWidget = EditorWidget;

            editorWidget.ShowAll();
            var editor    = new GtkEmbed2(editorWidget);
            var editorEto = editor.ToEto();

            Preview = new PreviewEditorView(editorEto, null, null, GetEditorText);
            var nspreview       = XamMac2Helpers.ToNative(Preview, true);
            var nsviewContainer = new NSViewContainer2(nspreview);

            return(nsviewContainer);
        }