[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnetlib/System.Windows.Forms/Themes DefaultThemePa
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnetlib/System.Windows.Forms/Themes DefaultThemePainter.cs, 1.24, 1.25 Glyphs.cs, 1.2, 1.3 |
Date: |
Fri, 21 Nov 2003 07:45:45 +0000 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/Themes
In directory subversions:/tmp/cvs-serv3484/System.Windows.Forms/Themes
Modified Files:
DefaultThemePainter.cs Glyphs.cs
Log Message:
Draw caption buttons using the appropriate glyphs.
Index: DefaultThemePainter.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/Themes/DefaultThemePainter.cs,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** DefaultThemePainter.cs 21 Nov 2003 07:14:55 -0000 1.24
--- DefaultThemePainter.cs 21 Nov 2003 07:45:43 -0000 1.25
***************
*** 907,916 ****
// Draw a caption button control.
- [TODO]
public virtual void DrawCaptionButton
(Graphics graphics, int x, int y, int width,
int height,
CaptionButton button, ButtonState state)
{
! // TODO
}
--- 907,985 ----
// Draw a caption button control.
public virtual void DrawCaptionButton
(Graphics graphics, int x, int y, int width,
int height,
CaptionButton button, ButtonState state)
{
! // Draw the border on the button.
! DrawButton(graphics, x, y, width, height, state,
! SystemColors.ControlText,
SystemColors.Control,
! false);
!
! // Adjust the glyph position if necessary.
! if((state & ButtonState.Pushed) != 0)
! {
! ++x;
! ++y;
! }
!
! // Determine the color to use for the glyph.
! Color color;
! if((state & ButtonState.Inactive) != 0)
! {
! color = SystemColors.ControlDark;
! }
! else
! {
! color = SystemColors.ControlText;
! }
!
! // Draw the glyph on the button.
! switch(button)
! {
! case CaptionButton.Close:
! {
! DrawGlyph(graphics, x, y,
width, height,
!
Glyphs.close_button_bits,
!
Glyphs.close_button_width,
!
Glyphs.close_button_height, color);
! }
! break;
!
! case CaptionButton.Minimize:
! {
! DrawGlyph(graphics, x, y,
width, height,
!
Glyphs.minimize_button_bits,
!
Glyphs.minimize_button_width,
!
Glyphs.minimize_button_height, color);
! }
! break;
!
! case CaptionButton.Maximize:
! {
! DrawGlyph(graphics, x, y,
width, height,
!
Glyphs.maximize_button_bits,
!
Glyphs.maximize_button_width,
!
Glyphs.maximize_button_height, color);
! }
! break;
!
! case CaptionButton.Restore:
! {
! DrawGlyph(graphics, x, y,
width, height,
!
Glyphs.restore_button_bits,
!
Glyphs.restore_button_width,
!
Glyphs.restore_button_height, color);
! }
! break;
!
! case CaptionButton.Help:
! {
! DrawGlyph(graphics, x, y,
width, height,
!
Glyphs.help_button_bits,
!
Glyphs.help_button_width,
!
Glyphs.help_button_height, color);
! }
! break;
! }
}
Index: Glyphs.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/Themes/Glyphs.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Glyphs.cs 21 Nov 2003 06:47:35 -0000 1.2
--- Glyphs.cs 21 Nov 2003 07:45:43 -0000 1.3
***************
*** 83,86 ****
--- 83,121 ----
{0x40, 0x60, 0x71, 0x3b, 0x1f, 0x0e, 0x04};
+ // Close caption button.
+ public const int close_button_width = 9;
+ public const int close_button_height = 9;
+ public static readonly byte[] close_button_bits =
+ {0x00, 0x00, 0x86, 0x01, 0xcc, 0x00, 0x78, 0x00, 0x30,
+ 0x00, 0x78, 0x00, 0xcc, 0x00, 0x86, 0x01, 0x00, 0x00};
+
+ // Minimize caption button.
+ public const int minimize_button_width = 9;
+ public const int minimize_button_height = 9;
+ public static readonly byte[] minimize_button_bits =
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00};
+
+ // Maximize caption button.
+ public const int maximize_button_width = 9;
+ public const int maximize_button_height = 9;
+ public static readonly byte[] maximize_button_bits =
+ {0xff, 0x01, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0x01};
+
+ // Restore caption button.
+ public const int restore_button_width = 9;
+ public const int restore_button_height = 9;
+ public static readonly byte[] restore_button_bits =
+ {0xfc, 0x00, 0xfc, 0x00, 0x84, 0x00, 0xbf, 0x00, 0xbf,
+ 0x00, 0xe1, 0x00, 0x21, 0x00, 0x21, 0x00, 0x3f, 0x00};
+
+ // Help caption button.
+ public const int help_button_width = 9;
+ public const int help_button_height = 9;
+ public static readonly byte[] help_button_bits =
+ {0x78, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0x60, 0x00, 0x30,
+ 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x00};
+
}; // class Glyphs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnetlib/System.Windows.Forms/Themes DefaultThemePainter.cs, 1.24, 1.25 Glyphs.cs, 1.2, 1.3,
Rhys Weatherley <address@hidden> <=