merge -r 58060:58217
[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 //      Peter Dennis Bartok, pbartok@novell.com
25 //
26
27
28 using System.Collections;
29 using System.Drawing;
30 using System.Drawing.Drawing2D;
31 using System.Drawing.Imaging;
32 using System.Reflection;
33
34 namespace System.Windows.Forms
35 {
36         
37         
38         // Implements a pool of system resources        
39         internal class SystemResPool
40         {
41                 private Hashtable pens = new Hashtable ();
42                 private Hashtable solidbrushes = new Hashtable ();
43                 private Hashtable hatchbrushes = new Hashtable ();
44                 
45                 public SystemResPool () {}
46                 
47                 public Pen GetPen (Color color)
48                 {
49                         int hash = color.ToArgb ();                     
50
51                         Pen res = pens [hash] as Pen;
52                         if (res != null)
53                                 return res;
54                         
55                         Pen pen = new Pen (color);
56                         pens.Add (hash, pen);
57                         return pen;
58                 }               
59                 
60                 public SolidBrush GetSolidBrush (Color color)
61                 {
62                         int hash = color.ToArgb ();
63
64                         SolidBrush res = solidbrushes [hash] as SolidBrush;
65                         if (res != null)
66                                 return res;
67                         
68                         SolidBrush brush = new SolidBrush (color);
69                         solidbrushes.Add (hash, brush);
70                         return brush;
71                 }               
72                 
73                 public HatchBrush GetHatchBrush (HatchStyle hatchStyle, Color foreColor, Color backColor)
74                 {
75                         string hash = hatchStyle.ToString () + foreColor.ToString () + backColor.ToString ();                   
76                                                 
77                         if (hatchbrushes.Contains (hash))
78                                 return (HatchBrush) hatchbrushes[hash];                                                 
79
80                         HatchBrush brush = new HatchBrush (hatchStyle, foreColor, backColor);
81                         hatchbrushes.Add (hash, brush);
82                         return brush;
83                 }
84                 
85         }
86
87         internal abstract class Theme
88         {               
89                 protected Array syscolors;
90                 protected Font default_font;
91                 protected Color defaultWindowBackColor;
92                 protected Color defaultWindowForeColor;         
93                 internal SystemResPool ResPool = new SystemResPool ();
94                 private Type system_colors = Type.GetType("System.Drawing.SystemColors, System.Drawing");
95
96                 private void SetSystemColors(string name, Color value) {
97                         if (system_colors != null) {
98                                 MethodInfo update;
99
100                                 system_colors.GetField(name, System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic).SetValue(null, value);
101                                 update = system_colors.GetMethod("UpdateColors", BindingFlags.Static | BindingFlags.NonPublic);
102                                 if (update != null) {
103                                         update.Invoke(null, null);
104                                 }
105                         }
106                 }
107
108
109                 /* OS Feature support */
110                 public abstract Version Version {
111                         get;
112                 }
113
114                 /* Default properties */                
115                 public virtual Color ColorScrollBar {
116                         get { return SystemColors.ScrollBar;}
117                         set { SetSystemColors("scroll_bar", value); }
118                 }
119
120                 public virtual Color ColorDesktop {
121                         get { return SystemColors.Desktop;}
122                         set { SetSystemColors("desktop", value); }
123                 }
124
125                 public virtual Color ColorActiveCaption {
126                         get { return SystemColors.ActiveCaption;}
127                         set { SetSystemColors("active_caption", value); }
128                 }
129
130                 public virtual Color ColorInactiveCaption {
131                         get { return SystemColors.InactiveCaption;}
132                         set { SetSystemColors("inactive_caption", value); }
133                 }
134
135                 public virtual Color ColorMenu {
136                         get { return SystemColors.Menu;}
137                         set { SetSystemColors("menu", value); }
138                 }
139
140                 public virtual Color ColorWindow {
141                         get { return SystemColors.Window;}
142                         set { SetSystemColors("window", value); }
143                 }
144
145                 public virtual Color ColorWindowFrame {
146                         get { return SystemColors.WindowFrame;}
147                         set { SetSystemColors("window_frame", value); }
148                 }
149
150                 public virtual Color ColorMenuText {
151                         get { return SystemColors.MenuText;}
152                         set { SetSystemColors("menu_text", value); }
153                 }
154
155                 public virtual Color ColorWindowText {
156                         get { return SystemColors.WindowText;}
157                         set { SetSystemColors("window_text", value); }
158                 }
159
160                 public virtual Color ColorActiveCaptionText {
161                         get { return SystemColors.ActiveCaptionText;}
162                         set { SetSystemColors("active_caption_text", value); }
163                 }
164
165                 public virtual Color ColorActiveBorder {
166                         get { return SystemColors.ActiveBorder;}
167                         set { SetSystemColors("active_border", value); }
168                 }
169
170                 public virtual Color ColorInactiveBorder{
171                         get { return SystemColors.InactiveBorder;}
172                         set { SetSystemColors("inactive_border", value); }
173                 }
174
175                 public virtual Color ColorAppWorkspace {
176                         get { return SystemColors.AppWorkspace;}
177                         set { SetSystemColors("app_workspace", value); }
178                 }
179
180                 public virtual Color ColorHighlight {
181                         get { return SystemColors.Highlight;}
182                         set { SetSystemColors("highlight", value); }
183                 }
184
185                 public virtual Color ColorHighlightText {
186                         get { return SystemColors.HighlightText;}
187                         set { SetSystemColors("highlight_text", value); }
188                 }
189
190                 public virtual Color ColorControl {
191                         get { return SystemColors.Control;}
192                         set { SetSystemColors("control", value); }
193                 }
194
195                 public virtual Color ColorControlDark {
196                         get { return SystemColors.ControlDark;}
197                         set { SetSystemColors("control_dark", value); }
198                 }
199
200                 public virtual Color ColorGrayText {
201                         get { return SystemColors.GrayText;}
202                         set { SetSystemColors("gray_text", value); }
203                 }
204
205                 public virtual Color ColorControlText {
206                         get { return SystemColors.ControlText;}
207                         set { SetSystemColors("control_text", value); }
208                 }
209
210                 public virtual Color ColorInactiveCaptionText {
211                         get { return SystemColors.InactiveCaptionText;}
212                         set { SetSystemColors("inactive_caption_text", value); }
213                 }
214
215                 public virtual Color ColorControlLight {
216                         get { return SystemColors.ControlLight;}
217                         set { SetSystemColors("control_light", value); }
218                 }
219
220                 public virtual Color ColorControlDarkDark {
221                         get { return SystemColors.ControlDarkDark;}
222                         set { SetSystemColors("control_dark_dark", value); }
223                 }
224
225                 public virtual Color ColorControlLightLight {
226                         get { return SystemColors.ControlLightLight;}
227                         set { SetSystemColors("control_light_light", value); }
228                 }
229
230                 public virtual Color ColorInfoText {
231                         get { return SystemColors.InfoText;}
232                         set { SetSystemColors("info_text", value); }
233                 }
234
235                 public virtual Color ColorInfo {
236                         get { return SystemColors.Info;}
237                         set { SetSystemColors("info", value); }
238                 }
239
240                 public virtual Color ColorHotTrack {
241                         get { return SystemColors.HotTrack;}
242                         set { SetSystemColors("hot_track", value);}
243                 }
244
245                 public virtual Color DefaultControlBackColor {
246                         get { return ColorControl; }
247                         set { ColorControl = value; }
248                 }
249
250                 public virtual Color DefaultControlForeColor {
251                         get { return ColorControlText; }
252                         set { ColorControlText = value; }
253                 }
254
255                 public virtual Font DefaultFont {
256                         get { return default_font; }
257                 }
258
259                 public virtual Color DefaultWindowBackColor {
260                         get { return defaultWindowBackColor; }                  
261                 }
262
263                 public virtual Color DefaultWindowForeColor {
264                         get { return defaultWindowForeColor; }
265                 }
266
267                 public virtual Color GetColor (XplatUIWin32.GetSysColorIndex idx)
268                 {
269                         return (Color) syscolors.GetValue ((int)idx);
270                 }
271
272                 public virtual void SetColor (XplatUIWin32.GetSysColorIndex idx, Color color)
273                 {
274                         syscolors.SetValue (color, (int) idx);
275                 }
276
277                 // Theme/UI specific defaults
278                 public virtual ArrangeDirection ArrangeDirection  {
279                         get {
280                                 return ArrangeDirection.Down;
281                         }
282                 }
283
284                 public virtual ArrangeStartingPosition ArrangeStartingPosition {
285                         get {
286                                 return ArrangeStartingPosition.BottomLeft;
287                         }
288                 }
289
290                 public virtual Size Border3DSize {
291                         get {
292                                 return new Size(2, 2);
293                         }
294                 }
295
296                 public virtual Size BorderSize {
297                         get {
298                                 return new Size(1, 1);
299                         }
300                 }
301
302                 public virtual Size CaptionButtonSize {
303                         get {
304                                 return new Size(18, 18);
305                         }
306                 }
307
308                 public virtual int CaptionHeight {
309                         get {
310                                 return XplatUI.CaptionHeight;
311                         }
312                 }
313
314                 public virtual Size DoubleClickSize {
315                         get {
316                                 return new Size(4, 4);
317                         }
318                 }
319
320                 public virtual int DoubleClickTime {
321                         get {
322                                 return 500;
323                         }
324                 }
325
326                 public virtual Size FixedFrameBorderSize {
327                         get {
328                                 return new Size(3, 3);
329                         }
330                 }
331
332                 public virtual Size FrameBorderSize {
333                         get {
334                                 return XplatUI.FrameBorderSize;
335                         }
336                 }
337
338                 public virtual int HorizontalScrollBarArrowWidth {
339                         get {
340                                 return 16;
341                         }
342                 }
343
344                 public virtual int HorizontalScrollBarHeight {
345                         get {
346                                 return 16;
347                         }
348                 }
349
350                 public virtual int HorizontalScrollBarThumbWidth {
351                         get {
352                                 return 16;
353                         }
354                 }
355
356                 public virtual Size IconSpacingSize {
357                         get {
358                                 return new Size(75, 75);
359                         }
360                 }
361
362                 public virtual Size MenuButtonSize {
363                         get {
364                                 return new Size(18, 18);
365                         }
366                 }
367
368                 public virtual Size MenuCheckSize {
369                         get {
370                                 return new Size(13, 13);
371                         }
372                 }
373
374                 public virtual Font MenuFont {
375                         get {
376                                 return default_font;
377                         }
378                 }
379
380                 public virtual int MenuHeight {
381                         get {
382                                 return 19;
383                         }
384                 }
385
386                 public virtual int MouseWheelScrollLines {
387                         get {
388                                 return 3;
389                         }
390                 }
391
392                 public virtual bool RightAlignedMenus {
393                         get {
394                                 return false;
395                         }
396                 }
397
398                 public virtual Size ToolWindowCaptionButtonSize {
399                         get {
400                                 return new Size(15, 15);
401                         }
402                 }
403
404                 public virtual int ToolWindowCaptionHeight {
405                         get {
406                                 return 16;
407                         }
408                 }
409
410                 public virtual int VerticalScrollBarArrowHeight {
411                         get {
412                                 return 16;
413                         }
414                 }
415
416                 public virtual int VerticalScrollBarThumbHeight {
417                         get {
418                                 return 16;
419                         }
420                 }
421
422                 public virtual int VerticalScrollBarWidth {
423                         get {
424                                 return 16;
425                         }
426                 }
427                 #region Principal Theme Methods
428                 // 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)
429                 public abstract void ResetDefaults();
430
431                 // If the theme writes directly to a window instead of a device context
432                 public abstract bool DoubleBufferingSupported {get;}
433                 #endregion      // Principal Theme Methods
434
435                 #region OwnerDraw Support
436                 public abstract void DrawOwnerDrawBackground (DrawItemEventArgs e);
437                 public abstract void DrawOwnerDrawFocusRectangle (DrawItemEventArgs e);
438                 #endregion      // OwnerDraw Support
439
440                 #region Button
441                 #endregion      // Button
442
443                 #region ButtonBase
444                 // Drawing
445                 public abstract void DrawButtonBase(Graphics dc, Rectangle clip_area, ButtonBase button);
446
447                 // Sizing
448                 public abstract Size ButtonBaseDefaultSize{get;}
449                 #endregion      // ButtonBase
450
451                 #region CheckBox
452                 public abstract void DrawCheckBox(Graphics dc, Rectangle clip_area, CheckBox checkbox);
453                 #endregion      // CheckBox
454                 
455                 #region CheckedListBox
456                 // Drawing              
457                 public abstract void DrawCheckedListBoxItem (CheckedListBox ctrl, DrawItemEventArgs e);
458                 public abstract Rectangle CheckedListBoxCheckRectangle ();
459                 #endregion // CheckedListBox
460                 
461                 #region ComboBox
462                 // Drawing
463                 public abstract void DrawComboBoxEditDecorations (Graphics dc, ComboBox ctrl, Rectangle rect);
464                 public abstract void DrawComboListBoxDecorations (Graphics dc, ComboBox ctrl, Rectangle rect);
465                 public abstract void DrawComboBoxItem (ComboBox ctrl, DrawItemEventArgs e);
466                 
467                 // Sizing
468                 public abstract int DrawComboBoxEditDecorationTop ();
469                 public abstract int DrawComboBoxEditDecorationBottom ();
470                 public abstract int DrawComboBoxEditDecorationRight ();
471                 public abstract int DrawComboBoxEditDecorationLeft ();
472                 public abstract int DrawComboListBoxDecorationTop (ComboBoxStyle style);
473                 public abstract int DrawComboListBoxDecorationBottom (ComboBoxStyle style);
474                 public abstract int DrawComboListBoxDecorationRight (ComboBoxStyle style);
475                 public abstract int DrawComboListBoxDecorationLeft (ComboBoxStyle style);
476                 #endregion      // ComboBox
477
478                 #region Control
479                 #endregion      // Control
480                 
481                 #region Datagrid
482                 public abstract int DataGridPreferredColumnWidth { get; }
483                 public abstract int DataGridMinimumColumnCheckBoxHeight { get; }
484                 public abstract int DataGridMinimumColumnCheckBoxWidth { get; }
485                 
486                 // Default colours
487                 public abstract Color DataGridAlternatingBackColor { get; }             
488                 public abstract Color DataGridBackColor { get; }                
489                 public abstract Color DataGridBackgroundColor { get; }
490                 public abstract Color DataGridCaptionBackColor { get; }
491                 public abstract Color DataGridCaptionForeColor { get; }         
492                 public abstract Color DataGridGridLineColor { get; }
493                 public abstract Color DataGridHeaderBackColor { get; }
494                 public abstract Color DataGridHeaderForeColor { get; }
495                 public abstract Color DataGridLinkColor { get; }
496                 public abstract Color DataGridLinkHoverColor { get; }
497                 public abstract Color DataGridParentRowsBackColor { get; }
498                 public abstract Color DataGridParentRowsForeColor { get; }
499                 public abstract Color DataGridSelectionBackColor { get; }
500                 public abstract Color DataGridSelectionForeColor { get; }
501                 // Paint                
502                 public abstract void DataGridPaint (PaintEventArgs pe, DataGrid grid);
503                 public abstract void DataGridPaintCaption (Graphics g, Rectangle clip, DataGrid grid);
504                 public abstract void DataGridPaintColumnsHdrs (Graphics g, Rectangle clip, DataGrid grid);
505                 public abstract void DataGridPaintRowsHeaders (Graphics g, Rectangle clip, DataGrid grid);
506                 public abstract void DataGridPaintRowHeader (Graphics g, Rectangle bounds, int row, DataGrid grid);
507                 public abstract void DataGridPaintRowHeaderArrow (Graphics g, Rectangle bounds, DataGrid grid);
508                 public abstract void DataGridPaintRows (Graphics g, Rectangle cells, Rectangle clip, DataGrid grid);
509                 public abstract void DataGridPaintRow (Graphics g, int row, Rectangle row_rect, bool is_newrow, DataGrid grid);
510                 
511                 
512                 #endregion // Datagrid
513
514                 #region DateTimePicker
515
516                 public abstract void DrawDateTimePicker(Graphics dc, Rectangle clip_rectangle, DateTimePicker dtp);
517
518                 #endregion      // DateTimePicker
519
520                 #region GroupBox
521                 // Drawing
522                 public abstract void DrawGroupBox (Graphics dc,  Rectangle clip_area, GroupBox box);
523
524                 // Sizing
525                 public abstract Size GroupBoxDefaultSize{get;}
526                 #endregion      // GroupBox
527
528                 #region HScrollBar
529                 public abstract Size HScrollBarDefaultSize{get;}        // Default size of the scrollbar
530                 #endregion      // HScrollBar
531
532                 #region Label
533                 // Drawing
534                 public abstract void DrawLabel (Graphics dc, Rectangle clip_rectangle, Label label);
535
536                 // Sizing
537                 public abstract Size LabelDefaultSize{get;}
538                 #endregion      // Label
539
540                 #region LinkLabel
541                 public abstract void DrawLinkLabel (Graphics dc, Rectangle clip_rectangle, LinkLabel label);
542                 #endregion      // LinkLabel
543                 
544                 #region ListBox
545                 // Drawing
546                 public abstract void DrawListBoxItem (ListBox ctrl, DrawItemEventArgs e);               
547                 #endregion      // ListBox              
548                 
549                 #region ListView
550                 // Drawing
551                 public abstract void DrawListView (Graphics dc, Rectangle clip_rectangle, ListView control);
552
553                 // Sizing
554                 public abstract Size ListViewCheckBoxSize { get; }
555                 public abstract int ListViewColumnHeaderHeight { get; }
556                 public abstract int ListViewDefaultColumnWidth { get; }
557                 public abstract int ListViewVerticalSpacing { get; }
558                 public abstract int ListViewEmptyColumnWidth { get; }
559                 public abstract int ListViewHorizontalSpacing { get; }
560                 public abstract Size ListViewDefaultSize { get; }
561                 #endregion      // ListView
562                 
563                 #region Menus
564                 public abstract void CalcItemSize (Graphics dc, MenuAPI.MENUITEM item, int y, int x, bool menuBar);
565                 public abstract void CalcPopupMenuSize (Graphics dc, IntPtr hMenu);
566                 public abstract int CalcMenuBarSize (Graphics dc, IntPtr hMenu, int width);
567                 public abstract void DrawMenuBar (Graphics dc, IntPtr hMenu, Rectangle rect);
568                 public abstract void DrawMenuItem (MenuItem item, DrawItemEventArgs e);
569                 public abstract void DrawPopupMenu (Graphics dc, IntPtr hMenu, Rectangle cliparea, Rectangle rect);             
570                 #endregion      // Menus
571
572                 #region MonthCalendar
573                 public abstract void DrawMonthCalendar(Graphics dc, Rectangle clip_rectangle, MonthCalendar month_calendar);
574                 #endregion      // MonthCalendar
575
576                 #region Panel
577                 // Sizing
578                 public abstract Size PanelDefaultSize{get;}
579                 #endregion      // Panel
580
581                 #region PictureBox
582                 // Drawing
583                 public abstract void DrawPictureBox (Graphics dc, Rectangle clip, PictureBox pb);
584
585                 // Sizing
586                 public abstract Size PictureBoxDefaultSize{get;}
587                 #endregion      // PictureBox
588
589                 #region ProgressBar
590                 // Drawing
591                 public abstract void DrawProgressBar (Graphics dc, Rectangle clip_rectangle, ProgressBar progress_bar);
592
593                 // Sizing
594                 public abstract Size ProgressBarDefaultSize{get;}
595                 #endregion      // ProgressBar
596
597                 #region RadioButton
598                 // Drawing
599                 public abstract void DrawRadioButton (Graphics dc, Rectangle clip_rectangle, RadioButton radio_button);
600
601                 // Sizing
602                 public abstract Size RadioButtonDefaultSize{get;}
603                 #endregion      // RadioButton
604
605                 #region ScrollBar
606                 // Drawing
607                 //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);
608                 public abstract void DrawScrollBar (Graphics dc, Rectangle clip_rectangle, ScrollBar bar);
609
610                 // Sizing
611                 public abstract int ScrollBarButtonSize {get;}          // Size of the scroll button
612                 #endregion      // ScrollBar
613
614                 #region StatusBar
615                 // Drawing
616                 public abstract void DrawStatusBar (Graphics dc, Rectangle clip_rectangle, StatusBar sb);
617
618                 // Sizing
619                 public abstract int StatusBarSizeGripWidth {get;}               // Size of Resize area
620                 public abstract int StatusBarHorzGapWidth {get;}        // Gap between panels
621                 public abstract Size StatusBarDefaultSize{get;}
622                 #endregion      // StatusBar
623
624                 #region TabControl
625                 public abstract Size TabControlDefaultItemSize { get; }
626                 public abstract Point TabControlDefaultPadding { get; }
627                 public abstract int TabControlMinimumTabWidth { get; }
628
629                 public abstract Rectangle GetTabControlLeftScrollRect (TabControl tab);
630                 public abstract Rectangle GetTabControlRightScrollRect (TabControl tab);
631                 public abstract Rectangle GetTabControlDisplayRectangle (TabControl tab);
632                 public abstract Size TabControlGetSpacing (TabControl tab);
633                 public abstract void DrawTabControl (Graphics dc, Rectangle area, TabControl tab);
634                 #endregion
635
636                 #region ToolBar
637                 // Drawing
638                 public abstract void DrawToolBar (Graphics dc, Rectangle clip_rectangle, ToolBar control);
639
640                 // Sizing
641                 public abstract int ToolBarGripWidth {get;}              // Grip width for the ToolBar
642                 public abstract int ToolBarImageGripWidth {get;}         // Grip width for the Image on the ToolBarButton
643                 public abstract int ToolBarSeparatorWidth {get;}         // width of the separator
644                 public abstract int ToolBarDropDownWidth { get; }        // width of the dropdown arrow rect
645                 public abstract int ToolBarDropDownArrowWidth { get; }   // width for the dropdown arrow on the ToolBarButton
646                 public abstract int ToolBarDropDownArrowHeight { get; }  // height for the dropdown arrow on the ToolBarButton
647                 public abstract Size ToolBarDefaultSize{get;}
648                 #endregion      // ToolBar
649
650                 #region ToolTip
651                 public abstract void DrawToolTip(Graphics dc, Rectangle clip_rectangle, ToolTip.ToolTipWindow control);
652                 public abstract Size ToolTipSize(ToolTip.ToolTipWindow tt, string text);
653                 #endregion      // ToolTip              
654                 
655
656                 #region TrackBar
657                 // Drawing
658                 public abstract void DrawTrackBar (Graphics dc, Rectangle clip_rectangle, TrackBar tb);
659
660                 // Sizing
661                 public abstract Size TrackBarDefaultSize{get; }         // Default size for the TrackBar control
662                 #endregion      // TrackBar
663
664                 #region VScrollBar
665                 public abstract Size VScrollBarDefaultSize{get;}        // Default size of the scrollbar
666                 #endregion      // VScrollBar
667
668                 #region TreeView
669                 public abstract Size TreeViewDefaultSize { get; }
670                 #endregion
671
672                 #region ControlPaint Methods
673                 public abstract void CPDrawBorder (Graphics graphics, Rectangle bounds, Color leftColor, int leftWidth,
674                         ButtonBorderStyle leftStyle, Color topColor, int topWidth, ButtonBorderStyle topStyle,
675                         Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, Color bottomColor,
676                         int bottomWidth, ButtonBorderStyle bottomStyle);
677
678                 public abstract void CPDrawBorder3D (Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides);
679                 public abstract void CPDrawButton (Graphics graphics, Rectangle rectangle, ButtonState state);
680                 public abstract void CPDrawCaptionButton (Graphics graphics, Rectangle rectangle, CaptionButton button, ButtonState state);
681                 public abstract void CPDrawCheckBox (Graphics graphics, Rectangle rectangle, ButtonState state);
682                 public abstract void CPDrawComboButton (Graphics graphics, Rectangle rectangle, ButtonState state);
683                 public abstract void CPDrawContainerGrabHandle (Graphics graphics, Rectangle bounds);
684                 public abstract void CPDrawFocusRectangle (Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor);
685                 public abstract void CPDrawGrabHandle (Graphics graphics, Rectangle rectangle, bool primary, bool enabled);
686                 public abstract void CPDrawGrid (Graphics graphics, Rectangle area, Size pixelsBetweenDots, Color backColor);
687                 public abstract void CPDrawImageDisabled (Graphics graphics, Image image, int x, int y, Color background);
688                 public abstract void CPDrawLockedFrame (Graphics graphics, Rectangle rectangle, bool primary);
689                 public abstract void CPDrawMenuGlyph (Graphics graphics, Rectangle rectangle, MenuGlyph glyph);
690                 public abstract void CPDrawRadioButton (Graphics graphics, Rectangle rectangle, ButtonState state);
691                 public abstract void CPDrawReversibleFrame (Rectangle rectangle, Color backColor, FrameStyle style);
692                 public abstract void CPDrawReversibleLine (Point start, Point end, Color backColor);
693                 public abstract void CPDrawScrollButton (Graphics graphics, Rectangle rectangle, ScrollButton button, ButtonState state);
694                 public abstract void CPDrawSelectionFrame (Graphics graphics, bool active, Rectangle outsideRect, Rectangle insideRect,
695                         Color backColor);
696                 public abstract void CPDrawSizeGrip (Graphics graphics, Color backColor, Rectangle bounds);
697                 public abstract void CPDrawStringDisabled (Graphics graphics, string s, Font font, Color color, RectangleF layoutRectangle,
698                         StringFormat format);
699                 public abstract void CPDrawBorderStyle (Graphics dc, Rectangle area, BorderStyle border_style);
700                 #endregion      // ControlPaint Methods
701         }
702 }