Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
changeset 48:23238d998535
Re #86: Complete initial GTK# UI
* Add "notes" section to unit tab
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 15 Aug 2010 14:34:06 +0000 |
parents | 07fd9f7b0dd1 |
children | d29ad8445461 |
files | Widgets/UnitDisplayWidget.cs gtk-gui/IBBoard.WarFoundry.GTK.FrmNewArmy.cs gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs gtk-gui/gui.stetic |
diffstat | 4 files changed, 133 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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
--- 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)) {
--- 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 @@ </widget> </child> </widget> - <widget class="Gtk.Bin" id="IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget" design-size="649 422"> + <widget class="Gtk.Bin" id="IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget" design-size="649 425"> <property name="MemberName" /> <child> <widget class="Gtk.VBox" id="vbox1"> @@ -766,11 +766,14 @@ <child> <widget class="Gtk.Table" id="table1"> <property name="MemberName" /> - <property name="NRows">2</property> + <property name="NRows">3</property> <property name="NColumns">3</property> <property name="RowSpacing">6</property> <property name="ColumnSpacing">6</property> <child> + <placeholder /> + </child> + <child> <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1"> <property name="MemberName" /> <property name="ShadowType">In</property> @@ -823,6 +826,54 @@ </packing> </child> <child> + <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow3"> + <property name="MemberName" /> + <property name="ShadowType">In</property> + <child> + <widget class="Gtk.TextView" id="notesView"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="ShowScrollbars">True</property> + <property name="Editable">False</property> + <property name="Text" translatable="yes" /> + </widget> + </child> + </widget> + <packing> + <property name="TopAttach">2</property> + <property name="BottomAttach">3</property> + <property name="LeftAttach">1</property> + <property name="RightAttach">2</property> + <property name="AutoSize">True</property> + <property name="YOptions">Fill</property> + <property name="XExpand">True</property> + <property name="XFill">True</property> + <property name="XShrink">False</property> + <property name="YExpand">False</property> + <property name="YFill">True</property> + <property name="YShrink">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Label" id="lblNotes"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">notes:</property> + </widget> + <packing> + <property name="TopAttach">2</property> + <property name="BottomAttach">3</property> + <property name="AutoSize">True</property> + <property name="XOptions">Fill</property> + <property name="YOptions">Fill</property> + <property name="XExpand">False</property> + <property name="XFill">True</property> + <property name="XShrink">False</property> + <property name="YExpand">False</property> + <property name="YFill">True</property> + <property name="YShrink">False</property> + </packing> + </child> + <child> <widget class="Gtk.Label" id="optionalEquipmentLabel"> <property name="MemberName" /> <property name="LabelProp" translatable="yes">Optional Equipment:</property> @@ -985,23 +1036,7 @@ </packing> </child> <child> - <widget class="Gtk.HBox" id="hbox2"> - <property name="MemberName" /> - <property name="Spacing">6</property> - <child> - <placeholder /> - </child> - <child> - <placeholder /> - </child> - <child> - <placeholder /> - </child> - </widget> - <packing> - <property name="Position">4</property> - <property name="AutoSize">True</property> - </packing> + <placeholder /> </child> </widget> </child>