Crate freya_hooks
source ·Expand description
§Freya Hooks
A collection of hooks to be used in Freya.
Macros§
- Alias for
Cow::Borrowed
, because that’s used a million times so shortening it is nice. Makes the code more readable. - Example usage:
- Create
FooThemeWith
structs without having to deal with the verbose syntax. - This macro has three arguments separator by commas.
Structs§
- Theming properties for the
Accordion
component. - You can use this to change a theme for only one component, with the
theme
property. - Animate a color.
- Animate a numeric value.
- Configuration for a given Asset.
- Theming properties for the
Body
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
BottomTab
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Button
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Canvas
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Checkbox
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
DropdownItem
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Dropdown
component. - You can use this to change a theme for only one component, with the
theme
property. - Create a configuration for a
UseEditable
. - Theming properties for Fonts.
- You can use this to change a theme for only one component, with the
theme
property. Theming properties for Fonts. - Theming properties for the
Graph
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Icon
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Input
component. - You can use this to change a theme for only one component, with the
theme
property. - A text line from a TextEditor
- Iterator over text lines.
- Theming properties for the
Link
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Loader
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
MenuContainer
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
MenuItem
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
NetworkImage
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Popup
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
ProgressBar
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Radio
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
ResizableHandle
component. - You can use this to change a theme for only one component, with the
theme
property. - A utf8 text rope.
- TextEditor implementing a Rope
- Theming properties for the
ScrollBar
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
ScrollView
component. Also used byVirtualScrollView
. - You can use this to change a theme for only one component, with the
theme
property. Also used byVirtualScrollView
. - Theming properties for the
SidebarItem
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Sidebar
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Slider
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
SnackBar
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Switch
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Tab
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Table
component. - You can use this to change a theme for only one component, with the
theme
property. - Holds the position of a cursor in a text
- Events for TextEditor
- Theming properties for the
Tile
component. - You can use this to change a theme for only one component, with the
theme
property. - Theming properties for the
Tooltip
component. - You can use this to change a theme for only one component, with the
theme
property. - Pass uniform values to a Shader.
- Animate your elements. Use
use_animation
to use this. - Holds a rendering hook callback that allows to render to the Canvas.
- Manage an editable content.
- Manage the focus operations of given Node
Enums§
- Controls the direction of the animation.
- Defines the duration for which an Asset will remain cached after it’s user has stopped using it. The default is 1h (3600s).
- Events emitted to the
UseEditable
. - How the editable content must behave.
- What to do once the animation finishes. By default it is
Stop
- Indicates the type of text dragging being done.
- Uniform value to be passed to a Shader.
Constants§
Traits§
- Common trait for editable texts
Functions§
- Animate your elements easily.
- Global caching system for assets.
- Register a rendering hook to gain access to the Canvas. Reactivity managed through signals.
- Register a rendering hook to gain access to the Canvas. Reactivity managed with manual dependencies.
- Create a virtual text editor with it’s own cursor and rope.
- Create a focus manager for a node.
- Initialize the global caching system for assets.
- Provide the default
Theme
. - Keep some native features (focused element, preferred theme, etc) on sync between the platform and the components
- Provide a custom
Theme
. - Subscribe to a Node layout changes.
- Get a signal to read the latest layout from a Node.
- Get access to information and features of the platform.
- Get access to information from the platform.
- Access the preferred theme selected by the user.
- Subscribe to
Theme
changes.