"景先生毕设|www.jxszl.com

C# CellRendererState类代码示例

2023-12-29 17:41编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中CellRendererState类的典型用法代码示例。如果您正苦于以下问题:C#CellRendererState类的具体用法?C#CellRendererState怎么用?C#CellRendererState使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:Render protectedoverridevoidRender(Gdk.Drawablewindow,Widgetwidget,Gdk.Rectanglebackground_area,Gdk.Rectanglecell_area,Gdk.Rectangleexpose_area,CellRendererStateflags) { base.Render(window,widget,background_area,cell_area,expose_area,flags); if(PackageSourceViewModel==null) return; using(varlayout=newPango.Layout(widget.PangoContext)){ layout.Alignment=Pango.Alignment.Left; layout.SetMarkup(GetPackageSourceNameMarkup()); intpackageSourceNameWidth=GetLayoutWidth(layout); StateTypestate=GetState(widget,flags); layout.SetMarkup(GetPackageSourceDescriptionMarkup()); window.DrawLayout(widget.Style.TextGC(state),cell_area.X+textSpacing,cell_area.Y+textTopSpacing,layout); if(!PackageSourceViewModel.IsValid){ using(varctx=Gdk.CairoHelper.Create(window)){ ctx.DrawImage(widget,warningImage,cell_area.X+textSpacing+packageSourceNameWidth+imageSpacing,cell_area.Y+textTopSpacing); } layout.SetMarkup(GetPackageSourceErrorMarkup()); intpackageSourceErrorTextX=cell_area.X+textSpacing+packageSourceNameWidth+(int)warningImage.Width+(2*imageSpacing); window.DrawLayout(widget.Style.TextGC(state),packageSourceErrorTextX,cell_area.Y+textTopSpacing,layout); } } }
原文链接:http://www.jxszl.com/biancheng/C/556703.html