Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

221 lines
6.5 KiB

  1. //-----------------------------------------------------------------------------
  2. // File: uielements.h
  3. //
  4. // Desc: Defines various UI element definitions used throughout the UI.
  5. //
  6. // Copyright (C) 1999-2000 Microsoft Corporation. All Rights Reserved.
  7. //-----------------------------------------------------------------------------
  8. #ifndef __DEFINE_ELEMENT_STRUCTURES__
  9. #ifndef __UIELEMENTS_H_ENUMS__
  10. #define __UIELEMENTS_H_ENUMS__
  11. enum UIELEMENT {
  12. UIE_VOID,
  13. //
  14. UIE_TAB,
  15. UIE_TABARROW,
  16. UIE_SELTAB,
  17. UIE_BUTTON,
  18. UIE_DEFBUTTON,
  19. UIE_BORDER,
  20. UIE_VIEWSEL,
  21. UIE_DEVOBJ,
  22. UIE_GLYPH,
  23. UIE_CALLOUT,
  24. UIE_CALLOUTHIGH,
  25. UIE_CALLOUTSHADOW,
  26. UIE_CALLOUTMAX,
  27. UIE_CALLOUTALIGN,
  28. UIE_VIEWBORDER,
  29. UIE_SBTRACK,
  30. UIE_SBTHUMB,
  31. UIE_SBBUTTON,
  32. UIE_USERNAMES,
  33. UIE_USERNAMESEL,
  34. UIE_ACTION,
  35. UIE_ACTIONLABEL,
  36. UIE_PICERRORTEXT,
  37. UIE_PICCUSTOMTEXT,
  38. UIE_PICCUSTOM2TEXT,
  39. UIE_ERRORHEADER,
  40. UIE_ERRORMESSAGE,
  41. };
  42. enum UIFONT {
  43. UIF_VOID,
  44. UIF_LAST,
  45. //
  46. UIF_FRAME,
  47. UIF_DEVOBJ,
  48. UIF_CALLOUT,
  49. UIF_ACTION,
  50. UIF_ACTIONLABEL,
  51. UIF_INFO,
  52. UIF_VIEWSEL,
  53. UIF_PICERROR,
  54. UIF_PICCUSTOM,
  55. UIF_PICCUSTOM2,
  56. UIF_ERRORHEADER,
  57. UIF_ERRORMESSAGE,
  58. };
  59. enum UIBRUSH {
  60. UIB_VOID,
  61. UIB_LAST,
  62. UIB_NULL,
  63. //
  64. UIB_BLACK,
  65. UIB_AREAFILL,
  66. UIB_HIGHLIGHTFILL,
  67. UIB_SB,
  68. };
  69. enum UIPEN {
  70. UIP_VOID,
  71. UIP_LAST,
  72. UIP_NULL,
  73. //
  74. UIP_BORDER,
  75. UIP_BLACK,
  76. UIP_AREAFILL,
  77. UIP_TEXTFORE,
  78. UIP_VIEWSELGRID,
  79. UIP_CALLOUTLINE,
  80. UIP_CALLOUTHIGHLIGHT,
  81. UIP_CALLOUTMAX,
  82. UIP_CALLOUTALIGN,
  83. UIP_VIEWBORDER,
  84. UIP_SELTHUMB,
  85. };
  86. enum UICOLOR {
  87. UIC_VOID,
  88. UIC_LAST,
  89. UIC_NULL,
  90. //
  91. UIC_BLACK,
  92. UIC_WHITE,
  93. UIC_RED,
  94. //
  95. UIC_TEXTFORE,
  96. UIC_TEXTHIGHLIGHT,
  97. UIC_CALLOUTLINE,
  98. UIC_CALLOUTHIGHLIGHT,
  99. UIC_BORDER,
  100. UIC_CONTROLFILL,
  101. UIC_HIGHLIGHTFILL,
  102. UIC_AREAFILL,
  103. //
  104. UIC_PICERRORTEXT,
  105. };
  106. #endif //__UIELEMENTS_H_ENUMS__
  107. #else // __DEFINE_ELEMENT_STRUCTURES__
  108. #ifndef __UIELEMENTS_H_TABLES__
  109. #define __UIELEMENTS_H_TABLES__
  110. static const UIELEMENTINFO uielement[] = {
  111. {UIE_TAB, UIF_FRAME, UIB_NULL, UIP_BORDER, UIC_BORDER, UIC_NULL},
  112. {UIE_TABARROW, UIF_LAST, UIB_BLACK, UIP_BORDER, UIC_LAST, UIC_LAST},
  113. {UIE_SELTAB, UIF_FRAME, UIB_HIGHLIGHTFILL, UIP_BORDER, UIC_BORDER, UIC_NULL},
  114. {UIE_BUTTON, UIF_FRAME, UIB_NULL, UIP_AREAFILL, UIC_AREAFILL, UIC_NULL},
  115. {UIE_DEFBUTTON, UIF_FRAME, UIB_HIGHLIGHTFILL, UIP_BORDER, UIC_BORDER, UIC_NULL},
  116. {UIE_BORDER, UIF_LAST, UIB_NULL, UIP_BORDER, UIC_LAST, UIC_LAST},
  117. {UIE_VIEWSEL, UIF_VIEWSEL, UIB_NULL, UIP_NULL, UIC_TEXTFORE, UIC_NULL},
  118. {UIE_DEVOBJ, UIF_DEVOBJ, UIB_LAST, UIP_LAST, UIC_TEXTFORE, UIC_BLACK},
  119. {UIE_GLYPH, UIF_LAST, UIB_LAST, UIP_LAST, UIC_TEXTFORE, UIC_NULL},
  120. {UIE_CALLOUT, UIF_CALLOUT, UIB_AREAFILL, UIP_CALLOUTLINE, UIC_TEXTFORE, UIC_AREAFILL},
  121. {UIE_CALLOUTHIGH, UIF_CALLOUT, UIB_AREAFILL, UIP_CALLOUTHIGHLIGHT, UIC_TEXTHIGHLIGHT, UIC_AREAFILL},
  122. {UIE_CALLOUTSHADOW, UIF_LAST, UIB_LAST, UIP_AREAFILL, UIC_LAST, UIC_LAST},
  123. {UIE_CALLOUTMAX, UIF_LAST, UIB_NULL, UIP_CALLOUTMAX, UIC_LAST, UIC_NULL},
  124. {UIE_CALLOUTALIGN, UIF_LAST, UIB_LAST, UIP_CALLOUTALIGN, UIC_LAST, UIC_LAST},
  125. {UIE_VIEWBORDER, UIF_LAST, UIB_NULL, UIP_VIEWBORDER, UIC_LAST, UIC_NULL},
  126. {UIE_SBTRACK, UIF_LAST, UIB_AREAFILL, UIP_NULL, UIC_LAST, UIC_LAST},
  127. {UIE_SBTHUMB, UIF_LAST, UIB_SB, UIP_NULL, UIC_LAST, UIC_LAST},
  128. {UIE_SBBUTTON, UIF_LAST, UIB_SB, UIP_BORDER, UIC_LAST, UIC_LAST},
  129. {UIE_USERNAMES, UIF_LAST, UIB_SB, UIP_BORDER, UIC_TEXTFORE, UIC_AREAFILL},
  130. {UIE_USERNAMESEL, UIF_LAST, UIB_LAST, UIP_LAST, UIC_AREAFILL, UIC_TEXTFORE},
  131. {UIE_ACTION, UIF_ACTION, UIB_LAST, UIP_LAST, UIC_TEXTFORE, UIC_NULL},
  132. {UIE_ACTIONLABEL, UIF_ACTIONLABEL, UIB_LAST, UIP_LAST, UIC_TEXTFORE, UIC_NULL},
  133. {UIE_PICERRORTEXT, UIF_PICERROR, UIB_LAST, UIP_LAST, UIC_PICERRORTEXT, UIC_BLACK},
  134. {UIE_PICCUSTOMTEXT, UIF_PICCUSTOM, UIB_LAST, UIP_LAST, UIC_PICERRORTEXT, UIC_BLACK},
  135. {UIE_PICCUSTOM2TEXT,UIF_PICCUSTOM2, UIB_LAST, UIP_LAST, UIC_PICERRORTEXT, UIC_BLACK},
  136. {UIE_ERRORHEADER, UIF_ERRORHEADER, UIB_LAST, UIP_LAST, UIC_PICERRORTEXT, UIC_BLACK},
  137. {UIE_ERRORMESSAGE, UIF_ERRORMESSAGE, UIB_LAST, UIP_LAST, UIC_PICERRORTEXT, UIC_BLACK},
  138. };
  139. static const UIFONTINFO uifont[] = {
  140. {UIF_FRAME, _T("System"), 9, TRUE, NULL},
  141. {UIF_DEVOBJ, _T("System"), 10, TRUE, NULL},
  142. {UIF_CALLOUT, _T("System"), 10, FALSE, NULL},
  143. {UIF_ACTION, _T("System"), 8, FALSE, NULL},
  144. {UIF_ACTIONLABEL, _T("System"), 12, TRUE, NULL},
  145. {UIF_INFO, _T("System"), 9, TRUE, NULL},
  146. {UIF_VIEWSEL, _T("System"), 8, TRUE, NULL},
  147. {UIF_PICERROR, _T("Arial"), 30, TRUE, NULL},
  148. {UIF_PICCUSTOM, _T("Arial"), 30, TRUE, NULL},
  149. {UIF_PICCUSTOM2, _T("Arial"), 15, TRUE, NULL},
  150. {UIF_ERRORHEADER, _T("Arial"), 60, TRUE, NULL},
  151. {UIF_ERRORMESSAGE, _T("Arial"), 30, TRUE, NULL},
  152. };
  153. static const UIBRUSHINFO uibrush[] = {
  154. {UIB_BLACK, UIC_BLACK, NULL, NULL},
  155. {UIB_AREAFILL, UIC_AREAFILL, NULL, NULL},
  156. {UIB_HIGHLIGHTFILL, UIC_HIGHLIGHTFILL, NULL, NULL},
  157. {UIB_SB, UIC_CONTROLFILL, NULL, NULL},
  158. };
  159. static const UIPENINFO uipen[] = {
  160. {UIP_BORDER, PS_SOLID, 1, UIC_BORDER, NULL},
  161. {UIP_BLACK, PS_SOLID, 1, UIC_BLACK, NULL},
  162. {UIP_AREAFILL, PS_SOLID, 1, UIC_AREAFILL, NULL},
  163. {UIP_TEXTFORE, PS_SOLID, 1, UIC_TEXTFORE, NULL},
  164. {UIP_VIEWSELGRID, PS_SOLID, 1, UIC_WHITE, NULL},
  165. {UIP_CALLOUTLINE, PS_SOLID, 1, UIC_CALLOUTLINE, NULL},
  166. {UIP_CALLOUTHIGHLIGHT, PS_SOLID, 1, UIC_CALLOUTHIGHLIGHT, NULL},
  167. {UIP_CALLOUTMAX, PS_DOT, 1, UIC_WHITE, NULL},
  168. {UIP_CALLOUTALIGN, PS_SOLID, 1, UIC_RED, NULL},
  169. {UIP_VIEWBORDER, PS_DOT, 1, UIC_RED, NULL},
  170. {UIP_SELTHUMB, PS_SOLID, 3, UIC_WHITE, NULL},
  171. };
  172. static const UICOLORINFO uicolor[] = {
  173. {UIC_WHITE, RGB(255, 255, 255)},
  174. {UIC_BLACK, RGB( 0, 0, 0)},
  175. {UIC_RED, RGB(255, 0, 0)},
  176. //
  177. {UIC_TEXTFORE, RGB(191, 0, 0)},
  178. {UIC_TEXTHIGHLIGHT, RGB(255, 0, 0)},
  179. {UIC_CALLOUTLINE, RGB(191, 0, 0)},
  180. {UIC_CALLOUTHIGHLIGHT, RGB(255, 0, 0)},
  181. {UIC_BORDER, RGB(255, 0, 0)},
  182. {UIC_CONTROLFILL, RGB(127, 0, 0)},
  183. {UIC_HIGHLIGHTFILL, RGB( 0, 0, 0)},
  184. {UIC_AREAFILL, RGB( 0, 0, 0)},
  185. //
  186. {UIC_PICERRORTEXT, RGB(128, 128, 128)},
  187. };
  188. const int NUMUIELEMENTS = sizeof(uielement) / sizeof(UIELEMENTINFO);
  189. const int NUMUIFONTS = sizeof(uifont) / sizeof(UIFONTINFO);
  190. const int NUMUIBRUSHES = sizeof(uibrush) / sizeof(UIBRUSHINFO);
  191. const int NUMUIPENS = sizeof(uipen) / sizeof(UIPENINFO);
  192. const int NUMUICOLORS = sizeof(uicolor) / sizeof(UICOLORINFO);
  193. #endif // __UIELEMENTS_H_TABLES__
  194. #endif //__DEFINE_ELEMENT_STRUCTURES__