;----------------------------------------------------------------- ; NTL - Native Theme Language - 07/10/00 ;----------------------------------------------------------------- Overview: --------- An .ntl file describes the brushes, lines, rectangles, curves, and shapes needed to draw control parts. The .ntl file is uses the standard Windows .ini file format with multiple sections and multiple "property = value" lines within each section. There are 2 section types supported: [OptionBits] - used to declare the option bit names/mappings used by the drawing sections [Drawing(xxx)] - used to describe how to draw the state named "xxx" OptionBits Section: ------------------- The [OptionBits] section contains properties lines of the form: = The declares an option bit, whose bit number is specified by . These options bits are passed by the theme-aware control in the lower 16 bits of the last DWORD param to DrawThemeBackground(). Once an optionbit is declared, its value can be tested by an "if" property in the [Drawing.xxx] sections. Drawing Sections: ----------------- There are 3 types of drawing that can be done in a drawing section. A section can contain one or more of these but each type should complete before the next type starts. 1. Collapsing Border drawing In this mode, successive outer borders of a certain color, width, and height are drawn from the original rectangle specified for the control part inward, towards the center of the part. Properties allowed in this mode are: AddBorder = SIZE COLOR FillBorder = COLOR FillBorder = IMAGEFILE FillBorder = NONE Notes: - "FillRect" fills the adjusted rectangle with the specified color or by tiling the specified bitmap 2. FreeHand drawing In this mode, we describe a brush and then can move, paint lines, and paint curves. There is no filling involved. The x,y point coordinates range from 0-1000, unless the "LogicalRect" property is specified to overrides them. These points are mapped at runtime to the part's actual rectangle. Properties allowed in this mode are: LogicalRect = RECT FillBrush = COLOR FillBrush = IMAGEFILE FillBrush = NONE LineBrush = COLOR SIZE LineBrush = NONE MoveTo = POINT LineTo = POINT CurveTo = CP1 CP2 POINT 3. Filled Shape drawing In this mode, we describe a line brush and a fill brush and then describe the lines and curves of the shape. After the border of the shape is drawn with the line brush, it is filled with the fill brush. Properties allowed in this mode are: Shape = POINT FillBrush = COLOR FillBrush = IMAGEFILE FillBrush = NONE LineBrush = COLOR SIZE LineBrush = NONE LogicalRect = RECT LineTo = POINT CurveTo = CP1 CP2 POINT EndShape = POINT Notes: - A Shape subsection must start with a "Shape" property and end with a "EndShape" property - "LineBrush" and "FillBrush" can only be specified once and must be the first 2 properties after "Shape". There are also some general properties that can appear anywhere in a section (with the exception of "GotoState", which if used, must be placed at the end of a section). These properties are: if =