Leaked source code of windows server 2003
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.

171 lines
5.1 KiB

  1. ;-----------------------------------------------------------------
  2. ; NTL - Native Theme Language - 07/10/00
  3. ;-----------------------------------------------------------------
  4. Overview:
  5. ---------
  6. An .ntl file describes the brushes, lines, rectangles, curves,
  7. and shapes needed to draw control parts.
  8. The .ntl file is uses the standard Windows .ini file format with multiple
  9. sections and multiple "property = value" lines within each section.
  10. There are 2 section types supported:
  11. [OptionBits] - used to declare the option bit names/mappings used by the
  12. drawing sections
  13. [Drawing(xxx)] - used to describe how to draw the state named "xxx"
  14. OptionBits Section:
  15. -------------------
  16. The [OptionBits] section contains properties lines of the form:
  17. <name> = <number>
  18. The <name> declares an option bit, whose bit number is specified by <number>. These
  19. options bits are passed by the theme-aware control in the lower 16 bits of the last DWORD
  20. param to DrawThemeBackground().
  21. Once an optionbit is declared, its value can be tested by an "if" property in the [Drawing.xxx]
  22. sections.
  23. Drawing Sections:
  24. -----------------
  25. There are 3 types of drawing that can be done in a drawing section. A section can contain one
  26. or more of these but each type should complete before the next type starts.
  27. 1. Collapsing Border drawing
  28. In this mode, successive outer borders of a certain color, width, and height are drawn
  29. from the original rectangle specified for the control part inward, towards the center
  30. of the part. Properties allowed in this mode are:
  31. AddBorder = SIZE <size4> COLOR <color4>
  32. FillBorder = COLOR <color>
  33. FillBorder = IMAGEFILE <imagefile>
  34. FillBorder = NONE
  35. Notes:
  36. - "FillRect" fills the adjusted rectangle with the specified color or
  37. by tiling the specified bitmap
  38. 2. FreeHand drawing
  39. In this mode, we describe a brush and then can move, paint lines, and paint curves. There
  40. is no filling involved. The x,y point coordinates range from 0-1000, unless the
  41. "LogicalRect" property is specified to overrides them. These points are mapped at runtime
  42. to the part's actual rectangle.
  43. Properties allowed in this mode are:
  44. LogicalRect = RECT <rect>
  45. FillBrush = COLOR <color>
  46. FillBrush = IMAGEFILE <imagefile>
  47. FillBrush = NONE
  48. LineBrush = COLOR <color> SIZE <size1>
  49. LineBrush = NONE
  50. MoveTo = POINT <point>
  51. LineTo = POINT <point>
  52. CurveTo = CP1 <point> CP2 <point> POINT <point>
  53. 3. Filled Shape drawing
  54. In this mode, we describe a line brush and a fill brush and then describe the lines
  55. and curves of the shape. After the border of the shape is drawn with the
  56. line brush, it is filled with the fill brush. Properties allowed in this mode are:
  57. Shape = POINT <point>
  58. FillBrush = COLOR <color>
  59. FillBrush = IMAGEFILE <imagefile>
  60. FillBrush = NONE
  61. LineBrush = COLOR <color> SIZE <size1>
  62. LineBrush = NONE
  63. LogicalRect = RECT <rect>
  64. LineTo = POINT <point>
  65. CurveTo = CP1 <point> CP2 <point> POINT <point>
  66. EndShape = POINT <point>
  67. Notes:
  68. - A Shape subsection must start with a "Shape" property and end with a
  69. "EndShape" property
  70. - "LineBrush" and "FillBrush" can only be specified once and must be the
  71. first 2 properties after "Shape".
  72. There are also some general properties that can appear anywhere in a section (with the exception of
  73. "GotoState", which if used, must be placed at the end of a section). These properties are:
  74. if = <option bit name> (on)
  75. if = <option bit name> (off)
  76. else = <option bit name> (on)
  77. else = <option bit name> (off)
  78. endif = <option bit name>
  79. SetOption = <option bit name> (on)
  80. SetOption = <option bit name> (off)
  81. GotoState = <state name>
  82. Note: when an "else" property is used, it must match the most recent, unmatched "if" property
  83. and have the opposite on/off setting.
  84. Each "if" property must be matched with an "endif" property of the same
  85. <option bit name>.
  86. Parameters:
  87. -----------
  88. <imagefile>
  89. ::= [ INDEX <number> ]
  90. <color>
  91. ::= <red number> <green number> <blue number>
  92. ::= <system color name (ex: WindowFrame)>
  93. ::= NONE
  94. <color4>
  95. ::= <color>
  96. ::= <color> "," <color>
  97. ::= <color> "," <color> "," <color> "," <color>
  98. <point>
  99. ::= <x number> <y number>
  100. <rect>
  101. ::= <left number> <top number> <right number> <bottom number>
  102. <size1>
  103. ::= <size>
  104. <size2>
  105. ::= <size>
  106. ::= <size> "," <size>
  107. <size4>
  108. ::= <size>
  109. ::= <size> "," <size>
  110. ::= <size> "," <size> "," <size> "," <size>
  111. <size>
  112. ::= <number>
  113. ::= <system metric name (ex: BorderWidth)>