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


C# Gtk.SizeAllocatedArgs类代码示例

本文整理汇总了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);
		}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:7,代码来源:Size.cs

示例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);
			}
		}
开发者ID:nieve,项目名称:monodevelop,代码行数:8,代码来源:DockBarItem.cs

示例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 ();
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:10,代码来源:GotoLineNumberWidget.cs

示例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 ();
			}
		}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:10,代码来源:GotoLineNumberWidget.cs

示例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;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:11,代码来源:elabel.cs

示例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;
        }
开发者ID:pupitetris,项目名称:imr,代码行数:13,代码来源:MainWindow.cs

示例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);
            }
        }
开发者ID:mono,项目名称:stetic,代码行数:14,代码来源:EmbedWindow.cs

示例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);
        }
开发者ID:robincornelius,项目名称:omvviewer-light,代码行数:15,代码来源:ScaleImage.cs

示例9: HandleControlSizeAllocated

		void HandleControlSizeAllocated (object o, SizeAllocatedArgs args)
		{
			if (initialLogShow && outputView.Visible) {
				SetInitialOutputViewSize (args.Allocation.Width);
				initialLogShow = false;
			}
		}
开发者ID:segaman,项目名称:monodevelop,代码行数:7,代码来源:ErrorListPad.cs

示例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;
			}
		}
开发者ID:ArsenShnurkov,项目名称:monodevelop,代码行数:7,代码来源:ErrorListPad.cs

示例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);
        }
开发者ID:emtees,项目名称:old-code,代码行数:8,代码来源:IconList.cs

示例12: OnSizeAllocated

 private void OnSizeAllocated(object o, SizeAllocatedArgs args)
 {
     foreach(iFolderViewGroup group in viewGroups)
        {
     group.OnSizeAllocated(o, args);
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:7,代码来源:iFolderIconView.cs

示例13: OnTextview1SizeAllocated

 protected void OnTextview1SizeAllocated (object o, SizeAllocatedArgs args)
 {
     vpaned1.Position = vpaned1.Allocation.Height; //add -50 for correct size of description box
 }
开发者ID:BrainSlugs83,项目名称:MonoGame,代码行数:4,代码来源:PropertiesView.cs

示例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 ();
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:27,代码来源:DebugValueWindow.cs

示例15: SizeAllocatedHandler

			void SizeAllocatedHandler (object o, SizeAllocatedArgs args) {
				Render();
			}
开发者ID:xxjeng,项目名称:nuxleus,代码行数:3,代码来源:DiffWidget.cs


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