コード例 #1
0
        protected override void Initialize(IPadWindow window)
        {
            DockItemToolbar toolbar = window.GetToolbar(DockPositionType.Left);

            optionsToolbar = toolbar;

            refreshButton             = new Button(new ImageView("gtk-refresh", IconSize.Menu));
            refreshButton.Clicked    += OnButtonRefreshClick;
            refreshButton.TooltipText = GettextCatalog.GetString("Refresh");
            toolbar.Add(refreshButton);

            toolbar.ShowAll();

            toolbar = window.GetToolbar(DockPositionType.Right);

            stopButton             = new Button(new ImageView(Ide.Gui.Stock.Stop, IconSize.Menu));
            stopButton.Clicked    += OnStopButtonClick;
            stopButton.TooltipText = GettextCatalog.GetString("Stop selected task");
            toolbar.Add(stopButton);

            clearButton             = new Button(new ImageView(Ide.Gui.Stock.Broom, IconSize.Menu));
            clearButton.Clicked    += OnClearButtonClick;
            clearButton.TooltipText = GettextCatalog.GetString("Clear Output");
            toolbar.Add(clearButton);

            showLogButton = new ToggleButton();
            AddIcon(showLogButton, Ide.Gui.Stock.Console);
            showLogButton.Clicked    += OnShowLogButtonClick;
            showLogButton.TooltipText = GettextCatalog.GetString("Show Task Runner Explorer Output");
            toolbar.Add(showLogButton);

            toolbar.ShowAll();
        }
コード例 #2
0
        public void Initialize(IPadWindow window)
        {
            DockItemToolbar toolbar = window.GetToolbar(Gtk.PositionType.Top);

            Gtk.Button goUp = new Gtk.Button(new Gtk.Image(Gtk.Stock.GoUp, Gtk.IconSize.Menu));
            goUp.TooltipText = GettextCatalog.GetString("Go up one level");
            goUp.Clicked    += delegate
            {
                fb.GoUp();
            };
            toolbar.Add(goUp);

            Gtk.Button goHome = new Gtk.Button(new Gtk.Image(Gtk.Stock.Home, Gtk.IconSize.Menu));
            goHome.TooltipText = GettextCatalog.GetString("Home");
            goHome.Clicked    += delegate
            {
                fb.GoHome();
            };
            toolbar.Add(goHome);

            Gtk.Entry entry = new Gtk.Entry();
            entry.TooltipText = GettextCatalog.GetString("Location");
            entry.Activated  += delegate
            {
                fb.GoPath(entry.Text);
            };

            fb.DirectoryChangedEvent += delegate
            {
                entry.Text     = fb.CurrentDir;
                goUp.Sensitive = System.IO.Path.GetPathRoot(fb.CurrentDir) != fb.CurrentDir;
            };
            toolbar.Add(entry, true);
            toolbar.ShowAll();
        }
コード例 #3
0
ファイル: PropertyPad.cs プロジェクト: awatertree/monodevelop
		public override void Initialize (IPadWindow container)
		{
			base.Initialize (container);
			toolbarProvider.Attach (container.GetToolbar (Gtk.PositionType.Top));
			grid.SetToolbarProvider (toolbarProvider);
			this.container = container;
		}
コード例 #4
0
		void IPadContent.Initialize (IPadWindow window)
		{
			this.window = window;
			window.Icon = icon;
			
			DockItemToolbar toolbar = window.GetToolbar (PositionType.Right);

			buttonStop = new Button (new Gtk.Image ("gtk-stop", IconSize.Menu));
			buttonStop.Clicked += new EventHandler (OnButtonStopClick);
			buttonStop.TooltipText = GettextCatalog.GetString ("Stop");
			toolbar.Add (buttonStop);

			buttonClear = new Button (new Gtk.Image ("gtk-clear", IconSize.Menu));
			buttonClear.Clicked += new EventHandler (OnButtonClearClick);
			buttonClear.TooltipText = GettextCatalog.GetString ("Clear console");
			toolbar.Add (buttonClear);

			buttonPin = new ToggleButton ();
			buttonPin.Image = new Gtk.Image ((IconId)"md-pin-up", IconSize.Menu);
			buttonPin.Image.ShowAll ();
			buttonPin.Clicked += new EventHandler (OnButtonPinClick);
			buttonPin.TooltipText = GettextCatalog.GetString ("Pin output pad");
			toolbar.Add (buttonPin);
			toolbar.ShowAll ();
		}
コード例 #5
0
        void IPadContent.Initialize(IPadWindow window)
        {
            this.window = window;
            window.Icon = icon;

            DockItemToolbar toolbar = window.GetToolbar(PositionType.Right);

            buttonStop             = new Button(new Gtk.Image("gtk-stop", IconSize.Menu));
            buttonStop.Clicked    += new EventHandler(OnButtonStopClick);
            buttonStop.TooltipText = GettextCatalog.GetString("Stop");
            toolbar.Add(buttonStop);

            buttonClear             = new Button(new Gtk.Image("gtk-clear", IconSize.Menu));
            buttonClear.Clicked    += new EventHandler(OnButtonClearClick);
            buttonClear.TooltipText = GettextCatalog.GetString("Clear console");
            toolbar.Add(buttonClear);

            buttonPin       = new ToggleButton();
            buttonPin.Image = new Gtk.Image((IconId)"md-pin-up", IconSize.Menu);
            buttonPin.Image.ShowAll();
            buttonPin.Clicked    += new EventHandler(OnButtonPinClick);
            buttonPin.TooltipText = GettextCatalog.GetString("Pin output pad");
            toolbar.Add(buttonPin);
            toolbar.ShowAll();
        }
コード例 #6
0
		public override void Initialize (IPadWindow window)
		{
			base.Initialize(window);

			// Call ctors
			inputEditor = new TextEditor() { Name = "input", Events = Gdk.EventMask.AllEventsMask, HeightRequest = 80 };
			editor = new TextEditor() { Name = "output", Events = Gdk.EventMask.AllEventsMask };
			vpaned = new Gtk.VPaned();
			var scr1 = new Gtk.ScrolledWindow();
			var scr2 = new Gtk.ScrolledWindow();

			// Init layout
			scr1.ShadowType = Gtk.ShadowType.In;
			scr1.Child = inputEditor;
			vpaned.Add1(scr1);
			scr1.ShowAll();
			inputEditor.ShowAll();

			scr2.ShadowType = Gtk.ShadowType.In;
			scr2.Child = editor;
			vpaned.Add2(scr2);
			scr2.ShowAll();
			editor.ShowAll();

			vpaned.ShowAll();

			// Init editors
			var o = editor.Options;
			inputEditor.Options = o;
			o.ShowLineNumberMargin = false;
			o.ShowFoldMargin = false;
			o.ShowIconMargin = false;

			editor.Document.ReadOnly = true;
			inputEditor.Text = PropertyService.Get(lastInputStringPropId, string.Empty);
			editor.Text = string.Empty;
			editor.Document.SyntaxMode = new Highlighting.DSyntaxMode();
			inputEditor.Document.SyntaxMode = new Highlighting.DSyntaxMode();
			editor.Document.MimeType = Formatting.DCodeFormatter.MimeType;
			inputEditor.Document.MimeType = Formatting.DCodeFormatter.MimeType;

			// Init toolbar
			var tb = window.GetToolbar(Gtk.PositionType.Top);

			executeButton = new Gtk.Button();
			executeButton.Image = new Gtk.Image(Gtk.Stock.Execute, Gtk.IconSize.Menu);
			executeButton.TooltipText = "Evaluates the expression typed in the upper input editor.";
			executeButton.Clicked += Execute;
			tb.Add(executeButton);

			abortButton = new Gtk.Button();
			abortButton.Sensitive = false;
			abortButton.Image = new Gtk.Image(Gtk.Stock.Stop, Gtk.IconSize.Menu);
			abortButton.TooltipText = "Stops the evaluation.";
			abortButton.Clicked += (object sender, EventArgs e) => AbortExecution();
			tb.Add(abortButton);

			tb.ShowAll();
		}
コード例 #7
0
ファイル: PropertyPad.cs プロジェクト: zenek-y/monodevelop
		protected override void Initialize (IPadWindow container)
		{
			base.Initialize (container);
			toolbarProvider.Attach (container.GetToolbar (DockPositionType.Top));
			grid.SetToolbarProvider (toolbarProvider);
			this.container = container;
			DesignerSupport.Service.SetPad (this);
		}
コード例 #8
0
        void CreateToolbar(IPadWindow window)
        {
            toolbarWidget = new PackageConsoleToolbarWidget();
            DockItemToolbar toolbar = window.GetToolbar(DockPositionType.Top);

            toolbar.Add(toolbarWidget, false);
            toolbar.ShowAll();
        }
コード例 #9
0
		void CreateToolbar (IPadWindow window)
		{
			toolbarWidget = new PackageConsoleToolbarWidget ();
			toolbarWidget.ClearButtonClicked += ClearButtonClicked;
			DockItemToolbar toolbar = window.GetToolbar (Gtk.PositionType.Top);
			toolbar.Add (toolbarWidget, false);
			toolbar.ShowAll ();
		}
コード例 #10
0
 public override void Initialize(IPadWindow container)
 {
     base.Initialize(container);
     toolbarProvider.Attach(container.GetToolbar(Gtk.PositionType.Top));
     grid.SetToolbarProvider(toolbarProvider);
     this.container = container;
     DesignerSupport.Service.SetPad(this);
 }
コード例 #11
0
        public void Initialize(IPadWindow window)
        {
            this.window  = window;
            window.Title = GettextCatalog.GetString("Strategy Controller");

            var toolbar = window.GetToolbar(PositionType.Top);

            buttonStart       = new Button();
            buttonStart.Image = new Gtk.Image(Gtk.Stock.MediaPlay, Gtk.IconSize.Menu);
            buttonStart.Image.Show();
            buttonStart.TooltipText = GettextCatalog.GetString("Start");
            buttonStart.Clicked    += OnBtnStartClicked;
            toolbar.Add(buttonStart);

            buttonPause       = new Button();
            buttonPause.Image = new Gtk.Image(Gtk.Stock.MediaPause, Gtk.IconSize.Menu);
            buttonPause.Image.Show();
            buttonPause.TooltipText = GettextCatalog.GetString("Pause");
            buttonPause.Clicked    += OnBtnPauseClicked;
            toolbar.Add(buttonPause);

            buttonStop       = new Button();
            buttonStop.Image = new Gtk.Image(Gtk.Stock.MediaStop, Gtk.IconSize.Menu);
            buttonStop.Image.Show();
            buttonStop.TooltipText = GettextCatalog.GetString("Stop");
            buttonStop.Clicked    += OnBtnStopClicked;
            toolbar.Add(buttonStop);
            toolbar.Add(new SeparatorToolItem());

            buttonStep       = new Button();
            buttonStep.Image = new Gtk.Image(Gtk.Stock.MediaNext, Gtk.IconSize.Menu);
            buttonStep.Image.Show();
            buttonStep.TooltipText = GettextCatalog.GetString("Step");
            buttonStep.Clicked    += OnBtnStepClicked;
            toolbar.Add(buttonStep);

            strategyMode = new ComboBox(Enumerable.ToArray(modeLookups.Keys));


            //    new string[] { "Backtest", "Paper", "Live" });
            strategyMode.Active   = 0;
            strategyMode.Changed += OnStrategyModeChanged;
            toolbar.Add(strategyMode);

            stepEvent = new ComboBox(Enumerable.ToArray(eventLookups.Keys));
            //new string[] { "OnEvent", "OnBid", "OnAsk" });
            stepEvent.Active   = 0;
            stepEvent.Changed += OnStepEventChanged;
            toolbar.Add(stepEvent);

            dePause = new HDateEdit();
            toolbar.Add(dePause);

            var dtPicker = new DatePicker();

            toolbar.Add(dtPicker);
            toolbar.ShowAll();
        }
