当前位置: 首页>>代码示例>>C#>>正文


C# Gtk.HBox.Show方法代码示例

本文整理汇总了C#中Gtk.HBox.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.HBox.Show方法的具体用法?C# Gtk.HBox.Show怎么用?C# Gtk.HBox.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.HBox的用法示例。


在下文中一共展示了Gtk.HBox.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: QueryWidget

		public QueryWidget (PhotoQuery query, Db db, TagSelectionWidget selector)
		{
			tips.Enable ();

			this.query = query;
			query.Changed += HandleChanged;

			Gtk.HSeparator sep = new Gtk.HSeparator ();
			sep.Show ();
			this.PackStart (sep, false, false, 0);
			
			Gtk.HBox hbox = new Gtk.HBox ();
			hbox.Show ();
			this.PackStart (hbox, false, false, 0);
			
			label = new Gtk.Label (Catalog.GetString ("Find: "));
			label.Show ();
			label.Ypad = 9;
			hbox.PackStart (label, false, false, 0);

			untagged = new Gtk.Label (Catalog.GetString ("Untagged photos"));
			untagged.Visible = false;
			hbox.PackStart (untagged, false, false, 0);

			comma_label = new Gtk.Label (", ");
			comma_label.Visible = false;
			hbox.PackStart (comma_label, false, false, 0);

			rollfilter = new Gtk.Label (Catalog.GetString ("Import roll"));	
			rollfilter.Visible = false;
			hbox.PackStart (rollfilter, false, false, 0);

			logic_widget = new LogicWidget (query, db.Tags, selector);
			logic_widget.Show ();
			hbox.PackStart (logic_widget, true, true, 0);

			warning_box = new Gtk.HBox ();
			warning_box.PackStart (new Gtk.Label (System.String.Empty));
			
			Gtk.Image warning_image = new Gtk.Image ("gtk-info", Gtk.IconSize.Button);
			warning_image.Show ();
			warning_box.PackStart (warning_image, false, false, 0);
			
			clear_button = new Gtk.Button ();
			clear_button.Add (new Gtk.Image ("gtk-close", Gtk.IconSize.Button));
			clear_button.Clicked += HandleClearButtonClicked;
			clear_button.Relief = Gtk.ReliefStyle.None;
			hbox.PackEnd (clear_button, false, false, 0);
			tips.SetTip (clear_button, Catalog.GetString("Clear search"), null);

			Gtk.Label warning = new Gtk.Label (Catalog.GetString ("No matching photos found"));
			warning_box.PackStart (warning, false, false, 0);
			warning_box.ShowAll ();
			warning_box.Spacing = 6;
			warning_box.Visible = false;

			hbox.PackEnd (warning_box, false, false, 0);
			
			warning_box.Visible = false;
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:60,代码来源:QueryWidget.cs

示例2: NoteMenuItem

		public NoteMenuItem (Note note, bool show_pin)
			: base (GetDisplayName(note))
		{
			this.note = note;
			Image = new Gtk.Image (note_icon);
#if HAS_GTK_2_16
			this.SetAlwaysShowImage (true);
#endif
			if (show_pin) {
				Gtk.HBox box = new Gtk.HBox (false, 0);
				Gtk.Widget child = Child;
				Remove (child);
				box.PackStart (child, true, true, 0);
				Add (box);
				box.Show();

				pinned = note.IsPinned;
				pin_img = new Gtk.Image(pinned ? pindown : pinup);
				pin_img.Show();
				box.PackStart (pin_img, false, false, 0);
			}
		}
开发者ID:MichaelAquilina,项目名称:tomboy,代码行数:22,代码来源:Tray.cs

示例3: Header

        public Header(string text)
            : base()
        {
            base.SetSizeRequest (-1, 30);

            Gtk.Alignment alignment = new Gtk.Alignment (0, 0, 1, 1);
            alignment.TopPadding = 1;
            alignment.LeftPadding = 5;
            alignment.RightPadding = 0;
            alignment.BottomPadding = 1;
            base.Add (alignment);

            //Select ();

            Gtk.HBox box = new Gtk.HBox ();
            alignment.Add (box);

            label = new Gtk.Label ();
            label.Ypad = 3;
            //	label.Xpad = 3;
            //base.Add (label);
            box.PackStart (label, true, true, 0);
            label.SetAlignment (0f, 0.5f);
            label.Justify = Gtk.Justification.Left;

            label.Markup = "<b>" + text + "</b>";

            closeButton = new Gtk.Button ();
            closeButton.Add (new Gtk.Image ("gtk-close", Gtk.IconSize.Menu));
            closeButton.Relief = Gtk.ReliefStyle.None;
            box.PackEnd (closeButton, false, false, 0);
            closeButton.ShowAll ();

            label.Show ();
            box.Show ();
            alignment.Show ();

            closeButton.Clicked += closeButton_Clicked;
        }
开发者ID:codebutler,项目名称:meshwork,代码行数:39,代码来源:Header.cs

示例4: Build

 public static void Build(object obj, string id)
 {
     System.Collections.Hashtable bindings = new System.Collections.Hashtable();
     if ((id == "administrator.EditCreateUser")) {
         Gtk.Window cobj = ((Gtk.Window)(obj));
         // Widget administrator.EditCreateUser
         cobj.Title = "EditCreateUser";
         cobj.WindowPosition = ((Gtk.WindowPosition)(4));
         cobj.Events = ((Gdk.EventMask)(0));
         cobj.Name = "administrator.EditCreateUser";
         cobj.DefaultWidth = 400;
         cobj.DefaultHeight = 300;
         bindings["administrator.EditCreateUser"] = cobj;
         cobj.Show();
     }
     else {
         if ((id == "administrator.LoginWindow")) {
             Gtk.Window cobj = ((Gtk.Window)(obj));
             // Widget administrator.LoginWindow
             cobj.Title = "Boxerp Server Administrator";
             cobj.WindowPosition = ((Gtk.WindowPosition)(1));
             cobj.Modal = true;
             cobj.Resizable = false;
             cobj.AllowGrow = false;
             cobj.Events = ((Gdk.EventMask)(0));
             cobj.Name = "administrator.LoginWindow";
             // Container child administrator.LoginWindow.Gtk.Container+ContainerChild
             Gtk.VBox w1 = new Gtk.VBox();
             w1.BorderWidth = ((uint)(5));
             w1.Events = ((Gdk.EventMask)(0));
             w1.Name = "vbox1";
             // Container child vbox1.Gtk.Box+BoxChild
             Gtk.HBox w2 = new Gtk.HBox();
             w2.Events = ((Gdk.EventMask)(0));
             w2.Name = "hbox1";
             // Container child hbox1.Gtk.Box+BoxChild
             Gtk.Label w3 = new Gtk.Label();
             w3.LabelProp = "Login:";
             w3.Events = ((Gdk.EventMask)(0));
             w3.Name = "label1";
             w3.WidthRequest = 150;
             bindings["label1"] = w3;
             w2.Add(w3);
             Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w2[w3]));
             w4.Position = 0;
             // Container child hbox1.Gtk.Box+BoxChild
             Gtk.Entry w5 = new Gtk.Entry();
             w5.Text = "demo";
             w5.IsEditable = true;
             w5.MaxLength = 100;
             w5.InvisibleChar = '●';
             w5.CanFocus = true;
             w5.Events = ((Gdk.EventMask)(0));
             w5.Name = "entryLogin";
             w5.WidthRequest = 200;
             bindings["entryLogin"] = w5;
             w2.Add(w5);
             Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(w2[w5]));
             w6.Position = 1;
             w6.Expand = false;
             w6.Fill = false;
             bindings["hbox1"] = w2;
             w1.Add(w2);
             Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(w1[w2]));
             w7.Position = 0;
             w7.Expand = false;
             w7.Fill = false;
             // Container child vbox1.Gtk.Box+BoxChild
             Gtk.HBox w8 = new Gtk.HBox();
             w8.Events = ((Gdk.EventMask)(0));
             w8.Name = "hbox2";
             w8.WidthRequest = 150;
             // Container child hbox2.Gtk.Box+BoxChild
             Gtk.Label w9 = new Gtk.Label();
             w9.LabelProp = "Password:";
             w9.Events = ((Gdk.EventMask)(0));
             w9.Name = "label2";
             bindings["label2"] = w9;
             w8.Add(w9);
             Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w8[w9]));
             w10.Position = 0;
             w10.Fill = false;
             // Container child hbox2.Gtk.Box+BoxChild
             Gtk.Entry w11 = new Gtk.Entry();
             w11.Text = "pass";
             w11.IsEditable = true;
             w11.Visibility = false;
             w11.InvisibleChar = '●';
             w11.CanFocus = true;
             w11.Events = ((Gdk.EventMask)(0));
             w11.Name = "entryPassword";
             w11.WidthRequest = 200;
             bindings["entryPassword"] = w11;
             w8.Add(w11);
             Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(w8[w11]));
             w12.Position = 1;
             w12.Expand = false;
             w12.Fill = false;
             bindings["hbox2"] = w8;
             w1.Add(w8);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:boxerp-svn,代码行数:101,代码来源:generated.cs

