Пример #1
0
        void Paste(ContextualMenu.MenuAction a)
        {
            editorEngine.Paste();

            editorEngine.text = CullString(editorEngine.text);
            UpdateText(editorEngine.text);
        }
Пример #2
0
 public void PrepareForDisplay(EventBase e)
 {
     foreach (ContextualMenu.MenuItem current in this.menuItems)
     {
         ContextualMenu.MenuAction menuAction = current as ContextualMenu.MenuAction;
         if (menuAction != null)
         {
             menuAction.UpdateActionStatus(e);
         }
     }
     if (this.menuItems[this.menuItems.Count - 1] is ContextualMenu.Separator)
     {
         this.menuItems.RemoveAt(this.menuItems.Count - 1);
     }
 }
Пример #3
0
 public void InsertAction(string actionName, Action <EventBase> action, Func <EventBase, ContextualMenu.MenuAction.StatusFlags> actionStatusCallback, int atIndex)
 {
     ContextualMenu.MenuAction item = new ContextualMenu.MenuAction(actionName, action, actionStatusCallback);
     this.menuItems.Insert(atIndex, item);
 }
Пример #4
0
 public void AppendAction(string actionName, Action <EventBase> action, Func <EventBase, ContextualMenu.MenuAction.StatusFlags> actionStatusCallback)
 {
     ContextualMenu.MenuAction item = new ContextualMenu.MenuAction(actionName, action, actionStatusCallback);
     this.menuItems.Add(item);
 }
Пример #5
0
 void Copy(ContextualMenu.MenuAction a)
 {
     editorEngine.Copy();
 }
Пример #6
0
 ContextualMenu.MenuAction.StatusFlags PasteActionStatus(ContextualMenu.MenuAction a)
 {
     return(editorEngine.CanPaste() ? ContextualMenu.MenuAction.StatusFlags.Normal : ContextualMenu.MenuAction.StatusFlags.Disabled);
 }
Пример #7
0
 ContextualMenu.MenuAction.StatusFlags CutCopyActionStatus(ContextualMenu.MenuAction a)
 {
     return((editorEngine.hasSelection && !isPasswordField) ? ContextualMenu.MenuAction.StatusFlags.Normal : ContextualMenu.MenuAction.StatusFlags.Disabled);
 }