mirror of
https://git.lynn.is/Gwen/python-layout.git
synced 2024-01-13 01:31:55 +01:00
99 lines
2.7 KiB
Python
99 lines
2.7 KiB
Python
from enum import Enum
|
|
|
|
|
|
class BoxTitleAnchor(Enum):
|
|
LEFT = 0,
|
|
CENTER = 1,
|
|
RIGHT = 2,
|
|
|
|
class ColorMode(Enum):
|
|
RGBA = 1,
|
|
GRAYSCALE = 2,
|
|
BW = 3,
|
|
|
|
|
|
class FlexDirection(Enum):
|
|
ROW = 0,
|
|
ROW_REVERSE = 1,
|
|
COLUMN = 2,
|
|
COLUMN_REVERSE = 3,
|
|
|
|
|
|
class FlexWrap(Enum):
|
|
NO_WRAP = 0,
|
|
WRAP = 1,
|
|
WRAP_REVERSE = 2,
|
|
|
|
|
|
class FlexJustify(Enum):
|
|
START = 0,
|
|
END = 1,
|
|
CENTER = 2,
|
|
SPACE_BETWEEN = 3,
|
|
SPACE_AROUND = 4,
|
|
SPACE_EVENLY = 5,
|
|
|
|
|
|
class FlexAlignItems(Enum):
|
|
START = 0,
|
|
END = 1,
|
|
CENTER = 2,
|
|
STRETCH = 3,
|
|
|
|
|
|
class FlexAlignContent(Enum):
|
|
START = 0,
|
|
END = 1,
|
|
CENTER = 2,
|
|
STRETCH = 3,
|
|
SPACE_BETWEEN = 4,
|
|
SPACE_AROUND = 5,
|
|
SPACE_EVENLY = 6,
|
|
|
|
|
|
class TextAlign(Enum):
|
|
LEFT = 0,
|
|
CENTER = 1,
|
|
RIGHT = 2
|
|
|
|
|
|
class TextVerticalAlign(Enum):
|
|
TOP = 0,
|
|
MIDDLE = 1,
|
|
BOTTOM = 2
|
|
|
|
|
|
class TextWrap(Enum):
|
|
NO_WRAP = 0,
|
|
ONLY_WORDS = 1,
|
|
PREFER_WORDS = 2,
|
|
EVERYWHERE = 3
|
|
|
|
|
|
class ImageMode(Enum):
|
|
ORIGINAL = 0, # use size of image, optionally scaled with `scale` option
|
|
STRETCH = 1, # stretch image to available space, ignoring aspect ratio
|
|
STRETCH_X = 2, # stretch image to available horizontal space, keep height the same, optionally scaled with `scale` option
|
|
STRETCH_Y = 3, # stretch image to available vertical space, keep width the same, optionally scaled with `scale` option
|
|
CONTAIN = 4, # scale image to available space, respecting aspect ratio, stretch as large as possible without cutting anything off
|
|
COVER = 5, # scale image to available space, respecting aspect ratio, stretch as large as necessary to fill available space completely
|
|
REPEAT = 6, # repeat image to fill available space
|
|
REPEAT_X = 7, # repeat image to fill available horizontal space, optionally scaled like ORIGINAL
|
|
REPEAT_Y = 8, # repeat image to fill available vertical space, optionally scaled like ORIGINAL
|
|
REPEAT_X_STRETCH = 9, # stretch image ignoring aspect ratio so that it fills available vertical space, and repeat horizontally to fill available space
|
|
REPEAT_Y_STRETCH = 10, # stretch image ignoring aspect ratio so that it fills available horizontal space, and repeat vertically to fill available space
|
|
REPEAT_X_FILL = 11, # scale image with aspect ratio so that it fills available vertical space, and repeat horizontally to fill available space
|
|
REPEAT_Y_FILL = 12, # scale image with aspect ratio so that it fills available horizontal space, and repeat vertically to fill available space
|
|
|
|
|
|
class ImageAnchor(Enum):
|
|
TOP_LEFT = 0,
|
|
TOP_CENTER = 1,
|
|
TOP_RIGHT = 2,
|
|
MIDDLE_LEFT = 3,
|
|
MIDDLE_CENTER = 4,
|
|
MIDDLE_RIGHT = 5,
|
|
BOTTOM_LEFT = 6,
|
|
BOTTOM_CENTER = 7,
|
|
BOTTOM_RIGHT = 8,
|