Esempio n. 1
0
        void Paste(ContextualMenu.MenuAction a)
        {
            editorEngine.Paste();

            editorEngine.text = CullString(editorEngine.text);
            UpdateText(editorEngine.text);
        }
Esempio n. 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);
     }
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 5
0
 void Copy(ContextualMenu.MenuAction a)
 {
     editorEngine.Copy();
 }
Esempio n. 6
0
 ContextualMenu.MenuAction.StatusFlags PasteActionStatus(ContextualMenu.MenuAction a)
 {
     return(editorEngine.CanPaste() ? ContextualMenu.MenuAction.StatusFlags.Normal : ContextualMenu.MenuAction.StatusFlags.Disabled);
 }
Esempio n. 7
0
 ContextualMenu.MenuAction.StatusFlags CutCopyActionStatus(ContextualMenu.MenuAction a)
 {
     return((editorEngine.hasSelection && !isPasswordField) ? ContextualMenu.MenuAction.StatusFlags.Normal : ContextualMenu.MenuAction.StatusFlags.Disabled);
 }