コード例 #1
0
ファイル: UIManager.cs プロジェクト: orf53975/stetic
 void Delete(object obj, EventArgs e)
 {
     Gtk.Editable focus = Focus;
     if (focus != null)
     {
         focus.DeleteSelection();
     }
     else
     {
         WidgetDesigner wd = SteticMain.CurrentDesigner;
         if (wd != null && wd.Selection != null)
         {
             wd.DeleteSelection();
         }
     }
 }
コード例 #2
0
ファイル: UIManager.cs プロジェクト: orf53975/stetic
 void EditShown(object obj, EventArgs args)
 {
     Gtk.Editable focus = Focus;
     if (focus != null)
     {
         int  selStart, selEnd;
         bool hasSelection, editable;
         hasSelection = focus.GetSelectionBounds(out selStart, out selEnd);
         editable     = focus.IsEditable;
         UpdateEdit(hasSelection && editable, hasSelection, editable);
     }
     else
     {
         UpdateEdit();
     }
 }
コード例 #3
0
ファイル: UIManager.cs プロジェクト: orf53975/stetic
 void Paste(object obj, EventArgs e)
 {
     Gtk.Editable focus = Focus;
     if (focus != null)
     {
         focus.PasteClipboard();
     }
     else
     {
         WidgetDesigner wd = SteticMain.CurrentDesigner;
         if (wd != null)
         {
             wd.PasteToSelection();
         }
     }
 }