コード例 #12
0
 override protected void Initialize(IPadWindow window)
 {
     separator = new VSeparator();
     toolbar   = window.GetToolbar(DockPositionType.Top);
     toolbar.Add(switcherCombo);
     toolbar.ShowAll();
     switcherCombo.Changed += new EventHandler(OnContentSwitched);
     OnContentSwitched(null, null);
 }
コード例 #13
0
        void CreateToolbar(IPadWindow window)
        {
            toolbarWidget = new PackageConsoleToolbarWidget();
            toolbarWidget.ClearButtonClicked += ClearButtonClicked;
            DockItemToolbar toolbar = window.GetToolbar(Gtk.PositionType.Top);

            toolbar.Add(toolbarWidget, false);
            toolbar.ShowAll();
        }
コード例 #14
0
		protected override void Initialize (IPadWindow window)
		{
			base.Initialize (window);
			IdeApp.Workbench.ActiveDocumentChanged += DocumentChangedHandler;
			CurrentDoc = IdeApp.Workbench.ActiveDocument;
			toolbar = window.GetToolbar (DockPositionType.Top);
			toolbar.Visible = false;
			Update ();
		}
コード例 #15
0
 protected override void Initialize(IPadWindow window)
 {
     base.Initialize(window);
     IdeApp.Workbench.ActiveDocumentChanged += DocumentChangedHandler;
     CurrentDoc      = IdeApp.Workbench.ActiveDocument;
     toolbar         = window.GetToolbar(DockPositionType.Top);
     toolbar.Visible = false;
     Update();
 }
コード例 #16
0
        void IPadContent.Initialize(IPadWindow window)
        {
            this.window  = window;
            window.Title = GettextCatalog.GetString("Errors");

            DockItemToolbar toolbar = window.GetToolbar(PositionType.Top);

            errorBtn        = new ToggleButton();
            errorBtn.Active = (bool)PropertyService.Get(showErrorsPropertyName, true);
            errorBtn.Image  = new Gtk.Image(Stock.Error, Gtk.IconSize.Menu);
            errorBtn.Image.Show();
            errorBtn.Toggled    += new EventHandler(FilterChanged);
            errorBtn.TooltipText = GettextCatalog.GetString("Show Errors");
            UpdateErrorsNum();
            toolbar.Add(errorBtn);

            warnBtn        = new ToggleButton();
            warnBtn.Active = (bool)PropertyService.Get(showWarningsPropertyName, true);
            warnBtn.Image  = new Gtk.Image(Stock.Warning, Gtk.IconSize.Menu);
            warnBtn.Image.Show();
            warnBtn.Toggled    += new EventHandler(FilterChanged);
            warnBtn.TooltipText = GettextCatalog.GetString("Show Warnings");
            UpdateWarningsNum();
            toolbar.Add(warnBtn);

            msgBtn        = new ToggleButton();
            msgBtn.Active = (bool)PropertyService.Get(showMessagesPropertyName, true);
            msgBtn.Image  = new Gtk.Image(Stock.Information, Gtk.IconSize.Menu);
            msgBtn.Image.Show();
            msgBtn.Toggled    += new EventHandler(FilterChanged);
            msgBtn.TooltipText = GettextCatalog.GetString("Show Messages");
            UpdateMessagesNum();
            toolbar.Add(msgBtn);

            toolbar.Add(new SeparatorToolItem());

            logBtn       = new ToggleButton();
            logBtn.Label = GettextCatalog.GetString("Build Output");
            logBtn.Image = ImageService.GetImage("md-message-log", Gtk.IconSize.Menu);
            logBtn.Image.Show();
            logBtn.TooltipText = GettextCatalog.GetString("Show build output");
            logBtn.Toggled    += HandleLogBtnToggled;
            toolbar.Add(logBtn);

            //Dummy widget to take all space between "Build Output" button and SearchEntry
            toolbar.Add(new HBox(), true);

            searchEntry = new SearchEntry();
            searchEntry.Entry.Changed += searchPatternChanged;
            searchEntry.WidthRequest   = 200;
            searchEntry.Visible        = true;
            toolbar.Add(searchEntry);

            toolbar.ShowAll();

            UpdatePadIcon();
        }
コード例 #17
0
        protected override void Initialize(IPadWindow window)
        {
            var toolbar = window.GetToolbar(DockPositionType.Right);

            runTestsButton             = new Button(new ImageView(Ide.Gui.Stock.RunProgramIcon, IconSize.Menu));
            runTestsButton.Clicked    += OnRunTestsButtonClick;
            runTestsButton.TooltipText = GettextCatalog.GetString("Run Tests");
            toolbar.Add(runTestsButton);

            toolbar.ShowAll();
        }
コード例 #18
0
 void ClearToolbar()
 {
     if (container != null)
     {
         var toolbar = container.GetToolbar(Gtk.PositionType.Top);
         foreach (var w in toolbar.Children)
         {
             toolbar.Remove(w);
         }
     }
 }
        protected override void Initialize(IPadWindow window)
        {
            DockItemToolbar toolbar = window.GetToolbar(DockPositionType.Right);

            var clearButton = new Button(new ImageView(Ide.Gui.Stock.Broom, IconSize.Menu));

            clearButton.Clicked    += ButtonClearClick;
            clearButton.TooltipText = GettextCatalog.GetString("Clear");
            toolbar.Add(clearButton);
            toolbar.ShowAll();
            logView.ShowAll();
        }
コード例 #20
0
        public override void Initialize(IPadWindow container)
        {
            DockItemToolbar toolbar = container.GetToolbar(PositionType.Right);

            var clearButton = new Button(new Gtk.Image(Ide.Gui.Stock.Broom, IconSize.Menu));

            clearButton.Clicked    += ButtonClearClick;
            clearButton.TooltipText = GettextCatalog.GetString("Clear");
            toolbar.Add(clearButton);
            toolbar.ShowAll();
            Control.ShowAll();
        }
コード例 #21
0
        protected override void Initialize(IPadWindow window)
        {
            var toolbar = window.GetToolbar(DockPositionType.Right);

            var openIdeLogButton = new Button(new ImageView(Ide.Gui.Stock.TextFileIcon, IconSize.Menu));

            openIdeLogButton.Clicked    += OnOpenIdeLogButtonClick;
            openIdeLogButton.TooltipText = GettextCatalog.GetString("Open IDE log");
            toolbar.Add(openIdeLogButton);

            toolbar.ShowAll();
        }
コード例 #22
0
        void AttachToolbarIfCustomWidget()
        {
            if (customWidget)
            {
                customWidget = false;
                frame.Remove(frame.Child);

#if MAC
                if (isNative)
                {
                    frame.Add(gtkWidget);
                }
                else
                {
#endif
                frame.Add(grid);
#if MAC
            }
#endif
                toolbarProvider.Attach(container.GetToolbar(DockPositionType.Top));
            }
        }
コード例 #23
0
        public ClassBrowserPadWidget(ExtensibleTreeView treeView, IPadWindow window)
        {
            this.treeView = treeView;

            DockItemToolbar searchBox = window.GetToolbar(PositionType.Top);

            searchEntry = new Entry();
            searchBox.Add(searchEntry, true);
            buttonSearch              = new Button(new Gtk.Image(Gtk.Stock.Find, IconSize.Menu));
            buttonSearch.Relief       = ReliefStyle.None;
            buttonCancelSearch        = new Button(new Gtk.Image(Gtk.Stock.Stop, IconSize.Menu));
            buttonCancelSearch.Relief = ReliefStyle.None;
            searchBox.Add(buttonSearch);
            searchBox.Add(buttonCancelSearch);
            searchBox.ShowAll();

            notebook            = new Notebook();
            notebook.ShowTabs   = false;
            notebook.ShowBorder = false;
            this.PackEnd(notebook, true, true, 0);

            notebook.AppendPage(treeView, null);
            ScrolledWindow scrolledWindow = new ScrolledWindow();

            scrolledWindow.Add(searchResultsTreeView);
            notebook.AppendPage(scrolledWindow, null);

            list = new ListStore(new Type[] {
                typeof(Pixbuf),
                typeof(string),
                typeof(IType)
            });
            model = new TreeModelSort(list);
            searchResultsTreeView.Model = model;
            searchResultsTreeView.AppendColumn(string.Empty, new Gtk.CellRendererPixbuf(), "pixbuf", 0);
            searchResultsTreeView.AppendColumn(string.Empty, new Gtk.CellRendererText(), "text", 1);
            searchResultsTreeView.HeadersVisible  = false;
            searchResultsTreeView.RowActivated   += SearchRowActivated;
            IdeApp.Workspace.WorkspaceItemOpened += OnOpenCombine;
            IdeApp.Workspace.WorkspaceItemClosed += OnCloseCombine;

            this.searchEntry.Changed        += SearchEntryChanged;
            this.buttonCancelSearch.Clicked += CancelSearchClicked;
            this.searchEntry.Activated      += SearchClicked;
            this.searchEntry.KeyPressEvent  += SearchEntryKeyPressEvent;
            this.buttonSearch.Clicked       += SearchClicked;

            this.ShowAll();
        }
コード例 #24
0
        public void Initialize(IPadWindow window)
        {
            var toolBar = window.GetToolbar(Gtk.PositionType.Top);
            CommandToolButton button = new CommandToolButton(TFSCommands.ConnectToServer, IdeApp.CommandService) { StockId = Gtk.Stock.Add };
            toolBar.Add(button);
            _treeView.Columns.Add(new ListViewColumn(string.Empty, new TextCellView(_name)));
            _treeView.DataSource = _treeStore;
            _content.PackStart(_treeView, true, true);
            UpdateData();

            onServersChanged = DispatchService.GuiDispatch<System.Action>(UpdateData);
            TFSVersionControlService.Instance.OnServersChange += onServersChanged;

            _treeView.RowActivated += OnRowClicked;
        }
コード例 #25
0
        protected override void Initialize(IPadWindow container)
        {
            base.Initialize(container);
            toolbarProvider.Attach(container.GetToolbar(DockPositionType.Top));

            propertyGrid.SetToolbarProvider(toolbarProvider);

            //native cocoa needs content shown to initialize stuff
            if (isNative)
            {
                container.PadContentShown += Window_PadContentShown;
            }
            this.container = container;
            DesignerSupport.Service.SetPad(this);
        }
