Skip to content

Constants

Symbolic constants used by various APIs.

Reference

toga.constants.NORMAL = 'normal'

toga.constants.LEFT = 'left'

toga.constants.RIGHT = 'right'

toga.constants.TOP = 'top'

toga.constants.BOTTOM = 'bottom'

toga.constants.CENTER = 'center'

toga.constants.START = 'start'

toga.constants.END = 'end'

toga.constants.ROW = 'row'

toga.constants.COLUMN = 'column'

toga.constants.VISIBLE = 'visible'

toga.constants.HIDDEN = 'hidden'

toga.constants.NONE = 'none'

toga.constants.JUSTIFY = 'justify'

toga.constants.RTL = 'rtl'

toga.constants.LTR = 'ltr'

toga.constants.SYSTEM = 'system'

toga.constants.MESSAGE = 'message'

toga.constants.SERIF = 'serif'

toga.constants.SANS_SERIF = 'sans-serif'

toga.constants.CURSIVE = 'cursive'

toga.constants.FANTASY = 'fantasy'

toga.constants.MONOSPACE = 'monospace'

toga.constants.ITALIC = 'italic'

toga.constants.OBLIQUE = 'oblique'

toga.constants.FONT_STYLES = {ITALIC, OBLIQUE}

toga.constants.SMALL_CAPS = 'small-caps'

toga.constants.FONT_VARIANTS = {SMALL_CAPS}

toga.constants.BOLD = 'bold'

toga.constants.FONT_WEIGHTS = {BOLD}

toga.constants.SYSTEM_DEFAULT_FONT_SIZE = -1

toga.constants.XX_SMALL = 'xx-small'

toga.constants.X_SMALL = 'x-small'

toga.constants.SMALL = 'small'

toga.constants.MEDIUM = 'medium'

toga.constants.LARGE = 'large'

toga.constants.X_LARGE = 'x-large'

toga.constants.XX_LARGE = 'xx-large'

toga.constants.XXX_LARGE = 'xxx-large'

toga.constants.ABSOLUTE_FONT_SIZES = {XX_SMALL, X_SMALL, SMALL, MEDIUM, LARGE, X_LARGE, XX_LARGE, XXX_LARGE}

toga.constants.LARGER = 'larger'

toga.constants.SMALLER = 'smaller'

toga.constants.RELATIVE_FONT_SIZES = {LARGER, SMALLER}

toga.constants.TRANSPARENT = 'transparent'

toga.constants.ALICEBLUE = 'aliceblue'

toga.constants.ANTIQUEWHITE = 'antiquewhite'

toga.constants.AQUA = 'aqua'

toga.constants.AQUAMARINE = 'aquamarine'

toga.constants.AZURE = 'azure'

toga.constants.BEIGE = 'beige'

toga.constants.BISQUE = 'bisque'

toga.constants.BLACK = 'black'

toga.constants.BLANCHEDALMOND = 'blanchedalmond'

toga.constants.BLUE = 'blue'

toga.constants.BLUEVIOLET = 'blueviolet'

toga.constants.BROWN = 'brown'

toga.constants.BURLYWOOD = 'burlywood'

toga.constants.CADETBLUE = 'cadetblue'

toga.constants.CHARTREUSE = 'chartreuse'

toga.constants.CHOCOLATE = 'chocolate'

toga.constants.CORAL = 'coral'

toga.constants.CORNFLOWERBLUE = 'cornflowerblue'

toga.constants.CORNSILK = 'cornsilk'

toga.constants.CRIMSON = 'crimson'

toga.constants.CYAN = 'cyan'

toga.constants.DARKBLUE = 'darkblue'

toga.constants.DARKCYAN = 'darkcyan'

toga.constants.DARKGOLDENROD = 'darkgoldenrod'

toga.constants.DARKGRAY = 'darkgray'

toga.constants.DARKGREY = 'darkgrey'

toga.constants.DARKGREEN = 'darkgreen'

toga.constants.DARKKHAKI = 'darkkhaki'

toga.constants.DARKMAGENTA = 'darkmagenta'

toga.constants.DARKOLIVEGREEN = 'darkolivegreen'

toga.constants.DARKORANGE = 'darkorange'

