📄 skin.ini_description_en.txt
字号:
* TopBottom
* LeftTop
* LeftBottom
* RightTop
* RightBottom
- TransformOutO - can be set to 1;
- TransformInvertO - cen be set to 1;
- TransformN - the same as TransformO, but for a new image;
- TransformDirN - the same as TransformDirO, but for a new image;
- TransformOutN - can be set to 1;
- TransformInvertN - can be set to 1;
- TransformOffset - any integer value;
- TransformOldOnTop - can be set to 1 if a new image should be drawn
first, and only then an old one;
- TransformDrawCaption - can be set to 1;
- StepsNum - integer number of transformation frames.
- Transform - using one of transform effect presets:
* None
* SlideLeft
* SlideTop
* SlideRight
* SlideBottom
* SlideLeftTop
* SlideLeftBottom
* SlideRightTop
* SlideRightBottom
* OverDrawLeft
* OverDrawTop
* OverDrawRight
* OverDrawBottom
* OverDrawLeftTop
* OverDrawLeftBottom
* OverDrawRightTop
* OverDrawRightBottom
* OverDrawLeftRight
* OverDrawTopBottom
* OverDrawLeftRightOut
* OverDrawTopBottomOut
===================================
4. Description of static sections
===================================
4.1. BasedOn
============
This section is not obligatory. Format of this section:
[BasedOn]
1=Skin1_Name\skin.ini
2=Skin2_Name\skin.sxs
3=Skin3_Name.zip
As stated in the example, you can specify a skin files paths list:
INI, SXS and ZIP files are supported.
If a skin file is listed in BasedOn section, it means that it is
loaded (all styles from this skin files are loaded) before the styles
from the current skin file.
4.2. Strings
============
This section is obligatory for those skins, which should be added to
the Select Skin dialog. In such files SkinName property must exist too:
[String]
SkinName=WindowsXP Blue Scheme
You can add any properties for your personal use to this section.
Also this section contains skin-file internal variables. Format of
internal variable declaration:
VariableName=VariableValue
Later you can use this variable in the skin-file:
SomePropertyName=$VariableName
Internal variables usage example:
[String]
DefaultFont=Arial
DefaultFontSize=12
[_Label]
N_FontName=$DefaultFont
N_FontSize=$DefaultFontSize
================
5. Skin styles
================
Every skin styles is defined in a separate section. All sections
except BasedOn and Strings define skin styles. Section name is set to
skin style name. The first (but not obligatory) property in a section is
BaseSkin (unlike it's name, this property points to skin style, not
skin). BaseSkin can be used for copying all parameters from another skin
style to the current skin style. See example:
[MySkinStyle1]
Property1=Value1
Property2=Value2
[MySkinStyle2]
BaseSkin=MySkinStyle1
Property1=Value3
In this example the skin style MySkinStyle2 will have Property1 set
to Value3 and Property2 set to Value2.
========================
6. General skin styles
========================
All skin style those don't have special prefixes in their names
(e.g. _Label or _Button) are general skin styles.
General skin is a set of rules, which are used for drawing some
static image (e.g. button face or group box border).
6.1. General skin style properties
==================================
These properties can be used with general skin styles:
- Transparent - can be set to 1, shouldn't be set if skin style is
opaque, this accelerates drawing routines;
- MouseCapture - can be one of these values:
* ByTransparency;
* Full (default);
Also you can specify Mouse Capture Region as value of this
property (see section 2.4).
- MouseCaptureTransparencyLimit - integer between 0 and 255,
inclusive. Is used only when MouseCapture=ByTransparency.
By default, MouseCaptureTransparencyLimit=250;
- UseBuffering - can be set to 1 if a style should be first painted
to a temporary bitmap and only then to a destination bitmap.
6.2. Skin style elements
========================
Skin style consists of a skin style elements list. To add a new element
to a skin style use this syntax:
ElementX=ElementName,ElementType
ElementX means Element1,Element2,...,Element12,Element13,...
depending on the number of the current element.
ElementName is user-defined, but I recommend to use the shortest forms
of ElementName: E1,E2,E3,E4,...
ElementType is one of:
- IMAGE - defines Image Element;
- PNG_IMAGE (do not use, use IMAGE instead);
- JPEG_IMAGE (do not use, use IMAGE instead);
- BOX_TILE - defines BoxTile Element;
- RECT - defines Figure Element;
- ELLIPSE - defines Figure Element;
- CIRCLE - defines Figure Element;
- ROUND_RECT - defines Figure Element;
- LINE - defines Figure Element;
- POLYGON - defines Figure Element;
- SOLID_FILL - defines Figure Element;
- FOCUS_RECT - defines Figure Element;
- ERASE_RECT - defines Figure Element;
- TEXT - defines Text Element;
- STYLE - defines Style Element.
For each element you can specify properties in this way:
ElementName.PropertyName=PropertyValue
Make sure that ElementName was added before setting it's property.
IMAGE ELEMENT
-------------
Properties of Image Element:
- Path - relative path to JPEG or PNG file;
- Transparent - should be set to 1 if image is not opaque. This
properties is used for drawing acceleration only.
- ResizeMode - one of these values:
* None (default)
* Tile
* Stretch
- Stretch - one of these values (is used if ResizeMode=Stretch):
* Nearest (default)
* Linear
* Spline
* Lanczos
* Mitchell
- OffsetX - integer value (is used if ResizeMode=Tile);
- OffsetY - integer value (is used if ResizeMode=Tile);
- Width - integer value (is used when ResizeMode isn't None);
- Height - integer value (is used when ResizeMode isn't None);
- Rect - image painting destination (see section 2.2);
- Centered - can be set to "1" if image shouldn't be scaled and has
to be horizontally and vertically centered;
- filter properties with no prefix used (see section 3.2).
BOXTILE ELEMENT
---------------
BoxTile is an element, which consists of 9 images:
11222222222233
44555555555566
44555555555566
77888888888899
Properties of BoxTile Element:
- Transparent - should be set to 1 if style is not opaque;
- Center - path to the center image;
- Left - path to the left image;
- Top - path to the top image;
- Right - path to the right image;
- Bottom - path to the bottom image;
- TopLeft - path to the top left corner image;
- TopRight - path to the top right corner image;
- BottomRight - path to the bottom right corner image;
- BottomLeft - path to the bottom left corner image;
- Paths - this property is used for fast setting of all path
properties. Format of the Paths property:
ElementName.Paths=Some_Path\prefix_*.png
Asterisk is replaced with "center", "left", "right", "bottom",
"topleft", "topright", "bottomright" and "bottomleft" for
appropriate path properties;
- Rect - drawing destination rectangle (see section 2.2);
- ResizeMode - one of Stretch and Tile, is used for Top, Left, Right,
Bottom and Center images;
- filter properties with no prefix used (see section 3.2).
FIGURE ELEMENT
--------------
Properties of Figure Element:
- HasBorder - is set to 1 if a border is drawn;
- HasFill - is set to 1 if a figure is filled;
- Antialiased - is set to 0 if antialiasing shouldn't be used;
- Rect - drawing destination rectangle, is used when ElementType is
one of RECT, ELLIPSE, CIRCLE, ROUND_RECT, FOCUS_RECT and ERASE_RECT
(see section 2.2);
- Poly - polygon or polyline coordinations, is used when ElementType
equals to LINE or POLYGON (see section 2.3);
- Fill - is one of these values (is used when HasFill=1):
* SOLID (default);
* GRADIENT_V - vertical gradient;
* GRADIENT_H - horizontal gradient.
- BorderColor - is used when HasBorder=1 (see section 2.1);
- FillColor - is used when HasFill=1 and Fill=SOLID (see section 2.1);
- FillColor1 - is used when HasFill=1 and Fill is not equal to SOLID,
defines the left color for horizontal fill and the top color for
vertical fill (see section 2.1);
- FillColor2 - is used when HasFill=1 and Fill is not equal to SOLID,
defines the right color for horizontal fill and the bottom color
for vertical fill (see section 2.1);
- Roundness - integer number for ElementType equal to ROUND_RECT;
- CornersStyle - is used for ROUND_RECT, defines, which corners of
a round rectange must be rounded:
| Left Top | Right Top | Right Bottom | Left Bottom |
* 0 | - | - | - | - |
* 1 | + | - | - | - |
* 2 | - | + | - | - |
* 3 | + | + | - | - |
* 4 | - | - | + | - |
* 5 | + | - | + | - |
* 6 | - | + | + | - |
* 7 | + | + | + | - |
* 8 | - | - | - | + |
* 9 | + | - | - | + |
* 10 | - | + | - | + |
* 11 | + | + | - | + |
* 12 | - | - | + | + |
* 13 | + | - | + | + |
* 14 | - | + | + | + |
* 15 | + | + | + | + |
"+" - corner is rounded, "-" - corner is sharp.
As you noted, binary form is used here.
- BorderThickness - floating-point number, default value is 1.
I recommend to use 1 for RECT, ELLIPSE (CIRCLE) and
ROUND_RECT - this makes painting mush faster.
TEXT ELEMENT
------------
Properties of Text Element:
- Text - text string, which is drawn;
- Align - horizontal text alignment in a destination rectangle:
can be set to Left (default), Right or Center;
- VAlign - vertical text alignment in a destination rectangle:
can be set to Top (default), Bottom or Center;
- Rect - defines a destination rectangle (see section 2.2).
STYLE ELEMENT
-------------
Properties of Style Element:
- Style - a name of a General or Selective skin style;
- Rect - defines a destination drawing rectangle (see section 2.2);
- filter properties with no prefix used (see section 3.2).
==========================
7. Selective skin styles
==========================
Selective-style is a set of rules, those indicates, which general skin
style to use depending on drawing region width and height. For example,
selective-style can be useful in this situation: you have to draw an icon
of variable size (e.g. 10x10, 27x27, 38x38, 123x123, ...) in your program,
but you have some icons of standard size: 16x16, 32x32 and 128x128. Always
to use 128x128-icon is not a good idea, because it contains some little
elements, which looks disgustingly for size 32x32 and lower. So you should
select appropriate icon depending on destination region width:
if width<=16px then use 16x16-icon
else if width<=32px then use 32x32-icon
else use 128x128-icon
Names of selective-styles must have "_Selective" at the beginning.
Section, which defines a selective-style contains these properties:
- any number of conditional styles selections in format:
StyleX=Condition,StyleName
where StyleX is Style1, Style2, ... , Style10, Style11, ...
Condition is conditional expression with these variables:
* W - destination region width;
* H - destination region height.
See section 9 to find arithmetic operations, which can be
used in Condition.
StyleName is a general skin style name.
- default skin style, which is used when none of condition is
fulfilled. Syntax, which is used to define default skin style:
Default=StyleName
Conditions are checked in order they are defined.
Example (with conditions described above):
[_Selective_MainIcon]
Style1=W<=16,Icon16
Style2=W<=32,Icon32
Default=Icon128
===========================================
8. Component-associated styles properties
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -