• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gtk.SizeAllocatedArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



SizeAllocatedArgs类属于Gtk命名空间,在下文中一共展示了SizeAllocatedArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: on_app1_size_allocate

 private void on_app1_size_allocate(object obj, SizeAllocatedArgs args)
 {
     int width;
     int height;
     app1.GetSize(out width, out height);
     if(width >= 1000)
         normalGUI = true;
     else
         normalGUI = false;
     if(normalGUI != normalGUIOld) {
         Log.WriteLine("Change Size. New is normal? -> " + normalGUI.ToString());
         normalGUIOld = normalGUI;
         changeGUIAspect();
     }
 }
开发者ID:dineshkummarc,项目名称:chronojump,代码行数:15,代码来源:chronojump.cs


示例17: OnSideSizeAllocated

 private void OnSideSizeAllocated(object o, SizeAllocatedArgs args)
 {
     SetSizeRequest (-1, args.Allocation.Height + (Allocation.Height - args.Allocation.Height));
 }
开发者ID:dufoli,项目名称:banshee,代码行数:4,代码来源:RecommendationPane.cs


示例18: OnSizeAllocated

        private void OnSizeAllocated(object o, SizeAllocatedArgs args)
        {
            // FIXME: Do we really need to do resizing this way? It blows.
            Gdk.Rectangle rect = args.Allocation;

            uint requested_columns = (uint) rect.Width/150;
            if (requested_columns == 0) requested_columns = 1;

            if (similar_items_table.NColumns != requested_columns) {
                // Need to clear the table before we resize it, apparently.
                foreach (Widget child in similar_items_table.Children)
                    similar_items_table.Remove (child);

                similar_items_table.Resize (DEFAULT_SIMILAR_TABLE_ROWS, requested_columns);
                RenderSimilarArtists ();
            }
        }
开发者ID:jrmuizel,项目名称:banshee-unofficial-plugins,代码行数:17,代码来源:RecommendationPane.cs


示例19: onResize

        void onResize(object o, SizeAllocatedArgs args)
        {
            MainClass.win.setmapwidget(map1);

            if (requested == true)
            {
                if (args.Allocation.Width > 100)
                {
                    requested = false;
                    map1.SetAsWater();
                  //   map1.set_optimal_size(args.Allocation.Width);
                     map1.SetGridRegion(MainClass.client.Network.CurrentSim.Handle);
                }
            }
        }
开发者ID:robincornelius,项目名称:omvviewer-light,代码行数:15,代码来源:Location.cs


示例20: onResize

        void onResize(object o,SizeAllocatedArgs args)
        {
            size=args.Allocation.Width<args.Allocation.Height?args.Allocation.Width:args.Allocation.Height;
            size=size/3;
            if(oldsize==size)
                return;

            oldsize=size;

            for(int x = 0; x < 9; x++)
            {
                maps[x].set_optimal_size(size);
            }
        }
开发者ID:robincornelius,项目名称:omvviewer-light,代码行数:14,代码来源:LocalRegion.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gtk.Table类代码示例发布时间:2022-05-26
下一篇:
C# Gtk.ScrolledWindow类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap