Наследование: Gtk.Bin, IOptionsPanel
Пример #1
0
		public ColorShemeEditor (HighlightingPanel panel)
		{
			this.panel = panel;
			this.Build ();
			textEditor = new TextEditor ();
			textEditor.Options = DefaultSourceEditorOptions.Instance;
			this.scrolledwindowTextEditor.Child = textEditor;
			textEditor.ShowAll ();
			
			this.treeviewColors.AppendColumn (GettextCatalog.GetString ("Name"), new Gtk.CellRendererText (), new CellLayoutDataFunc (SyntaxCellRenderer));
			this.treeviewColors.HeadersVisible = false;
			this.treeviewColors.Model = colorStore;
			this.treeviewColors.Selection.Changed += HandleTreeviewColorsSelectionChanged;
			this.colorbuttonFg.ColorSet += Stylechanged;
			this.colorbuttonBg.ColorSet += Stylechanged;
			this.colorbuttonPrimary.ColorSet += Stylechanged;
			this.colorbuttonSecondary.ColorSet += Stylechanged;
			this.colorbuttonBorder.ColorSet += Stylechanged;
			colorbuttonBg.UseAlpha = true;
			this.checkbuttonBold.Toggled += Stylechanged;
			this.checkbuttonItalic.Toggled += Stylechanged;
			
			this.buttonOk.Clicked += HandleButtonOkClicked;
			HandleTreeviewColorsSelectionChanged (null, null);
			notebookColorChooser.ShowTabs = false;
		}
Пример #2
0
		public ColorShemeEditor (HighlightingPanel panel)
		{
			this.panel = panel;
			this.Build ();
			textEditor = new MonoTextEditor ();
			textEditor.Options = new StyledSourceEditorOptions (MonoDevelop.Ide.Editor.DefaultSourceEditorOptions.Instance);
			this.scrolledwindowTextEditor.Child = textEditor;
			textEditor.ShowAll ();
			
			this.treeviewColors.AppendColumn (GettextCatalog.GetString ("Name"), new Gtk.CellRendererText (), new CellLayoutDataFunc (SyntaxCellRenderer));
			this.treeviewColors.HeadersVisible = false;
			this.treeviewColors.Model = colorStore;
			this.treeviewColors.SearchColumn = -1; // disable the interactive search
			this.treeviewColors.Selection.Changed += HandleTreeviewColorsSelectionChanged;
			this.hpaned1.Position = 250;
			this.SetSizeRequest (1024, 768);

			this.colorbuttonFg.ColorSet += Stylechanged;
			this.colorbuttonBg.ColorSet += Stylechanged;
			this.colorbuttonPrimary.ColorSet += Stylechanged;
			this.colorbuttonSecondary.ColorSet += Stylechanged;
			this.colorbuttonBorder.ColorSet += Stylechanged;
			colorbuttonBg.UseAlpha = true;
			this.checkbuttonBold.Toggled += Stylechanged;
			this.checkbuttonItalic.Toggled += Stylechanged;
			
			this.buttonOk.Clicked += HandleButtonOkClicked;
			HandleTreeviewColorsSelectionChanged (null, null);
			notebookColorChooser.ShowTabs = false;
		}
Пример #3
0
        public ColorShemeEditor(HighlightingPanel panel)
        {
            this.panel = panel;
            this.Build();
            textEditor         = new TextEditor();
            textEditor.Options = DefaultSourceEditorOptions.Instance;
            this.scrolledwindowTextEditor.Child = textEditor;
            textEditor.ShowAll();

            this.treeviewColors.AppendColumn(GettextCatalog.GetString("Name"), new Gtk.CellRendererText(), new CellLayoutDataFunc(SyntaxCellRenderer));
            this.treeviewColors.HeadersVisible     = false;
            this.treeviewColors.Model              = colorStore;
            this.treeviewColors.Selection.Changed += HandleTreeviewColorsSelectionChanged;
            this.colorbuttonFg.ColorSet           += Stylechanged;
            this.colorbuttonBg.ColorSet           += Stylechanged;
            this.colorbuttonPrimary.ColorSet      += Stylechanged;
            this.colorbuttonSecondary.ColorSet    += Stylechanged;
            this.colorbuttonBorder.ColorSet       += Stylechanged;
            colorbuttonBg.UseAlpha          = true;
            this.checkbuttonBold.Toggled   += Stylechanged;
            this.checkbuttonItalic.Toggled += Stylechanged;

            this.buttonOk.Clicked += HandleButtonOkClicked;
            HandleTreeviewColorsSelectionChanged(null, null);
            notebookColorChooser.ShowTabs = false;
        }
