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


C# Gtk.Resize方法代码示例

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


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

示例1: ResizeIfNeeded

 public static void ResizeIfNeeded(Gtk.Window win)
 {
     int winX, winY;
     win.GetSize(out winX, out winY);
     int maxY = ScreenHeightFitted(true);
     if(winY > maxY)
         win.Resize(winX, maxY);
 }
开发者ID:dineshkummarc,项目名称:chronojump,代码行数:8,代码来源:utilGtk.cs

示例2: SetupViewerGeometry

        public void SetupViewerGeometry(Gtk.Window w)
        {
            int width =
                (int) gconfClient.
                Get ("/apps/csboard/viewer/session/width");
            int height =
                (int) gconfClient.
                Get ("/apps/csboard/viewer/session/height");

            w.Resize (width, height);
        }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:11,代码来源:Session.cs

示例3: ApplyNewSize

 private static void ApplyNewSize(Gtk.Window window, int width, int height)
 {
     if ( width > MinWidth
           && height > MinHeight )
         {
             window.Resize( width, height );
         }
 }
开发者ID:Baltasarq,项目名称:GtkUtil,代码行数:8,代码来源:GtkUtil.cs

示例4: Rebuild

		private void Rebuild(Gtk.Table table, uint[][][] positions, GedcomIndividualRecord activePerson, GedcomFamilyLink[] lst)
		{
			foreach (Gtk.Widget child in table.Children)
			{
				child.Destroy();
			}
			table.Resize(1,1);
			
			uint xmax = 0;
			uint ymax = 0;
			
			for (int i = 0; i < positions.Length; i ++)
			{
				uint x = positions[i][0][0] + 1;
				uint y = positions[i][0][1] + 1;
				uint w = positions[i][0][2];
				uint h = positions[i][0][3];
				
				GedcomFamilyLink famLink = (GedcomFamilyLink)lst[i];
				if (famLink == null)
				{	
					PedigreeBox pw = new PedigreeBox(null, 0, null);
					
					if (i > 0 && lst[((i+1)/2)-1] != null)
					{
						GedcomFamilyLink missingFamLink = (GedcomFamilyLink)lst[((i+1)/2)-1];
						
						// missing parent button
						pw.ForceMouseOver = true;
					}
					// FIXME: both conditions do the same thing, double checking
					// the gramps code it doesn't appear to be a mistake in porting
					if (positions[i][0][2] > 1)
					{
						table.Attach(pw,x, x+w, y, y+h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);
					}
					else
					{
						table.Attach(pw,x, x+w, y, y+h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);
					}
					
					xmax = (uint)Math.Max(xmax, x + w);
					ymax = (uint)Math.Max(ymax, y + h);
				}
				else
				{
					GedcomIndividualRecord indi = (GedcomIndividualRecord)_database[famLink.Indi];
					
					if (_showImages && i < ((positions.Length - 1) / 2) && positions[i][0][3] > 1)
					{
						
					}
					
					PedigreeBox pw = new PedigreeBox(indi, positions[i][0][3], null);
					pw.SelectIndividual += PedigreeBox_SelectIndividual;
					
					if (positions[i][0][3] < 7)
					{
						pw.TooltipMarkup = pw.FormatPerson(11, true);
					}
					
					if (positions[i][0][2] > 1)
					{
						table.Attach(pw, x, x+w, y, y+h, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, 0);
					}
					else
					{
						table.Attach(pw, x, x+w, y, y+h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);
					}
					
					xmax = (uint)Math.Max(xmax, x + w);
					ymax = (uint)Math.Max(ymax, y + h);
				}
				
				// connection lines
				if (positions[i].Length > 1)
				{
					// separate boxes for father and mother
					x = positions[i][1][0] + 1;
					y = positions[i][1][1] + 1;
					w = 1;
					h = positions[i][1][2];
					
					Gtk.DrawingArea line = new Gtk.DrawingArea();
					line.ExposeEvent += Line_Expose;
					bool rela = false;
					if (famLink != null && (famLink.Pedigree == PedegreeLinkageType.Birth || famLink.Pedigree == PedegreeLinkageType.Unknown))
					{
						line.AddEvents((int)Gdk.EventMask.ButtonPressMask);
						rela = true;
					}
					Utility.Pair<int, bool> lineData = new Pair<int,bool>();
					lineData.First = i * 2 + 1;
					lineData.Second = rela;
					_lines[line] = lineData;
					
					table.Attach(line, x, x + w, y, y + h, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);
					
					xmax = (uint)Math.Max(xmax, x + w);
					ymax = (uint)Math.Max(ymax, y + h);
//.........这里部分代码省略.........
开发者ID:Bert6623,项目名称:Gedcom.Net,代码行数:101,代码来源:PedigreeView.cs

示例5: PlaceWindow

		internal virtual void PlaceWindow (Gtk.Window window, int x, int y, int width, int height)
		{
			window.Move (x, y);
			window.Resize (width, height);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:5,代码来源:PlatformService.cs

示例6: PlaceWindow

 // Pinta TODO: This may need to be overridden for Mac?
 private void PlaceWindow (Gtk.Window window, int x, int y, int width, int height)
 {
     window.Move (x, y);
     window.Resize (width, height);
 }
开发者ID:msiyer,项目名称:Pinta,代码行数:6,代码来源:DockFrameTopLevel.cs


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