コード例 #26
0
        void IPadContent.Initialize(IPadWindow window)
        {
            this.window  = window;
            window.Title = GettextCatalog.GetString("Errors");

            DockItemToolbar toolbar = window.GetToolbar(PositionType.Top);

            errorBtn        = new ToggleButton();
            errorBtn.Active = (bool)PropertyService.Get(showErrorsPropertyName, true);
            errorBtn.Image  = new Gtk.Image(Stock.Error, Gtk.IconSize.Menu);
            errorBtn.Image.Show();
            errorBtn.Toggled    += new EventHandler(FilterChanged);
            errorBtn.TooltipText = GettextCatalog.GetString("Show Errors");
            UpdateErrorsNum();
            toolbar.Add(errorBtn);

            warnBtn        = new ToggleButton();
            warnBtn.Active = (bool)PropertyService.Get(showWarningsPropertyName, true);
            warnBtn.Image  = new Gtk.Image(Stock.Warning, Gtk.IconSize.Menu);
            warnBtn.Image.Show();
            warnBtn.Toggled    += new EventHandler(FilterChanged);
            warnBtn.TooltipText = GettextCatalog.GetString("Show Warnings");
            UpdateWarningsNum();
            toolbar.Add(warnBtn);

            msgBtn        = new ToggleButton();
            msgBtn.Active = (bool)PropertyService.Get(showMessagesPropertyName, true);
            msgBtn.Image  = new Gtk.Image(Stock.Information, Gtk.IconSize.Menu);
            msgBtn.Image.Show();
            msgBtn.Toggled    += new EventHandler(FilterChanged);
            msgBtn.TooltipText = GettextCatalog.GetString("Show Messages");
            UpdateMessagesNum();
            toolbar.Add(msgBtn);

            toolbar.Add(new SeparatorToolItem());

            logBtn       = new ToggleButton();
            logBtn.Label = GettextCatalog.GetString("Build Output");
            logBtn.Image = ImageService.GetImage("md-message-log", Gtk.IconSize.Menu);
            logBtn.Image.Show();
            logBtn.TooltipText = GettextCatalog.GetString("Show build output");
            logBtn.Toggled    += HandleLogBtnToggled;
            toolbar.Add(logBtn);

            toolbar.ShowAll();

            UpdatePadIcon();
        }
コード例 #27
0
		public ClassBrowserPadWidget (ExtensibleTreeView treeView, IPadWindow window)
		{
			this.treeView = treeView;
			
			DockItemToolbar searchBox = window.GetToolbar (PositionType.Top);
			
			searchEntry = new Entry ();
			searchBox.Add (searchEntry, true);
			buttonSearch = new Button (new Gtk.Image (Gtk.Stock.Find, IconSize.Menu));
			buttonSearch.Relief = ReliefStyle.None;
			buttonCancelSearch = new Button (new Gtk.Image (Gtk.Stock.Stop, IconSize.Menu));
			buttonCancelSearch.Relief = ReliefStyle.None;
			searchBox.Add (buttonSearch);
			searchBox.Add (buttonCancelSearch);
			searchBox.ShowAll ();
			
			notebook = new Notebook ();
			notebook.ShowTabs = false;
			notebook.ShowBorder = false;
			this.PackEnd (notebook, true, true, 0);
			
			notebook.AppendPage (treeView, null);
			ScrolledWindow scrolledWindow = new ScrolledWindow ();
			scrolledWindow.Add (searchResultsTreeView);
			notebook.AppendPage (scrolledWindow, null);
			
			list = new ListStore (new Type[] {
				typeof (Pixbuf),
				typeof (string),
				typeof (IType)
			});
			model = new TreeModelSort (list);
			searchResultsTreeView.Model = model;
			searchResultsTreeView.AppendColumn (string.Empty, new Gtk.CellRendererPixbuf (), "pixbuf", 0);
			searchResultsTreeView.AppendColumn (string.Empty, new Gtk.CellRendererText (), "text", 1);
			searchResultsTreeView.HeadersVisible = false;
			searchResultsTreeView.RowActivated += SearchRowActivated;
			IdeApp.Workspace.WorkspaceItemOpened += OnOpenCombine;
			IdeApp.Workspace.WorkspaceItemClosed += OnCloseCombine;
					
			this.searchEntry.Changed += SearchEntryChanged;
			this.buttonCancelSearch.Clicked += CancelSearchClicked;
			this.searchEntry.Activated += SearchClicked;
			this.searchEntry.KeyPressEvent += SearchEntryKeyPressEvent;
			this.buttonSearch.Clicked += SearchClicked;
			
			this.ShowAll ();
		}
コード例 #28
0
		public void Initialize (IPadWindow container)
		{
			view = new ConsoleView ();
			view.ConsoleInput += OnViewConsoleInput;
			Pango.FontDescription font = Pango.FontDescription.FromString (DesktopService.DefaultMonospaceFont);
			font.Size = (font.Size * 8) / 10;
			view.SetFont (font);
			view.ShadowType = Gtk.ShadowType.None;
			view.ShowAll ();
			
			DockItemToolbar toolbar = container.GetToolbar (Gtk.PositionType.Right);
			DockToolButton buttonClear = new DockToolButton ("gtk-clear");
			buttonClear.Clicked += ButtonClearClicked;
			buttonClear.TooltipText = GettextCatalog.GetString ("Clear");
			toolbar.Add (buttonClear);
			toolbar.ShowAll ();
		}
コード例 #29
0
ファイル: MixinInsightPad.cs プロジェクト: FrankLIKE/Mono-D
        public override void Initialize(IPadWindow pad)
        {
            base.Initialize(pad);

            // Init editor
            outputEditor              = new TextEditor();
            outputEditor.Events       = Gdk.EventMask.AllEventsMask;
            outputEditor.Name         = "outputEditor";
            outputEditor.TabsToSpaces = false;

            scrolledWindow            = new Gtk.ScrolledWindow();
            scrolledWindow.Child      = outputEditor;
            scrolledWindow.ShadowType = Gtk.ShadowType.In;
            scrolledWindow.ShowAll();
            outputEditor.ShowAll();

            var o = outputEditor.Options;

            outputEditor.Document.MimeType = Formatting.DCodeFormatter.MimeType;
            o.ShowLineNumberMargin         = false;
            o.ShowFoldMargin = false;
            o.ShowIconMargin = false;
            outputEditor.Document.ReadOnly = true;


            // Init toolbar
            var tb = pad.GetToolbar(Gtk.PositionType.Top);

            var ch = new Gtk.ToggleButton();

            ch.Image       = new Gtk.Image(Gtk.Stock.Refresh, Gtk.IconSize.Menu);
            ch.Active      = EnableCaretTracking;
            ch.TooltipText = "Toggle automatic update after the caret has been moved.";
            ch.Toggled    += (object s, EventArgs ea) => EnableCaretTracking = ch.Active;
            tb.Add(ch);

            abortButton             = new Gtk.Button();
            abortButton.Sensitive   = false;
            abortButton.Image       = new Gtk.Image(Gtk.Stock.Stop, Gtk.IconSize.Menu);
            abortButton.TooltipText = "Stops the evaluation.";
            abortButton.Clicked    += (object sender, EventArgs e) => AbortExecution();
            tb.Add(abortButton);

            tb.ShowAll();
            Instance = this;
        }
コード例 #30
0
        void CreateToolbar(IPadWindow window)
        {
            DockItemToolbar toolbar = window.GetToolbar(DockPositionType.Right);

            stopButton             = new Button(new ImageView(Ide.Gui.Stock.Stop, IconSize.Menu));
            stopButton.Clicked    += StopButtonClicked;
            stopButton.TooltipText = GettextCatalog.GetString("Stop running");
            IsStopButtonEnabled    = false;
            toolbar.Add(stopButton);

            clearButton             = new Button(new ImageView(Ide.Gui.Stock.Broom, IconSize.Menu));
            clearButton.Clicked    += ClearButtonClicked;
            clearButton.TooltipText = GettextCatalog.GetString("Clear");
            toolbar.Add(clearButton);

            toolbar.ShowAll();
        }
コード例 #31
0
        public MonoDroidDeviceLog(IPadWindow container)
        {
            Stetic.BinContainer.Attach(this);
            DockItemToolbar toolbar = container.GetToolbar(PositionType.Top);

            var chooseDeviceButton = new Button()
            {
                Label = GettextCatalog.GetString("Choose Device"),
            };

            deviceLabel = new Label()
            {
                Xalign = 0,
            };
            SetDeviceLabel();
            var reconnectButton = new Button()
            {
                Label = GettextCatalog.GetString("Reconnect"),
            };

            toolbar.Add(deviceLabel);
            toolbar.Add(chooseDeviceButton);
            toolbar.Add(reconnectButton);

            reconnectButton.Clicked += delegate {
                Disconnect();
                if (Device != null)
                {
                    Connect();
                }
                else
                {
                    SetDeviceLabel();
                }
            };
            chooseDeviceButton.Clicked += delegate {
                Device = MonoDroidUtility.ChooseDevice(null);
            };

            log = new LogView();
            this.Add(log);

            toolbar.ShowAll();
            ShowAll();
        }
コード例 #32
0
        public void Initialize(IPadWindow container)
        {
            view = new ConsoleView();
            view.ConsoleInput += OnViewConsoleInput;
            Pango.FontDescription font = Pango.FontDescription.FromString(DesktopService.DefaultMonospaceFont);
            font.Size = (font.Size * 8) / 10;
            view.SetFont(font);
            view.ShadowType = Gtk.ShadowType.None;
            view.ShowAll();

            DockItemToolbar toolbar     = container.GetToolbar(Gtk.PositionType.Right);
            DockToolButton  buttonClear = new DockToolButton("gtk-clear");

            buttonClear.Clicked    += ButtonClearClicked;
            buttonClear.TooltipText = GettextCatalog.GetString("Clear");
            toolbar.Add(buttonClear);
            toolbar.ShowAll();
        }
コード例 #33
0
ファイル: MixinInsightPad.cs プロジェクト: DinrusGroup/Mono-D
		public override void Initialize(IPadWindow pad)
		{
			base.Initialize(pad);

			// Init editor
			outputEditor = new TextEditor();
			outputEditor.Events = Gdk.EventMask.AllEventsMask;
			outputEditor.Name = "outputEditor";
			outputEditor.TabsToSpaces = false;
			
			scrolledWindow = new Gtk.ScrolledWindow();
			scrolledWindow.Child = outputEditor;
			scrolledWindow.ShadowType = Gtk.ShadowType.In;
			scrolledWindow.ShowAll();
			outputEditor.ShowAll();

			var o = outputEditor.Options;
			outputEditor.Document.MimeType = Formatting.DCodeFormatter.MimeType;
			o.ShowLineNumberMargin = false;
			o.ShowFoldMargin = false;
			o.ShowIconMargin = false;
			outputEditor.Document.ReadOnly = true;


			// Init toolbar
			var tb = pad.GetToolbar(Gtk.PositionType.Top);

			var ch = new Gtk.ToggleButton();
			ch.Image = new Gtk.Image(Gtk.Stock.Refresh, Gtk.IconSize.Menu);
			ch.Active = EnableCaretTracking;
			ch.TooltipText = "Toggle automatic update after the caret has been moved.";
			ch.Toggled += (object s, EventArgs ea) => EnableCaretTracking = ch.Active;
			tb.Add(ch);

			abortButton = new Gtk.Button();
			abortButton.Sensitive = false;
			abortButton.Image = new Gtk.Image(Gtk.Stock.Stop, Gtk.IconSize.Menu);
			abortButton.TooltipText = "Stops the evaluation.";
			abortButton.Clicked += (object sender, EventArgs e) => AbortExecution();
			tb.Add(abortButton);

			tb.ShowAll();
			Instance = this;
		}