Пример #4
0
        public ColorShemeEditor(HighlightingPanel panel)
        {
            this.panel = panel;
            this.Build();
            textEditor         = new MonoTextEditor();
            textEditor.Options = new StyledSourceEditorOptions(MonoDevelop.Ide.Editor.DefaultSourceEditorOptions.Instance);
            this.scrolledwindowTextEditor.Child = textEditor;
            textEditor.ShowAll();

            this.treeviewColors.AppendColumn(GettextCatalog.GetString("Name"), new Gtk.CellRendererText(), new CellLayoutDataFunc(SyntaxCellRenderer));
            this.treeviewColors.HeadersVisible     = false;
            this.treeviewColors.Model              = colorStore;
            this.treeviewColors.SearchColumn       = -1;       // disable the interactive search
            this.treeviewColors.Selection.Changed += HandleTreeviewColorsSelectionChanged;
            this.hpaned1.Position = 250;
            this.SetSizeRequest(1024, 768);

            this.colorbuttonFg.ColorSet        += Stylechanged;
            this.colorbuttonBg.ColorSet        += Stylechanged;
            this.colorbuttonPrimary.ColorSet   += Stylechanged;
            this.colorbuttonSecondary.ColorSet += Stylechanged;
            this.colorbuttonBorder.ColorSet    += Stylechanged;
            colorbuttonBg.UseAlpha              = true;
            this.checkbuttonBold.Toggled       += Stylechanged;
            this.checkbuttonItalic.Toggled     += Stylechanged;

            this.buttonOk.Clicked += HandleButtonOkClicked;
            HandleTreeviewColorsSelectionChanged(null, null);
            notebookColorChooser.ShowTabs = false;
        }
Пример #5
0
        public virtual void ApplyChanges()
        {
            DefaultSourceEditorOptions.Instance.DefaultRegionsFolding = this.foldregionsCheckbutton.Active;
            DefaultSourceEditorOptions.Instance.DefaultCommentFolding = this.foldCommentsCheckbutton.Active;
            DefaultSourceEditorOptions.Instance.LineEndingConversion  = (MonoDevelop.Ide.Editor.LineEndingConversion) this.comboboxLineEndings.Active;
            if (DefaultSourceEditorOptions.Instance.ShowFoldMargin != this.foldingCheckbutton.Active)
            {
                DefaultSourceEditorOptions.Instance.ShowFoldMargin = this.foldingCheckbutton.Active;
                HighlightingPanel.UpdateActiveDocument();
            }
//			DefaultSourceEditorOptions.Instance.WrapLines = wordWrapCheckbutton.Active;
        }
        public virtual void ApplyChanges()
        {
            DefaultSourceEditorOptions.Instance.DefaultRegionsFolding = this.foldregionsCheckbutton.Active;
            DefaultSourceEditorOptions.Instance.DefaultCommentFolding = this.foldCommentsCheckbutton.Active;
            DefaultSourceEditorOptions.Instance.LineEndingConversion  = (LineEndingConversion)this.comboboxLineEndings.Active;

            if (DefaultSourceEditorOptions.Instance.ShowFoldMargin != this.foldingCheckbutton.Active)
            {
                DefaultSourceEditorOptions.Instance.ShowFoldMargin = this.foldingCheckbutton.Active;
                HighlightingPanel.UpdateActiveDocument();
            }

            DefaultSourceEditorOptions.Instance.EnableNewEditor = this.newEditorCheckBox.Active;
        }
        public virtual void ApplyChanges()
        {
            DefaultSourceEditorOptions.Instance.EnableCodeCompletion     = this.codeCompletioncheckbutton.Active;
            DefaultSourceEditorOptions.Instance.DefaultRegionsFolding    = this.foldregionsCheckbutton.Active;
            DefaultSourceEditorOptions.Instance.DefaultCommentFolding    = this.foldCommentsCheckbutton.Active;
            DefaultSourceEditorOptions.Instance.EnableAutoCodeCompletion = this.autoCodeCompletionCheckbutton.Active;
            DefaultSourceEditorOptions.Instance.EnableParameterInsight   = this.enableParameterInsightCheckbutton.Active;
            DefaultSourceEditorOptions.Instance.UseAntiAliasing          = this.antiAliasingCheckbutton.Active;
            DefaultSourceEditorOptions.Instance.LineEndingConversion     = (LineEndingConversion)this.comboboxLineEndings.Active;
//			CompletionTextEditorExtension.HideObsoleteItems.Set (this.hideObsoleteItemsCheckbutton.Active);
            if (DefaultSourceEditorOptions.Instance.ShowFoldMargin != this.foldingCheckbutton.Active)
            {
                DefaultSourceEditorOptions.Instance.ShowFoldMargin = this.foldingCheckbutton.Active;
                HighlightingPanel.UpdateActiveDocument();
            }
        }
