Style module - SPStyleInterface

Module for manipulating single styles in the styles collection.

Constants

Styles number

See the Styles module.

Property  number

Use this to specify which property should be manipulated by a particular getter or setter function - what_prop parameter. Always use the constants, the actual numbers may change in future versions of SP.
Boolean
STYLE_RESOLVE = 1
STYLE_LOCAL = 2
STYLE_EMBEDABLE = 3
STYLE_FONT_B = 4
STYLE_FONT_I = 5
STYLE_FONT_U = 6
STYLE_FONT_S = 7

Text
STYLE_NAME = 11
STYLE_FONT_NAME = 12
Floating point
STYLE_ASS_ANGLE = 31
Integer
STYLE_FONT_SIZE = 41
STYLE_FONT_CHARSET = 42
STYLE_COLOR1 = 43
STYLE_COLOR2 = 44
STYLE_COLOR3 = 45
STYLE_COLORS = 46
STYLE_BORDER_STYLE = 47
STYLE_OUTLINE_W = 48
STYLE_SHADOW_W = 49
STYLE_SUB_POSITION = 50
STYLE_ALIGN = 51
STYLE_MARGIN_L = 52
STYLE_MARGIN_R = 53
STYLE_MARGIN_V = 54
STYLE_MARGIN_V2 = 55
STYLE_ASS_SCALE_X = 56
STYLE_ASS_SCALE_Y = 57
STYLE_ASS_SPACING = 58
STYLE_COLOR1_ALPHA = 59
STYLE_COLOR2_ALPHA = 60
STYLE_COLOR3_ALPHA = 61
STYLE_COLORS_ALPHA = 62
STYLE_INDEX = 63 (get only)

Border style

Possible values for Border style property:
STYLE_P_BST_DEFAULT = -1
STYLE_P_BST_OUTLINE = 1
STYLE_P_BST_BOX = 3

Subtitle position

Possible value for position of subtitles
STYLE_P_SUBPOS_DEFAULT = -1
STYLE_P_SUBPOS_BOTTOM = 0
STYLE_P_SUBPOS_CENTER = 1
STYLE_P_SUBPOS_TOP = 2

Subtitle text align

STYLE_P_SUBALIGN_DEFAULT = -1
STYLE_P_SUBALIGN_LEFT = 1
STYLE_P_SUBALIGN_CENTER = 2
STYLE_P_SUBALIGN_RIGHT = 3

Property getters and setters

These functions are used to set or get values of style properties.  Common parameters are:

Return value of getter function is either:
Return value of setter function can be either:
get_style_prop(styles_no, style_id, what_prop)
set_style_prop(styles_no, style_id, what_prop, prop_val)

Style manipulation methods

These functions of SPStyleInterface enable to call corresponding methods of TStyle in SP. Common parameters are styles_no and style_id with the same meaning as with property getters.

make_empty(styles_no, style_id)
is_empty(styles_no, style_id)
compact_default(styles_no, style_id)
style_equals(styles_no, style_id, other_styles, other_style_id)