コード例 #1
0
ファイル: AppMenu.cs プロジェクト: dlbeer/olishell
        public AppMenu(DebugManager mgr, AccelGroup agr,
                       Settings set, Window parent,
                       DebugPane pane, string argsOverride)
        {
            settings     = set;
            debugPane    = pane;
            debugManager = mgr;
            menuBar      = new MenuBar();
            preferences  = new PreferencesDialog(set, parent, argsOverride);

            menuBar.Append(CreateFileMenu(agr));
            menuBar.Append(CreateEditMenu(agr));
            menuBar.Append(CreateViewMenu(agr));
            menuBar.Append(CreateDebuggerMenu(agr));
            menuBar.Append(CreateHelpMenu(agr));

            debugManager.DebuggerBusy    += OnDebuggerBusy;
            debugManager.DebuggerReady   += OnDebuggerReady;
            debugManager.DebuggerStarted += OnDebuggerStarted;
            debugManager.DebuggerExited  += OnDebuggerExited;

            menuBar.Destroyed += OnDestroy;

            debuggerStop.Sensitive      = false;
            debuggerInterrupt.Sensitive = false;

            foreach (MenuItem m in commandMacros)
            {
                m.Sensitive = false;
            }
        }
コード例 #2
0
ファイル: AppMenu.cs プロジェクト: dlbeer/olishell
        public AppMenu(DebugManager mgr, AccelGroup agr,
		       Settings set, Window parent,
		       DebugPane pane, string argsOverride)
        {
            settings = set;
            debugPane = pane;
            debugManager = mgr;
            menuBar = new MenuBar();
            preferences = new PreferencesDialog(set, parent, argsOverride);

            menuBar.Append(CreateFileMenu(agr));
            menuBar.Append(CreateEditMenu(agr));
            menuBar.Append(CreateViewMenu(agr));
            menuBar.Append(CreateDebuggerMenu(agr));
            menuBar.Append(CreateHelpMenu(agr));

            debugManager.DebuggerBusy += OnDebuggerBusy;
            debugManager.DebuggerReady += OnDebuggerReady;
            debugManager.DebuggerStarted += OnDebuggerStarted;
            debugManager.DebuggerExited += OnDebuggerExited;

            menuBar.Destroyed += OnDestroy;

            debuggerStop.Sensitive = false;
            debuggerInterrupt.Sensitive = false;

            foreach (MenuItem m in commandMacros)
            m.Sensitive = false;
        }
コード例 #3
0
        public App(Settings set, DebugManager mgr, string argsOverride)
        {
            settings  = set;
            debugPane = new DebugPane(set, mgr);

            AccelGroup agr = new AccelGroup();

            menu = new AppMenu(mgr, agr, set, mainWin, debugPane,
                               argsOverride);
            toolbar = new AppToolbar(mgr, debugPane);

            VBox vb = new VBox(false, 3);

            mainWin.Resize(settings.WindowWidth, settings.WindowHeight);
            mainWin.DeleteEvent += (obj, evt) => Application.Quit();
            mainWin.AddAccelGroup(agr);

            vb.PackStart(menu.View, false, false, 0);
            vb.PackStart(toolbar.View, false, false, 0);
            vb.PackEnd(debugPane.View, true, true, 0);
            mainWin.Add(vb);

            mainWin.DeleteEvent += OnDeleteEvent;
            mainWin.ShowAll();
        }
コード例 #4
0
ファイル: App.cs プロジェクト: dlbeer/olishell
        public App(Settings set, DebugManager mgr, string argsOverride)
        {
            settings = set;
            debugPane = new DebugPane(set, mgr);

            AccelGroup agr = new AccelGroup();
            menu = new AppMenu(mgr, agr, set, mainWin, debugPane,
                   argsOverride);
            toolbar = new AppToolbar(mgr, debugPane);

            VBox vb = new VBox(false, 3);

            mainWin.Resize(settings.WindowWidth, settings.WindowHeight);
            mainWin.DeleteEvent += (obj, evt) => Application.Quit();
            mainWin.AddAccelGroup(agr);

            vb.PackStart(menu.View, false, false, 0);
            vb.PackStart(toolbar.View, false, false, 0);
            vb.PackEnd(debugPane.View, true, true, 0);
            mainWin.Add(vb);

            mainWin.DeleteEvent += OnDeleteEvent;
            mainWin.ShowAll();
        }
