00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 namespace Foodolini.Activities {
00012
00013
00014 public partial class IngredientsActivity {
00015
00016 private Gtk.VBox vbox2;
00017
00018 private Gtk.HBox hbox1;
00019
00020 private Gtk.Label label1;
00021
00022 private Gtk.Entry SearchEntry;
00023
00024 private Gtk.ComboBox CategoryCombobox;
00025
00026 private Gtk.ScrolledWindow GtkScrolledWindow;
00027
00028 private Gtk.NodeView ingredientsView;
00029
00030 private Gtk.HBox hbox2;
00031
00032 private Gtk.Button CreateIngredientButton;
00033
00034 protected virtual void Build() {
00035 Stetic.Gui.Initialize(this);
00036
00037 Stetic.BinContainer.Attach(this);
00038 this.Name = "Foodolini.Activities.IngredientsActivity";
00039
00040 this.vbox2 = new Gtk.VBox();
00041 this.vbox2.Name = "vbox2";
00042 this.vbox2.Spacing = 6;
00043
00044 this.hbox1 = new Gtk.HBox();
00045 this.hbox1.Name = "hbox1";
00046 this.hbox1.Spacing = 6;
00047
00048 this.label1 = new Gtk.Label();
00049 this.label1.Name = "label1";
00050 this.label1.LabelProp = Mono.Unix.Catalog.GetString("Search:");
00051 this.hbox1.Add(this.label1);
00052 Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
00053 w1.Position = 0;
00054 w1.Expand = false;
00055 w1.Fill = false;
00056
00057 this.SearchEntry = new Gtk.Entry();
00058 this.SearchEntry.CanFocus = true;
00059 this.SearchEntry.Name = "SearchEntry";
00060 this.SearchEntry.IsEditable = true;
00061 this.SearchEntry.InvisibleChar = '●';
00062 this.hbox1.Add(this.SearchEntry);
00063 Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.SearchEntry]));
00064 w2.Position = 1;
00065
00066 this.CategoryCombobox = Gtk.ComboBox.NewText();
00067 this.CategoryCombobox.Name = "CategoryCombobox";
00068 this.hbox1.Add(this.CategoryCombobox);
00069 Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.CategoryCombobox]));
00070 w3.Position = 2;
00071 w3.Expand = false;
00072 w3.Fill = false;
00073 this.vbox2.Add(this.hbox1);
00074 Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
00075 w4.Position = 0;
00076 w4.Expand = false;
00077 w4.Fill = false;
00078
00079 this.GtkScrolledWindow = new Gtk.ScrolledWindow();
00080 this.GtkScrolledWindow.Name = "GtkScrolledWindow";
00081 this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
00082
00083 this.ingredientsView = new Gtk.NodeView();
00084 this.ingredientsView.CanFocus = true;
00085 this.ingredientsView.Name = "ingredientsView";
00086 this.ingredientsView.EnableSearch = false;
00087 this.GtkScrolledWindow.Add(this.ingredientsView);
00088 this.vbox2.Add(this.GtkScrolledWindow);
00089 Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow]));
00090 w6.Position = 1;
00091
00092 this.hbox2 = new Gtk.HBox();
00093 this.hbox2.Name = "hbox2";
00094 this.hbox2.Spacing = 6;
00095
00096 this.CreateIngredientButton = new Gtk.Button();
00097 this.CreateIngredientButton.CanFocus = true;
00098 this.CreateIngredientButton.Name = "CreateIngredientButton";
00099 this.CreateIngredientButton.UseUnderline = true;
00100
00101 Gtk.Alignment w7 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
00102
00103 Gtk.HBox w8 = new Gtk.HBox();
00104 w8.Spacing = 2;
00105
00106 Gtk.Image w9 = new Gtk.Image();
00107 w9.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16);
00108 w8.Add(w9);
00109
00110 Gtk.Label w11 = new Gtk.Label();
00111 w11.LabelProp = Mono.Unix.Catalog.GetString("_Create ingredient");
00112 w11.UseUnderline = true;
00113 w8.Add(w11);
00114 w7.Add(w8);
00115 this.CreateIngredientButton.Add(w7);
00116 this.hbox2.Add(this.CreateIngredientButton);
00117 Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox2[this.CreateIngredientButton]));
00118 w15.Position = 0;
00119 w15.Expand = false;
00120 w15.Fill = false;
00121 this.vbox2.Add(this.hbox2);
00122 Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox2]));
00123 w16.Position = 2;
00124 w16.Expand = false;
00125 w16.Fill = false;
00126 this.Add(this.vbox2);
00127 if ((this.Child != null)) {
00128 this.Child.ShowAll();
00129 }
00130 this.Hide();
00131 this.SearchEntry.Changed += new System.EventHandler(this.OnSearchEntryChanged);
00132 this.CategoryCombobox.Changed += new System.EventHandler(this.OnSearchEntryChanged);
00133 this.ingredientsView.RowActivated += new Gtk.RowActivatedHandler(this.OnIngredientsViewRowActivated);
00134 this.ingredientsView.ButtonPressEvent += new Gtk.ButtonPressEventHandler(this.OnIngredientsViewButtonPressEvent);
00135 this.ingredientsView.CursorChanged += new System.EventHandler(this.OnIngredientsViewCursorChanged);
00136 this.CreateIngredientButton.Clicked += new System.EventHandler(this.OnCreateIngredientButtonClicked);
00137 }
00138 }
00139 }