Пример #1
0
        public override void Draw(RECT rcBounds, RECT rcUpdate, int lDrawFlags, IntPtr hdc, IntPtr pvDrawObject)
        {
            drawDepth++;
            try
            {
                if (drawDepth > 1)
                {
                    return;
                }

                _HTML_PAINTER_INFO pInfo = new _HTML_PAINTER_INFO();
                GetPainterInfo(ref pInfo);

                //adjust the draw bounds to remove our padding for invalidates
                Rectangle drawBounds = RectangleHelper.Convert(rcBounds);
                drawBounds.X      += invalidationPadding;
                drawBounds.Y      += invalidationPadding;
                drawBounds.Height -= invalidationPadding * 2;
                drawBounds.Width  -= invalidationPadding * 2;

                using (Graphics g = Graphics.FromHdc(hdc))
                {
                    OnDraw(g, drawBounds, rcBounds, rcUpdate, lDrawFlags, hdc, pvDrawObject);
                }
            }
            finally
            {
                drawDepth--;
            }
        }
Пример #2
0
        public override void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo)
        {
            // expand the paint region enough to make room for the painted tab.
            pInfo.rcExpand.top    = Math.Max(BORDER_MARGIN_Y, pInfo.rcExpand.top);
            pInfo.rcExpand.bottom = Math.Max(BORDER_MARGIN_Y, pInfo.rcExpand.bottom);
            pInfo.rcExpand.left   = Math.Max(BORDER_MARGIN_X, pInfo.rcExpand.left);
            pInfo.rcExpand.right  = Math.Max(BORDER_MARGIN_X, pInfo.rcExpand.right);

            base.GetPainterInfo(ref pInfo);
        }
Пример #3
0
        public virtual Int32 GetPainterInfo(out _HTML_PAINTER_INFO pInfo)
        {
            ParameterModifier[] modifiers = Invoker.CreateParamModifiers(true);
            pInfo = new NetOffice.MSHTMLApi._HTML_PAINTER_INFO();
            object[] paramsArray = Invoker.ValidateParamsArray(pInfo);
            object   returnItem  = Invoker.MethodReturn(this, "GetPainterInfo", paramsArray, modifiers);

            pInfo = (_HTML_PAINTER_INFO)paramsArray[0];
            return(NetRuntimeSystem.Convert.ToInt32(returnItem));
        }
        public override void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo)
        {
            // ensure we paint above everything (including selection handles)
            pInfo.lFlags  = (int)_HTML_PAINTER.HTMLPAINTER_OPAQUE;
            pInfo.lZOrder = (int)_HTML_PAINT_ZORDER.HTMLPAINT_ZORDER_WINDOW_TOP;

            // expand to the right to accomodate our widget
            pInfo.rcExpand.top    = 0;
            pInfo.rcExpand.bottom = 0;
            pInfo.rcExpand.left   = 0;
            pInfo.rcExpand.right  = _widgetEnabled.Width - WIDGET_HORIZONTAL_OVERLAY;
        }
Пример #5
0
        public override void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo)
        {
            // ensure we paint above everything (including selection handles)
            pInfo.lFlags  = (int)_HTML_PAINTER.HTMLPAINTER_OPAQUE;
            pInfo.lZOrder = (int)_HTML_PAINT_ZORDER.HTMLPAINT_ZORDER_WINDOW_TOP;

            // expand to the right to add padding for invalidates
            pInfo.rcExpand.top    += invalidationPadding;
            pInfo.rcExpand.bottom += invalidationPadding;
            pInfo.rcExpand.left   += invalidationPadding;
            pInfo.rcExpand.right  += invalidationPadding;
        }
        public override void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo)
        {
            CalculatePadding();

            // ensure we paint above everything (including selection handles)
            pInfo.lFlags  = (int)(HTML_PAINTER.OPAQUE | HTML_PAINTER.HITTEST);
            pInfo.lZOrder = (int)_HTML_PAINT_ZORDER.HTMLPAINT_ZORDER_WINDOW_TOP;

            // expand to the right to accomodate our widget
            pInfo.rcExpand.top    = TopPadding;
            pInfo.rcExpand.bottom = BottomPadding;
            pInfo.rcExpand.left   = LeftPadding;
            pInfo.rcExpand.right  = RightPadding;
        }
Пример #7
0
 /// <summary>
 /// IHTMLPainter.GetPainterInfo -- Called by MSHTML to retrieve information about the needs
 /// and functionality of a rendering behavior
 /// </summary>
 /// <param name="pInfo">Pointer to a variable of type HTML_PAINTER_INFO that receives
 /// information the behavior needs to pass to MSHTML</param>
 public abstract void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo);
 public override void GetPainterInfo(ref _HTML_PAINTER_INFO pInfo)
 {
     base.GetPainterInfo(ref pInfo);
 }