diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2016-08-19 12:54:05 +0300 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2016-08-19 12:54:05 +0300 |
commit | a53663092474b878864d22474899e8ab9b82d003 (patch) | |
tree | 41be0bf6906112756ddb45d11f027cc6c0fbaf03 /main/src/core/MonoDevelop.Ide/gtk-gui | |
parent | fa9c9c50b289a6f1c1790f0539a2370989d5b1b6 (diff) |
[Ide] Editor highlighting now works based on bundles.
Supports theming/language definitions/preferences/snippets etc.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/gtk-gui')
3 files changed, 293 insertions, 24 deletions
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Editor.TextMate.TextMateBundleOptionsPanelWidget.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Editor.TextMate.TextMateBundleOptionsPanelWidget.cs new file mode 100644 index 0000000000..061df98193 --- /dev/null +++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Editor.TextMate.TextMateBundleOptionsPanelWidget.cs @@ -0,0 +1,134 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace MonoDevelop.Ide.Editor.TextMate +{ + public partial class TextMateBundleOptionsPanelWidget + { + private global::Gtk.VBox vbox4; + + private global::Gtk.Label GtkLabel5; + + private global::Gtk.Alignment GtkAlignment; + + private global::Gtk.VBox vbox5; + + private global::Gtk.ScrolledWindow scrolledwindow1; + + private global::Gtk.TreeView bundleTreeview; + + private global::Gtk.HBox hbox2; + + private global::Gtk.Button addButton; + + private global::Gtk.Button removeButton; + + private global::Gtk.Button buttonEdit; + + protected virtual void Build() + { + global::Stetic.Gui.Initialize(this); + // Widget MonoDevelop.Ide.Editor.TextMate.TextMateBundleOptionsPanelWidget + global::Stetic.BinContainer.Attach(this); + this.Name = "MonoDevelop.Ide.Editor.TextMate.TextMateBundleOptionsPanelWidget"; + // Container child MonoDevelop.Ide.Editor.TextMate.TextMateBundleOptionsPanelWidget.Gtk.Container+ContainerChild + this.vbox4 = new global::Gtk.VBox(); + this.vbox4.Name = "vbox4"; + this.vbox4.Spacing = 6; + // Container child vbox4.Gtk.Box+BoxChild + this.GtkLabel5 = new global::Gtk.Label(); + this.GtkLabel5.Name = "GtkLabel5"; + this.GtkLabel5.Xalign = 0F; + this.GtkLabel5.LabelProp = global::Mono.Unix.Catalog.GetString("<b>Language bundles</b>"); + this.GtkLabel5.UseMarkup = true; + this.vbox4.Add(this.GtkLabel5); + global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.GtkLabel5])); + w1.Position = 0; + w1.Expand = false; + w1.Fill = false; + // Container child vbox4.Gtk.Box+BoxChild + this.GtkAlignment = new global::Gtk.Alignment(0F, 0F, 1F, 1F); + this.GtkAlignment.Name = "GtkAlignment"; + this.GtkAlignment.LeftPadding = ((uint)(12)); + // Container child GtkAlignment.Gtk.Container+ContainerChild + this.vbox5 = new global::Gtk.VBox(); + this.vbox5.Name = "vbox5"; + this.vbox5.Spacing = 6; + // Container child vbox5.Gtk.Box+BoxChild + this.scrolledwindow1 = new global::Gtk.ScrolledWindow(); + this.scrolledwindow1.CanFocus = true; + this.scrolledwindow1.Name = "scrolledwindow1"; + this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child scrolledwindow1.Gtk.Container+ContainerChild + global::Gtk.Viewport w2 = new global::Gtk.Viewport(); + w2.ShadowType = ((global::Gtk.ShadowType)(0)); + // Container child GtkViewport.Gtk.Container+ContainerChild + this.bundleTreeview = new global::Gtk.TreeView(); + this.bundleTreeview.CanFocus = true; + this.bundleTreeview.Name = "bundleTreeview"; + this.bundleTreeview.HeadersVisible = false; + w2.Add(this.bundleTreeview); + this.scrolledwindow1.Add(w2); + this.vbox5.Add(this.scrolledwindow1); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.scrolledwindow1])); + w5.Position = 0; + // Container child vbox5.Gtk.Box+BoxChild + this.hbox2 = new global::Gtk.HBox(); + this.hbox2.Name = "hbox2"; + this.hbox2.Spacing = 6; + // Container child hbox2.Gtk.Box+BoxChild + this.addButton = new global::Gtk.Button(); + this.addButton.CanFocus = true; + this.addButton.Name = "addButton"; + this.addButton.UseStock = true; + this.addButton.UseUnderline = true; + this.addButton.Label = "gtk-add"; + this.hbox2.Add(this.addButton); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.addButton])); + w6.PackType = ((global::Gtk.PackType)(1)); + w6.Position = 0; + w6.Expand = false; + w6.Fill = false; + // Container child hbox2.Gtk.Box+BoxChild + this.removeButton = new global::Gtk.Button(); + this.removeButton.CanFocus = true; + this.removeButton.Name = "removeButton"; + this.removeButton.UseStock = true; + this.removeButton.UseUnderline = true; + this.removeButton.Label = "gtk-remove"; + this.hbox2.Add(this.removeButton); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.removeButton])); + w7.PackType = ((global::Gtk.PackType)(1)); + w7.Position = 1; + w7.Expand = false; + w7.Fill = false; + // Container child hbox2.Gtk.Box+BoxChild + this.buttonEdit = new global::Gtk.Button(); + this.buttonEdit.CanFocus = true; + this.buttonEdit.Name = "buttonEdit"; + this.buttonEdit.UseUnderline = true; + this.buttonEdit.Label = global::Mono.Unix.Catalog.GetString("_Edit"); + this.hbox2.Add(this.buttonEdit); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.buttonEdit])); + w8.PackType = ((global::Gtk.PackType)(1)); + w8.Position = 2; + w8.Expand = false; + w8.Fill = false; + this.vbox5.Add(this.hbox2); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hbox2])); + w9.PackType = ((global::Gtk.PackType)(1)); + w9.Position = 1; + w9.Expand = false; + w9.Fill = false; + this.GtkAlignment.Add(this.vbox5); + this.vbox4.Add(this.GtkAlignment); + global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.GtkAlignment])); + w11.Position = 1; + this.Add(this.vbox4); + if ((this.Child != null)) + { + this.Child.ShowAll(); + } + this.Hide(); + } + } +} diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/generated.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/generated.cs index 886fd2e124..453751b36a 100644 --- a/main/src/core/MonoDevelop.Ide/gtk-gui/generated.cs +++ b/main/src/core/MonoDevelop.Ide/gtk-gui/generated.cs @@ -6,9 +6,10 @@ namespace Stetic { private static bool initialized; - internal static void Initialize (Gtk.Widget iconRenderer) + internal static void Initialize(Gtk.Widget iconRenderer) { - if ((Stetic.Gui.initialized == false)) { + if ((Stetic.Gui.initialized == false)) + { Stetic.Gui.initialized = true; } } @@ -17,51 +18,55 @@ namespace Stetic internal class BinContainer { private Gtk.Widget child; - + private Gtk.UIManager uimanager; - public static BinContainer Attach (Gtk.Bin bin) + public static BinContainer Attach(Gtk.Bin bin) { - BinContainer bc = new BinContainer (); - bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested); - bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated); - bin.Added += new Gtk.AddedHandler (bc.OnAdded); + BinContainer bc = new BinContainer(); + bin.SizeRequested += new Gtk.SizeRequestedHandler(bc.OnSizeRequested); + bin.SizeAllocated += new Gtk.SizeAllocatedHandler(bc.OnSizeAllocated); + bin.Added += new Gtk.AddedHandler(bc.OnAdded); return bc; } - private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args) + private void OnSizeRequested(object sender, Gtk.SizeRequestedArgs args) { - if ((this.child != null)) { - args.Requisition = this.child.SizeRequest (); + if ((this.child != null)) + { + args.Requisition = this.child.SizeRequest(); } } - private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args) + private void OnSizeAllocated(object sender, Gtk.SizeAllocatedArgs args) { - if ((this.child != null)) { + if ((this.child != null)) + { this.child.Allocation = args.Allocation; } } - private void OnAdded (object sender, Gtk.AddedArgs args) + private void OnAdded(object sender, Gtk.AddedArgs args) { this.child = args.Widget; } - public void SetUiManager (Gtk.UIManager uim) + public void SetUiManager(Gtk.UIManager uim) { this.uimanager = uim; - this.child.Realized += new System.EventHandler (this.OnRealized); + this.child.Realized += new System.EventHandler(this.OnRealized); } - private void OnRealized (object sender, System.EventArgs args) + private void OnRealized(object sender, System.EventArgs args) { - if ((this.uimanager != null)) { + if ((this.uimanager != null)) + { Gtk.Widget w; w = this.child.Toplevel; if (((w != null) - && typeof(Gtk.Window).IsInstanceOfType (w))) { - ((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup); + && typeof(Gtk.Window).IsInstanceOfType(w))) + { + ((Gtk.Window)(w)).AddAccelGroup(this.uimanager.AccelGroup); this.uimanager = null; } } @@ -70,12 +75,12 @@ namespace Stetic internal class ActionGroups { - public static Gtk.ActionGroup GetActionGroup (System.Type type) + public static Gtk.ActionGroup GetActionGroup(System.Type type) { - return Stetic.ActionGroups.GetActionGroup (type.FullName); + return Stetic.ActionGroups.GetActionGroup(type.FullName); } - public static Gtk.ActionGroup GetActionGroup (string name) + public static Gtk.ActionGroup GetActionGroup(string name) { return null; } diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic b/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic index 012653b5c5..d60aa816f6 100644 --- a/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic +++ b/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic @@ -12117,4 +12117,134 @@ Visual Studio generates a default ID for embedded resources, instead of simply u </widget> </child> </widget> -</stetic-interface> + <widget class="Gtk.Bin" id="MonoDevelop.Ide.Editor.TextMate.TextMateBundleOptionsPanelWidget" design-size="565 400"> + <property name="MemberName" /> + <property name="Visible">False</property> + <child> + <widget class="Gtk.VBox" id="vbox4"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <widget class="Gtk.Label" id="GtkLabel5"> + <property name="MemberName" /> + <property name="Xalign">0</property> + <property name="LabelProp" translatable="yes"><b>Language bundles</b></property> + <property name="UseMarkup">True</property> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Alignment" id="GtkAlignment"> + <property name="MemberName" /> + <property name="Xalign">0</property> + <property name="Yalign">0</property> + <property name="LeftPadding">12</property> + <child> + <widget class="Gtk.VBox" id="vbox5"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <widget class="Gtk.ScrolledWindow" id="scrolledwindow1"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="ShadowType">In</property> + <child> + <widget class="Gtk.Viewport" id="GtkViewport"> + <property name="MemberName" /> + <property name="ShadowType">None</property> + <child> + <widget class="Gtk.TreeView" id="bundleTreeview"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="ShowScrollbars">True</property> + <property name="HeadersVisible">False</property> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">True</property> + </packing> + </child> + <child> + <widget class="Gtk.HBox" id="hbox2"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <widget class="Gtk.Button" id="addButton"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="UseStock">True</property> + <property name="Type">StockItem</property> + <property name="StockId">gtk-add</property> + <property name="label">gtk-add</property> + </widget> + <packing> + <property name="PackType">End</property> + <property name="Position">0</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Button" id="removeButton"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="UseStock">True</property> + <property name="Type">StockItem</property> + <property name="StockId">gtk-remove</property> + <property name="label">gtk-remove</property> + </widget> + <packing> + <property name="PackType">End</property> + <property name="Position">1</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Button" id="buttonEdit"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Type">TextOnly</property> + <property name="Label" translatable="yes">_Edit</property> + <property name="UseUnderline">True</property> + </widget> + <packing> + <property name="PackType">End</property> + <property name="Position">2</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="PackType">End</property> + <property name="Position">1</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + <packing> + <property name="Position">1</property> + <property name="AutoSize">True</property> + </packing> + </child> + </widget> + </child> + </widget> +</stetic-interface>
\ No newline at end of file |