toga.constants.DARKORCHID = 'darkorchid'

toga.constants.DARKRED = 'darkred'

toga.constants.DARKSALMON = 'darksalmon'

toga.constants.DARKSEAGREEN = 'darkseagreen'

toga.constants.DARKSLATEBLUE = 'darkslateblue'

toga.constants.DARKSLATEGRAY = 'darkslategray'

toga.constants.DARKSLATEGREY = 'darkslategrey'

toga.constants.DARKTURQUOISE = 'darkturquoise'

toga.constants.DARKVIOLET = 'darkviolet'

toga.constants.DEEPPINK = 'deeppink'

toga.constants.DEEPSKYBLUE = 'deepskyblue'

toga.constants.DIMGRAY = 'dimgray'

toga.constants.DIMGREY = 'dimgrey'

toga.constants.DODGERBLUE = 'dodgerblue'

toga.constants.FIREBRICK = 'firebrick'

toga.constants.FLORALWHITE = 'floralwhite'

toga.constants.FORESTGREEN = 'forestgreen'

toga.constants.FUCHSIA = 'fuchsia'

toga.constants.GAINSBORO = 'gainsboro'

toga.constants.GHOSTWHITE = 'ghostwhite'

toga.constants.GOLD = 'gold'

toga.constants.GOLDENROD = 'goldenrod'

toga.constants.GRAY = 'gray'

toga.constants.GREY = 'grey'

toga.constants.GREEN = 'green'

toga.constants.GREENYELLOW = 'greenyellow'

toga.constants.HONEYDEW = 'honeydew'

toga.constants.HOTPINK = 'hotpink'

toga.constants.INDIANRED = 'indianred'

toga.constants.INDIGO = 'indigo'

toga.constants.IVORY = 'ivory'

toga.constants.KHAKI = 'khaki'

toga.constants.LAVENDER = 'lavender'

toga.constants.LAVENDERBLUSH = 'lavenderblush'

toga.constants.LAWNGREEN = 'lawngreen'

toga.constants.LEMONCHIFFON = 'lemonchiffon'

toga.constants.LIGHTBLUE = 'lightblue'

toga.constants.LIGHTCORAL = 'lightcoral'

toga.constants.LIGHTCYAN = 'lightcyan'

toga.constants.LIGHTGOLDENRODYELLOW = 'lightgoldenrodyellow'

toga.constants.LIGHTGRAY = 'lightgray'

toga.constants.LIGHTGREY = 'lightgrey'

toga.constants.LIGHTGREEN = 'lightgreen'

toga.constants.LIGHTPINK = 'lightpink'

toga.constants.LIGHTSALMON = 'lightsalmon'

toga.constants.LIGHTSEAGREEN = 'lightseagreen'

toga.constants.LIGHTSKYBLUE = 'lightskyblue'

toga.constants.LIGHTSLATEGRAY = 'lightslategray'

toga.constants.LIGHTSLATEGREY = 'lightslategrey'

toga.constants.LIGHTSTEELBLUE = 'lightsteelblue'

toga.constants.LIGHTYELLOW = 'lightyellow'

toga.constants.LIME = 'lime'

toga.constants.LIMEGREEN = 'limegreen'

toga.constants.LINEN = 'linen'

toga.constants.MAGENTA = 'magenta'

toga.constants.MAROON = 'maroon'

toga.constants.MEDIUMAQUAMARINE = 'mediumaquamarine'

toga.constants.MEDIUMBLUE = 'mediumblue'

toga.constants.MEDIUMORCHID = 'mediumorchid'

toga.constants.MEDIUMPURPLE = 'mediumpurple'

toga.constants.MEDIUMSEAGREEN = 'mediumseagreen'

toga.constants.MEDIUMSLATEBLUE = 'mediumslateblue'

toga.constants.MEDIUMSPRINGGREEN = 'mediumspringgreen'

toga.constants.MEDIUMTURQUOISE = 'mediumturquoise'

toga.constants.MEDIUMVIOLETRED = 'mediumvioletred'

toga.constants.MIDNIGHTBLUE = 'midnightblue'

toga.constants.MINTCREAM = 'mintcream'

