colschem.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/univ/colschem.h
  3. // Purpose: wxColourScheme class provides the colours to use for drawing
  4. // Author: Vadim Zeitlin
  5. // Modified by:
  6. // Created: 19.08.00
  7. // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_UNIV_COLSCHEM_H_
  11. #define _WX_UNIV_COLSCHEM_H_
  12. class WXDLLIMPEXP_FWD_CORE wxWindow;
  13. #include "wx/colour.h"
  14. #include "wx/checkbox.h"
  15. // ----------------------------------------------------------------------------
  16. // wxColourScheme
  17. // ----------------------------------------------------------------------------
  18. class WXDLLIMPEXP_CORE wxColourScheme
  19. {
  20. public:
  21. // the standard colours
  22. enum StdColour
  23. {
  24. // the background colour for a window
  25. WINDOW,
  26. // the different background and text colours for the control
  27. CONTROL,
  28. CONTROL_PRESSED,
  29. CONTROL_CURRENT,
  30. // the label text for the normal and the disabled state
  31. CONTROL_TEXT,
  32. CONTROL_TEXT_DISABLED,
  33. CONTROL_TEXT_DISABLED_SHADOW,
  34. // the scrollbar background colour for the normal and pressed states
  35. SCROLLBAR,
  36. SCROLLBAR_PRESSED,
  37. // the background and text colour for the highlighted item
  38. HIGHLIGHT,
  39. HIGHLIGHT_TEXT,
  40. // these colours are used for drawing the shadows of 3D objects
  41. SHADOW_DARK,
  42. SHADOW_HIGHLIGHT,
  43. SHADOW_IN,
  44. SHADOW_OUT,
  45. // the titlebar background colours for the normal and focused states
  46. TITLEBAR,
  47. TITLEBAR_ACTIVE,
  48. // the titlebar text colours
  49. TITLEBAR_TEXT,
  50. TITLEBAR_ACTIVE_TEXT,
  51. // the default gauge fill colour
  52. GAUGE,
  53. // desktop background colour (only used by framebuffer ports)
  54. DESKTOP,
  55. // wxFrame's background colour
  56. FRAME,
  57. MAX
  58. };
  59. // get a standard colour
  60. virtual wxColour Get(StdColour col) const = 0;
  61. // get the background colour for the given window
  62. virtual wxColour GetBackground(wxWindow *win) const = 0;
  63. // virtual dtor for any base class
  64. virtual ~wxColourScheme() {}
  65. };
  66. // some people just can't spell it correctly :-)
  67. typedef wxColourScheme wxColorScheme;
  68. // ----------------------------------------------------------------------------
  69. // macros
  70. // ----------------------------------------------------------------------------
  71. // retrieve the default colour from the theme or the given scheme
  72. #define wxSCHEME_COLOUR(scheme, what) scheme->Get(wxColorScheme::what)
  73. #define wxTHEME_COLOUR(what) \
  74. wxSCHEME_COLOUR(wxTheme::Get()->GetColourScheme(), what)
  75. // get the background colour for the window in the current theme
  76. #define wxTHEME_BG_COLOUR(win) \
  77. wxTheme::Get()->GetColourScheme()->GetBackground(win)
  78. #endif // _WX_UNIV_COLSCHEM_H_