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
BorderRectangleelement - Helper struct containing the offsets of the fields of the struct
BorderRectangle - The implementation of the
BoxShadowelement - Helper struct containing the offsets of the fields of the struct
BoxShadow - The implementation of the
Clipelement - Helper struct containing the offsets of the fields of the struct
Clip - The implementation of the
ClippedImageelement - Helper struct containing the offsets of the fields of the struct
ClippedImage - The implementation of the
ComponentContainerelement - Helper struct containing the offsets of the fields of the struct
ComponentContainer - The implementation of an empty items that does nothing
- Helper struct containing the offsets of the fields of the struct
Empty - The implementation of the
Flickableelement - Wraps the internal data structure for the Flickable
- Helper struct containing the offsets of the fields of the struct
Flickable - A runtime item that exposes key
- Helper struct containing the offsets of the fields of the struct
FocusScope - The implementation of the
Imageelement - Helper struct containing the offsets of the fields of the struct
ImageItem - Invariant, same as vtable::Inner: vtable and ptr has to be valid and ptr an instance matching the vtable
- Items are the nodes in the render tree.
- This structure is generated and passed to the key press and release callbacks of the
FocusScopeelement. - KeyboardModifier provides booleans to indicate possible modifier keys on a keyboard, such as Shift, Control, etc. This structure is generated as part of
KeyEventOn macOS, the command key is mapped to the meta modifier. On Windows, the windows key is mapped to the meta modifier. - The Layer Item is not meant to be used directly by the .slint code, instead, the
layer: xxxproperty should be used - Helper struct containing the offsets of the fields of the struct
Layer - The Opacity Item is not meant to be used directly by the .slint code, instead, the
opacity: xxxorvisible: falseshould be used - Helper struct containing the offsets of the fields of the struct
Opacity - The implementation of the
Pathelement - Helper struct containing the offsets of the fields of the struct
Path - Represents a Pointer event sent by the windowing system. This structure is passed to the
pointer-eventcallback of theTouchAreaelement. - Represents a Pointer scroll (or wheel) event sent by the windowing system. This structure is passed to the
scroll-eventcallback of theTouchAreaelement. - The implementation of the
PropertyAnimationelement - Helper struct containing the offsets of the fields of the struct
PropertyAnimation - The implementation of the
Rectangleelement - Helper struct containing the offsets of the fields of the struct
Rectangle - The implementation of the
Rotateelement - Helper struct containing the offsets of the fields of the struct
Rotate - Represents an item in a StandardListView and a StandardTableView.
- Value of the state property A state is just the current state, but also has information about the previous state and the moment it changed
- This is used to define the column and the column header of a TableView
- The implementation of the
Textelement - Helper struct containing the offsets of the fields of the struct
Text - The implementation of the
TextInputelement - Helper struct containing the offsets of the fields of the struct
TextInput - This 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
TouchAreaelement - Helper struct containing the offsets of the fields of the struct
TouchArea - The implementation of the
Windowelement - Helper struct containing the offsets of the fields of the struct
WindowItem
Enums
- This enum represents the different values for the
accessible-roleproperty, 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-roleproperty which can be added to any element within aDialogto 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 defines how the source image shall fit into an
Imageelement. - This enum specifies how the source image will be scaled.
- This enum is used to define the type of the input field.
- Enum representing the alignment property of a
HorizontalBox, aVerticalBox, aHorizontalLayout, orVerticalLayout. - This enum represents different types of mouse cursors. It’s 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.
- Represents the orientation of an element or widget such as the
Slider. - 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.
- The enum reports what happened to the
PointerEventButtonin the event - 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 represents the different values of the
sort-orderproperty. It’s used to sort aStandardTableViewby a column. - Use this enum to add standard buttons to a
Dialog. The look and positioning of theseStandardButtons depends on the environment (OS, UI environment, etc.) the application runs in. - This enum describes the different types of alignment of text along the horizontal axis of a
Textelement. - This enum describes the how the text appear if it is too wide to fit in the
Textwidth. - This enum describes the different types of alignment of text along the vertical axis of a
Textelement. - This enum describes the how the text wrap if it is too wide to fit in the
Textwidth.
Statics
Traits
- Items are the nodes in the render tree. Note: Was generated from the
#[vtable]macro onItemVTable - Trait containing the associated constant relative to the trait Item.
Type Aliases
- Alias for
vtable::VRef<ItemVTable>which represent a pointer to adyn Itemwith the associated vtable - Workarounds for cbindgen