protected override void Run() { #if WIN32 var wintv = System.Windows.Input.Keyboard.FocusedElement; var cmd = System.Windows.Input.ApplicationCommands.SelectAll; if (wintv != null && cmd.CanExecute(null, wintv)) { cmd.Execute(null, wintv); return; } #endif if (IdeApp.Workbench.RootWindow.HasToplevelFocus) { Gtk.Editable editable = IdeApp.Workbench.RootWindow.Focus as Gtk.Editable; if (editable != null) { editable.SelectRegion(0, -1); return; } Gtk.TextView tv = IdeApp.Workbench.RootWindow.Focus as Gtk.TextView; if (tv != null) { tv.Buffer.SelectRange(tv.Buffer.StartIter, tv.Buffer.EndIter); return; } #if MAC var mactv = AppKit.NSApplication.SharedApplication.KeyWindow.FirstResponder as AppKit.NSText; if (mactv != null) { mactv.SelectAll(mactv); return; } #endif } }
protected override void Run() { if (IdeApp.Workbench.RootWindow.HasToplevelFocus) { Gtk.Editable editable = IdeApp.Workbench.RootWindow.Focus as Gtk.Editable; if (editable != null) { editable.SelectRegion(0, -1); return; } Gtk.TextView tv = IdeApp.Workbench.RootWindow.Focus as Gtk.TextView; if (tv != null) { tv.Buffer.SelectRange(tv.Buffer.StartIter, tv.Buffer.EndIter); return; } #if MAC var mactv = AppKit.NSApplication.SharedApplication.KeyWindow.FirstResponder as AppKit.NSText; if (mactv != null) { mactv.SelectAll(mactv); return; } #endif } }
protected override void Run() { if (IdeApp.Workbench.RootWindow.HasToplevelFocus) { Gtk.Editable editable = IdeApp.Workbench.RootWindow.Focus as Gtk.Editable; if (editable != null) { editable.SelectRegion(0, -1); return; } Gtk.TextView tv = IdeApp.Workbench.RootWindow.Focus as Gtk.TextView; if (tv != null) { tv.Buffer.SelectRange(tv.Buffer.StartIter, tv.Buffer.EndIter); return; } } }