コード例 #5
0
ファイル: AppToolbar.cs プロジェクト: dlbeer/olishell
        public AppToolbar(DebugManager mgr, DebugPane dpane)
        {
            debugManager = mgr;
            debugPane = dpane;
            toolBar = new Toolbar();

            // Debugger control buttons
            debuggerStart = new ToolButton(Stock.MediaPlay);
            debuggerStart.Clicked += OnDebuggerStart;
            debuggerStart.Label = "Start";
            debuggerStart.TooltipText = "Start debugger";
            toolBar.Add(debuggerStart);

            debuggerStop = new ToolButton(Stock.MediaStop);
            debuggerStop.Clicked += OnDebuggerStop;
            debuggerStop.Label = "Stop";
            debuggerStop.TooltipText = "Stop debugger";
            toolBar.Add(debuggerStop);

            debuggerInterrupt = new ToolButton(Stock.Cancel);
            debuggerInterrupt.Clicked += OnDebuggerInterrupt;
            debuggerInterrupt.Label = "Interrupt";
            debuggerInterrupt.TooltipText = "Interrupt debugger";
            toolBar.Add(debuggerInterrupt);

            debuggerStart.Sensitive = true;
            debuggerStop.Sensitive = false;
            debuggerInterrupt.Sensitive = false;

            toolBar.Add(new SeparatorToolItem());

            // Command macros
            var cmdProg = new ToolButton(Stock.Open);
            cmdProg.Clicked += OnCommandProgram;
            cmdProg.Label = "Program";
            cmdProg.TooltipText = "Program...";
            toolBar.Add(cmdProg);
            commandMacros.Add(cmdProg);

            var cmdReset = new ToolButton(Stock.Clear);
            cmdReset.Clicked += (obj, evt) =>
            debugPane.DebugView.RunCommand("reset");
            cmdReset.Label = "Reset";
            cmdReset.TooltipText = "Reset";
            toolBar.Add(cmdReset);
            commandMacros.Add(cmdReset);

            var cmdRun = new ToolButton(Stock.GoForward);
            cmdRun.Clicked += (obj, evt) =>
            debugPane.DebugView.RunCommand("run");
            cmdRun.Label = "Run";
            cmdRun.TooltipText = "Run";
            toolBar.Add(cmdRun);
            commandMacros.Add(cmdRun);

            var cmdStep = new ToolButton(Stock.MediaNext);
            cmdStep.Clicked += (obj, evt) =>
            debugPane.DebugView.RunCommand("step");
            cmdStep.Label = "Step";
            cmdStep.TooltipText = "Step";
            toolBar.Add(cmdStep);
            commandMacros.Add(cmdStep);

            foreach (ToolButton m in commandMacros)
            m.Sensitive = false;

            toolBar.Add(new SeparatorToolItem());

            // Zoom controls
            var zoomIn = new ToolButton(Stock.ZoomIn);
            zoomIn.Clicked += (obj, evt) => debugPane.PowerView.ZoomIn();
            zoomIn.Label = "Zoom in";
            zoomIn.TooltipText = "Zoom in";
            toolBar.Add(zoomIn);

            var zoomOut = new ToolButton(Stock.ZoomOut);
            zoomOut.Clicked += (obj, evt) => debugPane.PowerView.ZoomOut();
            zoomOut.Label = "Zoom out";
            zoomOut.TooltipText = "Zoom out";
            toolBar.Add(zoomOut);

            var zoomFit = new ToolButton(Stock.ZoomFit);
            zoomFit.Clicked += (obj, evt) => debugPane.PowerView.ZoomFit();
            zoomFit.Label = "Zoom fit";
            zoomFit.TooltipText = "Zoom to fit";
            toolBar.Add(zoomFit);

            var zoomFull = new ToolButton(Stock.Zoom100);
            zoomFull.Clicked += (obj, evt) => debugPane.PowerView.ZoomFull();
            zoomFull.Label = "Zoom full";
            zoomFull.TooltipText = "Zoom full";
            toolBar.Add(zoomFull);

            // Debug manager listeners
            debugManager.DebuggerBusy += OnDebuggerBusy;
            debugManager.DebuggerReady += OnDebuggerReady;
            debugManager.DebuggerStarted += OnDebuggerStarted;
            debugManager.DebuggerExited += OnDebuggerExited;
        }