Пример #8
0
		public XwtColorSchemeEditor (HighlightingPanel panel)
		{
			this.panel = panel;

			this.Buttons.Add (new DialogButton (Command.Cancel));
			this.Buttons.Add (new DialogButton (Command.Ok));

			colorStore = new TreeStore (nameField, styleField, propertyField);

			var mainTable = new Table ();

			var headerTable = new Table ();
			headerTable.Add (new Label () { Text="Name:" }, 0, 0);
			headerTable.Add (entryName, 1, 0);
			headerTable.Add (new Label () { Text="Description:" }, 2, 0);
			headerTable.Add (entryDescription, 3, 0, 1, 1, true);
			mainTable.Add (headerTable, 0, 0, 1, 1, true, false, WidgetPlacement.Fill, WidgetPlacement.Start);

			var table = new Table ();

			var commandHBox = new HBox ();
			commandHBox.PackStart (new Button ("Undo"));
			commandHBox.PackStart (new Button ("Redo"));
			commandHBox.PackStart (new Button ("AutoSet"));
			table.Add (commandHBox, 0, 0);

			var adjustHBox = new HBox ();
			adjustHBox.PackStart (colorbuttonPrimary);
			adjustHBox.PackStart (colorbuttonSecondary);
			adjustHBox.PackStart (colorbuttonBorder);
			adjustHBox.PackStart (togglebuttonBold, false, WidgetPlacement.End);
			adjustHBox.PackStart (togglebuttonItalic, false, WidgetPlacement.End);
			adjustHBox.PackStart (buttonFormat, false, WidgetPlacement.End);
			table.Add (adjustHBox, 0, 1);

			this.colorbuttonPrimary.ColorSet += StyleChanged;
			this.colorbuttonSecondary.ColorSet += StyleChanged;
			this.colorbuttonBorder.ColorSet += StyleChanged;
			this.togglebuttonBold.Toggled += StyleChanged;
			this.togglebuttonItalic.Toggled += StyleChanged;

			this.textEditor = new TextEditor ();
			this.textEditor.Options = DefaultSourceEditorOptions.Instance;
			this.textEditor.ShowAll ();
			var toolkit = Toolkit.CurrentEngine;
			var wrappedTextEditor = toolkit.WrapWidget (textEditor);
			var scrollView = new ScrollView (wrappedTextEditor) {
				HorizontalScrollPolicy=ScrollPolicy.Always,
				VerticalScrollPolicy=ScrollPolicy.Always
			};
			table.Add (scrollView, 0, 2, 1, 1, true, true);

			this.treeviewColors = new TreeView ();
			this.treeviewColors.Columns.Add (GettextCatalog.GetString ("Name"), nameField);
			this.treeviewColors.HeadersVisible = false;
			this.treeviewColors.DataSource = colorStore;
			this.treeviewColors.SelectionChanged += HandleTreeviewColorsSelectionChanged;

			var box = new HPaned ();

			var treeBox = new VBox ();
			treeBox.PackStart (searchEntry);
			treeBox.PackStart (treeviewColors, true);
			box.Panel1.Content = treeBox;
			box.Panel2.Content = table;
			box.Panel2.Resize = true;
			box.Position = 400;
			
			mainTable.Add (box, 0, 1, 1, 1, true, true);
			this.Content = mainTable;

			this.Height = 400;

			HandleTreeviewColorsSelectionChanged (null, null);
		}