本文整理汇总了C#中Gtk.SizeAllocatedArgs类的典型用法代码示例。如果您正苦于以下问题:C# SizeAllocatedArgs类的具体用法?C# SizeAllocatedArgs怎么用?C# SizeAllocatedArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SizeAllocatedArgs类属于Gtk命名空间,在下文中一共展示了SizeAllocatedArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Size_Allocated
static void Size_Allocated (object obj, SizeAllocatedArgs args)
{
Rectangle rect = args.Allocation;
if (rect.Width == 0 || rect.Height == 0)
Console.WriteLine ("ERROR: Allocation is null!");
Console.WriteLine ("Size: ({0}, {1})", rect.Width, rect.Height);
}
示例2: HandleBarFrameSizeAllocated
void HandleBarFrameSizeAllocated (object o, SizeAllocatedArgs args)
{
if (!lastFrameSize.Equals (args.Allocation.Size)) {
lastFrameSize = args.Allocation.Size;
if (autoShowFrame != null)
bar.Frame.UpdateSize (bar, autoShowFrame);
}
}
示例3: HandleViewTextEditorhandleSizeAllocated
void HandleViewTextEditorhandleSizeAllocated (object o, SizeAllocatedArgs args)
{
int newX = textEditor.Allocation.Width - this.Allocation.Width - 8;
var containerChild = ((TextEditor.EditorContainerChild)textEditor [frame]);
if (newX != containerChild.X) {
this.entryLineNumber.WidthRequest = textEditor.Allocation.Width / 4;
containerChild.X = newX;
textEditor.QueueResize ();
}
}
示例4: HandleViewTextEditorhandleSizeAllocated
void HandleViewTextEditorhandleSizeAllocated (object o, SizeAllocatedArgs args)
{
int newX = widget.TextEditor.Allocation.Width - this.Allocation.Width - 8;
TextEditorContainer.EditorContainerChild containerChild = ((Mono.TextEditor.TextEditorContainer.EditorContainerChild)widget.TextEditorContainer[container]);
if (newX != containerChild.X) {
this.entryLineNumber.WidthRequest = widget.Vbox.Allocation.Width / 4;
containerChild.X = newX;
widget.TextEditorContainer.QueueResize ();
}
}
示例5: OnSizeAllocated
void OnSizeAllocated(object o, SizeAllocatedArgs args)
{
if (refreshed) {
refreshed = false;
return;
}
if (Allocation.Width != old_width)
Refresh ();
old_width = Allocation.Width;
refreshed = true;
}
示例6: OnFixedBgSizeAllocated
protected void OnFixedBgSizeAllocated(object o, SizeAllocatedArgs args)
{
if (fixedBgAllocateFlag) {
fixedBgAllocateFlag = false;
return;
}
fixedBgAllocateFlag = true;
Gtk.Requisition ireq = mainImageBg.SizeRequest ();
Gtk.Fixed.FixedChild w = ((global::Gtk.Fixed.FixedChild) (fixedBg [mainImageBg]));
w.X = args.Allocation.Width - ireq.Width;
w.Y = args.Allocation.Height - ireq.Height + IMAGE_BG_OFFSSETY;
}
示例7: OnSizeAllocated
private static void OnSizeAllocated(object obj, SizeAllocatedArgs args)
{
Window window = obj as Window;
if (obj == null) return;
Gdk.Rectangle allocation = args.Allocation;
if (window.IsRealized) {
window.GdkWindow.MoveResize (allocation.X,
allocation.Y,
allocation.Width,
allocation.Height);
}
}
示例8: HandleSizeAllocated
void HandleSizeAllocated(object o, SizeAllocatedArgs args)
{
width=args.Allocation.Width;
height=args.Allocation.Height;
if (oldwidth == width && oldheight == height)
return;
oldwidth = width;
oldheight = height;
if(baseimage.Pixbuf==null)
return;
dispimage.Pixbuf=baseimage.Pixbuf.ScaleSimple(args.Allocation.Width,args.Allocation.Height,InterpType.Bilinear);
}
示例9: HandleControlSizeAllocated
void HandleControlSizeAllocated (object o, SizeAllocatedArgs args)
{
if (initialLogShow && outputView.Visible) {
SetInitialOutputViewSize (args.Allocation.Width);
initialLogShow = false;
}
}
示例10: HandleSwSizeAllocated
void HandleSwSizeAllocated (object o, SizeAllocatedArgs args)
{
if (!initialLogShow && outputView.Visible) {
var val = (double) ((double) control.Position / (double) control.Allocation.Width);
LogSeparatorPosition.Value = val;
}
}
示例11: SizeAllocatedHandler
void SizeAllocatedHandler (object obj, SizeAllocatedArgs args)
{
Gdk.Rectangle rect = args.Allocation;
if (rect.Equals (Gdk.Rectangle.Zero))
Console.WriteLine ("ERROR: Allocation is null!");
SizeChanged (rect.Width, rect.Height);
}
示例12: OnSizeAllocated
private void OnSizeAllocated(object o, SizeAllocatedArgs args)
{
foreach(iFolderViewGroup group in viewGroups)
{
group.OnSizeAllocated(o, args);
}
}
示例13: OnTextview1SizeAllocated
protected void OnTextview1SizeAllocated (object o, SizeAllocatedArgs args)
{
vpaned1.Position = vpaned1.Allocation.Height; //add -50 for correct size of description box
}
示例14: OnTreeSizeChanged
void OnTreeSizeChanged (object s, SizeAllocatedArgs a)
{
int x, y, w, h;
GetPosition (out x, out y);
h = (int)sw.Vadjustment.Upper;
w = (int)sw.Hadjustment.Upper;
int dy = y + h - this.Screen.Height;
int dx = x + w - this.Screen.Width;
if (dy > 0 && sw.VscrollbarPolicy == PolicyType.Never) {
sw.VscrollbarPolicy = PolicyType.Always;
sw.HeightRequest = h - dy - 10;
} else if (sw.VscrollbarPolicy == PolicyType.Always && sw.Vadjustment.Upper == sw.Vadjustment.PageSize) {
sw.VscrollbarPolicy = PolicyType.Never;
sw.HeightRequest = -1;
}
if (dx > 0 && sw.HscrollbarPolicy == PolicyType.Never) {
sw.HscrollbarPolicy = PolicyType.Always;
sw.WidthRequest = w - dx - 10;
} else if (sw.HscrollbarPolicy == PolicyType.Always && sw.Hadjustment.Upper == sw.Hadjustment.PageSize) {
sw.HscrollbarPolicy = PolicyType.Never;
sw.WidthRequest = -1;
}
// Force a redraw of the whole window. This is a workaround for bug 7538
QueueDraw ();
}
示例15: SizeAllocatedHandler
void SizeAllocatedHandler (object o, SizeAllocatedArgs args) {
Render();
}