public void visit(TerminalD terminalD)
        {
            // set current, ready for parent
            TerminalV terminalV = new TerminalV(terminalD, level + 1);

            terminalD.References.Add(terminalV);

            current = terminalV;
        }
 public void visit(TerminalV terminalV)
 {
     drawnItem = new Terminal(terminalV);
 }
        public Terminal(TerminalV terminalVIn)
        {
            InitializeComponent();

            Init(terminalVIn);
        }
        private void Init(TerminalV terminalVIn)
        {
            terminalV = terminalVIn;

            SetLabelContent(terminalV.Name);

            this.Background = VADG.Global.Settings.getBrush(terminalV.Level);

            if (terminalV.Reference.IsSelected)
            {
                SetBorderThickness(2.0);
            }

            if ((terminalV.Reference.Parent.Parent as ChoiceD).Children.Count == 1)
                rightClickMenu.Items.Remove(removeChoice);

            // listen to events from the controller
            ViewController.ViewEvents.TerminalEvent += new ViewEvents.TerminalEventHandler(ViewEvents_TerminalEvent);

            // let the listener controller hear me :)
            ViewController.ViewListener.Listen(this);
        }
 public void visit(TerminalV terminalV)
 {
 }
 public void Rename(TerminalV terminalV, string newName)
 {
     terminalV.Reference.Name = newName;
 }
        private GrammarNodeV newVisual()
        {
            if (newItem is UndefinedD)
            {
                UndefinedD undefinedD = newItem as UndefinedD;
                UndefinedV visual = new UndefinedV(undefinedD, level);

                undefinedD.References.Add(visual);
                return visual;
            }
            else if (newItem is TerminalD)
            {
                TerminalD terminalD = newItem as TerminalD;
                TerminalV visual = new TerminalV(terminalD, level);

                terminalD.References.Add(visual);
                return visual;
            }
            else if (newItem is NonterminalTailD)
            {
                NonterminalTailD nontTailD = newItem as NonterminalTailD;
                NonterminalTailV visual = new NonterminalTailV(nontTailD, level);
                nontTailD.AddReference(visual);
                return visual;
            }
            else
                throw new NotImplementedException();
        }
 internal void setRule(TerminalV terminalV)
 {
     rule = terminalV.Reference.getMyRule();
 }