toga.constants.MISTYROSE = 'mistyrose'

toga.constants.MOCCASIN = 'moccasin'

toga.constants.NAVAJOWHITE = 'navajowhite'

toga.constants.NAVY = 'navy'

toga.constants.OLDLACE = 'oldlace'

toga.constants.OLIVE = 'olive'

toga.constants.OLIVEDRAB = 'olivedrab'

toga.constants.ORANGE = 'orange'

toga.constants.ORANGERED = 'orangered'

toga.constants.ORCHID = 'orchid'

toga.constants.PALEGOLDENROD = 'palegoldenrod'

toga.constants.PALEGREEN = 'palegreen'

toga.constants.PALETURQUOISE = 'paleturquoise'

toga.constants.PALEVIOLETRED = 'palevioletred'

toga.constants.PAPAYAWHIP = 'papayawhip'

toga.constants.PEACHPUFF = 'peachpuff'

toga.constants.PERU = 'peru'

toga.constants.PINK = 'pink'

toga.constants.PLUM = 'plum'

toga.constants.POWDERBLUE = 'powderblue'

toga.constants.PURPLE = 'purple'

toga.constants.REBECCAPURPLE = 'rebeccapurple'

toga.constants.RED = 'red'

toga.constants.ROSYBROWN = 'rosybrown'

toga.constants.ROYALBLUE = 'royalblue'

toga.constants.SADDLEBROWN = 'saddlebrown'

toga.constants.SALMON = 'salmon'

toga.constants.SANDYBROWN = 'sandybrown'

toga.constants.SEAGREEN = 'seagreen'

toga.constants.SEASHELL = 'seashell'

toga.constants.SIENNA = 'sienna'

toga.constants.SILVER = 'silver'

toga.constants.SKYBLUE = 'skyblue'

toga.constants.SLATEBLUE = 'slateblue'

toga.constants.SLATEGRAY = 'slategray'

toga.constants.SLATEGREY = 'slategrey'

toga.constants.SNOW = 'snow'

toga.constants.SPRINGGREEN = 'springgreen'

toga.constants.STEELBLUE = 'steelblue'

toga.constants.TAN = 'tan'

toga.constants.TEAL = 'teal'

toga.constants.THISTLE = 'thistle'

toga.constants.TOMATO = 'tomato'

toga.constants.TURQUOISE = 'turquoise'

toga.constants.VIOLET = 'violet'

toga.constants.WHEAT = 'wheat'

toga.constants.WHITE = 'white'

toga.constants.WHITESMOKE = 'whitesmoke'

toga.constants.YELLOW = 'yellow'

toga.constants.YELLOWGREEN = 'yellowgreen'

toga.constants.Direction

Bases: Enum

The direction a given property should act.

HORIZONTAL = 0

VERTICAL = 1

toga.constants.Baseline

Bases: Enum

The meaning of a Y coordinate when drawing text.

ALPHABETIC = auto()

Alphabetic baseline of the first line

TOP = auto()

Top of text

MIDDLE = auto()

Middle of text

BOTTOM = auto()

Bottom of text

toga.constants.FillRule

Bases: Enum

The rule to use when filling paths.

EVENODD = 0

NONZERO = 1

toga.constants.FlashMode

Bases: Enum

The flash mode to use when capturing photos or videos.

AUTO = -1

OFF = 0

ON = 1

__str__() -> str

toga.constants.WindowState

Bases: Enum

The possible window states of an app.

NOTE: Some platforms do not fully support all states; see the toga.Window's platform notes for details.

NORMAL = 0

The NORMAL state represents the default state of the window or app when it is not in any other specific window state.

MINIMIZED = 1

MINIMIZED state is when the window isn't currently visible, although it will appear in any operating system's list of active windows.

MAXIMIZED = 2

The window is the largest size it can be on the screen with title bar and window chrome still visible.

FULLSCREEN = 3

FULLSCREEN state is when the window title bar and window chrome remain hidden; But app menu and toolbars remain visible.

PRESENTATION = 4

PRESENTATION state is when the window title bar, window chrome, app menu and toolbars all remain hidden.

A good example is a slideshow app in presentation mode - the only visible content is the slide.