コード例 #1
0
        /// <summary>
        /// Method which paints cells
        /// </summary>
        /// <param name="evnt">
        /// Expose event parameters <see cref="Gdk.EventExpose"/>
        /// </param>
        /// <param name="aContext">
        /// Cairo context <see cref="Cairo.Context"/>
        /// </param>
        protected virtual void PaintCells(Gdk.EventExpose evnt, Gdk.Drawable aDrawable, Cairo.Context aContext, CellRectangle aArea)
        {
            if (box.IsVisible == false)
            {
                return;
            }
            System.Console.WriteLine("Paint");
            box.Area.Clip(aContext);
//			aContext.Rectangle (box.Area);
//			aContext.Clip();
//			Cairo.Rectangle cliprect = new Cairo.Rectangle (0, 0, Allocation.Width, Allocation.Height);
            CellRectangle cliprect = new CellRectangle(evnt.Area.X, evnt.Area.Y, evnt.Area.Width, evnt.Area.Height);
//			box.Paint (evnt, aContext, cliprect, box.Area);
//			box.Paint (new CellExposeEventArgs (evnt, aContext, evnt.Window, cliprect, box.Area));
            CellExposeEventArgs args = new CellExposeEventArgs(evnt, aContext, aDrawable, cliprect, box.Area);

            args.WidgetInRenderer   = IsCellRenderer;
            args.Widget             = this;
            args.ForceRecalculation = true;
            box.Arguments.Start(CellAction.Paint, args);
            box.Paint(args);
            box.Arguments.Stop();
            args.Disconnect();
            args = null;
            aContext.ResetClip();
        }
コード例 #2
0
 /// <summary>
 /// Stops action
 /// </summary>
 public void Stop()
 {
     if (ActionType == CellAction.None)
     {
         return;
     }
     actionType = CellAction.None;
     passedArguments.Disconnect();
     passedArguments = null;
 }