dockart.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: aui/dockart.h
  3. // Purpose: interface of wxAuiDockArt
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /**
  8. These are the possible pane dock art settings for wxAuiDefaultDockArt.
  9. @library{wxaui}
  10. @category{aui}
  11. */
  12. enum wxAuiPaneDockArtSetting
  13. {
  14. /// Customizes the sash size
  15. wxAUI_DOCKART_SASH_SIZE = 0,
  16. /// Customizes the caption size
  17. wxAUI_DOCKART_CAPTION_SIZE = 1,
  18. /// Customizes the gripper size
  19. wxAUI_DOCKART_GRIPPER_SIZE = 2,
  20. /// Customizes the pane border size
  21. wxAUI_DOCKART_PANE_BORDER_SIZE = 3,
  22. /// Customizes the pane button size
  23. wxAUI_DOCKART_PANE_BUTTON_SIZE = 4,
  24. /// Customizes the background colour, which corresponds to the client area.
  25. wxAUI_DOCKART_BACKGROUND_COLOUR = 5,
  26. /// Customizes the sash colour
  27. wxAUI_DOCKART_SASH_COLOUR = 6,
  28. /// Customizes the active caption colour
  29. wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR = 7,
  30. /// Customizes the active caption gradient colour
  31. wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8,
  32. /// Customizes the inactive caption colour
  33. wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR = 9,
  34. /// Customizes the inactive gradient caption colour
  35. wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10,
  36. /// Customizes the active caption text colour
  37. wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR = 11,
  38. /// Customizes the inactive caption text colour
  39. wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR = 12,
  40. /// Customizes the border colour
  41. wxAUI_DOCKART_BORDER_COLOUR = 13,
  42. /// Customizes the gripper colour
  43. wxAUI_DOCKART_GRIPPER_COLOUR = 14,
  44. /// Customizes the caption font
  45. wxAUI_DOCKART_CAPTION_FONT = 15,
  46. /// Customizes the gradient type (no gradient, vertical or horizontal)
  47. wxAUI_DOCKART_GRADIENT_TYPE = 16
  48. };
  49. /**
  50. These are the possible gradient dock art settings for wxAuiDefaultDockArt
  51. */
  52. enum wxAuiPaneDockArtGradients
  53. {
  54. /// No gradient on the captions, in other words a solid colour
  55. wxAUI_GRADIENT_NONE = 0,
  56. /// Vertical gradient on the captions, in other words a gradal change in colours from top to bottom
  57. wxAUI_GRADIENT_VERTICAL = 1,
  58. /// Horizontal gradient on the captions, in other words a gradual change in colours from left to right
  59. wxAUI_GRADIENT_HORIZONTAL = 2
  60. };
  61. /**
  62. These are the possible pane button / wxAuiNotebook button / wxAuiToolBar button states.
  63. */
  64. enum wxAuiPaneButtonState
  65. {
  66. /// Normal button state
  67. wxAUI_BUTTON_STATE_NORMAL = 0,
  68. /// Hovered button state
  69. wxAUI_BUTTON_STATE_HOVER = 1 << 1,
  70. /// Pressed button state
  71. wxAUI_BUTTON_STATE_PRESSED = 1 << 2,
  72. /// Disabled button state
  73. wxAUI_BUTTON_STATE_DISABLED = 1 << 3,
  74. /// Hidden button state
  75. wxAUI_BUTTON_STATE_HIDDEN = 1 << 4,
  76. /// Checked button state
  77. wxAUI_BUTTON_STATE_CHECKED = 1 << 5
  78. };
  79. /**
  80. These are the possible pane button / wxAuiNotebook button / wxAuiToolBar button identifiers.
  81. */
  82. enum wxAuiButtonId
  83. {
  84. /// Shows a close button on the pane
  85. wxAUI_BUTTON_CLOSE = 101,
  86. /// Shows a maximize/restore button on the pane
  87. wxAUI_BUTTON_MAXIMIZE_RESTORE = 102,
  88. /// Shows a minimize button on the pane
  89. wxAUI_BUTTON_MINIMIZE = 103,
  90. /**
  91. Shows a pin button on the pane
  92. */
  93. wxAUI_BUTTON_PIN = 104,
  94. /**
  95. Shows an option button on the pane (not implemented)
  96. */
  97. wxAUI_BUTTON_OPTIONS = 105,
  98. /**
  99. Shows a window list button on the pane (for wxAuiNotebook)
  100. */
  101. wxAUI_BUTTON_WINDOWLIST = 106,
  102. /**
  103. Shows a left button on the pane (for wxAuiNotebook)
  104. */
  105. wxAUI_BUTTON_LEFT = 107,
  106. /**
  107. Shows a right button on the pane (for wxAuiNotebook)
  108. */
  109. wxAUI_BUTTON_RIGHT = 108,
  110. /**
  111. Shows an up button on the pane (not implemented)
  112. */
  113. wxAUI_BUTTON_UP = 109,
  114. /**
  115. Shows a down button on the pane (not implemented)
  116. */
  117. wxAUI_BUTTON_DOWN = 110,
  118. /**
  119. Shows one of three possible custom buttons on the pane (not implemented)
  120. */
  121. wxAUI_BUTTON_CUSTOM1 = 201,
  122. /**
  123. Shows one of three possible custom buttons on the pane (not implemented)
  124. */
  125. wxAUI_BUTTON_CUSTOM2 = 202,
  126. /**
  127. Shows one of three possible custom buttons on the pane (not implemented)
  128. */
  129. wxAUI_BUTTON_CUSTOM3 = 203
  130. };
  131. /**
  132. @class wxAuiDockArt
  133. wxAuiDockArt is part of the wxAUI class framework.
  134. See also @ref overview_aui.
  135. wxAuiDockArt is the art provider: provides all drawing functionality to the
  136. wxAui dock manager. This allows the dock manager to have a plugable look-and-feel.
  137. By default, a wxAuiManager uses an instance of this class called
  138. wxAuiDefaultDockArt which provides bitmap art and a colour scheme that is
  139. adapted to the major platforms' look. You can either derive from that class
  140. to alter its behaviour or write a completely new dock art class.
  141. Call wxAuiManager::SetArtProvider to force wxAUI to use your new dock art provider.
  142. @library{wxaui}
  143. @category{aui}
  144. @see wxAuiManager, wxAuiPaneInfo
  145. */
  146. class wxAuiDockArt
  147. {
  148. public:
  149. /**
  150. Constructor.
  151. */
  152. wxAuiDockArt();
  153. /**
  154. Destructor.
  155. */
  156. virtual ~wxAuiDockArt();
  157. /**
  158. Draws a background.
  159. */
  160. virtual void DrawBackground(wxDC& dc, wxWindow* window, int orientation,
  161. const wxRect& rect) = 0;
  162. /**
  163. Draws a border.
  164. */
  165. virtual void DrawBorder(wxDC& dc, wxWindow* window, const wxRect& rect,
  166. wxAuiPaneInfo& pane) = 0;
  167. /**
  168. Draws a caption.
  169. */
  170. virtual void DrawCaption(wxDC& dc, wxWindow* window, const wxString& text,
  171. const wxRect& rect, wxAuiPaneInfo& pane) = 0;
  172. /**
  173. Draws a gripper.
  174. */
  175. virtual void DrawGripper(wxDC& dc, wxWindow* window, const wxRect& rect,
  176. wxAuiPaneInfo& pane) = 0;
  177. /**
  178. Draws a button in the pane's title bar.
  179. @a button can be one of the values of @b wxAuiButtonId.
  180. @a button_state can be one of the values of @b wxAuiPaneButtonState.
  181. */
  182. virtual void DrawPaneButton(wxDC& dc, wxWindow* window, int button,
  183. int button_state, const wxRect& rect,
  184. wxAuiPaneInfo& pane) = 0;
  185. /**
  186. Draws a sash between two windows.
  187. */
  188. virtual void DrawSash(wxDC& dc, wxWindow* window, int orientation,
  189. const wxRect& rect) = 0;
  190. /**
  191. Get the colour of a certain setting.
  192. @a id can be one of the colour values of @b wxAuiPaneDockArtSetting.
  193. */
  194. virtual wxColour GetColour(int id) = 0;
  195. /**
  196. Get a font setting.
  197. */
  198. virtual wxFont GetFont(int id) = 0;
  199. /**
  200. Get the value of a certain setting.
  201. @a id can be one of the size values of @b wxAuiPaneDockArtSetting.
  202. */
  203. virtual int GetMetric(int id) = 0;
  204. /**
  205. Set a certain setting with the value @e colour.
  206. @a id can be one of the colour values of @b wxAuiPaneDockArtSetting.
  207. */
  208. virtual void SetColour(int id, const wxColour& colour) = 0;
  209. /**
  210. Set a font setting.
  211. */
  212. virtual void SetFont(int id, const wxFont& font) = 0;
  213. /**
  214. Set a certain setting with the value @e new_val.
  215. @a id can be one of the size values of @b wxAuiPaneDockArtSetting.
  216. */
  217. virtual void SetMetric(int id, int new_val) = 0;
  218. };