# build-aux/mypy-stubs/xlwt/Formatting.pyi - Type stubs for xlwt # # Copyright (C) 2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later import typing # These colour indexes are the ranges/values for BIFF5-BIFF8 (Excel # 5.0 - 2007); older versions are different at >=0x18. AFAICT xlwt # won't save older versions, so that's fine. type _FixedColourIndex = typing.Literal[ 0x00, # black 0x01, # white 0x02, # red 0x03, # green 0x04, # blue 0x05, # yellow 0x06, # magenta 0x07, # cyan # ... 0x40, # System window text colour for border lines (used in records XF, CF, and WINDOW2) 0x41, # System window background colour for pattern background (used in records XF, and CF) # ... 0x43, # System face colour (dialogue background colour) # ... 0x4D, # System window text colour for chart border lines 0x4E, # System window background colour for chart areas 0x4F, # Automatic colour for chart border lines (seems to be always Black) 0x50, # System ToolTip background colour (used in note objects) 0x51, # System ToolTip text colour (used in note objects) # ... 0x7FFF, # System window text colour for fonts (used in records FONT, EFONT, and CF) ] type _UserColourIndex = typing.Literal[ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, ] type _ColourIndex = _FixedColourIndex | _UserColourIndex type _Escapement = typing.Literal[0x00, 0x01, 0x02] type _Underline = typing.Literal[0x00, 0x01, 0x21, 0x02, 0x22] type _Family = typing.Literal[0x00, 0x01, 0x02, 0x03, 0x04, 0x05] type _Charset = typing.Literal[ 0x00, 0x01, 0x02, 0x4D, 0x80, 0x81, 0x82, 0x86, 0x88, 0xA1, 0xA2, 0xA3, 0xB1, 0xB2, 0xBA, 0xCC, 0xDE, 0xEE, 0xFF, ] class Font: ESCAPEMENT_NONE: _Escapement = ... ESCAPEMENT_SUPERSCRIPT: _Escapement = ... ESCAPEMENT_SUBSCRIPT: _Escapement = ... UNDERLINE_NONE: _Underline = ... UNDERLINE_SINGLE: _Underline = ... UNDERLINE_SINGLE_ACC: _Underline = ... UNDERLINE_DOUBLE: _Underline = ... UNDERLINE_DOUBLE_ACC: _Underline = ... FAMILY_NONE: _Family = ... FAMILY_ROMAN: _Family = ... FAMILY_SWISS: _Family = ... FAMILY_MODERN: _Family = ... FAMILY_SCRIPT: _Family = ... FAMILY_DECORATIVE: _Family = ... CHARSET_ANSI_LATIN: _Charset = ... CHARSET_SYS_DEFAULT: _Charset = ... CHARSET_SYMBOL: _Charset = ... CHARSET_APPLE_ROMAN: _Charset = ... CHARSET_ANSI_JAP_SHIFT_JIS: _Charset = ... CHARSET_ANSI_KOR_HANGUL: _Charset = ... CHARSET_ANSI_KOR_JOHAB: _Charset = ... CHARSET_ANSI_CHINESE_GBK: _Charset = ... CHARSET_ANSI_CHINESE_BIG5: _Charset = ... CHARSET_ANSI_GREEK: _Charset = ... CHARSET_ANSI_TURKISH: _Charset = ... CHARSET_ANSI_VIETNAMESE: _Charset = ... CHARSET_ANSI_HEBREW: _Charset = ... CHARSET_ANSI_ARABIC: _Charset = ... CHARSET_ANSI_BALTIC: _Charset = ... CHARSET_ANSI_CYRILLIC: _Charset = ... CHARSET_ANSI_THAI: _Charset = ... CHARSET_ANSI_LATIN_II: _Charset = ... CHARSET_OEM_LATIN_I: _Charset = ... height: int italic: bool struck_out: bool outline: bool shadow: bool colour_index: _ColourIndex bold: bool escapement: _Escapement underline: _Underline family: _Family charset: _Charset name: str type _Horz = typing.Literal[0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07] type _Vert = typing.Literal[0x00, 0x01, 0x02, 0x03, 0x04] type _Direction = typing.Literal[0x00, 0x01, 0x02] type _Orientation = typing.Literal[0x00, 0x01, 0x02, 0x03] type _Rotation = typing.Literal[0x00, 0xFF] type _Wrap = typing.Literal[0x01, 0x00] type _Shrink = typing.Literal[0x01, 0x00] class Alignment: HORZ_GENERAL: _Horz = ... HORZ_LEFT: _Horz = ... HORZ_CENTER: _Horz = ... HORZ_RIGHT: _Horz = ... HORZ_FILLED: _Horz = ... HORZ_JUSTIFIED: _Horz = ... HORZ_CENTER_ACROSS_SEL: _Horz = ... HORZ_DISTRIBUTED: _Horz = ... VERT_TOP: _Vert = ... VERT_CENTER: _Vert = ... VERT_BOTTOM: _Vert = ... VERT_JUSTIFIED: _Vert = ... VERT_DISTRIBUTED: _Vert = ... DIRECTION_GENERAL: _Direction = ... DIRECTION_LR: _Direction = ... DIRECTION_RL: _Direction = ... ORIENTATION_NOT_ROTATED: _Orientation = ... ORIENTATION_STACKED: _Orientation = ... ORIENTATION_90_CC: _Orientation = ... ORIENTATION_90_CW: _Orientation = ... ROTATION_0_ANGLE: _Rotation = ... ROTATION_STACKED: _Rotation = ... WRAP_AT_RIGHT: _Wrap = ... NOT_WRAP_AT_RIGHT: _Wrap = ... SHRINK_TO_FIT: _Shrink = ... NOT_SHRINK_TO_FIT: _Shrink = ... horz: _Horz vert: _Vert dire: _Direction orie: _Orientation rota: _Rotation wrap: _Wrap shri: _Shrink inde: int merg: int type _Line = typing.Literal[ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D ] type _Diag1 = typing.Literal[0x00, 0x01] type _Diag2 = typing.Literal[0x00, 0x01] class Borders: NO_LINE: _Line = ... THIN: _Line = ... MEDIUM: _Line = ... DASHED: _Line = ... DOTTED: _Line = ... THICK: _Line = ... DOUBLE: _Line = ... HAIR: _Line = ... MEDIUM_DASHED: _Line = ... THIN_DASH_DOTTED: _Line = ... MEDIUM_DASH_DOTTED: _Line = ... THIN_DASH_DOT_DOTTED: _Line = ... MEDIUM_DASH_DOT_DOTTED: _Line = ... SLANTED_MEDIUM_DASH_DOTTED: _Line = ... NEED_DIAG1: _Diag1 = ... NEED_DIAG2: _Diag2 = ... NO_NEED_DIAG1: _Diag1 = ... NO_NEED_DIAG2: _Diag2 = ... left: _Line right: _Line top: _Line bottom: _Line left_colour: _ColourIndex right_colour: _ColourIndex top_colour: _ColourIndex bottom_colour: _ColourIndex diag_colour: _ColourIndex need_diag1: _Diag1 need_diag2: _Diag2 type _Pattern = typing.Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] class Pattern: NO_PATTERN: _Pattern = ... SOLID_PATTERN: _Pattern = ... pattern: _Pattern pattern_fore_colour: _ColourIndex pattern_back_colour: _ColourIndex type _Bool = typing.Literal[0, 1] class Protection: cell_locked: _Bool formula_hidden: _Bool