示例5: Update

		void Update (CommandInfo cmdInfo)
		{
			lastCmdInfo = cmdInfo;
			if (isArray && !isArrayItem) {
				this.Visible = false;
				Gtk.Menu menu = (Gtk.Menu) Parent;  
				
				if (itemArray != null) {
					foreach (Gtk.MenuItem item in itemArray)
						menu.Remove (item);
				}
				
				itemArray = new ArrayList ();
				int i = Array.IndexOf (menu.Children, this);
				
				if (cmdInfo.ArrayInfo != null) {
					foreach (CommandInfo info in cmdInfo.ArrayInfo) {
						Gtk.MenuItem item;
						if (info.IsArraySeparator) {
							item = new Gtk.SeparatorMenuItem ();
							item.Show ();
						} else {
							item = CommandEntry.CreateMenuItem (commandManager, commandId, false);
							ICommandMenuItem mi = (ICommandMenuItem) item; 
							mi.SetUpdateInfo (info, initialTarget);
						}
						menu.Insert (item, ++i);
						itemArray.Add (item);
					}
				}
			} else {
				Gtk.Widget child = Child;
				if (child == null)
					return;
				
				Gtk.Label accel_label = null;
				Gtk.Label label = null;
				
				if (!(child is Gtk.HBox)) {
					child = new Gtk.HBox (false, 0);
					accel_label = new Gtk.Label ("");
					accel_label.UseUnderline = false;
					accel_label.Xalign = 1.0f;
					accel_label.Show ();
					
					label = new Gtk.Label ("");
					label.UseUnderline = true;
					label.Xalign = 0.0f;
					label.Show ();
					
					((Gtk.Box) child).PackStart (label);
					((Gtk.Box) child).PackStart (accel_label);
					child.Show ();
					
					this.Remove (Child);
					this.Add (child);
				} else {
					accel_label = (Gtk.Label) ((Gtk.Box) child).Children[1];
					label = (Gtk.Label) ((Gtk.Box) child).Children[0];
				}
				
				if (cmdInfo.AccelKey != null)
					accel_label.Text = "    " + KeyBindingManager.BindingToDisplayLabel (cmdInfo.AccelKey, true);
				else
					accel_label.Text = String.Empty;
				
				if (cmdInfo.UseMarkup) {
					label.Markup = overrideLabel ?? cmdInfo.Text;
					label.UseMarkup = true;
				} else {
					label.Text = overrideLabel ?? cmdInfo.Text;
					label.UseMarkup = false;
				}
				
				label.UseUnderline = true;
				
				this.Sensitive = cmdInfo.Enabled;
				this.Visible = cmdInfo.Visible && (disabledVisible || cmdInfo.Enabled);
				
				if (!cmdInfo.Icon.IsNull && cmdInfo.Icon != lastIcon) {
					Image = new Gtk.Image (cmdInfo.Icon, Gtk.IconSize.Menu);
					lastIcon = cmdInfo.Icon;
				}
				
				if (cmdInfo is CommandInfoSet) {
					CommandInfoSet ciset = (CommandInfoSet) cmdInfo;
					Gtk.Menu smenu = new Gtk.Menu ();
					Submenu = smenu;
					foreach (CommandInfo info in ciset.CommandInfos) {
						Gtk.MenuItem item;
						if (info.IsArraySeparator) {
							item = new Gtk.SeparatorMenuItem ();
							item.Show ();
						} else {
							item = CommandEntry.CreateMenuItem (commandManager, commandId, false);
							ICommandMenuItem mi = (ICommandMenuItem) item; 
							mi.SetUpdateInfo (info, initialTarget);
						}
						smenu.Add (item);
					}
//.........这里部分代码省略.........
开发者ID:telebovich,项目名称:monodevelop,代码行数:101,代码来源:CommandMenuItem.cs

示例6: Build

 public static void Build(object obj, string id)
 {
     System.Collections.Hashtable bindings = new System.Collections.Hashtable();
     if ((id == "SharpTranslator.ReversibleCombos")) {
         Gtk.Bin cobj = ((Gtk.Bin)(obj));
         // Widget SharpTranslator.ReversibleCombos
         BinContainer.Attach(cobj);
         cobj.Events = ((Gdk.EventMask)(256));
         cobj.Name = "SharpTranslator.ReversibleCombos";
         // Container child SharpTranslator.ReversibleCombos.Gtk.Container+ContainerChild
         Gtk.HBox w1 = new Gtk.HBox();
         w1.Spacing = 5;
         w1.BorderWidth = ((uint)(5));
         w1.Events = ((Gdk.EventMask)(0));
         w1.Name = "hbox1";
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.Label w2 = new Gtk.Label();
         w2.LabelProp = "Source:";
         w2.Events = ((Gdk.EventMask)(0));
         w2.Name = "labelSource";
         bindings["labelSource"] = w2;
         w1.Add(w2);
         Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(w1[w2]));
         w3.Position = 0;
         w3.Expand = false;
         w3.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.ComboBox w4 = Gtk.ComboBox.NewText();
         w4.Events = ((Gdk.EventMask)(0));
         w4.Name = "comboSource";
         bindings["comboSource"] = w4;
         w1.Add(w4);
         Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(w1[w4]));
         w5.Position = 1;
         w5.Expand = false;
         w5.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.VSeparator w6 = new Gtk.VSeparator();
         w6.Events = ((Gdk.EventMask)(0));
         w6.Name = "vseparator1";
         bindings["vseparator1"] = w6;
         w1.Add(w6);
         Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(w1[w6]));
         w7.Position = 2;
         w7.Expand = false;
         w7.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.CheckButton w8 = new Gtk.CheckButton();
         w8.Label = "reverse";
         w8.DrawIndicator = true;
         w8.BorderWidth = ((uint)(5));
         w8.CanFocus = true;
         w8.Events = ((Gdk.EventMask)(0));
         w8.Name = "checkbuttonReverse";
         bindings["checkbuttonReverse"] = w8;
         w1.Add(w8);
         Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(w1[w8]));
         w9.Position = 3;
         w9.Expand = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.VSeparator w10 = new Gtk.VSeparator();
         w10.Events = ((Gdk.EventMask)(0));
         w10.Name = "vseparator2";
         bindings["vseparator2"] = w10;
         w1.Add(w10);
         Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(w1[w10]));
         w11.Position = 4;
         w11.Expand = false;
         w11.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.Label w12 = new Gtk.Label();
         w12.LabelProp = "Target:";
         w12.Events = ((Gdk.EventMask)(0));
         w12.Name = "labelTarget";
         bindings["labelTarget"] = w12;
         w1.Add(w12);
         Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(w1[w12]));
         w13.Position = 5;
         w13.Expand = false;
         w13.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.ComboBox w14 = Gtk.ComboBox.NewText();
         w14.Events = ((Gdk.EventMask)(0));
         w14.Name = "comboTarget";
         bindings["comboTarget"] = w14;
         w1.Add(w14);
         Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(w1[w14]));
         w15.Position = 6;
         w15.Expand = false;
         w15.Fill = false;
         bindings["hbox1"] = w1;
         cobj.Add(w1);
         bindings["SharpTranslator.ReversibleCombos"] = cobj;
         w2.Show();
         w4.Show();
         w6.Show();
         w8.Show();
         w10.Show();
         w12.Show();
         w14.Show();
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:sharptranslator-svn,代码行数:101,代码来源:generated.cs

