-
- protected override void ScrollBar_Vertical_Draw_ThumbMoving_None( int scrollbutton_height, ScrollBar bar, Rectangle clip, Graphics dc )
- {
- Rectangle r = new Rectangle( 0,
- scrollbutton_height, bar.ClientRectangle.Width, bar.ClientRectangle.Height - ( scrollbutton_height * 2 ) );
- Rectangle intersect = Rectangle.Intersect( clip, r );
-
- if ( intersect != Rectangle.Empty )
- {
- using ( LinearGradientBrush lgbr = new LinearGradientBrush( new Point( 0, 0 ), new Point( r. Width - 1, 0 ), LightColor, Color.White ) )
- {
- lgbr.Blend = FlatBlend;
- dc.FillRectangle( lgbr, intersect );
- }
- }
- }
-
- protected override void ScrollBar_Vertical_Draw_ThumbMoving_Forward( int scrollbutton_height, ScrollBar bar, Rectangle thumb_pos, Rectangle clip, Graphics dc )
- {
- Rectangle r = new Rectangle( 0, scrollbutton_height,
- bar.ClientRectangle.Width, thumb_pos.Y - scrollbutton_height );
- Rectangle intersect = Rectangle.Intersect( clip, r );
-
- using ( LinearGradientBrush lgbr = new LinearGradientBrush( new Point( 0, 0 ), new Point( r. Width - 1, 0 ), LightColor, Color.White ) )
- {
- lgbr.Blend = FlatBlend;
-
- if ( intersect != Rectangle.Empty )
- dc.FillRectangle( lgbr, intersect );
-
- r.X = 0;
- r.Y = thumb_pos.Y + thumb_pos.Height;
- r.Width = bar.ClientRectangle.Width;
- r.Height = bar.ClientRectangle.Height - ( thumb_pos.Y + thumb_pos.Height ) - scrollbutton_height;
-
- intersect = Rectangle.Intersect( clip, r );
- if ( intersect != Rectangle.Empty )
- dc.FillRectangle( lgbr, intersect );
- }
- }
-
- protected override void ScrollBar_Vertical_Draw_ThumbMoving_Backwards( int scrollbutton_height, ScrollBar bar, Rectangle thumb_pos, Rectangle clip, Graphics dc )
- {
- Rectangle r = new Rectangle( 0, scrollbutton_height,
- bar.ClientRectangle.Width, thumb_pos.Y - scrollbutton_height );
- Rectangle intersect = Rectangle.Intersect( clip, r );
-
- using ( LinearGradientBrush lgbr = new LinearGradientBrush( new Point( 0, 0 ), new Point( r. Width - 1, 0 ), LightColor, Color.White ) )
- {
- lgbr.Blend = FlatBlend;
-
- if ( intersect != Rectangle.Empty )
- dc.FillRectangle( lgbr, intersect );
-
- r.X = 0;
- r.Y = thumb_pos.Y + thumb_pos.Height;
- r.Width = bar.ClientRectangle.Width;
- r.Height = bar.ClientRectangle.Height - ( thumb_pos.Y + thumb_pos.Height ) - scrollbutton_height;
-
- intersect = Rectangle.Intersect( clip, r );
- if ( intersect != Rectangle.Empty )
- dc.FillRectangle( lgbr, intersect );
- }
- }
-
- protected override void ScrollBar_Horizontal_Draw_ThumbMoving_None( int scrollbutton_width, ScrollBar bar, Rectangle clip, Graphics dc )
- {
- Rectangle r = new Rectangle( scrollbutton_width,
- 0, bar.ClientRectangle.Width - ( scrollbutton_width * 2 ), bar.ClientRectangle.Height );
- Rectangle intersect = Rectangle.Intersect( clip, r );
-
- if ( intersect != Rectangle.Empty )
- {
- using ( LinearGradientBrush lgbr = new LinearGradientBrush( new Point( 0, 0 ), new Point( 0, r.Height - 1 ), LightColor, Color.White ) )
- {
- lgbr.Blend = FlatBlend;
-
- dc.FillRectangle( lgbr, intersect );
- }
- }
- }
-
- protected override void ScrollBar_Horizontal_Draw_ThumbMoving_Forward( int scrollbutton_width, Rectangle thumb_pos, ScrollBar bar, Rectangle clip, Graphics dc )
- {
- Rectangle r = new Rectangle( scrollbutton_width, 0,
- thumb_pos.X - scrollbutton_width, bar.ClientRectangle.Height );
- Rectangle intersect = Rectangle.Intersect( clip, r );
-
- using ( LinearGradientBrush lgbr = new LinearGradientBrush( new Point( 0, 0 ), new Point( 0, r.Height - 1 ), LightColor, Color.White ) )
- {
- lgbr.Blend = FlatBlend;
-
- if ( intersect != Rectangle.Empty )
- dc.FillRectangle( lgbr, intersect );
-
- r.X = thumb_pos.X + thumb_pos.Width;
- r.Y = 0;
- r.Width = bar.ClientRectangle.Width - ( thumb_pos.X + thumb_pos.Width ) - scrollbutton_width;
- r.Height = bar.ClientRectangle.Height;
-
- intersect = Rectangle.Intersect( clip, r );
- if ( intersect != Rectangle.Empty )
- dc.FillRectangle( lgbr, intersect );
- }
- }
-
- protected override void ScrollBar_Horizontal_Draw_ThumbMoving_Backwards( int scrollbutton_width, Rectangle thumb_pos, ScrollBar bar, Rectangle clip, Graphics dc )
- {
- Rectangle r = new Rectangle( scrollbutton_width, 0,
- thumb_pos.X - scrollbutton_width, bar.ClientRectangle.Height );
- Rectangle intersect = Rectangle.Intersect( clip, r );
-
- using ( LinearGradientBrush lgbr = new LinearGradientBrush( new Point( 0, 0 ), new Point( 0, r.Height - 1 ), LightColor, Color.White ) )
- {
- lgbr.Blend = FlatBlend;
-
- if ( intersect != Rectangle.Empty )
- dc.FillRectangle( lgbr, intersect );
-
- r.X = thumb_pos.X + thumb_pos.Width;
- r.Y = 0;
- r.Width = bar.ClientRectangle.Width - ( thumb_pos.X + thumb_pos.Width ) - scrollbutton_width;
- r.Height = bar.ClientRectangle.Height;
-
- intersect = Rectangle.Intersect( clip, r );
- if ( intersect != Rectangle.Empty )
- dc.FillRectangle( lgbr, intersect );
- }
- }