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


C# Gtk.Alignment类代码示例

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


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

示例1: DocumentOutlinePad

		public DocumentOutlinePad ()
		{
			box = new Gtk.Alignment (0, 0, 1, 1);
			box.BorderWidth = 0;
			SetEmptyWidget ();
			box.ShowAll ();
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:7,代码来源:DocumentOutlinePad.cs

示例2: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.OCMSplash
     this.WidthRequest = 744;
     this.HeightRequest = 600;
     this.Name = "ocmgtk.OCMSplash";
     this.Title = Mono.Unix.Catalog.GetString("OCMSplash");
     this.TypeHint = ((Gdk.WindowTypeHint)(4));
     this.WindowPosition = ((Gtk.WindowPosition)(3));
     this.Resizable = false;
     this.AllowGrow = false;
     this.Decorated = false;
     // Container child ocmgtk.OCMSplash.Gtk.Container+ContainerChild
     this.splashVBox = new Gtk.VBox();
     this.splashVBox.Name = "splashVBox";
     this.splashVBox.Spacing = 6;
     // Container child splashVBox.Gtk.Box+BoxChild
     this.labelAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.labelAlignment.Name = "labelAlignment";
     this.labelAlignment.LeftPadding = ((uint)(120));
     this.labelAlignment.TopPadding = ((uint)(430));
     // Container child labelAlignment.Gtk.Container+ContainerChild
     this.versionLabel = new Gtk.Label();
     this.versionLabel.Name = "versionLabel";
     this.versionLabel.Xalign = 0F;
     this.versionLabel.Yalign = 0F;
     this.versionLabel.LabelProp = "<b><big>Version XXX</big></b>\n<small>Copyright (c) Kyle Campbell 2010-2011</small>";
     this.versionLabel.UseMarkup = true;
     this.labelAlignment.Add(this.versionLabel);
     this.splashVBox.Add(this.labelAlignment);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.splashVBox[this.labelAlignment]));
     w2.Position = 0;
     w2.Expand = false;
     w2.Fill = false;
     // Container child splashVBox.Gtk.Box+BoxChild
     this.progressAlign = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.progressAlign.Name = "progressAlign";
     this.progressAlign.LeftPadding = ((uint)(120));
     this.progressAlign.RightPadding = ((uint)(400));
     // Container child progressAlign.Gtk.Container+ContainerChild
     this.loadProgress = new Gtk.ProgressBar();
     this.loadProgress.WidthRequest = 100;
     this.loadProgress.HeightRequest = 10;
     this.loadProgress.Name = "loadProgress";
     this.progressAlign.Add(this.loadProgress);
     this.splashVBox.Add(this.progressAlign);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.splashVBox[this.progressAlign]));
     w4.Position = 1;
     w4.Expand = false;
     w4.Fill = false;
     this.Add(this.splashVBox);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 786;
     this.DefaultHeight = 627;
     this.Show();
 }
开发者ID:cbuehler,项目名称:opencachemanager,代码行数:59,代码来源:ocmgtk.OCMSplash.cs

示例3: CreateMainLayout

		protected virtual Gtk.Widget CreateMainLayout ()
		{
			mainBox = new Gtk.VBox ();
			mainBox.Show ();
			alignment = new RootWindowAlignment (this);
			mainBox.PackStart (alignment, true, true, 0);
			alignment.Show ();
			return mainBox;
		}
开发者ID:m13253,项目名称:xwt,代码行数:9,代码来源:WindowBackend.cs

示例4: WindowBackend

 public WindowBackend()
 {
     Window = new Gtk.Window ("");
     mainBox = new Gtk.VBox ();
     Window.Add (mainBox);
     mainBox.Show ();
     alignment = new Gtk.Alignment (0, 0, 1, 1);
     mainBox.PackStart (alignment, true, true, 0);
     alignment.Show ();
 }
开发者ID:carlosalberto,项目名称:xwt,代码行数:10,代码来源:WindowBackend.cs

