Values and Enums¶
Overview¶
Alignment on an axis of a container. |
|
A buffer for short-term storage and transfer within and between applications. |
|
|
A color in the sRGB color space. |
The fill mode of a rule. |
|
|
A font. |
The horizontal alignment of some resource. |
|
An |
|
|
A measurement of a monotonically nondecreasing clock. |
The strategy used to fill space in a specific dimension. |
|
|
A line. |
|
A 2D point. |
|
A rectangle. |
|
An amount of space in 2 dimensions. |
|
The appearance of the handle of a slider. |
The shape of the handle of a slider. |
|
An |
|
|
A representation of cursor position in a |
The position of the tooltip. |
|
The vertical alignment of some resource. |
Details¶
- class pyiced.Align¶
Alignment on an axis of a container.
See also
- START¶
Align at the start of the axis.
- CENTER¶
Align at the center of the axis.
- END¶
Align at the end of the axis.
- class pyiced.Clipboard¶
A buffer for short-term storage and transfer within and between applications.
Warning
The clipboard is only valid during the call to
pyiced.IcedApp.update()
.See also
- class pyiced.Color(r, g, b, a=1.0)¶
A color in the sRGB color space.
- Parameters
- BLACK = Color(0, 0, 0)¶
- TRANSPARENT = Color(0, 0, 0, a=0)¶
- WHITE = Color(1, 1, 1)¶
- a¶
Alpha channel, 0.0 – 1.0 (0.0 = transparent; 1.0 = opaque)
- Returns
Color channel value
- Return type
- class pyiced.FillMode¶
The fill mode of a rule.
See also
- FULL = FillMode.FULL¶
- static asymmetric_padding(first_pad, second_pad)¶
Different offset on each end of the rule.
- class pyiced.Font(name, data)¶
A font.
The font does not get loaded multiple times, but instead the name is used to tell fonts apart. So you should use the same name for the same data in subsequent Font instance creations.
- Parameters
name (str) – The name of the external font
data (bytes-like) – The bytes of the external font
See also
Warning
The font data gets interned! Even of the module is unloaded / reloaded, some memory is lost until the interpreter is restarted.
- DEFAULT = Font.DEFAULT¶
- class pyiced.HorizontalAlignment¶
The horizontal alignment of some resource.
See also
- LEFT¶
Align left
- CENTER¶
Horizontally centered
- RIGHT¶
Align right
- class pyiced.ImageHandle¶
An
pyiced.image()
handle.See also
- static from_memory(bytes)¶
Creates an image handle containing the image data directly.
- Parameters
bytes (bytes-like) – The data of the image file.
- Returns
The new image handle.
- Return type
- static from_path(path)¶
Creates an image handle pointing to the image of the given path.
- Parameters
path (pathlib.Path) – The path of the image file.
- Returns
The new image handle.
- Return type
- class pyiced.Instant¶
A measurement of a monotonically nondecreasing clock. Opaque and useful only with duration.
You can add/substract a number of seconds as
float
to/from an instant to get a new instant.You can add/substract a
timedelta
to/from an instant to get a new instant.You can substract two instants to get the number of seconds as
float
between them:later - earlier = seconds
.
See also
- class pyiced.Length¶
The strategy used to fill space in a specific dimension.
See also
- FILL = Length.FILL¶
- SHRINK = Length.SHRINK¶
- static fill_portion(i)¶
Fill a portion of the remaining space relative to other elements.
- static units(i)¶
Fill a fixed amount of space.
- class pyiced.Line(color, width)¶
A line.
It is normally used to define the highlight of something, like a split.
See also
- color¶
The color of the line.
- Returns
The “color” parameter given when constructing this line.
- Return type
- class pyiced.Point(x, y)¶
A 2D point.
See also
- ORIGIN = Point(0, 0)¶
- x¶
The X coordinate.
- Returns
The “x” parameter given when constructing this point.
- Return type
- class pyiced.Rectangle(top_left, size)¶
A rectangle.
See also
- height¶
Height of the rectangle.
- Returns
The “size.height” parameter given when constructing this point.
- Return type
- size¶
The size of the rectangle.
- Returns
The “size” parameter given when constructing this point.
- Return type
- top_left¶
The top-left corner.
- Returns
The “top_left” parameter given when constructing this point.
- Return type
- width¶
Width of the rectangle.
- Returns
The “size.width” parameter given when constructing this point.
- Return type
- static with_size(size)¶
Creates a new Rectangle with its top-left corner at the origin and with the provided Size.
- x¶
X coordinate of the top-left corner.
- Returns
The “top_left.x” parameter given when constructing this point.
- Return type
- class pyiced.Size(width, height)¶
An amount of space in 2 dimensions.
See also
- INFINITY = Size(inf, inf)¶
- UNIT = Size(1.0, 1.0)¶
- ZERO = Size(0.0, 0.0)¶
- height¶
The height.
- Returns
The “height” parameter given when constructing this size.
- Return type
- class pyiced.SliderHandle(shape, color, border_width, border_color)¶
The appearance of the handle of a slider.
- Parameters
shape (SliderHandleShape) – The color of the slider_handle.
color (Color) – The width of the slider_handle.
border_width (float) – The width of the slider_handle.
border_color (Color) – The width of the slider_handle.
See also
- class pyiced.SliderHandleShape¶
The shape of the handle of a slider.
See also
- static circle(radius)¶
A circle.
- Parameters
radius (float) – The radius of the circle
- Returns
A slider handle in the shape of a circle.
- Return type
- static rectangle(width, border_radius)¶
A rectangle.
- Parameters
- Returns
A slider handle in the shape of a rectangle.
- Return type
- class pyiced.SvgHandle¶
An
svg()
handle.See also
- static from_memory(bytes)¶
Creates an SVG Handle pointing to the vector image of the given path.
- Parameters
bytes (bytes-like) –
Creates an SVG Handle from raw bytes containing either an SVG string or gzip compressed data.
This is useful if you already have your SVG data in-memory, maybe because you downloaded or generated it procedurally.
- Returns
An SVG handle usable in
svg()
.- Return type
- class pyiced.TextInputCursor(state)¶
A representation of cursor position in a
text_input()
.There should be no reason to create or inspect this object directly.
- Parameters
state (TextInputState) – Text input state to inspect.
- selection(value)¶
Get the selected text.
Warning
If the state is currently in use, the method will fail.
- Parameters
value (str) – The current value of the
text_input()
.- Returns
The selected text. May be empty.
- Return type
- state(value)¶
Get the state of the
TextInputCursor()
.The result is measured in terms of graphems, not bytes or codepoints!
Warning
If the state is currently in use, the method will fail.
- Returns
int – The current cursor position when there’s no selection.
Tuple[int, int] – The selected text range.
- class pyiced.TooltipPosition¶
The position of the tooltip.
See also
- FOLLOW_CURSOR¶
The tooltip will follow the cursor.
- TOP¶
The tooltip will appear on the top of the widget.
- BOTTOM¶
The tooltip will appear on the bottom of the widget.
- LEFT¶
The tooltip will appear on the left of the widget.
- RIGHT¶
The tooltip will appear on the right of the widget.
Named Colors¶
pyiced.css_color
exports pyiced.Color
constants for all 148 named
CSS Color Module Level 4
colors.
- pyiced.css_color.ALICEBLUE¶
- pyiced.css_color.ANTIQUEWHITE¶
- pyiced.css_color.AQUA¶
- pyiced.css_color.AQUAMARINE¶
- pyiced.css_color.AZURE¶
- pyiced.css_color.BEIGE¶
- pyiced.css_color.BISQUE¶
- pyiced.css_color.BLACK¶
- pyiced.css_color.BLANCHEDALMOND¶
- pyiced.css_color.BLUE¶
- pyiced.css_color.BLUEVIOLET¶
- pyiced.css_color.BROWN¶
- pyiced.css_color.BURLYWOOD¶
- pyiced.css_color.CADETBLUE¶
- pyiced.css_color.CHARTREUSE¶
- pyiced.css_color.CHOCOLATE¶
- pyiced.css_color.CORAL¶
- pyiced.css_color.CORNFLOWERBLUE¶
- pyiced.css_color.CORNSILK¶
- pyiced.css_color.CRIMSON¶
- pyiced.css_color.CYAN¶
- pyiced.css_color.DARKBLUE¶
- pyiced.css_color.DARKCYAN¶
- pyiced.css_color.DARKGOLDENROD¶
- pyiced.css_color.DARKGRAY¶
- pyiced.css_color.DARKGREEN¶
- pyiced.css_color.DARKGREY¶
- pyiced.css_color.DARKKHAKI¶
- pyiced.css_color.DARKMAGENTA¶
- pyiced.css_color.DARKOLIVEGREEN¶
- pyiced.css_color.DARKORANGE¶
- pyiced.css_color.DARKORCHID¶
- pyiced.css_color.DARKRED¶
- pyiced.css_color.DARKSALMON¶
- pyiced.css_color.DARKSEAGREEN¶
- pyiced.css_color.DARKSLATEBLUE¶
- pyiced.css_color.DARKSLATEGRAY¶
- pyiced.css_color.DARKSLATEGREY¶
- pyiced.css_color.DARKTURQUOISE¶
- pyiced.css_color.DARKVIOLET¶
- pyiced.css_color.DEEPPINK¶
- pyiced.css_color.DEEPSKYBLUE¶
- pyiced.css_color.DIMGRAY¶
- pyiced.css_color.DIMGREY¶
- pyiced.css_color.DODGERBLUE¶
- pyiced.css_color.FIREBRICK¶
- pyiced.css_color.FLORALWHITE¶
- pyiced.css_color.FORESTGREEN¶
- pyiced.css_color.FUCHSIA¶
- pyiced.css_color.GAINSBORO¶
- pyiced.css_color.GHOSTWHITE¶
- pyiced.css_color.GOLD¶
- pyiced.css_color.GOLDENROD¶
- pyiced.css_color.GRAY¶
- pyiced.css_color.GREEN¶
- pyiced.css_color.GREENYELLOW¶
- pyiced.css_color.GREY¶
- pyiced.css_color.HONEYDEW¶
- pyiced.css_color.HOTPINK¶
- pyiced.css_color.INDIANRED¶
- pyiced.css_color.INDIGO¶
- pyiced.css_color.IVORY¶
- pyiced.css_color.KHAKI¶
- pyiced.css_color.LAVENDER¶
- pyiced.css_color.LAVENDERBLUSH¶
- pyiced.css_color.LAWNGREEN¶
- pyiced.css_color.LEMONCHIFFON¶
- pyiced.css_color.LIGHTBLUE¶
- pyiced.css_color.LIGHTCORAL¶
- pyiced.css_color.LIGHTCYAN¶
- pyiced.css_color.LIGHTGOLDENRODYELLOW¶
- pyiced.css_color.LIGHTGRAY¶
- pyiced.css_color.LIGHTGREEN¶
- pyiced.css_color.LIGHTGREY¶
- pyiced.css_color.LIGHTPINK¶
- pyiced.css_color.LIGHTSALMON¶
- pyiced.css_color.LIGHTSEAGREEN¶
- pyiced.css_color.LIGHTSKYBLUE¶
- pyiced.css_color.LIGHTSLATEGRAY¶
- pyiced.css_color.LIGHTSLATEGREY¶
- pyiced.css_color.LIGHTSTEELBLUE¶
- pyiced.css_color.LIGHTYELLOW¶
- pyiced.css_color.LIME¶
- pyiced.css_color.LIMEGREEN¶
- pyiced.css_color.LINEN¶
- pyiced.css_color.MAGENTA¶
- pyiced.css_color.MAROON¶
- pyiced.css_color.MEDIUMAQUAMARINE¶
- pyiced.css_color.MEDIUMBLUE¶
- pyiced.css_color.MEDIUMORCHID¶
- pyiced.css_color.MEDIUMPURPLE¶
- pyiced.css_color.MEDIUMSEAGREEN¶
- pyiced.css_color.MEDIUMSLATEBLUE¶
- pyiced.css_color.MEDIUMSPRINGGREEN¶
- pyiced.css_color.MEDIUMTURQUOISE¶
- pyiced.css_color.MEDIUMVIOLETRED¶
- pyiced.css_color.MIDNIGHTBLUE¶
- pyiced.css_color.MINTCREAM¶
- pyiced.css_color.MISTYROSE¶
- pyiced.css_color.MOCCASIN¶
- pyiced.css_color.NAVAJOWHITE¶
- pyiced.css_color.NAVY¶
- pyiced.css_color.OLDLACE¶
- pyiced.css_color.OLIVE¶
- pyiced.css_color.OLIVEDRAB¶
- pyiced.css_color.ORANGE¶
- pyiced.css_color.ORANGERED¶
- pyiced.css_color.ORCHID¶
- pyiced.css_color.PALEGOLDENROD¶
- pyiced.css_color.PALEGREEN¶
- pyiced.css_color.PALETURQUOISE¶
- pyiced.css_color.PALEVIOLETRED¶
- pyiced.css_color.PAPAYAWHIP¶
- pyiced.css_color.PEACHPUFF¶
- pyiced.css_color.PERU¶
- pyiced.css_color.PINK¶
- pyiced.css_color.PLUM¶
- pyiced.css_color.POWDERBLUE¶
- pyiced.css_color.PURPLE¶
- pyiced.css_color.REBECCAPURPLE¶
- pyiced.css_color.RED¶
- pyiced.css_color.ROSYBROWN¶
- pyiced.css_color.ROYALBLUE¶
- pyiced.css_color.SADDLEBROWN¶
- pyiced.css_color.SALMON¶
- pyiced.css_color.SANDYBROWN¶
- pyiced.css_color.SEAGREEN¶
- pyiced.css_color.SEASHELL¶
- pyiced.css_color.SIENNA¶
- pyiced.css_color.SILVER¶
- pyiced.css_color.SKYBLUE¶
- pyiced.css_color.SLATEBLUE¶
- pyiced.css_color.SLATEGRAY¶
- pyiced.css_color.SLATEGREY¶
- pyiced.css_color.SNOW¶
- pyiced.css_color.SPRINGGREEN¶
- pyiced.css_color.STEELBLUE¶
- pyiced.css_color.TAN¶
- pyiced.css_color.TEAL¶
- pyiced.css_color.THISTLE¶
- pyiced.css_color.TOMATO¶
- pyiced.css_color.TURQUOISE¶
- pyiced.css_color.VIOLET¶
- pyiced.css_color.WHEAT¶
- pyiced.css_color.WHITE¶
- pyiced.css_color.WHITESMOKE¶
- pyiced.css_color.YELLOW¶
- pyiced.css_color.YELLOWGREEN¶