コード例 #34
0
        protected override void Initialize(IPadWindow window)
        {
            var toolbar = window.GetToolbar(DockPositionType.Top);

            startButton             = new Button(new ImageView(Ide.Gui.Stock.RunProgramIcon, IconSize.Menu));
            startButton.Clicked    += OnStartButtonClicked;
            startButton.TooltipText = GettextCatalog.GetString("Enable build logging");
            toolbar.Add(startButton);

            stopButton             = new Button(new ImageView(Ide.Gui.Stock.Stop, IconSize.Menu));
            stopButton.Clicked    += OnStopButtonClicked;
            stopButton.TooltipText = GettextCatalog.GetString("Stop build logging");
            stopButton.Sensitive   = false;
            toolbar.Add(stopButton);

            clearButton             = new Button(new ImageView(Ide.Gui.Stock.Broom, IconSize.Menu));
            clearButton.Clicked    += OnClearButtonClicked;
            clearButton.TooltipText = GettextCatalog.GetString("Clear");
            toolbar.Add(clearButton);

            string[] buildTypeItems = buildTypes
                                      .Select(buildType => GetDisplayText(buildType))
                                      .ToArray();
            buildTypeFilterComboBox          = new ComboBox(buildTypeItems);
            buildTypeFilterComboBox.Active   = 0;
            buildTypeFilterComboBox.Changed += BuildTypeFilterComboBoxChanged;
            toolbar.Add(buildTypeFilterComboBox);

            var spacer = new HBox();

            toolbar.Add(spacer, true);

            searchEntry = new SearchEntry();
            searchEntry.WidthRequest   = 200;
            searchEntry.Visible        = true;
            searchEntry.Entry.Changed += SearchEntryChanged;
            toolbar.Add(searchEntry);

            toolbar.ShowAll();

            ProjectSystemService.MSBuildTargetStarted  += MSBuildTargetStarted;
            ProjectSystemService.MSBuildTargetFinished += MSBuildTargetFinished;
        }
コード例 #35
0
        public void Initialize(IPadWindow window)
        {
            var toolBar = window.GetToolbar(Gtk.PositionType.Top);
            CommandToolButton button = new CommandToolButton(TFSCommands.ConnectToServer, IdeApp.CommandService)
            {
                StockId = Gtk.Stock.Add
            };

            toolBar.Add(button);
            _treeView.Columns.Add(new ListViewColumn(string.Empty, new TextCellView(_name)));
            _treeView.DataSource = _treeStore;
            _content.PackStart(_treeView, true, true);
            UpdateData();

            onServersChanged = DispatchService.GuiDispatch <System.Action>(UpdateData);
            TFSVersionControlService.Instance.OnServersChange += onServersChanged;

            _treeView.RowActivated += OnRowClicked;
        }
コード例 #36
0
		public MonoDroidDeviceLog (IPadWindow container)
		{
			Stetic.BinContainer.Attach (this);
			DockItemToolbar toolbar = container.GetToolbar (PositionType.Top);
			
			var chooseDeviceButton = new Button () {
				Label = GettextCatalog.GetString ("Choose Device"),
			};
			deviceLabel = new Label () {
				Xalign = 0,
			};
			SetDeviceLabel ();
			var reconnectButton = new Button () {
				Label = GettextCatalog.GetString ("Reconnect"),
			};
			
			toolbar.Add (deviceLabel);
			toolbar.Add (chooseDeviceButton);
			toolbar.Add (reconnectButton);
			
			reconnectButton.Clicked += delegate {
				Disconnect ();
				if (Device != null)
					Connect ();
				else
					SetDeviceLabel ();
			};
			chooseDeviceButton.Clicked += delegate {
				Device = MonoDroidUtility.ChooseDevice (null);
			};
			
			log = new LogView ();
			this.Add (log);
			
			toolbar.ShowAll ();
			ShowAll ();
		}
コード例 #37
0
ファイル: DefaultMonitorPad.cs プロジェクト: t9up/monodevelop
        protected override void Initialize(IPadWindow window)
        {
            window.Icon = icon;

            DockItemToolbar toolbar = window.GetToolbar(DockPositionType.Right);

            buttonStop             = new Button(new ImageView(Stock.Stop, IconSize.Menu));
            buttonStop.Clicked    += new EventHandler(OnButtonStopClick);
            buttonStop.TooltipText = GettextCatalog.GetString("Stop");
            toolbar.Add(buttonStop);

            buttonClear             = new Button(new ImageView(Stock.Broom, IconSize.Menu));
            buttonClear.Clicked    += new EventHandler(OnButtonClearClick);
            buttonClear.TooltipText = GettextCatalog.GetString("Clear console");
            toolbar.Add(buttonClear);

            buttonPin       = new ToggleButton();
            buttonPin.Image = new ImageView(Stock.PinUp, IconSize.Menu);
            buttonPin.Image.ShowAll();
            buttonPin.Clicked    += new EventHandler(OnButtonPinClick);
            buttonPin.TooltipText = GettextCatalog.GetString("Pin output pad");
            toolbar.Add(buttonPin);
            toolbar.ShowAll();
        }
コード例 #38
0
		protected override void Initialize (IPadWindow window)
		{
			window.Icon = icon;
			
			DockItemToolbar toolbar = window.GetToolbar (DockPositionType.Right);

			buttonStop = new Button (new ImageView (Stock.Stop, IconSize.Menu));
			buttonStop.Clicked += new EventHandler (OnButtonStopClick);
			buttonStop.TooltipText = GettextCatalog.GetString ("Stop");
			toolbar.Add (buttonStop);

			buttonClear = new Button (new ImageView (Stock.Broom, IconSize.Menu));
			buttonClear.Clicked += new EventHandler (OnButtonClearClick);
			buttonClear.TooltipText = GettextCatalog.GetString ("Clear console");
			toolbar.Add (buttonClear);

			buttonPin = new ToggleButton ();
			buttonPin.Image = new ImageView (Stock.PinUp, IconSize.Menu);
			buttonPin.Image.ShowAll ();
			buttonPin.Clicked += new EventHandler (OnButtonPinClick);
			buttonPin.TooltipText = GettextCatalog.GetString ("Pin output pad");
			toolbar.Add (buttonPin);
			toolbar.ShowAll ();
		}
コード例 #39
0
		public void Initialize (IPadWindow window)
		{
			DockItemToolbar toolbar = window.GetToolbar (Gtk.PositionType.Top);
			
			Gtk.Button goUp = new Gtk.Button (new Gtk.Image (Gtk.Stock.GoUp, Gtk.IconSize.Menu));
			goUp.TooltipText = GettextCatalog.GetString ("Go up one level");
			goUp.Clicked += delegate {
				fb.GoUp ();
			};
			toolbar.Add (goUp);
			
			Gtk.Button goHome = new Gtk.Button (new Gtk.Image (Gtk.Stock.Home, Gtk.IconSize.Menu));
			goHome.TooltipText = GettextCatalog.GetString ("Home");
			goHome.Clicked += delegate {
				fb.GoHome ();
			};
			toolbar.Add (goHome);
			
			Gtk.Entry entry = new Gtk.Entry ();
			entry.TooltipText = GettextCatalog.GetString ("Location");
			entry.Activated += delegate {
				fb.GoPath (entry.Text);
			};
			
			fb.DirectoryChangedEvent += delegate {
				entry.Text = fb.CurrentDir;
				goUp.Sensitive = System.IO.Path.GetPathRoot (fb.CurrentDir) != fb.CurrentDir;
			};
			toolbar.Add (entry, true);
			toolbar.ShowAll ();
		}
コード例 #40
0
        public void Initialize(IPadWindow window)
        {
            // Toolbar and menu definitions

            ActionCommand gotoCmd       = new ActionCommand(LocalCommands.GoToFile, GettextCatalog.GetString("Go to File"));
            ActionCommand propertiesCmd = new ActionCommand(LocalCommands.Properties, GettextCatalog.GetString("Properties"), Gtk.Stock.Properties);

            menuSet = new CommandEntrySet();
            menuSet.Add(gotoCmd);
            menuSet.AddSeparator();
            menuSet.AddItem(DebugCommands.EnableDisableBreakpoint);
            menuSet.AddItem(DebugCommands.ClearAllBreakpoints);
            menuSet.AddItem(DebugCommands.DisableAllBreakpoints);
            menuSet.AddItem(EditCommands.DeleteKey);
            menuSet.AddSeparator();
            menuSet.Add(propertiesCmd);

            CommandEntrySet toolbarSet = new CommandEntrySet();

            toolbarSet.AddItem(DebugCommands.EnableDisableBreakpoint);
            toolbarSet.AddItem(DebugCommands.ClearAllBreakpoints);
            toolbarSet.AddItem(DebugCommands.DisableAllBreakpoints);
            toolbarSet.AddItem(EditCommands.Delete);
            toolbarSet.AddSeparator();
            toolbarSet.Add(propertiesCmd);

            // The breakpoint list

            store = new TreeStore(typeof(string), typeof(bool), typeof(string), typeof(object), typeof(string), typeof(string), typeof(string), typeof(string));

            tree                = new PadTreeView();
            tree.Model          = store;
            tree.RulesHint      = true;
            tree.HeadersVisible = true;
            tree.DoPopupMenu    = ShowPopup;
            tree.KeyPressEvent += OnKeyPressEvent;

            treeState = new TreeViewState(tree, (int)Columns.Breakpoint);

            TreeViewColumn col = new TreeViewColumn();
            CellRenderer   crp = new CellRendererIcon();

            col.PackStart(crp, false);
            col.AddAttribute(crp, "stock_id", (int)Columns.Icon);
            tree.AppendColumn(col);

            Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle();
            toggleRender.Toggled += new ToggledHandler(ItemToggled);
            col = new TreeViewColumn();
            col.PackStart(toggleRender, false);
            col.AddAttribute(toggleRender, "active", (int)Columns.Selected);
            tree.AppendColumn(col);

            TreeViewColumn FrameCol = new TreeViewColumn();
            CellRenderer   crt      = tree.TextRenderer;

            FrameCol.Title = GettextCatalog.GetString("Name");
            FrameCol.PackStart(crt, true);
            FrameCol.AddAttribute(crt, "text", (int)Columns.FileName);
            FrameCol.Resizable = true;
            FrameCol.Alignment = 0.0f;
            tree.AppendColumn(FrameCol);

            col           = tree.AppendColumn(GettextCatalog.GetString("Condition"), crt, "text", (int)Columns.Condition);
            col.Resizable = true;

            col           = tree.AppendColumn(GettextCatalog.GetString("Trace Expression"), crt, "text", (int)Columns.TraceExp);
            col.Resizable = true;

            col           = tree.AppendColumn(GettextCatalog.GetString("Hit Count"), crt, "text", (int)Columns.HitCount);
            col.Resizable = true;

            col           = tree.AppendColumn(GettextCatalog.GetString("Last Trace"), crt, "text", (int)Columns.LastTrace);
            col.Resizable = true;

            sw            = new Gtk.ScrolledWindow();
            sw.ShadowType = ShadowType.None;
            sw.Add(tree);

            control = sw;

            control.ShowAll();

            bps = DebuggingService.Breakpoints;

            UpdateDisplay();

            breakpointUpdatedHandler = DispatchService.GuiDispatch <EventHandler <BreakpointEventArgs> > (OnBreakpointUpdated);
            breakpointRemovedHandler = DispatchService.GuiDispatch <EventHandler <BreakpointEventArgs> > (OnBreakpointRemoved);
            breakpointAddedHandler   = DispatchService.GuiDispatch <EventHandler <BreakpointEventArgs> > (OnBreakpointAdded);
            breakpointChangedHandler = DispatchService.GuiDispatch <EventHandler> (OnBreakpointChanged);

            DebuggingService.Breakpoints.BreakpointAdded   += breakpointAddedHandler;
            DebuggingService.Breakpoints.BreakpointRemoved += breakpointRemovedHandler;
            DebuggingService.Breakpoints.Changed           += breakpointChangedHandler;
            DebuggingService.Breakpoints.BreakpointUpdated += breakpointUpdatedHandler;

            DebuggingService.PausedEvent  += OnDebuggerStatusCheck;
            DebuggingService.ResumedEvent += OnDebuggerStatusCheck;
            DebuggingService.StoppedEvent += OnDebuggerStatusCheck;

            tree.RowActivated += OnRowActivated;

            DockItemToolbar toolbar = window.GetToolbar(PositionType.Top);

            toolbar.Add(toolbarSet, sw);
            toolbar.ShowAll();
        }
