enum border_style {BORDER_OUTLINE, BORDER_OPAQUE}; enum style_type {KRY_STYLE_SSA, KRY_STYLE_ASS, KRY_STYLE_COMMENT}; class kryStyle { public: kryStyle(); ~kryStyle(); kryStyle *Copy(); gboolean Compare(kryStyle *s2); void SetName(char *name); static void SetNameStatic(kryStyle *style, char *name); void SetFontName(char *name); static void SetFontNameStatic(kryStyle *style, char *fontname); char *GetName(); static char *GetNameStatic(kryStyle *style); char *GetFontName(); static char *GetFontNameStatic(kryStyle *style); double GetFontSize(); static double GetFontSizeStatic(kryStyle *style); gboolean GetBold(); static gboolean GetBoldStatic(kryStyle *style); gboolean GetItalic(); static gboolean GetItalicStatic(kryStyle *style); gboolean GetUnderline(); static gboolean GetUnderlineStatic(kryStyle *style); gboolean GetStrikethrough(); static gboolean GetStrikethroughStatic(kryStyle *style); void SetBold(gboolean bold); static void SetBoldStatic(kryStyle *style, gboolean bold); void SetItalic(gboolean italic); static void SetItalicStatic(kryStyle *style, gboolean italic); void SetUnderline(gboolean underline); static void SetUnderlineStatic(kryStyle *style, gboolean underline); void SetStrikethrough(gboolean underline); static void SetStrikethroughStatic(kryStyle *style, gboolean underline); void SetAlignment(int alignment); static void SetAlignmentStatic(kryStyle *style, int alignment); int GetAlignment(); static int GetAlignmentStatic(kryStyle *style); double GetFontScaleX(); static double GetFontScaleXStatic(kryStyle *style); double GetFontScaleY(); static double GetFontScaleYStatic(kryStyle *style); double GetFontSpacing(); static double GetFontSpacingStatic(kryStyle *style); double GetFontAngleX(); double GetFontAngleY(); double GetFontAngleZ(); static double GetFontAngleZStatic(kryStyle *style); void SetFontSize(double size); static void SetFontSizeStatic(kryStyle *style, double size); void SetFontScaleX(double scale); static void SetFontScaleXStatic(kryStyle *style, double scale); void SetFontScaleY(double scale); static void SetFontScaleYStatic(kryStyle *style, double scale); void SetFontSpacing(double spacing); static void SetFontSpacingStatic(kryStyle *style, double spacing); void SetFontAngleX(double angle); static void SetFontAngleXStatic(kryStyle *style, double angle); void SetFontAngleY(double angle); static void SetFontAngleYStatic(kryStyle *style, double angle); void SetFontAngleZ(double angle); static void SetFontAngleZStatic(kryStyle *style, double angle); unsigned int GetColorPrimary(); static unsigned int GetColorPrimaryStatic(kryStyle *style); unsigned int GetColorSecondary(); static unsigned int GetColorSecondaryStatic(kryStyle *style); unsigned int GetColorTertiary(); static unsigned int GetColorTertiaryStatic(kryStyle *style); unsigned int GetColorOutline(); static unsigned int GetColorOutlineStatic(kryStyle *style); unsigned int GetColorShadow(); static unsigned int GetColorShadowStatic(kryStyle *style); unsigned int GetColorBack(); static unsigned int GetColorBackStatic(kryStyle *style); unsigned int *GetColorPrimaryPtr(); unsigned int *GetColorSecondaryPtr(); unsigned int *GetColorOutlinePtr(); unsigned int *GetColorShadowPtr(); void SetColorPrimary(unsigned int color); static void SetColorPrimaryStatic(kryStyle *style, unsigned int color); void SetColorSecondary(unsigned int color); static void SetColorSecondaryStatic(kryStyle *style, unsigned int color); void SetColorTertiary(unsigned int color); static void SetColorTertiaryStatic(kryStyle *style, unsigned int color); void SetColorOutline(unsigned int color); static void SetColorOutlineStatic(kryStyle *style, unsigned int color); void SetColorShadow(unsigned int color); static void SetColorShadowStatic(kryStyle *style, unsigned int color); void SetColorBack(unsigned int color); static void SetColorBackStatic(kryStyle *style, unsigned int color); void SetMarginTop(int margin); void SetMarginLeft(int margin); static void SetMarginLeftStatic(kryStyle *style, int margin); void SetMarginRight(int margin); static void SetMarginRightStatic(kryStyle *style, int margin); void SetMarginBottom(int margin); void SetMarginVertical(int margin); static void SetMarginVerticalStatic(kryStyle *style, int margin); int GetMarginTop(); static int GetMarginTopStatic(kryStyle *style); int GetMarginLeft(); static int GetMarginLeftStatic(kryStyle *style); int GetMarginRight(); static int GetMarginRightStatic(kryStyle *style); int GetMarginBottom(); static int GetMarginBottomStatic(kryStyle *style); enum style_type GetType(); void SetType(enum style_type type); void SetBorderStyle(enum border_style style); static void SetBorderStyleStatic(kryStyle *style, enum border_style type); double GetBorderSize(); static double GetBorderSizeStatic(kryStyle *style); double GetShadowSize(); static double GetShadowSizeStatic(kryStyle *style); void SetBorderSize(double size); static void SetBorderSizeStatic(kryStyle *style, double size); void SetShadowSize(double size); static void SetShadowSizeStatic(kryStyle *style, double size); enum border_style GetBorderStyle(); static enum border_style GetBorderStyleStatic(kryStyle *style); int GetBlur(); void SetBlur(int blur); int GetCharset(); static int GetCharsetStatic(kryStyle *style); void SetCharset(int charset); static void SetCharsetStatic(kryStyle *style, int charset); int GetRelative(); void SetAlphaLevel(int alpha); static void SetAlphaLevelStatic(kryStyle *style, int level); int GetAlphaLevel(); static int GetAlphaLevelStatic(kryStyle *style); void Ref(); void Unref(); static void DestroyStatic(kryStyle *style); char *GetPrefix(); void SetPrefix(char *text); #ifdef _WINDOWS void LoadIntoLogfont(LOGFONTW *logfonta); #endif friend GList *sub_ssa_build_style_list(char *buffer); private: // name of the style char *m_name; // name of the font char *m_font_name; // used for storing comments char *m_prefix; // angle of rotation around x axis double m_font_anglex; // angle of rotation around y axis double m_font_angley; // angle of rotation around z axis double m_font_anglez; // font size double m_font_size; // font height scaling (in percent) double m_font_scaley; // font width scaling (in percent) double m_font_scalex; // font spacing double m_font_spacing; // primary color unsigned int m_color_primary; // secondary color unsigned int m_color_secondary; // tertiary color unsigned int m_color_tertiary; // outline color unsigned int m_color_outline; // shadow color unsigned int m_color_shadow; // back color unsigned int m_color_back; // font weight int m_bold; // font italic int m_italic; // border style enum border_style m_border_style; // size of the border double m_shadow_size; // size of the shadow double m_border_size; // alignment (based on numpad) int m_alignment; // left margin int m_margin_left; // right margin int m_margin_right; // top margin int m_margin_top; // bottom margin int m_margin_bottom; // alpha level int m_alpha_level; // character set int m_charset; // strikethrough int m_strikethrough; // underline int m_underline; // blur int m_blur; // relative to video rectangle int m_relative; enum style_type m_type; int m_refcount; };