copying the latest Sys.Web.Services from trunk.
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / Theme.cs
1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 //
20 // Copyright (c) 2004-2005 Novell, Inc.
21 //
22 // Authors:
23 //      Jordi Mas i Hernandez, jordi@ximian.com
24 //
25
26
27 using System.Drawing;
28 using System.Drawing.Drawing2D;
29 using System.Drawing.Imaging;
30 using System.Collections;
31
32 namespace System.Windows.Forms
33 {
34         
35         
36         // Implements a pool of system resources        
37         internal class SystemResPool
38         {
39                 private Hashtable pens = new Hashtable ();
40                 private Hashtable solidbrushes = new Hashtable ();
41                 private Hashtable hatchbrushes = new Hashtable ();
42                 
43                 public SystemResPool () {}
44                 
45                 public Pen GetPen (Color color)
46                 {
47                         int hash = color.ToArgb ();                     
48
49                         Pen res = pens [hash] as Pen;
50                         if (res != null)
51                                 return res;
52                         
53                         Pen pen = new Pen (color);
54                         pens.Add (hash, pen);
55                         return pen;
56                 }               
57                 
58                 public SolidBrush GetSolidBrush (Color color)
59                 {
60                         int hash = color.ToArgb ();
61
62                         SolidBrush res = solidbrushes [hash] as SolidBrush;
63                         if (res != null)
64                                 return res;
65                         
66                         SolidBrush brush = new SolidBrush (color);
67                         solidbrushes.Add (hash, brush);
68                         return brush;
69                 }               
70                 
71                 public HatchBrush GetHatchBrush (HatchStyle hatchStyle, Color foreColor, Color backColor)
72                 {
73                         string hash = hatchStyle.ToString () + foreColor.ToString () + backColor.ToString ();                   
74                                                 
75                         if (hatchbrushes.Contains (hash))
76                                 return (HatchBrush) hatchbrushes[hash];                                                 
77                         
78                         HatchBrush brush = new HatchBrush (hatchStyle, foreColor, backColor);
79                         hatchbrushes.Add (hash, brush);
80                         return brush;
81                 }
82                 
83         }
84
85         internal abstract class Theme
86         {               
87                 protected Array syscolors;
88                 protected Font default_font;
89                 protected Color defaultWindowBackColor;
90                 protected Color defaultWindowForeColor;         
91                 internal SystemResPool ResPool = new SystemResPool ();
92
93                 /* OS Feature support */
94                 public abstract Version Version {
95                         get;
96                 }
97
98                 /* Default properties */                
99                 public virtual Color ColorScrollbar {
100                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_SCROLLBAR);}
101                 }
102
103                 public virtual Color ColorBackground {
104                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_BACKGROUND);}
105                 }
106
107                 public virtual Color ColorActiveTitle {
108                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_ACTIVECAPTION);}
109                 }
110
111                 public virtual Color ColorInactiveTitle {
112                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_INACTIVECAPTION);}
113                 }
114
115                 public virtual Color ColorMenu {
116                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_MENU);}
117                 }
118
119                 public virtual Color ColorWindow {
120                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_WINDOW);}
121                 }
122
123                 public virtual Color ColorWindowFrame {
124                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_WINDOWFRAME);}
125                 }
126
127                 public virtual Color ColorMenuText {
128                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_MENUTEXT);}
129                 }
130
131                 public virtual Color ColorWindowText {
132                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_WINDOWTEXT);}
133                 }
134
135                 public virtual Color ColorTitleText {
136                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_CAPTIONTEXT);}
137                 }
138
139                 public virtual Color ColorActiveBorder {
140                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_ACTIVEBORDER);}
141                 }
142
143                 public virtual Color ColorInactiveBorder{
144                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_INACTIVEBORDER);}
145                 }
146
147                 public virtual Color ColorAppWorkSpace {
148                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_APPWORKSPACE);}
149                 }
150
151                 public virtual Color ColorHilight {
152                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_HIGHLIGHT);}
153                 }
154
155                 public virtual Color ColorHilightText {
156                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_HIGHLIGHTTEXT);}
157                 }
158
159                 public virtual Color ColorButtonFace {
160                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_BTNFACE);}
161                 }
162
163                 public virtual Color ColorButtonShadow {
164                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_BTNSHADOW);}
165                 }
166
167                 public virtual Color ColorGrayText {
168                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_GRAYTEXT);}
169                 }
170
171                 public virtual Color ColorButtonText {
172                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_BTNTEXT);}
173                 }
174
175                 public virtual Color ColorInactiveTitleText {
176                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_INACTIVECAPTIONTEXT);}
177                 }
178
179                 public virtual Color ColorButtonHilight {
180                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_BTNHIGHLIGHT);}
181                 }
182
183                 public virtual Color ColorButtonDkShadow {
184                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_3DDKSHADOW);}
185                 }
186
187                 public virtual Color ColorButtonLight {
188                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_3DLIGHT);}
189                 }
190
191                 public virtual Color ColorInfoText {
192                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_INFOTEXT);}
193                 }
194
195                 public virtual Color ColorInfoWindow {
196                         get {return GetColor (XplatUIWin32.GetSysColorIndex.COLOR_INFOBK);}
197                 }
198
199                 public virtual Color DefaultControlBackColor {
200                         get { return ColorButtonFace; }
201                 }
202
203                 public virtual Color DefaultControlForeColor {
204                         get { return ColorButtonText; }
205                 }
206
207                 public virtual Font DefaultFont {
208                         get { return default_font; }
209                 }
210
211                 public virtual Color DefaultWindowBackColor {
212                         get { return defaultWindowBackColor; }                  
213                 }
214
215                 public virtual Color DefaultWindowForeColor {
216                         get { return defaultWindowForeColor; }
217                 }
218
219                 public virtual Color GetColor (XplatUIWin32.GetSysColorIndex idx)
220                 {
221                         return (Color) syscolors.GetValue ((int)idx);
222                 }
223
224                 public virtual void SetColor (XplatUIWin32.GetSysColorIndex idx, Color color)
225                 {
226                         syscolors.SetValue (color, (int) idx);
227                 }
228
229                 // Theme/UI specific defaults
230                 public virtual ArrangeDirection ArrangeDirection  {
231                         get {
232                                 return ArrangeDirection.Down;
233                         }
234                 }
235
236                 public virtual ArrangeStartingPosition ArrangeStartingPosition {
237                         get {
238                                 return ArrangeStartingPosition.BottomLeft;
239                         }
240                 }
241
242                 public virtual Size Border3DSize {
243                         get {
244                                 return new Size(2, 2);
245                         }
246                 }
247
248                 public virtual Size BorderSize {
249                         get {
250                                 return new Size(1, 1);
251                         }
252                 }
253
254                 public virtual Size CaptionButtonSize {
255                         get {
256                                 return new Size(18, 18);
257                         }
258                 }
259
260                 public virtual int CaptionHeight {
261                         get {
262                                 return 19;
263                         }
264                 }
265
266                 public virtual Size DoubleClickSize {
267                         get {
268                                 return new Size(4, 4);
269                         }
270                 }
271
272                 public virtual int DoubleClickTime {
273                         get {
274                                 return 500;
275                         }
276                 }
277
278                 public virtual Size FixedFrameBorderSize {
279                         get {
280                                 return new Size(3, 3);
281                         }
282                 }
283
284                 public virtual Size FrameBorderSize {
285                         get {
286                                 return new Size(4, 4);
287                         }
288                 }
289
290                 public virtual int HorizontalScrollBarArrowWidth {
291                         get {
292                                 return 16;
293                         }
294                 }
295
296                 public virtual int HorizontalScrollBarHeight {
297                         get {
298                                 return 16;
299                         }
300                 }
301
302                 public virtual int HorizontalScrollBarThumbWidth {
303                         get {
304                                 return 16;
305                         }
306                 }
307
308                 public virtual Size IconSpacingSize {
309                         get {
310                                 return new Size(75, 75);
311                         }
312                 }
313
314                 public virtual Size MenuButtonSize {
315                         get {
316                                 return new Size(18, 18);
317                         }
318                 }
319
320                 public virtual Size MenuCheckSize {
321                         get {
322                                 return new Size(13, 13);
323                         }
324                 }
325
326                 public virtual Font MenuFont {
327                         get {
328                                 return default_font;
329                         }
330                 }
331
332                 public virtual int MenuHeight {
333                         get {
334                                 return 19;
335                         }
336                 }
337
338                 public virtual int MouseWheelScrollLines {
339                         get {
340                                 return 3;
341                         }
342                 }
343
344                 public virtual bool RightAlignedMenus {
345                         get {
346                                 return false;
347                         }
348                 }
349
350                 public virtual Size ToolWindowCaptionButtonSize {
351                         get {
352                                 return new Size(15, 15);
353                         }
354                 }
355
356                 public virtual int ToolWindowCaptionHeight {
357                         get {
358                                 return 16;
359                         }
360                 }
361
362                 public virtual int VerticalScrollBarArrowHeight {
363                         get {
364                                 return 16;
365                         }
366                 }
367
368                 public virtual int VerticalScrollBarThumbHeight {
369                         get {
370                                 return 16;
371                         }
372                 }
373
374                 public virtual int VerticalScrollBarWidth {
375                         get {
376                                 return 16;
377                         }
378                 }
379                 #region Principal Theme Methods
380                 // To let the theme now that a change of defaults (colors, etc) was detected and force a re-read (and possible recreation of cached resources)
381                 public abstract void ResetDefaults();
382
383                 // If the theme writes directly to a window instead of a device context
384                 public abstract bool DoubleBufferingSupported {get;}
385                 #endregion      // Principal Theme Methods
386
387                 #region OwnerDraw Support
388                 public abstract void DrawOwnerDrawBackground (DrawItemEventArgs e);
389                 public abstract void DrawOwnerDrawFocusRectangle (DrawItemEventArgs e);
390                 #endregion      // OwnerDraw Support
391
392                 #region Button
393                 #endregion      // Button
394
395                 #region ButtonBase
396                 // Drawing
397                 public abstract void DrawButtonBase(Graphics dc, Rectangle clip_area, ButtonBase button);
398
399                 // Sizing
400                 public abstract Size ButtonBaseDefaultSize{get;}
401                 #endregion      // ButtonBase
402
403                 #region CheckBox
404                 public abstract void DrawCheckBox(Graphics dc, Rectangle clip_area, CheckBox checkbox);
405                 #endregion      // CheckBox
406                 
407                 #region CheckedListBox
408                 // Drawing              
409                 public abstract void DrawCheckedListBoxItem (CheckedListBox ctrl, DrawItemEventArgs e);
410                 public abstract Rectangle CheckedListBoxCheckRectangle ();
411                 #endregion // CheckedListBox
412                 
413                 #region ComboBox
414                 // Drawing
415                 public abstract void DrawComboBoxEditDecorations (Graphics dc, ComboBox ctrl, Rectangle rect);
416                 public abstract void DrawComboListBoxDecorations (Graphics dc, ComboBox ctrl, Rectangle rect);
417                 public abstract void DrawComboBoxItem (ComboBox ctrl, DrawItemEventArgs e);
418                 
419                 // Sizing
420                 public abstract int DrawComboBoxEditDecorationTop ();
421                 public abstract int DrawComboBoxEditDecorationBottom ();
422                 public abstract int DrawComboBoxEditDecorationRight ();
423                 public abstract int DrawComboBoxEditDecorationLeft ();
424                 public abstract int DrawComboListBoxDecorationTop (ComboBoxStyle style);
425                 public abstract int DrawComboListBoxDecorationBottom (ComboBoxStyle style);
426                 public abstract int DrawComboListBoxDecorationRight (ComboBoxStyle style);
427                 public abstract int DrawComboListBoxDecorationLeft (ComboBoxStyle style);
428                 #endregion      // ComboBox
429
430                 #region Control
431                 #endregion      // Control
432
433                 #region DateTimePicker
434
435                 public abstract void DrawDateTimePicker(Graphics dc, Rectangle clip_rectangle, DateTimePicker dtp);
436
437                 #endregion      // DateTimePicker
438
439                 #region GroupBox
440                 // Drawing
441                 public abstract void DrawGroupBox (Graphics dc,  Rectangle clip_area, GroupBox box);
442
443                 // Sizing
444                 public abstract Size GroupBoxDefaultSize{get;}
445                 #endregion      // GroupBox
446
447                 #region HScrollBar
448                 public abstract Size HScrollBarDefaultSize{get;}        // Default size of the scrollbar
449                 #endregion      // HScrollBar
450
451                 #region Label
452                 // Drawing
453                 public abstract void DrawLabel (Graphics dc, Rectangle clip_rectangle, Label label);
454
455                 // Sizing
456                 public abstract Size LabelDefaultSize{get;}
457                 #endregion      // Label
458
459                 #region LinkLabel
460                 public abstract void DrawLinkLabel (Graphics dc, Rectangle clip_rectangle, LinkLabel label);
461                 #endregion      // LinkLabel
462                 
463                 #region ListBox
464                 // Drawing
465                 public abstract void DrawListBoxDecorations (Graphics dc, ListBox ctrl);
466                 public abstract void DrawListBoxItem (ListBox ctrl, DrawItemEventArgs e);
467                 
468                 // Sizing
469                 public abstract int DrawListBoxDecorationTop (BorderStyle border_style);
470                 public abstract int DrawListBoxDecorationBottom (BorderStyle border_style);
471                 public abstract int DrawListBoxDecorationRight (BorderStyle border_style);
472                 public abstract int DrawListBoxDecorationLeft (BorderStyle border_style);
473                 #endregion      // ListBox              
474                 
475                 #region ListView
476                 // Drawing
477                 public abstract void DrawListView (Graphics dc, Rectangle clip_rectangle, ListView control);
478
479                 // Sizing
480                 public abstract Size ListViewCheckBoxSize { get; }
481                 public abstract int ListViewColumnHeaderHeight { get; }
482                 public abstract int ListViewDefaultColumnWidth { get; }
483                 public abstract int ListViewVerticalSpacing { get; }
484                 public abstract int ListViewEmptyColumnWidth { get; }
485                 public abstract int ListViewHorizontalSpacing { get; }
486                 public abstract Size ListViewDefaultSize { get; }
487                 #endregion      // ListView
488                 
489                 #region Menus
490                 public abstract void CalcItemSize (Graphics dc, MenuAPI.MENUITEM item, int y, int x, bool menuBar);
491                 public abstract void CalcPopupMenuSize (Graphics dc, IntPtr hMenu);
492                 public abstract int CalcMenuBarSize (Graphics dc, IntPtr hMenu, int width);
493                 public abstract void DrawMenuBar (Graphics dc, IntPtr hMenu, Rectangle rect);
494                 public abstract void DrawMenuItem (MenuItem item, DrawItemEventArgs e);
495                 public abstract void DrawPopupMenu (Graphics dc, IntPtr hMenu, Rectangle cliparea, Rectangle rect);             
496                 #endregion      // Menus
497
498                 #region MonthCalendar
499                 public abstract void DrawMonthCalendar(Graphics dc, Rectangle clip_rectangle, MonthCalendar month_calendar);
500                 #endregion      // MonthCalendar
501
502                 #region Panel
503                 // Sizing
504                 public abstract Size PanelDefaultSize{get;}
505                 #endregion      // Panel
506
507                 #region PictureBox
508                 // Drawing
509                 public abstract void DrawPictureBox (Graphics dc, PictureBox pb);
510
511                 // Sizing
512                 public abstract Size PictureBoxDefaultSize{get;}
513                 #endregion      // PictureBox
514
515                 #region ProgressBar
516                 // Drawing
517                 public abstract void DrawProgressBar (Graphics dc, Rectangle clip_rectangle, ProgressBar progress_bar);
518
519                 // Sizing
520                 public abstract Size ProgressBarDefaultSize{get;}
521                 #endregion      // ProgressBar
522
523                 #region RadioButton
524                 // Drawing
525                 public abstract void DrawRadioButton (Graphics dc, Rectangle clip_rectangle, RadioButton radio_button);
526
527                 // Sizing
528                 public abstract Size RadioButtonDefaultSize{get;}
529                 #endregion      // RadioButton
530
531                 #region ScrollBar
532                 // Drawing
533                 //public abstract void DrawScrollBar (Graphics dc, Rectangle area, ScrollBar bar, ref Rectangle thumb_pos, ref Rectangle first_arrow_area, ref Rectangle second_arrow_area, ButtonState first_arrow, ButtonState second_arrow, ref int scrollbutton_width, ref int scrollbutton_height, bool vert);
534                 public abstract void DrawScrollBar (Graphics dc, Rectangle clip_rectangle, ScrollBar bar);
535
536                 // Sizing
537                 public abstract int ScrollBarButtonSize {get;}          // Size of the scroll button
538                 #endregion      // ScrollBar
539
540                 #region StatusBar
541                 // Drawing
542                 public abstract void DrawStatusBar (Graphics dc, Rectangle clip_rectangle, StatusBar sb);
543
544                 // Sizing
545                 public abstract int StatusBarSizeGripWidth {get;}               // Size of Resize area
546                 public abstract int StatusBarHorzGapWidth {get;}        // Gap between panels
547                 public abstract Size StatusBarDefaultSize{get;}
548                 #endregion      // StatusBar
549
550                 #region TabControl
551                 public abstract Size TabControlDefaultItemSize { get; }
552                 public abstract Point TabControlDefaultPadding { get; }
553                 public abstract int TabControlMinimumTabWidth { get; }
554
555                 public abstract Rectangle GetTabControlLeftScrollRect (TabControl tab);
556                 public abstract Rectangle GetTabControlRightScrollRect (TabControl tab);
557                 public abstract Rectangle GetTabControlDisplayRectangle (TabControl tab);
558                 public abstract Size TabControlGetSpacing (TabControl tab);
559                 public abstract void DrawTabControl (Graphics dc, Rectangle area, TabControl tab);
560                 #endregion
561
562                 #region ToolBar
563                 // Drawing
564                 public abstract void DrawToolBar (Graphics dc, Rectangle clip_rectangle, ToolBar control);
565
566                 // Sizing
567                 public abstract int ToolBarGripWidth {get;}              // Grip width for the ToolBar
568                 public abstract int ToolBarImageGripWidth {get;}         // Grip width for the Image on the ToolBarButton
569                 public abstract int ToolBarSeparatorWidth {get;}         // width of the separator
570                 public abstract int ToolBarDropDownWidth { get; }        // width of the dropdown arrow rect
571                 public abstract int ToolBarDropDownArrowWidth { get; }   // width for the dropdown arrow on the ToolBarButton
572                 public abstract int ToolBarDropDownArrowHeight { get; }  // height for the dropdown arrow on the ToolBarButton
573                 public abstract Size ToolBarDefaultSize{get;}
574                 #endregion      // ToolBar
575
576                 #region ToolTip
577                 public abstract void DrawToolTip(Graphics dc, Rectangle clip_rectangle, ToolTip tt);
578                 public abstract Size ToolTipSize(ToolTip tt, string text);
579                 #endregion      // ToolTip              
580                 
581
582                 #region TrackBar
583                 // Drawing
584                 public abstract void DrawTrackBar (Graphics dc, Rectangle clip_rectangle, TrackBar tb);
585
586                 // Sizing
587                 public abstract Size TrackBarDefaultSize{get; }         // Default size for the TrackBar control
588                 #endregion      // TrackBar
589
590                 #region VScrollBar
591                 public abstract Size VScrollBarDefaultSize{get;}        // Default size of the scrollbar
592                 #endregion      // VScrollBar
593
594                 #region TreeView
595                 public abstract Size TreeViewDefaultSize { get; }
596                 #endregion
597
598                 #region ControlPaint Methods
599                 public abstract void CPDrawBorder (Graphics graphics, Rectangle bounds, Color leftColor, int leftWidth,
600                         ButtonBorderStyle leftStyle, Color topColor, int topWidth, ButtonBorderStyle topStyle,
601                         Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, Color bottomColor,
602                         int bottomWidth, ButtonBorderStyle bottomStyle);
603
604                 public abstract void CPDrawBorder3D (Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides);
605                 public abstract void CPDrawButton (Graphics graphics, Rectangle rectangle, ButtonState state);
606                 public abstract void CPDrawCaptionButton (Graphics graphics, Rectangle rectangle, CaptionButton button, ButtonState state);
607                 public abstract void CPDrawCheckBox (Graphics graphics, Rectangle rectangle, ButtonState state);
608                 public abstract void CPDrawComboButton (Graphics graphics, Rectangle rectangle, ButtonState state);
609                 public abstract void CPDrawContainerGrabHandle (Graphics graphics, Rectangle bounds);
610                 public abstract void CPDrawFocusRectangle (Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor);
611                 public abstract void CPDrawGrabHandle (Graphics graphics, Rectangle rectangle, bool primary, bool enabled);
612                 public abstract void CPDrawGrid (Graphics graphics, Rectangle area, Size pixelsBetweenDots, Color backColor);
613                 public abstract void CPDrawImageDisabled (Graphics graphics, Image image, int x, int y, Color background);
614                 public abstract void CPDrawLockedFrame (Graphics graphics, Rectangle rectangle, bool primary);
615                 public abstract void CPDrawMenuGlyph (Graphics graphics, Rectangle rectangle, MenuGlyph glyph);
616                 public abstract void CPDrawRadioButton (Graphics graphics, Rectangle rectangle, ButtonState state);
617                 public abstract void CPDrawReversibleFrame (Rectangle rectangle, Color backColor, FrameStyle style);
618                 public abstract void CPDrawReversibleLine (Point start, Point end, Color backColor);
619                 public abstract void CPDrawScrollButton (Graphics graphics, Rectangle rectangle, ScrollButton button, ButtonState state);
620                 public abstract void CPDrawSelectionFrame (Graphics graphics, bool active, Rectangle outsideRect, Rectangle insideRect,
621                         Color backColor);
622                 public abstract void CPDrawSizeGrip (Graphics graphics, Color backColor, Rectangle bounds);
623                 public abstract void CPDrawStringDisabled (Graphics graphics, string s, Font font, Color color, RectangleF layoutRectangle,
624                         StringFormat format);
625                 public abstract void CPDrawBorderStyle (Graphics dc, Rectangle area, BorderStyle border_style);
626                 #endregion      // ControlPaint Methods
627         }
628 }