示例7: Build


//.........这里部分代码省略.........
         // Container child GtkAlignment1.Gtk.Container+ContainerChild
         Gtk.HBox w21 = new Gtk.HBox();
         w21.Spacing = 2;
         w21.Events = ((Gdk.EventMask)(0));
         w21.Name = "GtkHBox1";
         // Container child GtkHBox1.Gtk.Container+ContainerChild
         Gtk.Image w22 = new Gtk.Image();
         w22.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-yes", 16, 0);
         w22.Events = ((Gdk.EventMask)(0));
         w22.Name = "image3";
         bindings["image3"] = w22;
         w21.Add(w22);
         // Container child GtkHBox1.Gtk.Container+ContainerChild
         Gtk.Label w24 = new Gtk.Label();
         w24.LabelProp = "Yes";
         w24.Events = ((Gdk.EventMask)(0));
         w24.Name = "GtkLabel1";
         bindings["GtkLabel1"] = w24;
         w21.Add(w24);
         bindings["GtkHBox1"] = w21;
         w20.Add(w21);
         bindings["GtkAlignment1"] = w20;
         w19.Add(w20);
         bindings["button24"] = w19;
         cobj.AddActionWidget(w19, -8);
         Gtk.ButtonBox.ButtonBoxChild w28 = ((Gtk.ButtonBox.ButtonBoxChild)(w8[w19]));
         w28.Position = 1;
         w28.Expand = false;
         w28.Fill = false;
         bindings["Boxerp.Client.GtkSharp.Lib.QuestionDialog_ActionArea"] = w8;
         cobj.DefaultWidth = 400;
         cobj.DefaultHeight = 99;
         bindings["Boxerp.Client.GtkSharp.Lib.QuestionDialog"] = cobj;
         w3.Show();
         w5.Show();
         w2.Show();
         w1.Show();
         w12.Show();
         w14.Show();
         w11.Show();
         w10.Show();
         w9.Show();
         w22.Show();
         w24.Show();
         w21.Show();
         w20.Show();
         w19.Show();
         w8.Show();
         cobj.Show();
         w9.Clicked += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnNo")));
         w19.Clicked += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnYes")));
     }
     else {
         if ((id == "Boxerp.Client.GtkSharp.Lib.SimpleListView")) {
             Gtk.Bin cobj = ((Gtk.Bin)(obj));
             // Widget Boxerp.Client.GtkSharp.Lib.SimpleListView
             BinContainer.Attach(cobj);
             cobj.Events = ((Gdk.EventMask)(256));
             cobj.Name = "Boxerp.Client.GtkSharp.Lib.SimpleListView";
             // Container child Boxerp.Client.GtkSharp.Lib.SimpleListView.Gtk.Container+ContainerChild
             Gtk.TreeView w1 = new Gtk.TreeView();
             w1.CanFocus = true;
             w1.Events = ((Gdk.EventMask)(0));
             w1.Name = "treeview";
             bindings["treeview"] = w1;
             cobj.Add(w1);
开发者ID:BackupTheBerlios,项目名称:boxerp-svn,代码行数:67,代码来源:generated.cs

示例8: Update

		void Update (CommandInfo cmdInfo)
		{
			lastCmdInfo = cmdInfo;
			
			Gtk.Widget child = Child;
			if (child == null)
				return;
			
			updating = true;
			
			Gtk.Label accel_label = null;
			Gtk.Label label = null;
			
			if (!(child is Gtk.HBox)) {
				child = new Gtk.HBox (false, 0);
				accel_label = new Gtk.Label ("");
				accel_label.UseUnderline = false;
				accel_label.Xalign = 1.0f;
				accel_label.Show ();
				
				label = new Gtk.Label ("");
				label.UseUnderline = true;
				label.Xalign = 0.0f;
				label.Show ();
				
				((Gtk.Box) child).PackStart (label);
				((Gtk.Box) child).PackStart (accel_label);
				child.Show ();
				
				this.Remove (Child);
				this.Add (child);
			} else {
				accel_label = (Gtk.Label) ((Gtk.Box) child).Children[1];
				label = (Gtk.Label) ((Gtk.Box) child).Children[0];
			}
			
			if (cmdInfo.AccelKey != null)
				accel_label.Text = "    " + KeyBindingManager.BindingToDisplayLabel (cmdInfo.AccelKey, true);
			else
				accel_label.Text = String.Empty;
			
			if (cmdInfo.UseMarkup) {
				label.Markup = overrideLabel ?? cmdInfo.Text;
				label.UseMarkup = true;
			} else {
				label.Text = overrideLabel ?? cmdInfo.Text;
				label.UseMarkup = false;
			}
			
			label.UseUnderline = true;
			
			Sensitive = cmdInfo.Enabled;
			Visible = cmdInfo.Visible && (disabledVisible || cmdInfo.Enabled);
			Active = cmdInfo.Checked;
			Inconsistent = cmdInfo.CheckedInconsistent;
			
			updating = false;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:58,代码来源:CommandCheckMenuItem.cs

示例9: HigMessageDialog

		public HigMessageDialog (Gtk.Window parent,
					 Gtk.DialogFlags flags,
					 Gtk.MessageType type,
					 Gtk.ButtonsType buttons,
					 string          header,
					 string          msg) : base ()
		{
			HasSeparator = false;
			BorderWidth = 5;
			Resizable = false;
			Title = "";
			
			VBox.Spacing = 12;
			ActionArea.Layout = Gtk.ButtonBoxStyle.End;
			
			accel_group = new Gtk.AccelGroup ();
			AddAccelGroup (accel_group);
			
			Gtk.HBox hbox = new Gtk.HBox (false, 12);
			hbox.BorderWidth = 5;
			hbox.Show ();
			VBox.PackStart (hbox, false, false, 0);
			
			Gtk.Image image = null;
			
			switch (type) {
			case Gtk.MessageType.Error:
				image = new Gtk.Image (Gtk.Stock.DialogError, Gtk.IconSize.Dialog);
				break;
			case Gtk.MessageType.Question:
				image = new Gtk.Image (Gtk.Stock.DialogQuestion, Gtk.IconSize.Dialog);
				break;
			case Gtk.MessageType.Info:
				image = new Gtk.Image (Gtk.Stock.DialogInfo, Gtk.IconSize.Dialog);
				break;
			case Gtk.MessageType.Warning:
				image = new Gtk.Image (Gtk.Stock.DialogWarning, Gtk.IconSize.Dialog);
				break;
			}

			image.Show ();
			hbox.PackStart (image, false, false, 0);
			
			Gtk.VBox label_vbox = new Gtk.VBox (false, 0);
			label_vbox.Show ();
			hbox.PackStart (label_vbox, true, true, 0);
			
			string title = String.Format ("<span weight='bold' size='larger'>{0}" +
						      "</span>\n",
						      header);

			Gtk.Label label;
			
			label = new Gtk.Label (title);
			label.UseMarkup = true;
			label.Justify = Gtk.Justification.Left;
			label.LineWrap = true;
			label.SetAlignment (0.0f, 0.5f);
			label.Show ();
			label_vbox.PackStart (label, false, false, 0);
			
			label = new Gtk.Label (msg);
			label.UseMarkup = true;
			label.Justify = Gtk.Justification.Left;
			label.LineWrap = true;
			label.SetAlignment (0.0f, 0.5f);
			label.Show ();
			label_vbox.PackStart (label, false, false, 0);
		
			switch (buttons) {
			case Gtk.ButtonsType.None:
				break;
			case Gtk.ButtonsType.Ok:
				AddButton (Gtk.Stock.Ok, Gtk.ResponseType.Ok, true);
				break;
			case Gtk.ButtonsType.Close:
				AddButton (Gtk.Stock.Close, Gtk.ResponseType.Close, true);
				break;
			case Gtk.ButtonsType.Cancel:
				AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel, true);
				break;
			case Gtk.ButtonsType.YesNo:
				AddButton (Gtk.Stock.No, Gtk.ResponseType.No, false);
				AddButton (Gtk.Stock.Yes, Gtk.ResponseType.Yes, true);
				break;
			case Gtk.ButtonsType.OkCancel:
				AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel, false);
				AddButton (Gtk.Stock.Ok, Gtk.ResponseType.Ok, true);
				break;
			}
			
			if (parent != null)
				TransientFor = parent;
			
			if ((int) (flags & Gtk.DialogFlags.Modal) != 0)
				Modal = true;
			
			if ((int) (flags & Gtk.DialogFlags.DestroyWithParent) != 0)
				DestroyWithParent = true;
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:100,代码来源:HigMessageDialog.cs

示例10: Build

		protected virtual void Build ()
		{
			Gtk.Window cobj = (Gtk.Window) null;
			// Widget Sya.reclutamiento
			cobj.Title = "Datos del Aspirante - Reclutamiento de Personal";
			Gtk.UIManager w1 = new Gtk.UIManager ();
			Gtk.ActionGroup w2 = new Gtk.ActionGroup ("Default");
			Gtk.Action w3 = new Gtk.Action ("goBack", null, null, "gtk-go-back");
			this.goBack = w3;
			w2.Add (w3, null);
			Gtk.Action w4 = new Gtk.Action ("goForward", null, null, "gtk-go-forward");
			this.goForward = w4;
			w2.Add (w4, null);
			Gtk.Action w5 = new Gtk.Action ("gotoLast", null, null, "gtk-goto-last");
			this.gotoLast = w5;
			w2.Add (w5, null);
			Gtk.Action w6 = new Gtk.Action ("print", null, null, "gtk-print");
			this.print = w6;
			w2.Add (w6, null);
			Gtk.Action w7 = new Gtk.Action ("save", null, null, "gtk-save");
			this.save = w7;
			w2.Add (w7, null);
			Gtk.Action w8 = new Gtk.Action ("quit", null, null, "gtk-quit");
			this.quit = w8;
			w2.Add (w8, null);
			Gtk.Action w9 = new Gtk.Action ("quit1", null, null, "gtk-quit");
			this.quit1 = w9;
			w2.Add (w9, null);
			Gtk.Action w10 = new Gtk.Action ("save1", null, null, "gtk-save");
			this.save1 = w10;
			w2.Add (w10, null);
			Gtk.Action w11 = new Gtk.Action ("quit2", null, null, "gtk-quit");
			this.quit2 = w11;
			w2.Add (w11, null);
			Gtk.Action w12 = new Gtk.Action ("about", null, null, "gtk-about");
			this.about = w12;
			w2.Add (w12, null);
			Gtk.Action w13 = new Gtk.Action ("gotoFirst", null, null, "gtk-goto-first");
			this.gotoFirst = w13;
			w2.Add (w13, null);
			Gtk.Action w14 = new Gtk.Action ("goBack1", null, null, "gtk-media-rewind");
			this.goBack1 = w14;
			w2.Add (w14, null);
			Gtk.Action w15 = new Gtk.Action ("goForward1", null, null, "gtk-media-forward");
			this.goForward1 = w15;
			w2.Add (w15, null);
			Gtk.Action w16 = new Gtk.Action ("gotoLast1", null, null, "gtk-goto-last");
			this.gotoLast1 = w16;
			w2.Add (w16, null);
			Gtk.Action w17 = new Gtk.Action ("save2", null, null, "gtk-save");
			this.save2 = w17;
			w2.Add (w17, null);
			Gtk.Action w18 = new Gtk.Action ("print1", null, null, "gtk-print");
			this.print1 = w18;
			w2.Add (w18, null);
			Gtk.Action w19 = new Gtk.Action ("quit3", null, null, "gtk-quit");
			this.quit3 = w19;
			w2.Add (w19, null);
			Gtk.Action w20 = new Gtk.Action ("dialogInfo", null, null, "gtk-dialog-info");
			this.dialogInfo = w20;
			w2.Add (w20, null);
			Gtk.Action w21 = new Gtk.Action ("about1", null, null, "gtk-about");
			this.about1 = w21;
			w2.Add (w21, null);
			Gtk.Action w22 = new Gtk.Action ("goBack2", null, null, "gtk-go-back");
			this.goBack2 = w22;
			w2.Add (w22, null);
			Gtk.Action w23 = new Gtk.Action ("goForward2", null, null, "gtk-go-forward");
			this.goForward2 = w23;
			w2.Add (w23, null);
			Gtk.Action w24 = new Gtk.Action ("printPreview", null, null, "gtk-print-preview");
			this.printPreview = w24;
			w2.Add (w24, null);
			w1.InsertActionGroup (w2, 0);
			cobj.AddAccelGroup (w1.AccelGroup);
			cobj.WindowPosition = ((Gtk.WindowPosition) (4));
			cobj.Modal = true;
			cobj.Gravity = ((Gdk.Gravity) (5));
			cobj.Name = "Sya.reclutamiento";
			// Container child Sya.reclutamiento.Gtk.Container+ContainerChild
			Gtk.ScrolledWindow w25 = new Gtk.ScrolledWindow ();
			w25.VscrollbarPolicy = ((Gtk.PolicyType) (1));
			w25.HscrollbarPolicy = ((Gtk.PolicyType) (1));
			w25.CanFocus = true;
			w25.Name = "scrolledwindow2";
			// Container child scrolledwindow2.Gtk.Container+ContainerChild
			Gtk.Viewport w26 = new Gtk.Viewport ();
			w26.ShadowType = ((Gtk.ShadowType) (0));
			w26.Name = "GtkViewport";
			// Container child GtkViewport.Gtk.Container+ContainerChild
			Gtk.VBox w27 = new Gtk.VBox ();
			w27.Name = "vbox1";
			// Container child vbox1.Gtk.Box+BoxChild
			Gtk.HBox w28 = new Gtk.HBox ();
			w28.Name = "hbox2";
			// Container child hbox2.Gtk.Box+BoxChild
			w1.AddUiFromString ("<ui><toolbar name='toolbar1'><toolitem action='gotoFirst'/><toolitem action='goBack1'/><toolitem action='goForward1'/><toolitem action='gotoLast1'/><toolitem action='save2'/><toolitem action='printPreview'/><toolitem action='print1'/><toolitem action='quit3'/><toolitem action='dialogInfo'/><toolitem action='about1'/><toolitem action='goBack2'/><toolitem action='goForward2'/></toolbar></ui>");
			Gtk.Toolbar w29 = ((Gtk.Toolbar) (w1.GetWidget ("/toolbar1")));
			w29.ShowArrow = false;
			w29.Tooltips = true;
//.........这里部分代码省略.........
开发者ID:mono,项目名称:gert,代码行数:101,代码来源:test.cs

示例11: Build


//.........这里部分代码省略.........
         w59.Events = ((Gdk.EventMask)(0));
         w59.Name = "image3";
         bindings["image3"] = w59;
         w58.Add(w59);
         // Container child GtkHBox.Gtk.Container+ContainerChild
         Gtk.Label w61 = new Gtk.Label();
         w61.LabelProp = "_Export";
         w61.UseUnderline = true;
         w61.Events = ((Gdk.EventMask)(0));
         w61.Name = "GtkLabel";
         bindings["GtkLabel"] = w61;
         w58.Add(w61);
         bindings["GtkHBox"] = w58;
         w57.Add(w58);
         bindings["GtkAlignment"] = w57;
         w56.Add(w57);
         bindings["button16"] = w56;
         w27.Add(w56);
         Gtk.Box.BoxChild w65 = ((Gtk.Box.BoxChild)(w27[w56]));
         w65.Position = 6;
         w65.Expand = false;
         w65.Fill = false;
         bindings["hbox1"] = w27;
         w15.Add(w27);
         Gtk.Box.BoxChild w66 = ((Gtk.Box.BoxChild)(w15[w27]));
         w66.Position = 2;
         w66.Expand = false;
         w66.Fill = false;
         bindings["vbox1"] = w15;
         cobj.Add(w15);
         cobj.DefaultWidth = 566;
         cobj.DefaultHeight = 300;
         bindings["igaeditorgtk.MainForm"] = cobj;
         w16.Show();
         w21.Show();
         w20.Show();
         w19.Show();
         w25.Show();
         w18.Show();
         w28.Show();
         w30.Show();
         w32.Show();
         w34.Show();
         w39.Show();
         w41.Show();
         w38.Show();
         w37.Show();
         w36.Show();
         w49.Show();
         w51.Show();
         w48.Show();
         w47.Show();
         w46.Show();
         w59.Show();
         w61.Show();
         w58.Show();
         w57.Show();
         w56.Show();
         w27.Show();
         w15.Show();
         cobj.Show();
         cobj.DeleteEvent += ((Gtk.DeleteEventHandler)(System.Delegate.CreateDelegate(typeof(Gtk.DeleteEventHandler), cobj, "OnDeleteEvent")));
         w7.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnReloadActivated")));
         w8.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnVaccumShrinkDatabaseActivated")));
         w9.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnCloseDatabaseActivated")));
         w10.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnExitActivated")));
开发者ID:micolous,项目名称:igaeditor,代码行数:67,代码来源:generated.cs

示例12: MakeAddinsPane

		// Page 3
		// Extension Preferences
		public Gtk.Widget MakeAddinsPane ()
		{
			Gtk.VBox vbox = new Gtk.VBox (false, 6);
			vbox.BorderWidth = 6;
			Gtk.Label l = new Gtk.Label (Catalog.GetString (
			                                     "The following add-ins are installed"));
			l.Xalign = 0;
			l.Show ();
			vbox.PackStart (l, false, false, 0);

			Gtk.HBox hbox = new Gtk.HBox (false, 6);

			// TreeView of Add-ins
			Gtk.TreeView tree = new Gtk.TreeView ();
			addin_tree = new Mono.Addins.Gui.AddinTreeWidget (tree);

			tree.Show ();

			Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow ();
			sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
			sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
			sw.ShadowType = Gtk.ShadowType.In;
			sw.Add (tree);
			sw.Show ();
			Gtk.LinkButton get_more_link =
				new Gtk.LinkButton ("http://live.gnome.org/Tomboy/PluginList",
				                    Catalog.GetString ("Get More Add-Ins..."));
			get_more_link.Show ();
			Gtk.VBox tree_box = new Gtk.VBox (false, 0);
			tree_box.Add (sw);
			tree_box.PackEnd (get_more_link, false, false, 5);
			tree_box.Show ();
			hbox.PackStart (tree_box, true, true, 0);

			// Action Buttons (right of TreeView)
			Gtk.VButtonBox button_box = new Gtk.VButtonBox ();
			button_box.Spacing = 4;
			button_box.Layout = Gtk.ButtonBoxStyle.Start;

			// TODO: In a future version, add in an "Install Add-ins..." button

			// TODO: In a future version, add in a "Repositories..." button

			enable_addin_button =
			        new Gtk.Button (Catalog.GetString ("_Enable"));
			enable_addin_button.Sensitive = false;
			enable_addin_button.Clicked += OnEnableAddinButton;
			enable_addin_button.Show ();

			disable_addin_button =
			        new Gtk.Button (Catalog.GetString ("_Disable"));
			disable_addin_button.Sensitive = false;
			disable_addin_button.Clicked += OnDisableAddinButton;
			disable_addin_button.Show ();

			addin_prefs_button =
			        new Gtk.Button (Gtk.Stock.Preferences);
			addin_prefs_button.Sensitive = false;
			addin_prefs_button.Clicked += OnAddinPrefsButton;
			addin_prefs_button.Show ();

			addin_info_button =
			        new Gtk.Button (Gtk.Stock.Info);
			addin_info_button.Sensitive = false;
			addin_info_button.Clicked += OnAddinInfoButton;
			addin_info_button.Show ();

			button_box.PackStart (enable_addin_button);
			button_box.PackStart (disable_addin_button);
			button_box.PackStart (addin_prefs_button);
			button_box.PackStart (addin_info_button);

			button_box.Show ();
			hbox.PackStart (button_box, false, false, 0);

			hbox.Show ();
			vbox.PackStart (hbox, true, true, 0);
			vbox.Show ();

			tree.Selection.Changed += OnAddinTreeSelectionChanged;
			LoadAddins ();

			return vbox;
		}
开发者ID:oluc,项目名称:tomboy,代码行数:86,代码来源:PreferencesDialog.cs

示例13: MakeSyncPane

		public Gtk.Widget MakeSyncPane ()
		{
			Gtk.VBox vbox = new Gtk.VBox (false, 0);
			vbox.Spacing = 4;
			vbox.BorderWidth = 8;

			Gtk.HBox hbox = new Gtk.HBox (false, 4);

			Gtk.Label label = new Gtk.Label (Catalog.GetString ("Ser_vice:"));
			label.Xalign = 0;
			label.Show ();
			hbox.PackStart (label, false, false, 0);

			// Populate the store with all the available SyncServiceAddins
			syncAddinStore = new Gtk.ListStore (typeof (SyncServiceAddin));
			syncAddinIters = new Dictionary<string,Gtk.TreeIter> ();
			SyncServiceAddin [] addins = Tomboy.DefaultNoteManager.AddinManager.GetSyncServiceAddins ();
			Array.Sort (addins, CompareSyncAddinsByName);
			foreach (SyncServiceAddin addin in addins) {
				Gtk.TreeIter iter = syncAddinStore.Append ();
				syncAddinStore.SetValue (iter, 0, addin);
				syncAddinIters [addin.Id] = iter;
			}

			syncAddinCombo = new Gtk.ComboBox (syncAddinStore);
			label.MnemonicWidget = syncAddinCombo;
			Gtk.CellRendererText crt = new Gtk.CellRendererText ();
			syncAddinCombo.PackStart (crt, true);
			syncAddinCombo.SetCellDataFunc (crt,
			                                new Gtk.CellLayoutDataFunc (ComboBoxTextDataFunc));

			// Read from Preferences which service is configured and select it
			// by default.  Otherwise, just select the first one in the list.
			string addin_id = Preferences.Get (
			                          Preferences.SYNC_SELECTED_SERVICE_ADDIN) as String;

			Gtk.TreeIter active_iter;
			if (addin_id != null && syncAddinIters.ContainsKey (addin_id)) {
				active_iter = syncAddinIters [addin_id];
				syncAddinCombo.SetActiveIter (active_iter);
			} else {
				if (syncAddinStore.GetIterFirst (out active_iter) == true) {
					syncAddinCombo.SetActiveIter (active_iter);
				}
			}

			syncAddinCombo.Changed += OnSyncAddinComboChanged;

			syncAddinCombo.Show ();
			hbox.PackStart (syncAddinCombo, true, true, 0);

			hbox.Show ();
			vbox.PackStart (hbox, false, false, 0);

			// Get the preferences GUI for the Sync Addin
			if (active_iter.Stamp != Gtk.TreeIter.Zero.Stamp)
				selectedSyncAddin = syncAddinStore.GetValue (active_iter, 0) as SyncServiceAddin;

			if (selectedSyncAddin != null)
				syncAddinPrefsWidget = selectedSyncAddin.CreatePreferencesControl (OnSyncAddinPrefsChanged);
			if (syncAddinPrefsWidget == null) {
				Gtk.Label l = new Gtk.Label (Catalog.GetString ("Not configurable"));
				l.Yalign = 0.5f;
				l.Yalign = 0.5f;
				syncAddinPrefsWidget = l;
			}
			if (syncAddinPrefsWidget != null && addin_id != null &&
			                syncAddinIters.ContainsKey (addin_id) && selectedSyncAddin.IsConfigured)
				syncAddinPrefsWidget.Sensitive = false;

			syncAddinPrefsWidget.Show ();
			syncAddinPrefsContainer = new Gtk.VBox (false, 0);
			syncAddinPrefsContainer.PackStart (syncAddinPrefsWidget, false, false, 0);
			syncAddinPrefsContainer.Show ();
			vbox.PackStart (syncAddinPrefsContainer, true, true, 10);

			// Autosync preference
			int timeout = (int) Preferences.Get (Preferences.SYNC_AUTOSYNC_TIMEOUT);
			if (timeout > 0 && timeout < 5) {
				timeout = 5;
				Preferences.Set (Preferences.SYNC_AUTOSYNC_TIMEOUT, 5);
			}
			Gtk.HBox autosyncBox = new Gtk.HBox (false, 5);
			// Translators: This is and the next string go together.
			// Together they look like "Automatically Sync in Background Every [_] Minutes",
			// where "[_]" is a GtkSpinButton.
			autosyncCheck =
				new Gtk.CheckButton (Catalog.GetString ("Automaticall_y Sync in Background Every"));
			autosyncSpinner = new Gtk.SpinButton (5, 1000, 1);
			autosyncSpinner.Value = timeout >= 5 ? timeout : 10;
			Gtk.Label autosyncExtraText =
				// Translators: See above comment for details on
				// this string.
				new Gtk.Label (Catalog.GetString ("Minutes"));
			autosyncCheck.Active = autosyncSpinner.Sensitive = timeout >= 5;
			EventHandler updateTimeoutPref = (o, e) => {
				Preferences.Set (Preferences.SYNC_AUTOSYNC_TIMEOUT,
				                 autosyncCheck.Active ? (int) autosyncSpinner.Value : -1);
			};
			autosyncCheck.Toggled += (o, e) => {
//.........这里部分代码省略.........
开发者ID:oluc,项目名称:tomboy,代码行数:101,代码来源:PreferencesDialog.cs

示例14: MakeFontButton

		Gtk.Button MakeFontButton ()
		{
			Gtk.HBox font_box = new Gtk.HBox (false, 0);
			font_box.Show ();

			font_face = new Gtk.Label (null);
			font_face.UseMarkup = true;
			font_face.Show ();
			font_box.PackStart (font_face, true, true, 0);

			Gtk.VSeparator sep = new Gtk.VSeparator ();
			sep.Show ();
			font_box.PackStart (sep, false, false, 0);

			font_size = new Gtk.Label (null);
			font_size.Xpad = 4;
			font_size.Show ();
			font_box.PackStart (font_size, false, false, 0);

			Gtk.Button button = new Gtk.Button ();
			button.Clicked += OnFontButtonClicked;
			button.Add (font_box);
			button.Show ();

			string font_desc = (string) Preferences.Get (Preferences.CUSTOM_FONT_FACE);
			UpdateFontButton (font_desc);

			return button;
		}
开发者ID:oluc,项目名称:tomboy,代码行数:29,代码来源:PreferencesDialog.cs

示例15: Build


//.........这里部分代码省略.........
         w11.Add(w12);
         bindings["scrolledwindow1"] = w11;
         w2.Add(w11);
         Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(w2[w11]));
         w18.Position = 1;
         bindings["vbox1"] = w2;
         w1.Add(w2);
         Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(w1[w2]));
         w19.Position = 0;
         bindings["dialog_VBox"] = w1;
         // Internal child sink.help.ActionArea
         Gtk.HButtonBox w20 = cobj.ActionArea;
         w20.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
         w20.Spacing = 6;
         w20.BorderWidth = ((uint)(5));
         w20.Events = ((Gdk.EventMask)(256));
         w20.Name = "sink.help_ActionArea";
         // Container child sink.help_ActionArea.Gtk.ButtonBox+ButtonBoxChild
         Gtk.Button w21 = new Gtk.Button();
         w21.CanFocus = true;
         w21.Events = ((Gdk.EventMask)(0));
         w21.Name = "button3";
         w21.CanDefault = true;
         w21.Label = "OK";
         bindings["button3"] = w21;
         cobj.AddActionWidget(w21, 0);
         Gtk.ButtonBox.ButtonBoxChild w22 = ((Gtk.ButtonBox.ButtonBoxChild)(w20[w21]));
         w22.Expand = false;
         w22.Fill = false;
         bindings["sink.help_ActionArea"] = w20;
         cobj.DefaultWidth = 400;
         cobj.DefaultHeight = 449;
         bindings["sink.help"] = cobj;
         w5.Show();
         w7.Show();
         w4.Show();
         w3.Show();
         w14.Show();
         w13.Show();
         w12.Show();
         w11.Show();
         w2.Show();
         w1.Show();
         w21.Show();
         w20.Show();
         cobj.Show();
         w21.Released += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnButton3Released")));
     }
     else {
         if ((id == "sink.sinkgtk")) {
             Gtk.Window cobj = ((Gtk.Window)(obj));
             // Widget sink.sinkgtk
             cobj.Title = "sinkgtk";
             Gtk.UIManager w1 = new Gtk.UIManager();
             Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
             Gtk.Action w3 = new Gtk.Action("Simulation", "Simulation", null, null);
             w3.ShortLabel = "Start";
             bindings["Simulation"] = w3;
             w2.Add(w3, null);
             Gtk.Action w4 = new Gtk.Action("NewSimulation", "New simulation", null, "gtk-media-play");
             w4.ShortLabel = "New simulation";
             bindings["NewSimulation"] = w4;
             w2.Add(w4, null);
             Gtk.ToggleAction w5 = new Gtk.ToggleAction("PauseSimulation", "Pause simulation", null, "gtk-media-pause");
             w5.ShortLabel = "Pause simulation";
             bindings["PauseSimulation"] = w5;
开发者ID:mchelen,项目名称:sink,代码行数:67,代码来源:generated.cs


注:本文中的Gtk.HBox.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。