[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms EventId.cs,1.6,1
From: |
Richard Baumann <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms EventId.cs,1.6,1.7 ButtonBase.cs,1.5,1.6 ControlPaint.cs,1.9,1.10 ProgressBar.cs,1.3,1.4 ToolBar.cs,1.3,1.4 |
Date: |
Tue, 08 Jul 2003 06:45:02 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms
In directory subversions:/tmp/cvs-serv21033/System.Windows.Forms
Modified Files:
EventId.cs ButtonBase.cs ControlPaint.cs ProgressBar.cs
ToolBar.cs
Log Message:
Change some stuff for the new themes system and add some new drawing code.
Index: EventId.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/EventId.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** EventId.cs 4 Jul 2003 05:50:00 -0000 1.6
--- EventId.cs 8 Jul 2003 10:45:00 -0000 1.7
***************
*** 125,128 ****
--- 125,132 ----
ButtonDropDown,
+ // "ScrollBar" events.
+ Scroll,
+ ValueChanged,
+
}; // enum EventId
Index: ButtonBase.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/ButtonBase.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** ButtonBase.cs 18 Jun 2003 08:42:02 -0000 1.5
--- ButtonBase.cs 8 Jul 2003 10:45:00 -0000 1.6
***************
*** 24,27 ****
--- 24,28 ----
using System.Drawing;
+ using System.Windows.Forms.Themes;
public abstract class ButtonBase : Control
***************
*** 333,337 ****
// Draw the border and background.
! ControlPaint.DrawButton
(graphics, x, y, width, height, state,
ForeColor, BackColor, isDefault);
--- 334,338 ----
// Draw the border and background.
! ThemeManager.MainPainter.DrawButton
(graphics, x, y, width, height, state,
ForeColor, BackColor, isDefault);
Index: ControlPaint.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/ControlPaint.cs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** ControlPaint.cs 7 Jul 2003 04:58:50 -0000 1.9
--- ControlPaint.cs 8 Jul 2003 10:45:00 -0000 1.10
***************
*** 259,278 ****
Border3DSide sides)
{
- DrawBorder3D(graphics, x, y, width, height,
-
SystemColors.InactiveBorder,
- SystemColors.Control,
- style, sides);
-
- }
- internal static void DrawBorder3D(Graphics graphics, int x, int y,
- int
width, int height,
- Color
foreColor,
- Color
backColor,
-
Border3DStyle style,
-
Border3DSide sides)
- {
ThemeManager.MainPainter.DrawBorder3D
(graphics, x, y, width, height,
! foreColor, backColor, style, sides);
}
--- 259,267 ----
Border3DSide sides)
{
ThemeManager.MainPainter.DrawBorder3D
(graphics, x, y, width, height,
! SystemColors.InactiveBorder,
! SystemColors.Control,
! style, sides);
}
***************
*** 281,304 ****
ButtonState
state)
{
! DrawButton(graphics, rectangle.X, rectangle.Y,
! rectangle.Width,
rectangle.Height, state,
! SystemColors.ControlText,
! SystemColors.Control, false);
}
public static void DrawButton(Graphics graphics, int x, int y,
int width,
int height, ButtonState state)
{
- DrawButton(graphics, x, y, width, height, state,
- SystemColors.ControlText,
- SystemColors.Control, false);
- }
- internal static void DrawButton
- (Graphics graphics, int x, int y, int width,
int height,
- ButtonState state, Color foreColor, Color
backColor,
- bool isDefault)
- {
ThemeManager.MainPainter.DrawButton
(graphics, x, y, width, height, state,
! foreColor, backColor, isDefault);
}
--- 270,286 ----
ButtonState
state)
{
! ThemeManager.MainPainter.DrawButton
! (graphics, rectangle.X, rectangle.Y,
! rectangle.Width, rectangle.Height,
state,
! SystemColors.ControlText,
! SystemColors.Control, false);
}
public static void DrawButton(Graphics graphics, int x, int y,
int width,
int height, ButtonState state)
{
ThemeManager.MainPainter.DrawButton
(graphics, x, y, width, height, state,
! SystemColors.ControlText,
! SystemColors.Control, false);
}
***************
*** 320,343 ****
}
- // Draw a progress bar control.
- internal static void DrawProgressBar(Graphics graphics, int x, int y,
-
int width, int height,
-
int steps, int step,
-
int value, bool enabled)
- {
- ThemeManager.MainPainter.DrawProgressBar
- (graphics, x, y, width, height,
- steps, step, value, enabled);
- }
-
- // Draw a progress bar block.
- internal static void DrawBlock(Graphics graphics, int x, int y,
- int
width, int height,
- Color
color)
- {
- ThemeManager.MainPainter.DrawBlock
- (graphics, x, y, width, height, color);
- }
-
// Draw a check box control.
public static void DrawCheckBox(Graphics graphics, Rectangle rectangle,
--- 302,305 ----
***************
*** 493,499 ****
ScrollButton button, ButtonState state)
{
! DrawScrollButton(graphics, rectangle.X,
rectangle.Y,
! rectangle.Width,
rectangle.Height,
! button, state);
}
public static void DrawScrollButton
--- 455,465 ----
ScrollButton button, ButtonState state)
{
! ThemeManager.MainPainter.DrawScrollButton
! (graphics,
! rectangle.X, rectangle.Y,
! rectangle.Width, rectangle.Height,
! button, state,
! SystemColors.ControlText,
! SystemColors.Control);
}
public static void DrawScrollButton
***************
*** 502,506 ****
{
ThemeManager.MainPainter.DrawScrollButton
! (graphics, x, y, width, height, button,
state);
}
--- 468,476 ----
{
ThemeManager.MainPainter.DrawScrollButton
! (graphics,
! x, y, width, height,
! button, state,
! SystemColors.ControlText,
! SystemColors.Control);
}
***************
*** 532,536 ****
public static void DrawStringDisabled
(Graphics graphics, String s, Font font,
! Color color, RectangleF layoutRectangle,
StringFormat format)
{
--- 502,506 ----
public static void DrawStringDisabled
(Graphics graphics, String s, Font font,
! Color color, RectangleF layoutRectangle,
StringFormat format)
{
Index: ProgressBar.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/ProgressBar.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ProgressBar.cs 21 Jun 2003 21:51:40 -0000 1.3
--- ProgressBar.cs 8 Jul 2003 10:45:00 -0000 1.4
***************
*** 24,27 ****
--- 24,28 ----
using System.Drawing;
using System.Drawing.Drawing2D;
+ using System.Windows.Forms.Themes;
namespace System.Windows.Forms
***************
*** 57,65 ****
}
! ControlPaint.DrawProgressBar(graphics, x, y,
!
clientSize.Width,
!
clientSize.Height,
!
steps, step,
!
value, this.Enabled);
}
--- 58,67 ----
}
!
ThemeManager.MainPainter.DrawProgressBar(graphics,
! x, y,
!
clientSize.Width,
!
clientSize.Height,
! steps,
step,
! value,
this.Enabled);
}
Index: ToolBar.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/ToolBar.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ToolBar.cs 5 Jul 2003 05:31:10 -0000 1.3
--- ToolBar.cs 8 Jul 2003 10:45:00 -0000 1.4
***************
*** 27,30 ****
--- 27,31 ----
using System.Drawing;
using System.Collections;
+ using System.Windows.Forms.Themes;
public class ToolBar : Control
***************
*** 47,51 ****
private Size staticSize = DefaultSize;
private int[] wrapData = new int[1] { 1 };
- private EventHandler imageListHandler = new
EventHandler(ImageListHandler);
private bool entered = false;
private int mouseDownClick = -1;
--- 48,51 ----
***************
*** 290,294 ****
if (imageList != null)
{
! imageList.RecreateHandle -= imageListHandler;
}
--- 290,294 ----
if (imageList != null)
{
! imageList.RecreateHandle -= new
EventHandler(ImageListHandler);
}
***************
*** 299,303 ****
if (imageList != null)
{
! imageList.RecreateHandle += imageListHandler;
}
--- 299,303 ----
if (imageList != null)
{
! imageList.RecreateHandle += new
EventHandler(ImageListHandler);
}
***************
*** 476,480 ****
{
ButtonState state;
! if (flat && !hover)
{
state |= ButtonState.Flat;
--- 476,480 ----
{
ButtonState state;
! if (flat && !hover && !click)
{
state |= ButtonState.Flat;
***************
*** 733,737 ****
private void Draw(Graphics g)
{
! if(!Visible || !IsHandleCreated) { return; }
Size clientSize = ClientSize;
--- 733,737 ----
private void Draw(Graphics g)
{
! if (!Visible || !IsHandleCreated) { return; }
Size clientSize = ClientSize;
***************
*** 865,870 ****
ButtonState state =
CalculateButtonState(flat,viewClick,viewHover,
partial,pushed);
!
ControlPaint.DrawButton(g,viewX,viewY,viewWidth,viewHeight,state,
! ForeColor,BackColor,false);
// adjust bounds to exclude button border
viewX += 2;
--- 865,873 ----
ButtonState state =
CalculateButtonState(flat,viewClick,viewHover,
partial,pushed);
! ThemeManager.MainPainter.DrawButton(g,
! viewX, viewY,
! viewWidth, viewHeight,
! state,
! ForeColor, BackColor,
false);
// adjust bounds to exclude button border
viewX += 2;
***************
*** 876,881 ****
state = CalculateButtonState(flat,dropClick,dropHover,
false,false);
!
ControlPaint.DrawButton(g,dropX,dropY,dropWidth,dropHeight,
!
state,ForeColor,BackColor,false);
// adjust bounds to exclude button border
dropX += 2;
--- 879,887 ----
state = CalculateButtonState(flat,dropClick,dropHover,
false,false);
! ThemeManager.MainPainter.DrawScrollButton(g,
! dropX, dropY,
! dropWidth,
dropHeight,
!
ScrollButton.Down, state,
! ForeColor,
BackColor);
// adjust bounds to exclude button border
dropX += 2;
***************
*** 1211,1214 ****
--- 1217,1240 ----
int tmp = mouseDownDrop;
mouseDownDrop = -1;
+ RedrawButton(tmp);
+ }
+ }
+ else if (mouseHoverClick != -1)
+ {
+ ToolBarButton b = buttons[mouseHoverClick];
+ if (b.Contains(x,y,dropDownArrows) != 1)
+ {
+ int tmp = mouseHoverClick;
+ mouseHoverClick = -1;
+ RedrawButton(tmp);
+ }
+ }
+ else if (mouseHoverDrop != -1)
+ {
+ ToolBarButton b = buttons[mouseHoverDrop];
+ if (b.Contains(x,y,dropDownArrows) != 2)
+ {
+ int tmp = mouseHoverDrop;
+ mouseHoverDrop = -1;
RedrawButton(tmp);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms EventId.cs,1.6,1.7 ButtonBase.cs,1.5,1.6 ControlPaint.cs,1.9,1.10 ProgressBar.cs,1.3,1.4 ToolBar.cs,1.3,1.4,
Richard Baumann <address@hidden> <=