Module i_slint_core::items
source · Expand description
This module contains the builtin items, either in this file or in sub-modules.
When adding an item or a property, it needs to be kept in sync with different place. (This is less than ideal and maybe we can have some automation later)
- It needs to be changed in this module
- In the compiler: builtins.slint
- In the interpreter (new item only): dynamic_component.rs
- For the C++ code (new item only): the cbindgen.rs to export the new item
- Don’t forget to update the documentation
Re-exports
pub use crate::item_tree::ItemRc;Structs
The implementation of the
BorderRectangle elementHelper struct containing the offsets of the fields of the struct
BorderRectangleThe implementation of the
BoxShadow elementHelper struct containing the offsets of the fields of the struct
BoxShadowThe implementation of the
Clip elementHelper struct containing the offsets of the fields of the struct
ClipThe implementation of the
ClippedImage elementHelper struct containing the offsets of the fields of the struct
ClippedImageThe implementation of an empty items that does nothing
Helper struct containing the offsets of the fields of the struct
EmptyThe implementation of the
Flickable elementWraps the internal data structure for the Flickable
Helper struct containing the offsets of the fields of the struct
FlickableA runtime item that exposes key
Helper struct containing the offsets of the fields of the struct
FocusScopeThe implementation of the
Image elementHelper struct containing the offsets of the fields of the struct
ImageItemItems are the nodes in the render tree.
The Layer Item is not meant to be used directly by the .slint code, instead, the
layer: xxx property should be usedHelper struct containing the offsets of the fields of the struct
LayerThe Opacity Item is not meant to be used directly by the .slint code, instead, the
opacity: xxx or visible: false should be usedHelper struct containing the offsets of the fields of the struct
OpacityThe implementation of the
Path elementHelper struct containing the offsets of the fields of the struct
PathRepresents a Pointer event sent by the windowing system.
The implementation of the
PropertyAnimation elementHelper struct containing the offsets of the fields of the struct
PropertyAnimationThe implementation of the
Rectangle elementHelper struct containing the offsets of the fields of the struct
RectangleThe implementation of the
Rotate elementHelper struct containing the offsets of the fields of the struct
RotateThe implementation of the
Text elementHelper struct containing the offsets of the fields of the struct
TextThe implementation of the
TextInput elementHelper struct containing the offsets of the fields of the struct
TextInputThis struct holds the fields needed for rendering a TextInput item after applying any
on-going composition. This way the renderer’s don’t have to duplicate the code for extracting
and applying the pre-edit text, cursor placement within, etc.
The implementation of the
TouchArea elementHelper struct containing the offsets of the fields of the struct
TouchAreaThe implementation of the
Window elementHelper struct containing the offsets of the fields of the struct
WindowItemEnums
This enum represents the different values for the
accessible-role property, used to describe the
role of an element in the context of assistive technology such as screen readers.This enum represents the value of the
dialog-button-role property which can be added to
any element within a Dialog to put that item in the button row, and its exact position
depends on the role and the platform.This enum describes whether an event was rejected or accepted by an event handler.
This enum describes the different ways of deciding what the inside of a shape described by a path shall be.
This enum is used to define the type of the input field. Currently this only differentiates between
text and password inputs but in the future it could be expanded to also define what type of virtual keyboard
should be shown, for example.
Enum representing the alignment property of a BoxLayout or HorizontalLayout
This enum represents different types of mouse cursors. It is a subset of the mouse cursors available in CSS.
For details and pictograms see the MDN Documentation for cursor.
Depending on the backend and used OS unidirectional resize cursors may be replaced with bidirectional ones.
PathEvent is a low-level data structure describing the composition of a path. Typically it is
generated at compile time from a higher-level description, such as SVG commands.
This enum describes the different types of buttons for a pointer event,
typically on a mouse or a pencil.
Returned by the
render() function on items to indicate whether the rendering of
children should be handled by the caller, of if the item took care of that (for example
through layer indirection)This enum describes the different types of alignment of text along the horizontal axis.
This enum describes the how the text appear if it is too wide to fit in the Text width.
This enum describes the different types of alignment of text along the vertical axis.
This enum describes the how the text wrap if it is too wide to fit in the Text width.
Statics
Traits
Items are the nodes in the render tree.
Note: Was generated from the
#[vtable] macro on ItemVTableTrait containing the associated constant relative to the trait Item.
Type Definitions
Alias for
vtable::VRef<ItemVTable> which represent a pointer to a dyn Item with
the associated vtableWorkarounds for cbindgen