本文整理汇总了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);
}
示例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);
}
示例3: ApplyNewSize
private static void ApplyNewSize(Gtk.Window window, int width, int height)
{
if ( width > MinWidth
&& height > MinHeight )
{
window.Resize( width, height );
}
}
示例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);
//.........这里部分代码省略.........
示例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);
}
示例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);
}