protected override void Initialize(IPadWindow window) { base.Initialize(window); #if MAC this.window = window; toolbox = new Toolbox.MacToolbox(DesignerSupport.Service.ToolboxService, window); widget = new GtkNSViewHost(toolbox); widget.DragDataGet += Widget_DragDataGet; widget.DragBegin += Widget_DragBegin; widget.DragEnd += Widget_DragEnd; this.window.PadContentShown += Container_PadContentShown; this.window.PadContentHidden += Container_PadContentHidden; toolbox.DragSourceSet += Toolbox_DragSourceSet; toolbox.DragBegin += Toolbox_DragBegin; widget.ShowAll(); toolbox.Refresh(); #else widget = new Toolbox.Toolbox(DesignerSupport.Service.ToolboxService, window); #endif }
protected override void Initialize(IPadWindow window) { base.Initialize(window); #if MAC this.window = window; toolbox = new Toolbox.MacToolbox(DesignerSupport.Service.ToolboxService, window); widget = GtkMacInterop.NSViewToGtkWidget(toolbox); widget.CanFocus = true; widget.Sensitive = true; widget.KeyPressEvent += toolbox.OnKeyPressed; widget.KeyReleaseEvent += toolbox.KeyReleased; widget.DragBegin += Widget_DragBegin; widget.DragEnd += Widget_DragEnd; widget.Focused += Widget_Focused; this.window.PadContentShown += Container_PadContentShown; this.window.PadContentHidden += Container_PadContentHidden; toolbox.ContentFocused += Toolbox_ContentFocused; toolbox.DragSourceSet += Toolbox_DragSourceSet; toolbox.DragBegin += Toolbox_DragBegin; toolbox.Refresh(); widget.ShowAll(); #else widget = new Toolbox.Toolbox(DesignerSupport.Service.ToolboxService, window); #endif }