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:
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
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.
20 // Copyright (c) 2004-2005 Novell, Inc.
23 // Jordi Mas i Hernandez, jordi@ximian.com
24 // Peter Dennis Bartok, pbartok@novell.com
28 using System.Collections;
30 using System.Drawing.Drawing2D;
31 using System.Drawing.Imaging;
32 using System.Reflection;
34 namespace System.Windows.Forms
36 internal enum UIIcon {
37 PlacesRecentDocuments,
50 // Implements a pool of system resources
51 internal class SystemResPool
53 private Hashtable pens = new Hashtable ();
54 private Hashtable solidbrushes = new Hashtable ();
55 private Hashtable hatchbrushes = new Hashtable ();
56 private Hashtable uiImages = new Hashtable();
58 public SystemResPool () {}
60 public Pen GetPen (Color color)
62 int hash = color.ToArgb ();
64 Pen res = pens [hash] as Pen;
68 Pen pen = new Pen (color);
73 public SolidBrush GetSolidBrush (Color color)
75 int hash = color.ToArgb ();
77 SolidBrush res = solidbrushes [hash] as SolidBrush;
81 SolidBrush brush = new SolidBrush (color);
82 solidbrushes.Add (hash, brush);
86 public HatchBrush GetHatchBrush (HatchStyle hatchStyle, Color foreColor, Color backColor)
88 string hash = hatchStyle.ToString () + foreColor.ToString () + backColor.ToString ();
90 if (hatchbrushes.Contains (hash))
91 return (HatchBrush) hatchbrushes[hash];
93 HatchBrush brush = new HatchBrush (hatchStyle, foreColor, backColor);
94 hatchbrushes.Add (hash, brush);
98 public void AddUIImage (Image image, string name, int size)
100 string hash = name + size.ToString();
102 if (uiImages.Contains (hash))
104 uiImages.Add (hash, image);
107 public Image GetUIImage(string name, int size)
109 string hash = name + size.ToString();
111 Image image = uiImages [hash] as Image;
117 internal abstract class Theme
119 protected Array syscolors;
120 protected Font default_font;
121 protected Color defaultWindowBackColor;
122 protected Color defaultWindowForeColor;
123 protected bool always_draw_hotkeys = true;
124 internal SystemResPool ResPool = new SystemResPool ();
125 private Type system_colors = Type.GetType("System.Drawing.SystemColors, System.Drawing");
127 private void SetSystemColors(string name, Color value) {
128 if (system_colors != null) {
131 system_colors.GetField(name, System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic).SetValue(null, value);
132 update = system_colors.GetMethod("UpdateColors", BindingFlags.Static | BindingFlags.NonPublic);
133 if (update != null) {
134 update.Invoke(null, null);
140 /* OS Feature support */
141 public abstract Version Version {
145 /* Default properties */
146 public virtual Color ColorScrollBar {
147 get { return SystemColors.ScrollBar;}
148 set { SetSystemColors("scroll_bar", value); }
151 public virtual Color ColorDesktop {
152 get { return SystemColors.Desktop;}
153 set { SetSystemColors("desktop", value); }
156 public virtual Color ColorActiveCaption {
157 get { return SystemColors.ActiveCaption;}
158 set { SetSystemColors("active_caption", value); }
161 public virtual Color ColorInactiveCaption {
162 get { return SystemColors.InactiveCaption;}
163 set { SetSystemColors("inactive_caption", value); }
166 public virtual Color ColorMenu {
167 get { return SystemColors.Menu;}
168 set { SetSystemColors("menu", value); }
171 public virtual Color ColorWindow {
172 get { return SystemColors.Window;}
173 set { SetSystemColors("window", value); }
176 public virtual Color ColorWindowFrame {
177 get { return SystemColors.WindowFrame;}
178 set { SetSystemColors("window_frame", value); }
181 public virtual Color ColorMenuText {
182 get { return SystemColors.MenuText;}
183 set { SetSystemColors("menu_text", value); }
186 public virtual Color ColorWindowText {
187 get { return SystemColors.WindowText;}
188 set { SetSystemColors("window_text", value); }
191 public virtual Color ColorActiveCaptionText {
192 get { return SystemColors.ActiveCaptionText;}
193 set { SetSystemColors("active_caption_text", value); }
196 public virtual Color ColorActiveBorder {
197 get { return SystemColors.ActiveBorder;}
198 set { SetSystemColors("active_border", value); }
201 public virtual Color ColorInactiveBorder{
202 get { return SystemColors.InactiveBorder;}
203 set { SetSystemColors("inactive_border", value); }
206 public virtual Color ColorAppWorkspace {
207 get { return SystemColors.AppWorkspace;}
208 set { SetSystemColors("app_workspace", value); }
211 public virtual Color ColorHighlight {
212 get { return SystemColors.Highlight;}
213 set { SetSystemColors("highlight", value); }
216 public virtual Color ColorHighlightText {
217 get { return SystemColors.HighlightText;}
218 set { SetSystemColors("highlight_text", value); }
221 public virtual Color ColorControl {
222 get { return SystemColors.Control;}
223 set { SetSystemColors("control", value); }
226 public virtual Color ColorControlDark {
227 get { return SystemColors.ControlDark;}
228 set { SetSystemColors("control_dark", value); }
231 public virtual Color ColorGrayText {
232 get { return SystemColors.GrayText;}
233 set { SetSystemColors("gray_text", value); }
236 public virtual Color ColorControlText {
237 get { return SystemColors.ControlText;}
238 set { SetSystemColors("control_text", value); }
241 public virtual Color ColorInactiveCaptionText {
242 get { return SystemColors.InactiveCaptionText;}
243 set { SetSystemColors("inactive_caption_text", value); }
246 public virtual Color ColorControlLight {
247 get { return SystemColors.ControlLight;}
248 set { SetSystemColors("control_light", value); }
251 public virtual Color ColorControlDarkDark {
252 get { return SystemColors.ControlDarkDark;}
253 set { SetSystemColors("control_dark_dark", value); }
256 public virtual Color ColorControlLightLight {
257 get { return SystemColors.ControlLightLight;}
258 set { SetSystemColors("control_light_light", value); }
261 public virtual Color ColorInfoText {
262 get { return SystemColors.InfoText;}
263 set { SetSystemColors("info_text", value); }
266 public virtual Color ColorInfo {
267 get { return SystemColors.Info;}
268 set { SetSystemColors("info", value); }
271 public virtual Color ColorHotTrack {
272 get { return SystemColors.HotTrack;}
273 set { SetSystemColors("hot_track", value);}
276 public virtual Color DefaultControlBackColor {
277 get { return ColorControl; }
278 set { ColorControl = value; }
281 public virtual Color DefaultControlForeColor {
282 get { return ColorControlText; }
283 set { ColorControlText = value; }
286 public virtual Font DefaultFont {
287 get { return default_font; }
290 public virtual Color DefaultWindowBackColor {
291 get { return defaultWindowBackColor; }
294 public virtual Color DefaultWindowForeColor {
295 get { return defaultWindowForeColor; }
298 public virtual Color GetColor (XplatUIWin32.GetSysColorIndex idx)
300 return (Color) syscolors.GetValue ((int)idx);
303 public virtual void SetColor (XplatUIWin32.GetSysColorIndex idx, Color color)
305 syscolors.SetValue (color, (int) idx);
308 // Theme/UI specific defaults
309 public virtual ArrangeDirection ArrangeDirection {
311 return ArrangeDirection.Down;
315 public virtual ArrangeStartingPosition ArrangeStartingPosition {
317 return ArrangeStartingPosition.BottomLeft;
321 public virtual Size Border3DSize {
323 return new Size(2, 2);
327 public virtual Size BorderSize {
329 return new Size(1, 1);
333 public virtual Size CaptionButtonSize {
335 return new Size(18, 18);
339 public virtual int CaptionHeight {
341 return XplatUI.CaptionHeight;
345 public virtual Size DoubleClickSize {
347 return new Size(4, 4);
351 public virtual int DoubleClickTime {
357 public virtual Size FixedFrameBorderSize {
359 return new Size(3, 3);
363 public virtual Size FrameBorderSize {
365 return XplatUI.FrameBorderSize;
369 public virtual int HorizontalScrollBarArrowWidth {
375 public virtual int HorizontalScrollBarHeight {
381 public virtual int HorizontalScrollBarThumbWidth {
387 public virtual Size IconSpacingSize {
389 return new Size(75, 75);
393 public virtual Size MenuButtonSize {
395 return new Size(18, 18);
399 public virtual Size MenuCheckSize {
401 return new Size(13, 13);
405 public virtual Font MenuFont {
411 public virtual int MenuHeight {
417 public virtual int MouseWheelScrollLines {
423 public virtual bool RightAlignedMenus {
429 public virtual Size ToolWindowCaptionButtonSize {
431 return new Size(15, 15);
435 public virtual int ToolWindowCaptionHeight {
441 public virtual int VerticalScrollBarArrowHeight {
447 public virtual int VerticalScrollBarThumbHeight {
453 public virtual int VerticalScrollBarWidth {
459 [MonoTODO("Figure out where to point for My Network Places")]
460 public virtual string Places(UIIcon index) {
462 case UIIcon.PlacesRecentDocuments: {
463 // Default = "Recent Documents"
464 return Environment.GetFolderPath(Environment.SpecialFolder.Recent);
467 case UIIcon.PlacesDesktop: {
468 // Default = "Desktop"
469 return Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
472 case UIIcon.PlacesPersonal: {
473 // Default = "My Documents"
474 return Environment.GetFolderPath(Environment.SpecialFolder.Personal);
477 case UIIcon.PlacesMyComputer: {
478 // Default = "My Computer"
479 return Environment.GetFolderPath(Environment.SpecialFolder.MyComputer);
482 case UIIcon.PlacesMyNetwork: {
483 // Default = "My Network Places"
488 throw new ArgumentOutOfRangeException("index", index, "Unsupported place");
493 private Image GetSizedResourceImage(string name, int size) {
495 Image image = ResPool.GetUIImage (name, size);
502 // Try name name_sizexsize
503 fullname = String.Format("{0}_{1}x{1}", name, size);
504 image = ResPool.GetUIImage (fullname, size);
508 image = (Image)Locale.GetResource(fullname);
510 ResPool.AddUIImage (image, fullname, size);
516 fullname = String.Format("{0}_{1}", name, size);
517 image = ResPool.GetUIImage (fullname, size);
521 image = (Image)Locale.GetResource(fullname);
523 ResPool.AddUIImage (image, fullname, size);
528 image = (Image)Locale.GetResource(name);
530 image = new Bitmap (image, new Size (size, size));
531 ResPool.AddUIImage (image, name, size);
537 image = (Image)Locale.GetResource(name);
538 ResPool.AddUIImage (image, name, size);
542 public virtual Image Images(UIIcon index) {
543 return Images(index, 0);
546 public virtual Image Images(UIIcon index, int size) {
548 case UIIcon.PlacesRecentDocuments: return GetSizedResourceImage ("last_open", size);
549 case UIIcon.PlacesDesktop: return GetSizedResourceImage ("desktop", size);
550 case UIIcon.PlacesPersonal: return GetSizedResourceImage ("folder_with_paper", size);
551 case UIIcon.PlacesMyComputer: return GetSizedResourceImage ("monitor-computer", size);
552 case UIIcon.PlacesMyNetwork: return GetSizedResourceImage ("monitor-planet", size);
554 // Icons for message boxes
555 case UIIcon.MessageBoxError: return GetSizedResourceImage ("mbox_error.png", size);
556 case UIIcon.MessageBoxInfo: return GetSizedResourceImage ("mbox_info.png", size);
557 case UIIcon.MessageBoxQuestion: return GetSizedResourceImage ("mbox_question.png", size);
558 case UIIcon.MessageBoxWarning: return GetSizedResourceImage ("mbox_warn.png", size);
561 case UIIcon.NormalFolder: return GetSizedResourceImage ("folder", size);
564 throw new ArgumentException("Invalid Icon type requested", "index");
570 public virtual Image Images(string mimetype, string extension, int size) {
574 #region Principal Theme Methods
575 // 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)
576 public abstract void ResetDefaults();
578 // If the theme writes directly to a window instead of a device context
579 public abstract bool DoubleBufferingSupported {get;}
580 #endregion // Principal Theme Methods
582 #region OwnerDraw Support
583 public abstract void DrawOwnerDrawBackground (DrawItemEventArgs e);
584 public abstract void DrawOwnerDrawFocusRectangle (DrawItemEventArgs e);
585 #endregion // OwnerDraw Support
592 public abstract void DrawButtonBase(Graphics dc, Rectangle clip_area, ButtonBase button);
595 public abstract Size ButtonBaseDefaultSize{get;}
596 #endregion // ButtonBase
599 public abstract void DrawCheckBox(Graphics dc, Rectangle clip_area, CheckBox checkbox);
600 #endregion // CheckBox
602 #region CheckedListBox
604 public abstract void DrawCheckedListBoxItem (CheckedListBox ctrl, DrawItemEventArgs e);
605 public abstract Rectangle CheckedListBoxCheckRectangle ();
606 #endregion // CheckedListBox
610 public abstract void DrawComboBoxEditDecorations (Graphics dc, ComboBox ctrl, Rectangle rect);
611 public abstract void DrawComboListBoxDecorations (Graphics dc, ComboBox ctrl, Rectangle rect);
612 public abstract void DrawComboBoxItem (ComboBox ctrl, DrawItemEventArgs e);
615 public abstract int DrawComboBoxEditDecorationTop ();
616 public abstract int DrawComboBoxEditDecorationBottom ();
617 public abstract int DrawComboBoxEditDecorationRight ();
618 public abstract int DrawComboBoxEditDecorationLeft ();
619 public abstract int DrawComboListBoxDecorationTop (ComboBoxStyle style);
620 public abstract int DrawComboListBoxDecorationBottom (ComboBoxStyle style);
621 public abstract int DrawComboListBoxDecorationRight (ComboBoxStyle style);
622 public abstract int DrawComboListBoxDecorationLeft (ComboBoxStyle style);
623 #endregion // ComboBox
626 #endregion // Control
629 public abstract int DataGridPreferredColumnWidth { get; }
630 public abstract int DataGridMinimumColumnCheckBoxHeight { get; }
631 public abstract int DataGridMinimumColumnCheckBoxWidth { get; }
634 public abstract Color DataGridAlternatingBackColor { get; }
635 public abstract Color DataGridBackColor { get; }
636 public abstract Color DataGridBackgroundColor { get; }
637 public abstract Color DataGridCaptionBackColor { get; }
638 public abstract Color DataGridCaptionForeColor { get; }
639 public abstract Color DataGridGridLineColor { get; }
640 public abstract Color DataGridHeaderBackColor { get; }
641 public abstract Color DataGridHeaderForeColor { get; }
642 public abstract Color DataGridLinkColor { get; }
643 public abstract Color DataGridLinkHoverColor { get; }
644 public abstract Color DataGridParentRowsBackColor { get; }
645 public abstract Color DataGridParentRowsForeColor { get; }
646 public abstract Color DataGridSelectionBackColor { get; }
647 public abstract Color DataGridSelectionForeColor { get; }
649 public abstract void DataGridPaint (PaintEventArgs pe, DataGrid grid);
650 public abstract void DataGridPaintCaption (Graphics g, Rectangle clip, DataGrid grid);
651 public abstract void DataGridPaintColumnsHdrs (Graphics g, Rectangle clip, DataGrid grid);
652 public abstract void DataGridPaintRowsHeaders (Graphics g, Rectangle clip, DataGrid grid);
653 public abstract void DataGridPaintRowHeader (Graphics g, Rectangle bounds, int row, DataGrid grid);
654 public abstract void DataGridPaintRowHeaderArrow (Graphics g, Rectangle bounds, DataGrid grid);
655 public abstract void DataGridPaintRows (Graphics g, Rectangle cells, Rectangle clip, DataGrid grid);
656 public abstract void DataGridPaintRow (Graphics g, int row, Rectangle row_rect, bool is_newrow, DataGrid grid);
659 #endregion // Datagrid
661 #region DateTimePicker
663 public abstract void DrawDateTimePicker(Graphics dc, Rectangle clip_rectangle, DateTimePicker dtp);
665 #endregion // DateTimePicker
669 public abstract void DrawGroupBox (Graphics dc, Rectangle clip_area, GroupBox box);
672 public abstract Size GroupBoxDefaultSize{get;}
673 #endregion // GroupBox
676 public abstract Size HScrollBarDefaultSize{get;} // Default size of the scrollbar
677 #endregion // HScrollBar
681 public abstract void DrawLabel (Graphics dc, Rectangle clip_rectangle, Label label);
684 public abstract Size LabelDefaultSize{get;}
688 public abstract void DrawLinkLabel (Graphics dc, Rectangle clip_rectangle, LinkLabel label);
689 #endregion // LinkLabel
693 public abstract void DrawListBoxItem (ListBox ctrl, DrawItemEventArgs e);
694 #endregion // ListBox
698 public abstract void DrawListViewItems (Graphics dc, Rectangle clip_rectangle, ListView control);
699 public abstract void DrawListViewHeader (Graphics dc, Rectangle clip_rectangle, ListView control);
700 public abstract void DrawListViewHeaderDragDetails (Graphics dc, ListView control, ColumnHeader drag_column, int target_x);
703 public abstract Size ListViewCheckBoxSize { get; }
704 public abstract int ListViewColumnHeaderHeight { get; }
705 public abstract int ListViewDefaultColumnWidth { get; }
706 public abstract int ListViewVerticalSpacing { get; }
707 public abstract int ListViewEmptyColumnWidth { get; }
708 public abstract int ListViewHorizontalSpacing { get; }
709 public abstract Size ListViewDefaultSize { get; }
710 #endregion // ListView
713 public abstract void CalcItemSize (Graphics dc, MenuItem item, int y, int x, bool menuBar);
714 public abstract void CalcPopupMenuSize (Graphics dc, Menu menu);
715 public abstract int CalcMenuBarSize (Graphics dc, Menu menu, int width);
716 public abstract void DrawMenuBar (Graphics dc, Menu menu, Rectangle rect);
717 public abstract void DrawMenuItem (MenuItem item, DrawItemEventArgs e);
718 public abstract void DrawPopupMenu (Graphics dc, Menu menu, Rectangle cliparea, Rectangle rect);
721 #region MonthCalendar
722 public abstract void DrawMonthCalendar(Graphics dc, Rectangle clip_rectangle, MonthCalendar month_calendar);
723 #endregion // MonthCalendar
727 public abstract Size PanelDefaultSize{get;}
732 public abstract void DrawPictureBox (Graphics dc, Rectangle clip, PictureBox pb);
735 public abstract Size PictureBoxDefaultSize{get;}
736 #endregion // PictureBox
740 public abstract void DrawProgressBar (Graphics dc, Rectangle clip_rectangle, ProgressBar progress_bar);
743 public abstract Size ProgressBarDefaultSize{get;}
744 #endregion // ProgressBar
748 public abstract void DrawRadioButton (Graphics dc, Rectangle clip_rectangle, RadioButton radio_button);
751 public abstract Size RadioButtonDefaultSize{get;}
752 #endregion // RadioButton
756 //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);
757 public abstract void DrawScrollBar (Graphics dc, Rectangle clip_rectangle, ScrollBar bar);
760 public abstract int ScrollBarButtonSize {get;} // Size of the scroll button
761 #endregion // ScrollBar
765 public abstract void DrawStatusBar (Graphics dc, Rectangle clip_rectangle, StatusBar sb);
768 public abstract int StatusBarSizeGripWidth {get;} // Size of Resize area
769 public abstract int StatusBarHorzGapWidth {get;} // Gap between panels
770 public abstract Size StatusBarDefaultSize{get;}
771 #endregion // StatusBar
774 public abstract Size TabControlDefaultItemSize { get; }
775 public abstract Point TabControlDefaultPadding { get; }
776 public abstract int TabControlMinimumTabWidth { get; }
778 public abstract Rectangle GetTabControlLeftScrollRect (TabControl tab);
779 public abstract Rectangle GetTabControlRightScrollRect (TabControl tab);
780 public abstract Rectangle GetTabControlDisplayRectangle (TabControl tab);
781 public abstract Size TabControlGetSpacing (TabControl tab);
782 public abstract void DrawTabControl (Graphics dc, Rectangle area, TabControl tab);
787 public abstract void DrawToolBar (Graphics dc, Rectangle clip_rectangle, ToolBar control);
790 public abstract int ToolBarGripWidth {get;} // Grip width for the ToolBar
791 public abstract int ToolBarImageGripWidth {get;} // Grip width for the Image on the ToolBarButton
792 public abstract int ToolBarSeparatorWidth {get;} // width of the separator
793 public abstract int ToolBarDropDownWidth { get; } // width of the dropdown arrow rect
794 public abstract int ToolBarDropDownArrowWidth { get; } // width for the dropdown arrow on the ToolBarButton
795 public abstract int ToolBarDropDownArrowHeight { get; } // height for the dropdown arrow on the ToolBarButton
796 public abstract Size ToolBarDefaultSize{get;}
797 #endregion // ToolBar
800 public abstract void DrawToolTip(Graphics dc, Rectangle clip_rectangle, ToolTip.ToolTipWindow control);
801 public abstract Size ToolTipSize(ToolTip.ToolTipWindow tt, string text);
802 #endregion // ToolTip
807 public abstract void DrawTrackBar (Graphics dc, Rectangle clip_rectangle, TrackBar tb);
810 public abstract Size TrackBarDefaultSize{get; } // Default size for the TrackBar control
811 #endregion // TrackBar
814 public abstract Size VScrollBarDefaultSize{get;} // Default size of the scrollbar
815 #endregion // VScrollBar
818 public abstract Size TreeViewDefaultSize { get; }
821 #region ControlPaint Methods
822 public abstract void CPDrawBorder (Graphics graphics, Rectangle bounds, Color leftColor, int leftWidth,
823 ButtonBorderStyle leftStyle, Color topColor, int topWidth, ButtonBorderStyle topStyle,
824 Color rightColor, int rightWidth, ButtonBorderStyle rightStyle, Color bottomColor,
825 int bottomWidth, ButtonBorderStyle bottomStyle);
827 public abstract void CPDrawBorder3D (Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides);
828 public abstract void CPDrawButton (Graphics graphics, Rectangle rectangle, ButtonState state);
829 public abstract void CPDrawCaptionButton (Graphics graphics, Rectangle rectangle, CaptionButton button, ButtonState state);
830 public abstract void CPDrawCheckBox (Graphics graphics, Rectangle rectangle, ButtonState state);
831 public abstract void CPDrawComboButton (Graphics graphics, Rectangle rectangle, ButtonState state);
832 public abstract void CPDrawContainerGrabHandle (Graphics graphics, Rectangle bounds);
833 public abstract void CPDrawFocusRectangle (Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor);
834 public abstract void CPDrawGrabHandle (Graphics graphics, Rectangle rectangle, bool primary, bool enabled);
835 public abstract void CPDrawGrid (Graphics graphics, Rectangle area, Size pixelsBetweenDots, Color backColor);
836 public abstract void CPDrawImageDisabled (Graphics graphics, Image image, int x, int y, Color background);
837 public abstract void CPDrawLockedFrame (Graphics graphics, Rectangle rectangle, bool primary);
838 public abstract void CPDrawMenuGlyph (Graphics graphics, Rectangle rectangle, MenuGlyph glyph);
839 public abstract void CPDrawRadioButton (Graphics graphics, Rectangle rectangle, ButtonState state);
840 public abstract void CPDrawReversibleFrame (Rectangle rectangle, Color backColor, FrameStyle style);
841 public abstract void CPDrawReversibleLine (Point start, Point end, Color backColor);
842 public abstract void CPDrawScrollButton (Graphics graphics, Rectangle rectangle, ScrollButton button, ButtonState state);
843 public abstract void CPDrawSelectionFrame (Graphics graphics, bool active, Rectangle outsideRect, Rectangle insideRect,
845 public abstract void CPDrawSizeGrip (Graphics graphics, Color backColor, Rectangle bounds);
846 public abstract void CPDrawStringDisabled (Graphics graphics, string s, Font font, Color color, RectangleF layoutRectangle,
847 StringFormat format);
848 public abstract void CPDrawBorderStyle (Graphics dc, Rectangle area, BorderStyle border_style);
849 #endregion // ControlPaint Methods