コード例 #41
0
ファイル: BreakpointPad.cs プロジェクト: IBBoard/monodevelop
		public void Initialize (IPadWindow window)
		{
			// Toolbar and menu definitions
			
			ActionCommand gotoCmd = new ActionCommand (LocalCommands.GoToFile, GettextCatalog.GetString ("Go to File"));
			ActionCommand propertiesCmd = new ActionCommand (LocalCommands.Properties, GettextCatalog.GetString ("Properties"), Gtk.Stock.Properties);
			
			menuSet = new CommandEntrySet ();
			menuSet.Add (gotoCmd);
			menuSet.AddSeparator ();
			menuSet.AddItem (DebugCommands.EnableDisableBreakpoint);
			menuSet.AddItem (DebugCommands.ClearAllBreakpoints);
			menuSet.AddItem (DebugCommands.DisableAllBreakpoints);
			menuSet.AddItem (EditCommands.DeleteKey);
			menuSet.AddSeparator ();
			menuSet.Add (propertiesCmd);
			
			CommandEntrySet toolbarSet = new CommandEntrySet ();
			toolbarSet.AddItem (DebugCommands.EnableDisableBreakpoint);
			toolbarSet.AddItem (DebugCommands.ClearAllBreakpoints);
			toolbarSet.AddItem (DebugCommands.DisableAllBreakpoints);
			toolbarSet.AddItem (EditCommands.Delete);
			toolbarSet.AddSeparator ();
			toolbarSet.Add (propertiesCmd);
			
			// The breakpoint list
			
			store = new TreeStore (typeof(string), typeof (bool), typeof(string), typeof(object), typeof(string), typeof(string), typeof(string), typeof(string));

			tree = new PadTreeView ();
			tree.Model = store;
			tree.RulesHint = true;
			tree.HeadersVisible = true;
			tree.DoPopupMenu = ShowPopup;
			tree.KeyPressEvent += OnKeyPressEvent;
			
			treeState = new TreeViewState (tree, (int) Columns.Breakpoint);
							
			TreeViewColumn col = new TreeViewColumn ();
			CellRenderer crp = new CellRendererIcon ();
			col.PackStart (crp, false);
			col.AddAttribute (crp, "stock_id", (int) Columns.Icon);
			tree.AppendColumn (col);
			
			Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle ();
			toggleRender.Toggled += new ToggledHandler (ItemToggled);
			col = new TreeViewColumn ();
			col.PackStart (toggleRender, false);
			col.AddAttribute (toggleRender, "active", (int) Columns.Selected);
			tree.AppendColumn (col);
			
			TreeViewColumn FrameCol = new TreeViewColumn ();
			CellRenderer crt = tree.TextRenderer;
			FrameCol.Title = GettextCatalog.GetString ("Name");
			FrameCol.PackStart (crt, true);
			FrameCol.AddAttribute (crt, "text", (int) Columns.FileName);
			FrameCol.Resizable = true;
			FrameCol.Alignment = 0.0f;
			tree.AppendColumn (FrameCol);

			col = tree.AppendColumn (GettextCatalog.GetString ("Condition"), crt, "text", (int) Columns.Condition);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Trace Expression"), crt, "text", (int) Columns.TraceExp);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Hit Count"), crt, "text", (int) Columns.HitCount);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Last Trace"), crt, "text", (int) Columns.LastTrace);
			col.Resizable = true;
			
			sw = new Gtk.ScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			sw.Add (tree);
			
			control = sw;
			
			control.ShowAll ();
			
			bps = DebuggingService.Breakpoints;
			
			UpdateDisplay ();

			breakpointUpdatedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointUpdated);
			breakpointRemovedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointRemoved);
			breakpointAddedHandler = DispatchService.GuiDispatch<EventHandler<BreakpointEventArgs>> (OnBreakpointAdded);
			breakpointChangedHandler = DispatchService.GuiDispatch<EventHandler> (OnBreakpointChanged);
			
			DebuggingService.Breakpoints.BreakpointAdded += breakpointAddedHandler;
			DebuggingService.Breakpoints.BreakpointRemoved += breakpointRemovedHandler;
			DebuggingService.Breakpoints.Changed += breakpointChangedHandler;
			DebuggingService.Breakpoints.BreakpointUpdated += breakpointUpdatedHandler;
			
			DebuggingService.PausedEvent += OnDebuggerStatusCheck;
			DebuggingService.ResumedEvent += OnDebuggerStatusCheck;
			DebuggingService.StoppedEvent += OnDebuggerStatusCheck;
			
			tree.RowActivated += OnRowActivated;
			
			DockItemToolbar toolbar = window.GetToolbar (PositionType.Top);
			toolbar.Add (toolbarSet, sw);
			toolbar.ShowAll ();
		}
コード例 #42
0
		protected override void Initialize (IPadWindow window)
		{
			window.Title = GettextCatalog.GetString ("Errors");

			DockItemToolbar toolbar = window.GetToolbar (DockPositionType.Top);
			
			errorBtn = new ToggleButton { Name = "toggleErrors" };
			errorBtn.Active = ShowErrors;
			errorBtn.Image = new Gtk.Image (Stock.Error, Gtk.IconSize.Menu);
			errorBtn.Image.Show ();
			errorBtn.Toggled += new EventHandler (FilterChanged);
			errorBtn.TooltipText = GettextCatalog.GetString ("Show Errors");
			UpdateErrorsNum();
			toolbar.Add (errorBtn);
			
			warnBtn = new ToggleButton  { Name = "toggleWarnings" };
			warnBtn.Active = ShowWarnings;
			warnBtn.Image = new Gtk.Image (Stock.Warning, Gtk.IconSize.Menu);
			warnBtn.Image.Show ();
			warnBtn.Toggled += new EventHandler (FilterChanged);
			warnBtn.TooltipText = GettextCatalog.GetString ("Show Warnings");
			UpdateWarningsNum();
			toolbar.Add (warnBtn);

			msgBtn = new ToggleButton  { Name = "toggleMessages" };
			msgBtn.Active = ShowMessages;
			msgBtn.Image = new Gtk.Image (Stock.Information, Gtk.IconSize.Menu);
			msgBtn.Image.Show ();
			msgBtn.Toggled += new EventHandler (FilterChanged);
			msgBtn.TooltipText = GettextCatalog.GetString ("Show Messages");
			UpdateMessagesNum();
			toolbar.Add (msgBtn);
			
			toolbar.Add (new SeparatorToolItem ());
			
			logBtn = new ToggleButton { Name = "toggleBuildOutput" };
			logBtn.Label = GettextCatalog.GetString ("Build Output");
			logBtn.Image = ImageService.GetImage ("md-message-log", Gtk.IconSize.Menu);
			logBtn.Image.Show ();
			logBtn.TooltipText = GettextCatalog.GetString ("Show build output");
			logBtn.Toggled += HandleLogBtnToggled;
			toolbar.Add (logBtn);

			//Dummy widget to take all space between "Build Output" button and SearchEntry
			toolbar.Add (new HBox (), true);

			searchEntry = new SearchEntry ();
			searchEntry.Entry.Changed += searchPatternChanged;
			searchEntry.WidthRequest = 200;
			searchEntry.Visible = true;
			toolbar.Add (searchEntry);

			toolbar.ShowAll ();

			UpdatePadIcon ();
		}
コード例 #43
0
		void InitializeSortingWidgets (IPadWindow window)
		{
			groupToggleButton = new ToggleButton ();
			groupToggleButton.Image = new Image (ImageService.GetPixbuf ("md-design-categorise", IconSize.Menu));
			groupToggleButton.Toggled += new EventHandler (OnButtonGroupClicked);
			groupToggleButton.TooltipText = GettextCatalog.GetString ("Group entries by type");

			sortAlphabeticallyToggleButton = new ToggleButton ();
			sortAlphabeticallyToggleButton.Image = new Image (Gtk.Stock.SortAscending, IconSize.Menu);
			sortAlphabeticallyToggleButton.Toggled += new EventHandler (OnButtonSortAlphabeticallyClicked);
			sortAlphabeticallyToggleButton.TooltipText = GettextCatalog.GetString ("Sort entries alphabetically");

			preferencesButton = new DockToolButton (Gtk.Stock.Preferences);
			preferencesButton.Image = new Image (Gtk.Stock.Preferences, IconSize.Menu);
			preferencesButton.Clicked += new EventHandler (OnButtonPreferencesClicked);
			preferencesButton.TooltipText = GettextCatalog.GetString ("Open preferences dialog");

			separator = new VSeparator ();

			toolbar = window.GetToolbar (PositionType.Top);
			toolbar.Add (groupToggleButton);
			toolbar.Add (sortAlphabeticallyToggleButton);
			toolbar.Add (separator);
			toolbar.Add (preferencesButton);
			toolbar.ShowAll ();

			toolbar.Visible = false;
		}
コード例 #44
0
ファイル: ErrorListPad.cs プロジェクト: sim756/monodevelop
        protected override void Initialize(IPadWindow window)
        {
            window.Title = GettextCatalog.GetString("Errors");

            DockItemToolbar toolbar = window.GetToolbar(DockPositionType.Top);

            toolbar.Accessible.Name = "ErrorPad.Toolbar";
            toolbar.Accessible.SetLabel("Error Pad Toolbar");
            toolbar.Accessible.SetRole("AXToolbar", "Pad toolbar");
            toolbar.Accessible.Description = GettextCatalog.GetString("The Error pad toolbar");

            errorBtn = MakeButton(Stock.Error, "toggleErrors", ShowErrors, out errorBtnLbl);
            errorBtn.Accessible.Name = "ErrorPad.ErrorButton";

            errorBtn.Toggled               += new EventHandler(FilterChanged);
            errorBtn.TooltipText            = GettextCatalog.GetString("Show Errors");
            errorBtn.Accessible.Description = GettextCatalog.GetString("Show Errors");
            UpdateErrorsNum();
            toolbar.Add(errorBtn);

            warnBtn = MakeButton(Stock.Warning, "toggleWarnings", ShowWarnings, out warnBtnLbl);
            warnBtn.Accessible.Name        = "ErrorPad.WarningButton";
            warnBtn.Toggled               += new EventHandler(FilterChanged);
            warnBtn.TooltipText            = GettextCatalog.GetString("Show Warnings");
            warnBtn.Accessible.Description = GettextCatalog.GetString("Show Warnings");
            UpdateWarningsNum();
            toolbar.Add(warnBtn);

            msgBtn = MakeButton(Stock.Information, "toggleMessages", ShowMessages, out msgBtnLbl);
            msgBtn.Accessible.Name        = "ErrorPad.MessageButton";
            msgBtn.Toggled               += new EventHandler(FilterChanged);
            msgBtn.TooltipText            = GettextCatalog.GetString("Show Messages");
            msgBtn.Accessible.Description = GettextCatalog.GetString("Show Messages");
            UpdateMessagesNum();
            toolbar.Add(msgBtn);

            var sep = new SeparatorToolItem();

            sep.Accessible.SetShouldIgnore(true);
            toolbar.Add(sep);

            logBtn = MakeButton("md-message-log", "toggleBuildOutput", out logBtnLbl);
            logBtn.Accessible.Name        = "ErrorPad.LogButton";
            logBtn.TooltipText            = GettextCatalog.GetString("Show build output");
            logBtn.Accessible.Description = GettextCatalog.GetString("Show build output");

            logBtnLbl.Text = GettextCatalog.GetString("Build Output");
            logBtn.Accessible.SetTitle(logBtnLbl.Text);

            logBtn.Clicked += HandleLogBtnClicked;
            toolbar.Add(logBtn);

            buildOutput = new BuildOutput();

            //Dummy widget to take all space between "Build Output" button and SearchEntry
            var spacer = new HBox();

            spacer.Accessible.SetShouldIgnore(true);
            toolbar.Add(spacer, true);

            searchEntry = new SearchEntry();
            searchEntry.Accessible.SetLabel(GettextCatalog.GetString("Search"));
            searchEntry.Accessible.Name        = "ErrorPad.Search";
            searchEntry.Accessible.Description = GettextCatalog.GetString("Search the error data");
            searchEntry.Entry.Changed         += searchPatternChanged;
            searchEntry.WidthRequest           = 200;
            searchEntry.Visible = true;
            toolbar.Add(searchEntry);

            toolbar.ShowAll();

            UpdatePadIcon();

            IdeApp.ProjectOperations.StartBuild += OnBuildStarted;
        }
