Crate freya_hooks

Source
Expand description

§Freya Hooks

A collection of hooks to be used in Freya.

Macros§

cow_borrowed
Alias for Cow::Borrowed, because that’s used a million times so shortening it is nice. Makes the code more readable.
define_theme
Example usage:
theme_with
Create FooThemeWith structs without having to deal with the verbose syntax.
use_applied_theme
This macro has three arguments separator by commas.

Structs§

AccordionTheme
Theming properties for the Accordion component.
AccordionThemeWith
You can use this to change a theme for only one component, with the theme property.
ActivableRouteContext
AnimColor
Animate a color.
AnimNum
Animate a numeric value.
AssetCacher
AssetConfiguration
Configuration for a given Asset.
BodyTheme
Theming properties for the Body component.
BodyThemeWith
You can use this to change a theme for only one component, with the theme property.
ButtonTheme
Theming properties for the Button component.
ButtonThemeWith
You can use this to change a theme for only one component, with the theme property.
CanvasTheme
Theming properties for the Canvas component.
CanvasThemeWith
You can use this to change a theme for only one component, with the theme property.
CheckboxTheme
Theming properties for the Checkbox component.
CheckboxThemeWith
You can use this to change a theme for only one component, with the theme property.
Context
DropdownItemTheme
Theming properties for the DropdownItem component.
DropdownItemThemeWith
You can use this to change a theme for only one component, with the theme property.
DropdownTheme
Theming properties for the Dropdown component.
DropdownThemeWith
You can use this to change a theme for only one component, with the theme property.
EditableConfig
Create a configuration for a UseEditable.
EditorHistory
FontTheme
Theming properties for Fonts.
FontThemeWith
You can use this to change a theme for only one component, with the theme property. Theming properties for Fonts.
GraphTheme
Theming properties for the Graph component.
GraphThemeWith
You can use this to change a theme for only one component, with the theme property.
IconTheme
Theming properties for the Icon component.
IconThemeWith
You can use this to change a theme for only one component, with the theme property.
InputTheme
Theming properties for the Input component.
InputThemeWith
You can use this to change a theme for only one component, with the theme property.
Line
A text line from a TextEditor
LinesIterator
Iterator over text lines.
LinkTheme
Theming properties for the Link component.
LinkThemeWith
You can use this to change a theme for only one component, with the theme property.
LoaderTheme
Theming properties for the Loader component.
LoaderThemeWith
You can use this to change a theme for only one component, with the theme property.
MenuContainerTheme
Theming properties for the MenuContainer component.
MenuContainerThemeWith
You can use this to change a theme for only one component, with the theme property.
MenuItemTheme
Theming properties for the MenuItem component.
MenuItemThemeWith
You can use this to change a theme for only one component, with the theme property.
NavigationMark
NetworkImageTheme
Theming properties for the NetworkImage component.
NetworkImageThemeWith
You can use this to change a theme for only one component, with the theme property.
PlatformInformation
Information about the platform.
PopupTheme
Theming properties for the Popup component.
PopupThemeWith
You can use this to change a theme for only one component, with the theme property.
ProgressBarTheme
Theming properties for the ProgressBar component.
ProgressBarThemeWith
You can use this to change a theme for only one component, with the theme property.
RadioTheme
Theming properties for the Radio component.
RadioThemeWith
You can use this to change a theme for only one component, with the theme property.
Rope
A utf8 text rope.
RopeEditor
TextEditor implementing a Rope
ScrollBarTheme
Theming properties for the ScrollBar component.
ScrollBarThemeWith
You can use this to change a theme for only one component, with the theme property.
ScrollViewTheme
Theming properties for the ScrollView component. Also used by VirtualScrollView.
ScrollViewThemeWith
You can use this to change a theme for only one component, with the theme property. Also used by VirtualScrollView.
SidebarItemTheme
Theming properties for the SidebarItem component.
SidebarItemThemeWith
You can use this to change a theme for only one component, with the theme property.
SidebarTheme
Theming properties for the Sidebar component.
SidebarThemeWith
You can use this to change a theme for only one component, with the theme property.
SliderTheme
Theming properties for the Slider component.
SliderThemeWith
You can use this to change a theme for only one component, with the theme property.
SnackBarTheme
Theming properties for the SnackBar component.
SnackBarThemeWith
You can use this to change a theme for only one component, with the theme property.
SwitchTheme
Theming properties for the Switch component.
SwitchThemeWith
You can use this to change a theme for only one component, with the theme property.
TableTheme
Theming properties for the Table component.
TableThemeWith
You can use this to change a theme for only one component, with the theme property.
TextCursor
Holds the position of a cursor in a text
TextEvent
Events for TextEditor
Theme
Ticker
TileTheme
Theming properties for the Tile component.
TileThemeWith
You can use this to change a theme for only one component, with the theme property.
TooltipTheme
Theming properties for the Tooltip component.
TooltipThemeWith
You can use this to change a theme for only one component, with the theme property.
UniformsBuilder
Pass uniform values to a Shader.
UseAnimator
Animate your elements. Use use_animation to use this.
UseCanvas
Holds a rendering hook callback that allows to render to the Canvas.
UseCanvasRunner
UseEditable
Manage an editable content.
UseFocus
Manage the focus operations of given Node
UsePlatform

Enums§

AnimDirection
Controls the direction of the animation.
AssetAge
Defines the duration for which an Asset will remain cached after it’s user has stopped using it. The default is 1h (3600s).
Ease
EditableEvent
Events emitted to the UseEditable.
EditableMode
How the editable content must behave.
Function
HistoryChange
OnFinish
What to do once the animation finishes. By default it is Stop
UniformValue
Uniform value to be passed to a Shader.
UsePlatformError

Constants§

DARK_THEME
LIGHT_THEME

Traits§

AnimatedValue
TextEditor
Common trait for editable texts

Functions§

apply_value
use_activable_route
use_animation
Animate your elements easily.
use_animation_with_dependencies
use_asset_cacher
Global caching system for assets.
use_canvas
Register a rendering hook to gain access to the Canvas.
use_editable
Create a virtual text editor with it’s own cursor and rope.
use_focus
Create a focus manager for a node.
use_get_theme
Subscribe to Theme changes, default theme will be used if there is no provided Theme.
use_init_accessibility
Sync both the Focus shared state and the platform accessibility focus
use_init_default_theme
Provide the default Theme.
use_init_theme
Provide a custom Theme.
use_node
Subscribe to a Node layout changes.
use_node_signal
Get a signal to read the latest layout from a Node.
use_platform
Get access to information and features of the platform.
use_theme
Subscribe to Theme changes.

Type Aliases§

AccessibilityIdCounter