コード例 #6
0
ファイル: AppToolbar.cs プロジェクト: dlbeer/olishell
        public AppToolbar(DebugManager mgr, DebugPane dpane)
        {
            debugManager = mgr;
            debugPane    = dpane;
            toolBar      = new Toolbar();

            // Debugger control buttons
            debuggerStart             = new ToolButton(Stock.MediaPlay);
            debuggerStart.Clicked    += OnDebuggerStart;
            debuggerStart.Label       = "Start";
            debuggerStart.TooltipText = "Start debugger";
            toolBar.Add(debuggerStart);

            debuggerStop             = new ToolButton(Stock.MediaStop);
            debuggerStop.Clicked    += OnDebuggerStop;
            debuggerStop.Label       = "Stop";
            debuggerStop.TooltipText = "Stop debugger";
            toolBar.Add(debuggerStop);

            debuggerInterrupt             = new ToolButton(Stock.Cancel);
            debuggerInterrupt.Clicked    += OnDebuggerInterrupt;
            debuggerInterrupt.Label       = "Interrupt";
            debuggerInterrupt.TooltipText = "Interrupt debugger";
            toolBar.Add(debuggerInterrupt);

            debuggerStart.Sensitive     = true;
            debuggerStop.Sensitive      = false;
            debuggerInterrupt.Sensitive = false;

            toolBar.Add(new SeparatorToolItem());

            // Command macros
            var cmdProg = new ToolButton(Stock.Open);

            cmdProg.Clicked    += OnCommandProgram;
            cmdProg.Label       = "Program";
            cmdProg.TooltipText = "Program...";
            toolBar.Add(cmdProg);
            commandMacros.Add(cmdProg);

            var cmdReset = new ToolButton(Stock.Clear);

            cmdReset.Clicked += (obj, evt) =>
                                debugPane.DebugView.RunCommand("reset");
            cmdReset.Label       = "Reset";
            cmdReset.TooltipText = "Reset";
            toolBar.Add(cmdReset);
            commandMacros.Add(cmdReset);

            var cmdRun = new ToolButton(Stock.GoForward);

            cmdRun.Clicked += (obj, evt) =>
                              debugPane.DebugView.RunCommand("run");
            cmdRun.Label       = "Run";
            cmdRun.TooltipText = "Run";
            toolBar.Add(cmdRun);
            commandMacros.Add(cmdRun);

            var cmdStep = new ToolButton(Stock.MediaNext);

            cmdStep.Clicked += (obj, evt) =>
                               debugPane.DebugView.RunCommand("step");
            cmdStep.Label       = "Step";
            cmdStep.TooltipText = "Step";
            toolBar.Add(cmdStep);
            commandMacros.Add(cmdStep);

            foreach (ToolButton m in commandMacros)
            {
                m.Sensitive = false;
            }

            toolBar.Add(new SeparatorToolItem());

            // Zoom controls
            var zoomIn = new ToolButton(Stock.ZoomIn);

            zoomIn.Clicked    += (obj, evt) => debugPane.PowerView.ZoomIn();
            zoomIn.Label       = "Zoom in";
            zoomIn.TooltipText = "Zoom in";
            toolBar.Add(zoomIn);

            var zoomOut = new ToolButton(Stock.ZoomOut);

            zoomOut.Clicked    += (obj, evt) => debugPane.PowerView.ZoomOut();
            zoomOut.Label       = "Zoom out";
            zoomOut.TooltipText = "Zoom out";
            toolBar.Add(zoomOut);

            var zoomFit = new ToolButton(Stock.ZoomFit);

            zoomFit.Clicked    += (obj, evt) => debugPane.PowerView.ZoomFit();
            zoomFit.Label       = "Zoom fit";
            zoomFit.TooltipText = "Zoom to fit";
            toolBar.Add(zoomFit);

            var zoomFull = new ToolButton(Stock.Zoom100);

            zoomFull.Clicked    += (obj, evt) => debugPane.PowerView.ZoomFull();
            zoomFull.Label       = "Zoom full";
            zoomFull.TooltipText = "Zoom full";
            toolBar.Add(zoomFull);

            // Debug manager listeners
            debugManager.DebuggerBusy    += OnDebuggerBusy;
            debugManager.DebuggerReady   += OnDebuggerReady;
            debugManager.DebuggerStarted += OnDebuggerStarted;
            debugManager.DebuggerExited  += OnDebuggerExited;
        }