コード例 #45
0
        public override void Initialize(IPadWindow container)
        {
            DockItemToolbar toolbar = container.GetToolbar (PositionType.Right);

            var clearButton = new Button (new Gtk.Image (Ide.Gui.Stock.Broom, IconSize.Menu));
            clearButton.Clicked += ButtonClearClick;
            clearButton.TooltipText = GettextCatalog.GetString ("Clear");
            toolbar.Add (clearButton);
            toolbar.ShowAll ();
            Control.ShowAll ();
        }
コード例 #46
0
ファイル: BreakpointPad.cs プロジェクト: kdubau/monodevelop
		protected override void Initialize (IPadWindow window)
		{
			Id = "MonoDevelop.Debugger.BreakpointPad";
			// Toolbar and menu definitions
			
			ActionCommand gotoCmd = new ActionCommand (LocalCommands.GoToFile, GettextCatalog.GetString ("Go to File"));
			ActionCommand propertiesCmd = new ActionCommand (LocalCommands.Properties, GettextCatalog.GetString ("Edit Breakpoint…"), Stock.Properties);
			
			menuSet = new CommandEntrySet ();
			menuSet.Add (propertiesCmd);
			menuSet.Add (gotoCmd);
			menuSet.AddSeparator ();
			menuSet.AddItem (DebugCommands.EnableDisableBreakpoint);
			menuSet.AddItem (DebugCommands.DisableAllBreakpoints);
			menuSet.AddSeparator ();
			menuSet.AddItem (EditCommands.DeleteKey);
			menuSet.AddItem (DebugCommands.ClearAllBreakpoints);
			
			CommandEntrySet toolbarSet = new CommandEntrySet ();
			toolbarSet.AddItem (DebugCommands.EnableDisableBreakpoint);
			toolbarSet.AddItem (DebugCommands.ClearAllBreakpoints);
			toolbarSet.AddItem (DebugCommands.DisableAllBreakpoints);
			toolbarSet.AddItem (EditCommands.Delete);
			toolbarSet.AddSeparator ();
			toolbarSet.Add (propertiesCmd);
			toolbarSet.AddSeparator ();
			toolbarSet.Add (new CommandEntry (DebugCommands.NewFunctionBreakpoint){ DisplayType = CommandEntryDisplayType.IconAndText });
			toolbarSet.Add (new CommandEntry (DebugCommands.NewCatchpoint){ DisplayType = CommandEntryDisplayType.IconAndText });
			
			// The breakpoint list
			
			store = new TreeStore (typeof(string), typeof (bool), typeof(string), typeof(object), typeof(string), typeof(string), typeof(string), typeof(string));
			SemanticModelAttribute modelAttr = new SemanticModelAttribute ("store__Icon", "store__Selected","store_FileName",
				"store_Breakpoint", "store_Condition", "store_TraceExp", "store_HitCount", "store_LastTrace");
			TypeDescriptor.AddAttributes (store, modelAttr);

			tree = new PadTreeView ();
			tree.Model = store;
			tree.RulesHint = true;
			tree.HeadersVisible = true;
			tree.DoPopupMenu = ShowPopup;
			tree.KeyPressEvent += OnKeyPressEvent;
			tree.Selection.Mode = SelectionMode.Multiple;
			
			treeState = new TreeViewState (tree, (int) Columns.Breakpoint);
							
			TreeViewColumn col = new TreeViewColumn ();
			CellRenderer crp = new CellRendererImage ();
			col.PackStart (crp, false);
			col.AddAttribute (crp, "stock_id", (int) Columns.Icon);
			tree.AppendColumn (col);
			
			Gtk.CellRendererToggle toggleRender = new Gtk.CellRendererToggle ();
			toggleRender.Toggled += new ToggledHandler (ItemToggled);
			col = new TreeViewColumn ();
			col.PackStart (toggleRender, false);
			col.AddAttribute (toggleRender, "active", (int) Columns.Selected);
			tree.AppendColumn (col);
			
			TreeViewColumn FrameCol = new TreeViewColumn ();
			CellRenderer crt = tree.TextRenderer;
			FrameCol.Title = GettextCatalog.GetString ("Name");
			FrameCol.PackStart (crt, true);
			FrameCol.AddAttribute (crt, "text", (int) Columns.FileName);
			FrameCol.Resizable = true;
			FrameCol.Alignment = 0.0f;
			tree.AppendColumn (FrameCol);

			col = tree.AppendColumn (GettextCatalog.GetString ("Condition"), crt, "text", (int) Columns.Condition);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Trace Expression"), crt, "text", (int) Columns.TraceExp);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Hit Count"), crt, "text", (int) Columns.HitCount);
			col.Resizable = true;
			
			col = tree.AppendColumn (GettextCatalog.GetString ("Last Trace"), crt, "text", (int) Columns.LastTrace);
			col.Resizable = true;
			
			sw = new Gtk.ScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			sw.Add (tree);
			
			control = sw;
			
			control.ShowAll ();
			
			breakpoints = DebuggingService.Breakpoints;
			
			UpdateDisplay ();

			breakpoints.BreakpointAdded += OnBreakpointAdded;
			breakpoints.BreakpointRemoved += OnBreakpointRemoved;
			breakpoints.Changed += OnBreakpointChanged;
			breakpoints.BreakpointUpdated += OnBreakpointUpdated;
			
			DebuggingService.PausedEvent += OnDebuggerStatusCheck;
			DebuggingService.ResumedEvent += OnDebuggerStatusCheck;
			DebuggingService.StoppedEvent += OnDebuggerStatusCheck;
			
			tree.RowActivated += OnRowActivated;
			
			DockItemToolbar toolbar = window.GetToolbar (DockPositionType.Top);
			toolbar.Add (toolbarSet, sw);
			toolbar.ShowAll ();
		}
コード例 #47
0
		public override void Initialize (IPadWindow container)
		{
			base.Initialize (container);
			grid.SetToolbarProvider (new DockToolbarProvider (container.GetToolbar (Gtk.PositionType.Top)));
		}
コード例 #48
0
ファイル: ErrorListPad.cs プロジェクト: segaman/monodevelop
		void IPadContent.Initialize (IPadWindow window)
		{
			window.Title = GettextCatalog.GetString ("Errors");

			DockItemToolbar toolbar = window.GetToolbar (PositionType.Top);
			
			errorBtn = new ToggleButton ();
			errorBtn.Active = (bool)PropertyService.Get (showErrorsPropertyName, true);
			errorBtn.Image = new Gtk.Image (Stock.Error, Gtk.IconSize.Menu);
			errorBtn.Image.Show ();
			errorBtn.Toggled += new EventHandler (FilterChanged);
			errorBtn.TooltipText = GettextCatalog.GetString ("Show Errors");
			UpdateErrorsNum();
			toolbar.Add (errorBtn);
			
			warnBtn = new ToggleButton ();
			warnBtn.Active = (bool)PropertyService.Get (showWarningsPropertyName, true);
			warnBtn.Image = new Gtk.Image (Stock.Warning, Gtk.IconSize.Menu);
			warnBtn.Image.Show ();
			warnBtn.Toggled += new EventHandler (FilterChanged);
			warnBtn.TooltipText = GettextCatalog.GetString ("Show Warnings");
			UpdateWarningsNum();
			toolbar.Add (warnBtn);
			
			msgBtn = new ToggleButton ();
			msgBtn.Active = (bool)PropertyService.Get (showMessagesPropertyName, true);
			msgBtn.Image = new Gtk.Image (Gtk.Stock.DialogInfo, Gtk.IconSize.Menu);
			msgBtn.Image.Show ();
			msgBtn.Toggled += new EventHandler (FilterChanged);
			msgBtn.TooltipText = GettextCatalog.GetString ("Show Messages");
			UpdateMessagesNum();
			toolbar.Add (msgBtn);
			
			toolbar.Add (new SeparatorToolItem ());
			
			logBtn = new ToggleButton ();
			logBtn.Label = GettextCatalog.GetString ("Build Output");
			logBtn.Image = ImageService.GetImage ("md-message-log", Gtk.IconSize.Menu);
			logBtn.Image.Show ();
			logBtn.TooltipText = GettextCatalog.GetString ("Show build output");
			logBtn.Toggled += HandleLogBtnToggled;
			toolbar.Add (logBtn);
			
			toolbar.ShowAll ();
		}
