# HG changeset patch # User IBBoard # Date 1281882846 0 # Node ID 23238d99853599a3112c5a521f5a5a0f4c28424d # Parent 07fd9f7b0dd1a7649d2e79a896ca2d21d5285601 Re #86: Complete initial GTK# UI * Add "notes" section to unit tab diff -r 07fd9f7b0dd1 -r 23238d998535 Widgets/UnitDisplayWidget.cs --- a/Widgets/UnitDisplayWidget.cs Sat Aug 14 19:56:08 2010 +0000 +++ b/Widgets/UnitDisplayWidget.cs Sun Aug 15 14:34:06 2010 +0000 @@ -26,6 +26,7 @@ unit = sourceUnit; unitName.Text = unit.Name; unitSize.Value = unit.Size; + notesView.Buffer.Text = unit.UnitType.Notes; double max = unit.UnitType.MaxSize; if (max == -1) diff -r 07fd9f7b0dd1 -r 23238d998535 gtk-gui/IBBoard.WarFoundry.GTK.FrmNewArmy.cs --- a/gtk-gui/IBBoard.WarFoundry.GTK.FrmNewArmy.cs Sat Aug 14 19:56:08 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GTK.FrmNewArmy.cs Sun Aug 15 14:34:06 2010 +0000 @@ -49,7 +49,6 @@ w1.BorderWidth = ((uint)(2)); // Container child dialog_VBox.Gtk.Box+BoxChild this.table1 = new global::Gtk.Table(((uint)(4)), ((uint)(2)), false); - this.table1.Name = "table1"; this.table1.RowSpacing = ((uint)(6)); this.table1.ColumnSpacing = ((uint)(6)); // Container child table1.Gtk.Table+TableChild diff -r 07fd9f7b0dd1 -r 23238d998535 gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs --- a/gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs Sat Aug 14 19:56:08 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs Sun Aug 15 14:34:06 2010 +0000 @@ -28,6 +28,12 @@ private global::Gtk.NodeView requiredEquipment; + private global::Gtk.ScrolledWindow GtkScrolledWindow3; + + private global::Gtk.TextView notesView; + + private global::Gtk.Label lblNotes; + private global::Gtk.Label optionalEquipmentLabel; private global::Gtk.Label requiredEquipmentLabel; @@ -46,8 +52,6 @@ private global::Gtk.Button bttnRemove; - private global::Gtk.HBox hbox2; - protected virtual void Build() { global::Stetic.Gui.Initialize(this); @@ -110,8 +114,7 @@ w6.Expand = false; w6.Fill = false; // Container child vbox1.Gtk.Box+BoxChild - this.table1 = new global::Gtk.Table(((uint)(2)), ((uint)(3)), false); - this.table1.Name = "table1"; + this.table1 = new global::Gtk.Table(((uint)(3)), ((uint)(3)), false); this.table1.RowSpacing = ((uint)(6)); this.table1.ColumnSpacing = ((uint)(6)); // Container child table1.Gtk.Table+TableChild @@ -145,23 +148,50 @@ w10.RightAttach = ((uint)(2)); w10.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild + this.GtkScrolledWindow3 = new global::Gtk.ScrolledWindow(); + this.GtkScrolledWindow3.Name = "GtkScrolledWindow3"; + this.GtkScrolledWindow3.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow3.Gtk.Container+ContainerChild + this.notesView = new global::Gtk.TextView(); + this.notesView.CanFocus = true; + this.notesView.Name = "notesView"; + this.notesView.Editable = false; + this.GtkScrolledWindow3.Add(this.notesView); + this.table1.Add(this.GtkScrolledWindow3); + global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow3])); + w12.TopAttach = ((uint)(2)); + w12.BottomAttach = ((uint)(3)); + w12.LeftAttach = ((uint)(1)); + w12.RightAttach = ((uint)(2)); + w12.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.lblNotes = new global::Gtk.Label(); + this.lblNotes.Name = "lblNotes"; + this.lblNotes.LabelProp = global::Mono.Unix.Catalog.GetString("notes:"); + this.table1.Add(this.lblNotes); + global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.lblNotes])); + w13.TopAttach = ((uint)(2)); + w13.BottomAttach = ((uint)(3)); + w13.XOptions = ((global::Gtk.AttachOptions)(4)); + w13.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild this.optionalEquipmentLabel = new global::Gtk.Label(); this.optionalEquipmentLabel.Name = "optionalEquipmentLabel"; this.optionalEquipmentLabel.LabelProp = global::Mono.Unix.Catalog.GetString("Optional Equipment:"); this.table1.Add(this.optionalEquipmentLabel); - global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.optionalEquipmentLabel])); - w11.TopAttach = ((uint)(1)); - w11.BottomAttach = ((uint)(2)); - w11.XOptions = ((global::Gtk.AttachOptions)(4)); - w11.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.optionalEquipmentLabel])); + w14.TopAttach = ((uint)(1)); + w14.BottomAttach = ((uint)(2)); + w14.XOptions = ((global::Gtk.AttachOptions)(4)); + w14.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.requiredEquipmentLabel = new global::Gtk.Label(); this.requiredEquipmentLabel.Name = "requiredEquipmentLabel"; this.requiredEquipmentLabel.LabelProp = global::Mono.Unix.Catalog.GetString("Required Equipment:"); this.table1.Add(this.requiredEquipmentLabel); - global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.requiredEquipmentLabel])); - w12.XOptions = ((global::Gtk.AttachOptions)(4)); - w12.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.requiredEquipmentLabel])); + w15.XOptions = ((global::Gtk.AttachOptions)(4)); + w15.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; @@ -173,10 +203,10 @@ this.bttnReplaceRequired.UseUnderline = true; this.bttnReplaceRequired.Label = global::Mono.Unix.Catalog.GetString("Replace"); this.vbox2.Add(this.bttnReplaceRequired); - global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.bttnReplaceRequired])); - w13.Position = 0; - w13.Expand = false; - w13.Fill = false; + global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.bttnReplaceRequired])); + w16.Position = 0; + w16.Expand = false; + w16.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.bttnEditRequired = new global::Gtk.Button(); this.bttnEditRequired.CanFocus = true; @@ -184,16 +214,16 @@ this.bttnEditRequired.UseUnderline = true; this.bttnEditRequired.Label = global::Mono.Unix.Catalog.GetString("Edit"); this.vbox2.Add(this.bttnEditRequired); - global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.bttnEditRequired])); - w14.Position = 1; - w14.Expand = false; - w14.Fill = false; + global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.bttnEditRequired])); + w17.Position = 1; + w17.Expand = false; + w17.Fill = false; this.table1.Add(this.vbox2); - global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.vbox2])); - w15.LeftAttach = ((uint)(2)); - w15.RightAttach = ((uint)(3)); - w15.XOptions = ((global::Gtk.AttachOptions)(4)); - w15.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w18 = ((global::Gtk.Table.TableChild)(this.table1[this.vbox2])); + w18.LeftAttach = ((uint)(2)); + w18.RightAttach = ((uint)(3)); + w18.XOptions = ((global::Gtk.AttachOptions)(4)); + w18.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild this.vbox3 = new global::Gtk.VBox(); this.vbox3.Name = "vbox3"; @@ -205,10 +235,10 @@ this.bttnAddOptional.UseUnderline = true; this.bttnAddOptional.Label = global::Mono.Unix.Catalog.GetString("Add"); this.vbox3.Add(this.bttnAddOptional); - global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnAddOptional])); - w16.Position = 0; - w16.Expand = false; - w16.Fill = false; + global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnAddOptional])); + w19.Position = 0; + w19.Expand = false; + w19.Fill = false; // Container child vbox3.Gtk.Box+BoxChild this.bttnEditOptional = new global::Gtk.Button(); this.bttnEditOptional.CanFocus = true; @@ -216,10 +246,10 @@ this.bttnEditOptional.UseUnderline = true; this.bttnEditOptional.Label = global::Mono.Unix.Catalog.GetString("Edit"); this.vbox3.Add(this.bttnEditOptional); - global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnEditOptional])); - w17.Position = 1; - w17.Expand = false; - w17.Fill = false; + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnEditOptional])); + w20.Position = 1; + w20.Expand = false; + w20.Fill = false; // Container child vbox3.Gtk.Box+BoxChild this.bttnRemove = new global::Gtk.Button(); this.bttnRemove.CanFocus = true; @@ -227,30 +257,23 @@ this.bttnRemove.UseUnderline = true; this.bttnRemove.Label = global::Mono.Unix.Catalog.GetString("Remove"); this.vbox3.Add(this.bttnRemove); - global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnRemove])); - w18.Position = 2; - w18.Expand = false; - w18.Fill = false; + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnRemove])); + w21.Position = 2; + w21.Expand = false; + w21.Fill = false; this.table1.Add(this.vbox3); - global::Gtk.Table.TableChild w19 = ((global::Gtk.Table.TableChild)(this.table1[this.vbox3])); - w19.TopAttach = ((uint)(1)); - w19.BottomAttach = ((uint)(2)); - w19.LeftAttach = ((uint)(2)); - w19.RightAttach = ((uint)(3)); - w19.XOptions = ((global::Gtk.AttachOptions)(4)); - w19.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w22 = ((global::Gtk.Table.TableChild)(this.table1[this.vbox3])); + w22.TopAttach = ((uint)(1)); + w22.BottomAttach = ((uint)(2)); + w22.LeftAttach = ((uint)(2)); + w22.RightAttach = ((uint)(3)); + w22.XOptions = ((global::Gtk.AttachOptions)(4)); + w22.YOptions = ((global::Gtk.AttachOptions)(4)); this.vbox1.Add(this.table1); - global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.table1])); - w20.Position = 3; - w20.Expand = false; - w20.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.hbox2 = new global::Gtk.HBox(); - this.hbox2.Name = "hbox2"; - this.hbox2.Spacing = 6; - this.vbox1.Add(this.hbox2); - global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox2])); - w21.Position = 4; + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.table1])); + w23.Position = 3; + w23.Expand = false; + w23.Fill = false; this.Add(this.vbox1); if ((this.Child != null)) { diff -r 07fd9f7b0dd1 -r 23238d998535 gtk-gui/gui.stetic --- a/gtk-gui/gui.stetic Sat Aug 14 19:56:08 2010 +0000 +++ b/gtk-gui/gui.stetic Sun Aug 15 14:34:06 2010 +0000 @@ -683,7 +683,7 @@ - + @@ -766,11 +766,14 @@ - 2 + 3 3 6 6 + + + In @@ -823,6 +826,54 @@ + + + In + + + + True + True + False + + + + + + 2 + 3 + 1 + 2 + True + Fill + True + True + False + False + True + False + + + + + + notes: + + + 2 + 3 + True + Fill + Fill + False + True + False + False + True + False + + + Optional Equipment: @@ -985,23 +1036,7 @@ - - - 6 - - - - - - - - - - - - 4 - True - +