Values and Enums¶
Overview¶
Alignment on an axis of a container. |
|
A buffer for short-term storage and transfer within and between applications. |
|
The fill mode of a rule. |
|
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.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.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(proto, **kwargs)¶
The appearance of the handle of a slider.
- Parameters
proto (Optional[Union[SliderHandle, str]]) –
Source style sheet to clone and modify. Defaults to iced_style’s default style.
The valid string values are “active”, “hovered” and “dragging”, same as the argument for
SliderStyleSheet
.None is the same as “active”.
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
- border_color¶
The “border_color” parameter given to the constructor.
- Returns
The set, copied or defaulted value.
- Return type
- border_width¶
The “border_width” parameter given to the constructor.
- Returns
The set, copied or defaulted value.
- Return type
- color¶
The “color” parameter given to the constructor.
- Returns
The set, copied or defaulted value.
- Return type
- shape()¶
- 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 containing the image data directly.
- 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.