コード例 #49
0
ファイル: Toolbox.cs プロジェクト: Kalnor/monodevelop
		public Toolbox (ToolboxService toolboxService, IPadWindow container)
		{			
			this.toolboxService = toolboxService;
			this.container = container;
			
			#region Toolbar
			DockItemToolbar toolbar = container.GetToolbar (PositionType.Top);
		
			filterEntry = new SearchEntry();
			filterEntry.Ready = true;
			filterEntry.HasFrame = true;
			filterEntry.WidthRequest = 150;
			filterEntry.Changed += new EventHandler (filterTextChanged);
			filterEntry.Show ();

			toolbar.Add (filterEntry, true);
			
			catToggleButton = new ToggleButton ();
			catToggleButton.Image = new Image (Ide.Gui.Stock.GroupByCategory, IconSize.Menu);
			catToggleButton.Toggled += new EventHandler (toggleCategorisation);
			catToggleButton.TooltipText = GettextCatalog.GetString ("Show categories");
			toolbar.Add (catToggleButton);
			
			compactModeToggleButton = new ToggleButton ();
			compactModeToggleButton.Image = new ImageView (ImageService.GetIcon ("md-compact-display", IconSize.Menu));
			compactModeToggleButton.Toggled += new EventHandler (ToggleCompactMode);
			compactModeToggleButton.TooltipText = GettextCatalog.GetString ("Use compact display");
			toolbar.Add (compactModeToggleButton);
	
			toolboxAddButton = new Button (new Gtk.Image (Ide.Gui.Stock.Add, IconSize.Menu));
			toolbar.Add (toolboxAddButton);
			toolboxAddButton.TooltipText = GettextCatalog.GetString ("Add toolbox items");
			toolboxAddButton.Clicked += new EventHandler (toolboxAddButton_Clicked);
			toolbar.ShowAll ();

			#endregion
			
			toolboxWidget = new ToolboxWidget ();
			toolboxWidget.SelectedItemChanged += delegate {
				selectedNode = this.toolboxWidget.SelectedItem != null ? this.toolboxWidget.SelectedItem.Tag as ItemToolboxNode : null;
				toolboxService.SelectItem (selectedNode);
			};
			this.toolboxWidget.DragBegin += delegate(object sender, Gtk.DragBeginArgs e) {
				
				if (this.toolboxWidget.SelectedItem != null) {
					this.toolboxWidget.HideTooltipWindow ();
					toolboxService.DragSelectedItem (this.toolboxWidget, e.Context);
				}
			};
			this.toolboxWidget.ActivateSelectedItem += delegate {
				toolboxService.UseSelectedItem ();
			};
			
			fontChanger = new MonoDevelop.Ide.Gui.PadFontChanger (toolboxWidget, toolboxWidget.SetCustomFont, toolboxWidget.QueueResize);
			
			this.toolboxWidget.DoPopupMenu = ShowPopup;
			
			scrolledWindow = new MonoDevelop.Components.CompactScrolledWindow ();
			base.PackEnd (scrolledWindow, true, true, 0);
			base.FocusChain = new Gtk.Widget [] { scrolledWindow };
			
			//Initialise self
			scrolledWindow.ShadowType = ShadowType.None;
			scrolledWindow.VscrollbarPolicy = PolicyType.Automatic;
			scrolledWindow.HscrollbarPolicy = PolicyType.Never;
			scrolledWindow.WidthRequest = 150;
			scrolledWindow.Add (this.toolboxWidget);
			
			//update view when toolbox service updated
			toolboxService.ToolboxContentsChanged += delegate { Refresh (); };
			toolboxService.ToolboxConsumerChanged += delegate { Refresh (); };
			Refresh ();
			
			//set initial state
			this.toolboxWidget.ShowCategories = catToggleButton.Active = true;
			compactModeToggleButton.Active = MonoDevelop.Core.PropertyService.Get ("ToolboxIsInCompactMode", false);
			this.toolboxWidget.IsListMode  = !compactModeToggleButton.Active;
			this.ShowAll ();
		}
コード例 #50
0
        public Toolbox(ToolboxService toolboxService, IPadWindow container)
        {
            this.toolboxService = toolboxService;
            this.container      = container;

            #region Toolbar
            DockItemToolbar toolbar = container.GetToolbar(PositionType.Top);

            filterEntry              = new SearchEntry();
            filterEntry.Ready        = true;
            filterEntry.HasFrame     = true;
            filterEntry.WidthRequest = 150;
            filterEntry.Changed     += new EventHandler(filterTextChanged);
            filterEntry.Show();

            toolbar.Add(filterEntry, true);

            catToggleButton             = new ToggleButton();
            catToggleButton.Image       = new Image(Ide.Gui.Stock.GroupByCategory, IconSize.Menu);
            catToggleButton.Toggled    += new EventHandler(toggleCategorisation);
            catToggleButton.TooltipText = GettextCatalog.GetString("Show categories");
            toolbar.Add(catToggleButton);

            compactModeToggleButton             = new ToggleButton();
            compactModeToggleButton.Image       = new ImageView(ImageService.GetIcon("md-compact-display", IconSize.Menu));
            compactModeToggleButton.Toggled    += new EventHandler(ToggleCompactMode);
            compactModeToggleButton.TooltipText = GettextCatalog.GetString("Use compact display");
            toolbar.Add(compactModeToggleButton);

            toolboxAddButton = new Button(new Gtk.Image(Ide.Gui.Stock.Add, IconSize.Menu));
            toolbar.Add(toolboxAddButton);
            toolboxAddButton.TooltipText = GettextCatalog.GetString("Add toolbox items");
            toolboxAddButton.Clicked    += new EventHandler(toolboxAddButton_Clicked);
            toolbar.ShowAll();

            #endregion

            toolboxWidget = new ToolboxWidget();
            toolboxWidget.SelectedItemChanged += delegate {
                selectedNode = this.toolboxWidget.SelectedItem != null ? this.toolboxWidget.SelectedItem.Tag as ItemToolboxNode : null;
                toolboxService.SelectItem(selectedNode);
            };
            this.toolboxWidget.DragBegin += delegate(object sender, Gtk.DragBeginArgs e) {
                if (this.toolboxWidget.SelectedItem != null)
                {
                    this.toolboxWidget.HideTooltipWindow();
                    toolboxService.DragSelectedItem(this.toolboxWidget, e.Context);
                }
            };
            this.toolboxWidget.ActivateSelectedItem += delegate {
                toolboxService.UseSelectedItem();
            };

            fontChanger = new MonoDevelop.Ide.Gui.PadFontChanger(toolboxWidget, toolboxWidget.SetCustomFont, toolboxWidget.QueueResize);

            this.toolboxWidget.DoPopupMenu = ShowPopup;

            scrolledWindow = new MonoDevelop.Components.CompactScrolledWindow();
            base.PackEnd(scrolledWindow, true, true, 0);
            base.FocusChain = new Gtk.Widget [] { scrolledWindow };

            //Initialise self
            scrolledWindow.ShadowType       = ShadowType.None;
            scrolledWindow.VscrollbarPolicy = PolicyType.Automatic;
            scrolledWindow.HscrollbarPolicy = PolicyType.Never;
            scrolledWindow.WidthRequest     = 150;
            scrolledWindow.Add(this.toolboxWidget);

            //update view when toolbox service updated
            toolboxService.ToolboxContentsChanged += delegate { Refresh(); };
            toolboxService.ToolboxConsumerChanged += delegate { Refresh(); };
            Refresh();

            //set initial state
            this.toolboxWidget.ShowCategories = catToggleButton.Active = true;
            compactModeToggleButton.Active    = MonoDevelop.Core.PropertyService.Get("ToolboxIsInCompactMode", false);
            this.toolboxWidget.IsListMode     = !compactModeToggleButton.Active;
            this.ShowAll();
        }
コード例 #51
0
		void IPadContent.Initialize (IPadWindow window)
		{
			toolbar = window.GetToolbar (PositionType.Top);
			toolbar.Add (switcherCombo);
			toolbar.ShowAll ();
			switcherCombo.Changed += new EventHandler (OnContentSwitched);
			OnContentSwitched (null, null);
			
			separator = new VSeparator ();
		}
コード例 #52
0
        void IPadContent.Initialize(IPadWindow window)
        {
            this.window = window;

            DockItemToolbar toolbar = window.GetToolbar(PositionType.Top);

            buttonSuccess        = new ToggleButton();
            buttonSuccess.Label  = GettextCatalog.GetString("Successful Tests");
            buttonSuccess.Active = false;
            buttonSuccess.Image  = new ImageView(TestStatusIcon.Success);
            buttonSuccess.Image.Show();
            buttonSuccess.Toggled    += new EventHandler(OnShowSuccessfulToggled);
            buttonSuccess.TooltipText = GettextCatalog.GetString("Show Successful Tests");
            toolbar.Add(buttonSuccess);

            buttonInconclusive        = new ToggleButton();
            buttonInconclusive.Label  = GettextCatalog.GetString("Inconclusive Tests");
            buttonInconclusive.Active = true;
            buttonInconclusive.Image  = new ImageView(TestStatusIcon.Inconclusive);
            buttonInconclusive.Image.Show();
            buttonInconclusive.Toggled    += new EventHandler(OnShowInconclusiveToggled);
            buttonInconclusive.TooltipText = GettextCatalog.GetString("Show Inconclusive Tests");
            toolbar.Add(buttonInconclusive);

            buttonFailures        = new ToggleButton();
            buttonFailures.Label  = GettextCatalog.GetString("Failed Tests");
            buttonFailures.Active = true;
            buttonFailures.Image  = new ImageView(TestStatusIcon.Failure);
            buttonFailures.Image.Show();
            buttonFailures.Toggled    += new EventHandler(OnShowFailuresToggled);
            buttonFailures.TooltipText = GettextCatalog.GetString("Show Failed Tests");
            toolbar.Add(buttonFailures);

            buttonIgnored        = new ToggleButton();
            buttonIgnored.Label  = GettextCatalog.GetString("Ignored Tests");
            buttonIgnored.Active = true;
            buttonIgnored.Image  = new ImageView(TestStatusIcon.NotRun);
            buttonIgnored.Image.Show();
            buttonIgnored.Toggled    += new EventHandler(OnShowIgnoredToggled);
            buttonIgnored.TooltipText = GettextCatalog.GetString("Show Ignored Tests");
            toolbar.Add(buttonIgnored);

            buttonOutput        = new ToggleButton();
            buttonOutput.Label  = GettextCatalog.GetString("Output");
            buttonOutput.Active = false;
            buttonOutput.Image  = ImageService.GetImage(MonoDevelop.Ide.Gui.Stock.OutputIcon, IconSize.Menu);
            buttonOutput.Image.Show();
            buttonOutput.Toggled    += new EventHandler(OnShowOutputToggled);
            buttonOutput.TooltipText = GettextCatalog.GetString("Show Output");
            toolbar.Add(buttonOutput);

            toolbar.Add(new SeparatorToolItem());

            buttonRun       = new Button();
            buttonRun.Label = GettextCatalog.GetString("Rerun Tests");
            buttonRun.Image = new Gtk.Image(Gtk.Stock.Execute, IconSize.Menu);
            buttonRun.Image.Show();
            buttonRun.Sensitive = false;
            toolbar.Add(buttonRun);

            buttonStop = new Button(new Gtk.Image(Ide.Gui.Stock.Stop, Gtk.IconSize.Menu));
            toolbar.Add(buttonStop);
            toolbar.ShowAll();

            buttonStop.Clicked += new EventHandler(OnStopClicked);
            buttonRun.Clicked  += new EventHandler(OnRunClicked);

            // Run panel

            DockItemToolbar runPanel = window.GetToolbar(PositionType.Bottom);

            infoSep = new VSeparator();

            resultLabel.UseMarkup    = true;
            infoCurrent.Ellipsize    = Pango.EllipsizeMode.Start;
            infoCurrent.WidthRequest = 0;
            runPanel.Add(resultLabel);
            runPanel.Add(progressBar);
            runPanel.Add(infoCurrent, true, 10);

            labels = new HBox(false, 10);

            infoLabel.UseMarkup = true;

            labels.PackStart(infoLabel, true, false, 0);

            runPanel.Add(new Gtk.Label(), true);
            runPanel.Add(labels);
            runPanel.Add(infoSep, false, 10);

            progressBar.HeightRequest = infoLabel.SizeRequest().Height;
            runPanel.ShowAll();
            resultSummary = new UnitTestResult();
            UpdateCounters();
        }