示例5: AddLabel

		void AddLabel ()
		{
			if (label == null) {
				Gtk.Alignment al = new Gtk.Alignment (0.5f, 0.5f, 1f, 1f);
				al.SetPadding (6, 6, 6, 6);
				label = new Gtk.Label ();
				al.Add (label);
				ContentBox.Add (al);
				al.ShowAll ();
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:11,代码来源:TooltipPopoverWindow.cs

示例6: MultipleObjectViewer

 protected MultipleObjectViewer(IBroadcaster hub, string caption)
     : base(false, 0)
 {
     _hub = hub;
     // --- first line: caption and buttons
     Gtk.HBox hbxFirstLine = new Gtk.HBox(false, 2);
     // Caption label
     Gtk.Alignment labelAlign = new Gtk.Alignment(0F, 0F, 1F, 1F);
     labelAlign.Add(new Gtk.Label(caption));
     hbxFirstLine.PackStart(labelAlign, false, false, 0);
     hbxFirstLine.PackStart(new Gtk.Label(String.Empty), true, true, 0);
     // "Add" button
     Gtk.Image image = new Gtk.Image();
     image.Stock = Gtk.Stock.Add;
     _btnAdd = new Gtk.Button();
     _btnAdd.Add(image);
     _btnAdd.Relief = Gtk.ReliefStyle.None;
     _btnAdd.Clicked += new EventHandler(OnAddButtonClicked);
     _btnAdd.Sensitive = false;
     hbxFirstLine.PackStart(_btnAdd, false, false, 0);
     // "Edit" button
     image = new Gtk.Image();
     image.Stock = Gtk.Stock.JumpTo;
     _btnEdit = new Gtk.Button();
     _btnEdit.Add(image);
     _btnEdit.Relief = Gtk.ReliefStyle.None;
     _btnEdit.Clicked += new EventHandler(OnEditButtonClicked);
     _btnEdit.Sensitive = false;
     hbxFirstLine.PackStart(_btnEdit, false, false, 0);
     // "Delete" button
     image = new Gtk.Image();
     image.Stock = Gtk.Stock.Remove;
     _btnDelete = new Gtk.Button();
     _btnDelete.Add(image);
     _btnDelete.Relief = Gtk.ReliefStyle.None;
     _btnDelete.Clicked += new EventHandler(OnDeleteButtonClicked);
     _btnDelete.Sensitive = false;
     hbxFirstLine.PackStart(_btnDelete, false, false, 0);
     base.PackStart(hbxFirstLine, false, false, 0);
     // --- second line: element list
     _store = new Gtk.TreeStore(typeof(string));
     _tvList = new Gtk.TreeView();
     _tvList.HeadersVisible = false;
     _tvList.AppendColumn("", new Gtk.CellRendererText(), "text", 0);
     _tvList.Model = _store;
     _tvList.FocusInEvent += new Gtk.FocusInEventHandler(EnableButtons);
     _tvList.ButtonPressEvent += new Gtk.ButtonPressEventHandler(ListClickedHandler);
     Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
     sw.ShadowType = Gtk.ShadowType.In;
     sw.Add(_tvList);
     base.PackStart(sw, true, true, 0);
     sw.Show();
 }
开发者ID:MonoBrasil,项目名称:historico,代码行数:53,代码来源:MultipleObjectViewer.cs

示例7: CreateWidget

 protected override Gtk.Widget CreateWidget(WindowContext context)
 {
     if(Child == null)
         throw new Exception("Align musí obsahovat widget");
     Gtk.Alignment a = new Gtk.Alignment(
         GetAtr("x", 0.5f),
         GetAtr("y", 0.5f),
         GetAtr("xs", 1.0f),
         GetAtr("ys", 1.0f));
     a.Child = Child.Build(context);
     return a;
 }
开发者ID:langpavel,项目名称:LPS-old,代码行数:12,代码来源:AlignExpression.cs

示例8: MakeImageButton

		public static Gtk.Button MakeImageButton (Gtk.Image image, string label)
		{
			Gtk.HBox box = new Gtk.HBox (false, 2);
			box.PackStart (image, false, false, 0);
			box.PackEnd (new Gtk.Label (label), false, false, 0);
			box.ShowAll ();

			Gtk.Button button = new Gtk.Button ();

			Gtk.Alignment align = new Gtk.Alignment (0.5f, 0.5f, 0.0f, 0.0f);
			align.Add (box);
			align.Show ();

			button.Add (align);
			return button;
		}			
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:16,代码来源:GtkUtils.cs

示例9: ToolbarComboBox

		public ToolbarComboBox () 
		{
			align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 0f);
			Add (align);
			
			align.LeftPadding = 3;
			align.RightPadding = 3;
			
			combo = new Gtk.ComboBox ();
			combo.Model = new Gtk.ListStore (typeof(string));
			ctx = new Gtk.CellRendererText ();
			combo.PackStart (ctx, true);
			combo.AddAttribute (ctx, "text", 0);
			
			align.Add (combo);
			ShowAll ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:17,代码来源:ToolbarComboBox.cs

示例10: WelcomePageTipOfTheDaySection

		public WelcomePageTipOfTheDaySection (): base (GettextCatalog.GetString ("Did you know?"))
		{
			XmlDocument xmlDocument = new XmlDocument ();
			xmlDocument.Load (System.IO.Path.Combine (System.IO.Path.Combine (PropertyService.DataPath, "options"), "TipsOfTheDay.xml"));

			foreach (XmlNode xmlNode in xmlDocument.DocumentElement.ChildNodes) {
				tips.Add (StringParserService.Parse (xmlNode.InnerText));
			}
			
			if (tips.Count != 0)  
				currentTip = new Random ().Next () % tips.Count;
			else
				currentTip = -1;

			Gtk.VBox box = new Gtk.VBox (false, 12);

			label = new Gtk.Label ();
			label.Xalign = 0;
			label.Wrap = true;
			label.WidthRequest = 200;
			label.ModifyFont (FontService.SansFont.CopyModified (Gui.Styles.FontScale11));
			label.SetPadding (0, 10);

			label.Text = currentTip != -1 ? tips[currentTip] : "";
			box.PackStart (label, true, true, 0);

			var next = new Gtk.Button (GettextCatalog.GetString ("Next Tip"));
			next.Relief = Gtk.ReliefStyle.Normal;
			next.Clicked += delegate {
				if (tips.Count == 0)
					return;
				currentTip = currentTip + 1;
				if (currentTip >= tips.Count)
					currentTip = 0;
				label.Text = tips[currentTip];
			};

			var al = new Gtk.Alignment (0, 0, 0, 0);
			al.Add (next);
			box.PackStart (al, false, false, 0);
			SetContent (box);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:42,代码来源:WelcomePageTipOfTheDaySection.cs

示例11: Wrap

		public override void Wrap (object obj, bool initialized)
		{
			base.Wrap (obj, initialized);
			if (!initialized) {
				frame.Label = "<b>" + frame.Name + "</b>";
				((Gtk.Label)frame.LabelWidget).UseMarkup = true;
				frame.Shadow = Gtk.ShadowType.None;
				if (AllowPlaceholders) {
					Gtk.Alignment align = new Gtk.Alignment (0, 0, 1, 1);
					align.LeftPadding = 12;
					Container align_wrapper = (Container)ObjectWrapper.Create (proj, align, this);
					align_wrapper.AddPlaceholder ();
					ReplaceChild (frame.Child, (Gtk.Widget)align_wrapper.Wrapped, true);
				}
			}

			if (frame.LabelWidget != null)
				ObjectWrapper.Create (proj, frame.LabelWidget, this);
			frame.AddNotification ("label-widget", LabelWidgetChanged);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:20,代码来源:Frame.cs

示例12: Build

 protected virtual void Build() {
     Stetic.Gui.Initialize(this);
     // Widget Mono.Upnp.GtkClient.LazyDeviceInfo
     Stetic.BinContainer.Attach(this);
     this.Name = "Mono.Upnp.GtkClient.LazyDeviceInfo";
     // Container child Mono.Upnp.GtkClient.LazyDeviceInfo.Gtk.Container+ContainerChild
     this.alignment = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment.Name = "alignment";
     // Container child alignment.Gtk.Container+ContainerChild
     this.loading = new Gtk.Label();
     this.loading.Name = "loading";
     this.loading.LabelProp = Mono.Unix.Catalog.GetString("Loading");
     this.alignment.Add(this.loading);
     this.Add(this.alignment);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
     this.Mapped += new System.EventHandler(this.OnMapped);
 }
开发者ID:rsweeney21,项目名称:Mono.Upnp,代码行数:20,代码来源:Mono.Upnp.GtkClient.LazyDeviceInfo.cs

示例13: 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

示例14: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.LogViewerWidget
     Stetic.BinContainer.Attach(this);
     this.Name = "ocmgtk.LogViewerWidget";
     // Container child ocmgtk.LogViewerWidget.Gtk.Container+ContainerChild
     this.logBox = new Gtk.VBox();
     this.logBox.Name = "logBox";
     this.logBox.Spacing = 6;
     this.logBox.BorderWidth = ((uint)(6));
     // Container child logBox.Gtk.Box+BoxChild
     this.logAlign = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.logAlign.Name = "logAlign";
     this.logBox.Add(this.logAlign);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.logBox[this.logAlign]));
     w1.Position = 0;
     this.Add(this.logBox);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
 }
开发者ID:cbuehler,项目名称:opencachemanager,代码行数:23,代码来源:ocmgtk.LogViewerWidget.cs

示例15: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Pinta.CurvesDialog
     this.Name = "Pinta.CurvesDialog";
     this.Title = Mono.Unix.Catalog.GetString("Curves");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Resizable = false;
     this.AllowGrow = false;
     this.SkipTaskbarHint = true;
     // Internal child Pinta.CurvesDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.labelMap = new Gtk.Label();
     this.labelMap.Name = "labelMap";
     this.labelMap.LabelProp = Mono.Unix.Catalog.GetString("Transfer Map");
     this.hbox1.Add(this.labelMap);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.labelMap]));
     w2.Position = 0;
     w2.Expand = false;
     w2.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.hseparatorMap = new Gtk.HSeparator();
     this.hseparatorMap.Name = "hseparatorMap";
     this.hbox1.Add(this.hseparatorMap);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.hseparatorMap]));
     w3.Position = 1;
     w1.Add(this.hbox1);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w1[this.hbox1]));
     w4.Position = 0;
     w4.Expand = false;
     w4.Fill = false;
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.hbox2 = new Gtk.HBox();
     this.hbox2.Name = "hbox2";
     this.hbox2.Spacing = 6;
     // Container child hbox2.Gtk.Box+BoxChild
     this.comboMap = Gtk.ComboBox.NewText();
     this.comboMap.AppendText(Mono.Unix.Catalog.GetString("RGB"));
     this.comboMap.AppendText(Mono.Unix.Catalog.GetString("Luminosity"));
     this.comboMap.Name = "comboMap";
     this.comboMap.Active = 1;
     this.hbox2.Add(this.comboMap);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox2[this.comboMap]));
     w5.Position = 0;
     w5.Expand = false;
     w5.Fill = false;
     // Container child hbox2.Gtk.Box+BoxChild
     this.alignment3 = new Gtk.Alignment(1F, 0.5F, 0F, 0F);
     this.alignment3.Name = "alignment3";
     // Container child alignment3.Gtk.Container+ContainerChild
     this.labelPoint = new Gtk.Label();
     this.labelPoint.Name = "labelPoint";
     this.labelPoint.LabelProp = Mono.Unix.Catalog.GetString("(256, 256)");
     this.alignment3.Add(this.labelPoint);
     this.hbox2.Add(this.alignment3);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox2[this.alignment3]));
     w7.PackType = ((Gtk.PackType)(1));
     w7.Position = 2;
     w7.Expand = false;
     w7.Fill = false;
     w1.Add(this.hbox2);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(w1[this.hbox2]));
     w8.Position = 1;
     w8.Expand = false;
     w8.Fill = false;
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.drawing = new Gtk.DrawingArea();
     this.drawing.WidthRequest = 256;
     this.drawing.HeightRequest = 256;
     this.drawing.CanFocus = true;
     this.drawing.Events = ((Gdk.EventMask)(795646));
     this.drawing.Name = "drawing";
     w1.Add(this.drawing);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(w1[this.drawing]));
     w9.Position = 2;
     w9.Padding = ((uint)(8));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.hbox3 = new Gtk.HBox();
     this.hbox3.Name = "hbox3";
     // Container child hbox3.Gtk.Box+BoxChild
     this.checkRed = new Gtk.CheckButton();
     this.checkRed.CanFocus = true;
     this.checkRed.Name = "checkRed";
     this.checkRed.Label = Mono.Unix.Catalog.GetString("Red  ");
     this.checkRed.Active = true;
     this.checkRed.DrawIndicator = true;
     this.checkRed.UseUnderline = true;
     this.hbox3.Add(this.checkRed);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.hbox3[this.checkRed]));
     w10.Position = 0;
     // Container child hbox3.Gtk.Box+BoxChild
     this.checkGreen = new Gtk.CheckButton();
     this.checkGreen.CanFocus = true;
//.........这里部分代码省略.........
开发者ID:xxgreg,项目名称:Pinta,代码行数:101,代码来源:Pinta.CurvesDialog.cs


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