Exemplo n.º 1
0
        public override void PaintThumb(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, eScrollThumbPosition position, eScrollBarState state)
        {
            Office2007ScrollBarStateColorTable ct = GetColorTable(state);
            if (ct == null) return;

            // Initialize Colors
            m_ThumbOuterBorder.Apply(ct.ThumbOuterBorder);
            m_ThumbSignFill.Apply(ct.ThumbSignBackground);

            m_ThumbSignShape.Path = GetThumbSignPath(position);
            m_ThumbShape.Paint(new Presentation.ShapePaintInfo(g, bounds));
            m_ThumbSignShape.Path.Dispose();
            m_ThumbSignShape.Path = null;
        }
Exemplo n.º 2
0
        private Office2007ScrollBarStateColorTable GetColorTable(eScrollBarState state)
        {
            Office2007ScrollBarColorTable csb = m_AppStyleScrollBar ? m_ColorTable.AppScrollBar : m_ColorTable.ScrollBar;
            if (state == eScrollBarState.Normal)
                return csb.Default;
            else if (state == eScrollBarState.Disabled)
                return csb.Disabled;
            else if (state == eScrollBarState.ControlMouseOver)
                return csb.MouseOverControl;
            else if (state == eScrollBarState.PartMouseOver)
                return csb.MouseOver;
            else if (state == eScrollBarState.Pressed)
                return csb.Pressed;

            return null;
        }
Exemplo n.º 3
0
 public virtual void PaintBackground(Graphics g, System.Drawing.Rectangle bounds, eScrollBarState state, bool horizontal, bool sideBorderOnly, bool rtl)
 {
 }
Exemplo n.º 4
0
 public virtual void PaintTrackHorizontal(Graphics g, System.Drawing.Rectangle bounds, eScrollBarState state)
 {
 }
Exemplo n.º 5
0
 public virtual void PaintThumb(Graphics g, System.Drawing.Rectangle bounds, eScrollThumbPosition position, eScrollBarState state)
 {
     
 }
Exemplo n.º 6
0
        public override void PaintTrackHorizontal(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, eScrollBarState state)
        {
            Office2007ScrollBarStateColorTable ct = GetColorTable(state);
            if (ct == null) return;

            // Apply Colors...
            // Apply Colors...
            m_TrackInnerFill.Apply(ct.TrackSignBackground);
            m_TrackShape.Paint(new Presentation.ShapePaintInfo(g, bounds));
        }
Exemplo n.º 7
0
        public override void PaintBackground(Graphics g, Rectangle bounds, eScrollBarState state, bool horizontal, bool sideBorderOnly, bool rtl)
        {
            Office2007ScrollBarStateColorTable ct = GetColorTable(state);
            if (ct == null) return;

            // Apply Colors...
            if (sideBorderOnly)
                m_BackgroundBorder.Apply(null);
            else
                m_BackgroundBorder.Apply(ct.Border);

            m_BackgroundFill.Apply(ct.Background);
            m_BackgroundFill.GradientAngle = horizontal ? 90 : 0;

            m_BackgroundShape.Paint(new Presentation.ShapePaintInfo(g, bounds));
            if (sideBorderOnly && !ct.Border.Start.IsEmpty)
            {
                if (horizontal)
                    DisplayHelp.DrawLine(g, bounds.X, bounds.Y, bounds.Right, bounds.Y, ct.Border.Start, 1);
                else
                {
                    if (rtl)
                        DisplayHelp.DrawLine(g, bounds.Right - 1, bounds.Y, bounds.Right - 1, bounds.Bottom, ct.Border.Start, 1);
                    else
                        DisplayHelp.DrawLine(g, 0, bounds.Y, 0, bounds.Bottom, ct.Border.Start, 1);
                }
            }
        }