コード例 #53
0
		public void Initialize (IPadWindow window)
		{
			this.window = window;
			window.PadShown += delegate {
				if (needsReload)
					Refresh ();
			};
			
			DockItemToolbar toolbar = window.GetToolbar (PositionType.Top);
			
			errorBtn = new ToggleButton ();
			errorBtn.Active = (bool)PropertyService.Get (showErrorsPropertyName, true);
			string errorTipText;
			if ((InternalLog.EnabledLoggingLevel & EnabledLoggingLevel.Error) != EnabledLoggingLevel.Error
				&& (InternalLog.EnabledLoggingLevel & EnabledLoggingLevel.Fatal) != EnabledLoggingLevel.Fatal) {
				errorBtn.Sensitive = false;
				errorTipText = GettextCatalog.GetString ("Logging of errors is not enabled");
			} else {
				errorTipText = GettextCatalog.GetString ("Show errors");
			}
			errorBtn.Image = new Gtk.Image (Gtk.Stock.DialogError, Gtk.IconSize.Menu);
			errorBtn.Image.Show ();
			errorBtn.Toggled += new EventHandler (FilterChanged);
			errorBtn.TooltipText = errorTipText;
			UpdateErrorsNum();
			toolbar.Add (errorBtn);
			
			warnBtn = new ToggleButton ();
			warnBtn.Active = (bool)PropertyService.Get (showWarningsPropertyName, true);
			string warnTipText;
			if ((InternalLog.EnabledLoggingLevel & EnabledLoggingLevel.Warn) != EnabledLoggingLevel.Warn) {
				warnBtn.Sensitive = false;
				warnTipText = GettextCatalog.GetString ("Logging of warnings is not enabled");
			} else {
				warnTipText = GettextCatalog.GetString ("Show warnings");
			}
			warnBtn.Image = new Gtk.Image (Gtk.Stock.DialogWarning, Gtk.IconSize.Menu);
			warnBtn.Image.Show ();
			warnBtn.Toggled += new EventHandler (FilterChanged);
			warnBtn.TooltipText = warnTipText;
			UpdateWarningsNum();
			toolbar.Add (warnBtn);
			
			msgBtn = new ToggleButton ();
			msgBtn.Active = (bool)PropertyService.Get (showMessagesPropertyName, true);
			string msgTipText;
			if ((InternalLog.EnabledLoggingLevel & EnabledLoggingLevel.Info) != EnabledLoggingLevel.Info) {
				msgBtn.Sensitive = false;
				msgTipText = GettextCatalog.GetString ("Logging of informational messages is not enabled");
			} else {
				msgTipText = GettextCatalog.GetString ("Show messages");
			}
			msgBtn.Image = new Gtk.Image (Gtk.Stock.DialogInfo, Gtk.IconSize.Menu);
			msgBtn.Image.Show ();
			msgBtn.Toggled += new EventHandler (FilterChanged);
			msgBtn.TooltipText = msgTipText;
			UpdateMessagesNum();
			toolbar.Add (msgBtn);
			
			debugBtn = new ToggleButton ();
			debugBtn.Active = (bool)PropertyService.Get (showDebugPropertyName, true);
			string debugTipText;
			if ((InternalLog.EnabledLoggingLevel & EnabledLoggingLevel.Debug) != EnabledLoggingLevel.Debug) {
				debugBtn.Sensitive = false;
				debugTipText = GettextCatalog.GetString ("Logging of debug messages is not enabled");
			} else {
				debugTipText = GettextCatalog.GetString ("Show debug");
			}
			debugBtn.Image = new Gtk.Image (Gtk.Stock.DialogQuestion, Gtk.IconSize.Menu);
			debugBtn.Image.Show ();
			debugBtn.Toggled += new EventHandler (FilterChanged);
			debugBtn.TooltipText = debugTipText;
			UpdateDebugNum();
			toolbar.Add (debugBtn);
			
			toolbar.Add (new SeparatorToolItem ());
			
			Gtk.Button clearBtn = new Gtk.Button (new Gtk.Image (Gtk.Stock.Clear, Gtk.IconSize.Menu));
			clearBtn.Clicked += new EventHandler (OnClearList);
			toolbar.Add (clearBtn);
			toolbar.ShowAll ();

			// Content
			
			store = new Gtk.ListStore (typeof (Gdk.Pixbuf),      // image - type
			                           typeof (string),          // desc
			                           typeof (string),          // time
			                           typeof (string),          // type string
			                           typeof (LogMessage));     // message

			TreeModelFilterVisibleFunc filterFunct = new TreeModelFilterVisibleFunc (FilterTaskTypes);
			filter = new TreeModelFilter (store, null);
            filter.VisibleFunc = filterFunct;
			
			view = new MonoDevelop.Ide.Gui.Components.PadTreeView (new Gtk.TreeModelSort (filter));
			view.RulesHint = true;
			view.PopupMenu += new PopupMenuHandler (OnPopupMenu);
			view.ButtonPressEvent += new ButtonPressEventHandler (OnButtonPressed);
			view.HeadersClickable = true;
			view.Selection.Mode = SelectionMode.Multiple;
			
			AddColumns ();
			
			sw = new Gtk.ScrolledWindow ();
			sw.ShadowType = ShadowType.None;
			sw.Add (view);
			
			LoggingService.AddLogger (this);
						
			iconWarning = sw.RenderIcon (Gtk.Stock.DialogWarning, Gtk.IconSize.Menu, "");
			iconError = sw.RenderIcon (Gtk.Stock.DialogError, Gtk.IconSize.Menu, "");
			iconInfo = sw.RenderIcon (Gtk.Stock.DialogInfo, Gtk.IconSize.Menu, "");
			iconDebug = sw.RenderIcon (Gtk.Stock.DialogQuestion, Gtk.IconSize.Menu, "");
			
			control = sw;
			sw.ShowAll ();
			
			Refresh ();

			store.SetSortFunc ((int)Columns.Time, TimeSortFunc);
			((TreeModelSort)view.Model).SetSortColumnId ((int)Columns.Time, SortType.Descending);
		}
コード例 #54
0
		void IPadContent.Initialize (IPadWindow window)
		{
			this.window = window;
			
			DockItemToolbar toolbar = window.GetToolbar (PositionType.Top);
			
			buttonSuccess = new ToggleButton ();
			buttonSuccess.Label = GettextCatalog.GetString ("Successful Tests");
			buttonSuccess.Active = false;
			buttonSuccess.Image = new ImageView (TestStatusIcon.Success);
			buttonSuccess.Image.Show ();
			buttonSuccess.Toggled += new EventHandler (OnShowSuccessfulToggled);
			buttonSuccess.TooltipText = GettextCatalog.GetString ("Show Successful Tests");
			toolbar.Add (buttonSuccess);

			buttonInconclusive = new ToggleButton ();
			buttonInconclusive.Label = GettextCatalog.GetString ("Inconclusive Tests");
			buttonInconclusive.Active = true;
			buttonInconclusive.Image = new ImageView (TestStatusIcon.Inconclusive);
			buttonInconclusive.Image.Show ();
			buttonInconclusive.Toggled += new EventHandler (OnShowInconclusiveToggled);
			buttonInconclusive.TooltipText = GettextCatalog.GetString ("Show Inconclusive Tests");
			toolbar.Add (buttonInconclusive);
			
			buttonFailures = new ToggleButton ();
			buttonFailures.Label = GettextCatalog.GetString ("Failed Tests");
			buttonFailures.Active = true;
			buttonFailures.Image = new ImageView (TestStatusIcon.Failure);
			buttonFailures.Image.Show ();
			buttonFailures.Toggled += new EventHandler (OnShowFailuresToggled);
			buttonFailures.TooltipText = GettextCatalog.GetString ("Show Failed Tests");
			toolbar.Add (buttonFailures);

			buttonIgnored = new ToggleButton ();
			buttonIgnored.Label = GettextCatalog.GetString ("Ignored Tests");
			buttonIgnored.Active = true;
			buttonIgnored.Image = new ImageView (TestStatusIcon.NotRun);
			buttonIgnored.Image.Show ();
			buttonIgnored.Toggled += new EventHandler (OnShowIgnoredToggled);
			buttonIgnored.TooltipText = GettextCatalog.GetString ("Show Ignored Tests");
			toolbar.Add (buttonIgnored);
			
			buttonOutput = new ToggleButton ();
			buttonOutput.Label = GettextCatalog.GetString ("Output");
			buttonOutput.Active = false;
			buttonOutput.Image = ImageService.GetImage (MonoDevelop.Ide.Gui.Stock.OutputIcon, IconSize.Menu);
			buttonOutput.Image.Show ();
			buttonOutput.Toggled += new EventHandler (OnShowOutputToggled);
			buttonOutput.TooltipText = GettextCatalog.GetString ("Show Output");
			toolbar.Add (buttonOutput);
			
			toolbar.Add (new SeparatorToolItem ());
			
			buttonRun = new Button ();
			buttonRun.Label = GettextCatalog.GetString ("Rerun Tests");
			buttonRun.Image = new Gtk.Image (Gtk.Stock.Execute, IconSize.Menu);
			buttonRun.Image.Show ();
			buttonRun.Sensitive = false;
			toolbar.Add (buttonRun);
			
			buttonStop = new Button (new Gtk.Image (Ide.Gui.Stock.Stop, Gtk.IconSize.Menu));
			toolbar.Add (buttonStop);
			toolbar.ShowAll ();
			
			buttonStop.Clicked += new EventHandler (OnStopClicked);
			buttonRun.Clicked += new EventHandler (OnRunClicked);
			
			// Run panel
			
			DockItemToolbar runPanel = window.GetToolbar (PositionType.Bottom);
			
			infoSep = new VSeparator ();
			
			resultLabel.UseMarkup = true;
			infoCurrent.Ellipsize = Pango.EllipsizeMode.Start;
			infoCurrent.WidthRequest = 0;
			runPanel.Add (resultLabel);
			runPanel.Add (progressBar);
			runPanel.Add (infoCurrent, true, 10);	
			
			labels = new HBox (false, 10);
			
			infoLabel.UseMarkup = true;

			labels.PackStart (infoLabel, true, false, 0);

			runPanel.Add (new Gtk.Label (), true);
			runPanel.Add (labels);
			runPanel.Add (infoSep, false, 10);
			
			progressBar.HeightRequest = infoLabel.SizeRequest ().Height;
			runPanel.ShowAll ();
			resultSummary = new UnitTestResult ();
			UpdateCounters ();
		}
コード例 #55
0
ファイル: ReplPad.cs プロジェクト: nerdshark/CSharpReplAddin
        public void Initialize(IPadWindow window)
        {
            replSessions = new Dictionary<ReplView, ReplSession> ();
            window.Icon = MonoDevelop.Ide.Gui.Stock.Console;
            emptyImage = new Image ();
            if (IdeApp.Preferences.CustomOutputPadFont != null)
                customFont = IdeApp.Preferences.CustomOutputPadFont;
            else
                customFont = FontService.DefaultMonospaceFontDescription;

            //view.AddMenuCommand("Start Interactive Session", StartInteractiveSessionHandler);
            //view.AddMenuCommand("Connect to Interactive Session", ConnectToInteractiveSessionHandler);

            notebook = new Notebook ();
            notebook.Scrollable = true;

            newReplButton = CreateNewReplButton ();
            connectToReplButton = ConnectToReplButton ();
            /*notebook.Added += (object o, AddedArgs args) => {
                currentReplView = (args.Widget as ReplView);
            };*/
            /*notebook.SwitchPage += (object o, SwitchPageArgs args) => {
                currentReplView = (notebook.GetNthPage ((int)(args.PageNum))) as ReplView;
            };
            */
            toolbar = CreateToolbar ();
            //toolbar.Add (newReplButton);

            window.GetToolbar (PositionType.Right).Add (newReplButton);
            window.GetToolbar (PositionType.Right).Add (connectToReplButton);
            window.GetToolbar (PositionType.Right).Visible = true;
            window.GetToolbar (PositionType.Right).ShowAll ();

            layout = new HBox ();
            layout.PackStart (notebook, true, true, 0);
            layout.PackEnd (toolbar, false, true, 0);
            Control = layout;
            Control.ShowAll ();
            IdeApp.Preferences.CustomOutputPadFontChanged += HandleCustomOutputPadFontChanged;

            ReplPad.Instance = this;
        }