Crate freya_hooks

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.
AnimConfiguration
AnimNum
Animate a numeric value.
AnimSequential
Chain a sequence of animated values.
AnimationContext
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.
BottomTabTheme
Theming properties for the BottomTab component.
BottomTabThemeWith
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.
CheckboxTheme
Theming properties for the Checkbox component.
CheckboxThemeWith
You can use this to change a theme for only one component, with the theme property.
ColorsSheet
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
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.
ResizableHandleTheme
Theming properties for the ResizableHandle component.
ResizableHandleThemeWith
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.
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.
TabTheme
Theming properties for the Tab component.
TabThemeWith
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.
UseAnimation
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 text.
UseFocus
Manage the focus operations of given Node
UsePlatform
UsePlatformEvents
UsePopup
Created using use_popup.
UsePopupAnswer

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
OnDepsChange
What to do once the animation dependencies change. By default it is Reset
OnFinish
What to do once the animation finishes. By default it is Stop
TextDragging
Indicates the type of text dragging being done.
UniformValue
Uniform value to be passed to a Shader.
UsePlatformError

Constants§

BANANA_THEME
DARK_THEME
LIGHT_THEME

Traits§

AnimatedValue
TextEditor
Common trait for editable texts

Functions§

apply_value
use_activable_route
Consume an activable Route, use in combination with ActivableRoute.
use_animation
Animate your elements easily.
use_animation_with_dependencies
use_asset_cacher
Get access to the global cache of assets.
use_canvas
Register a rendering hook to gain access to the Canvas. Reactivity managed through signals.
use_canvas_with_deps
Register a rendering hook to gain access to the Canvas. Reactivity managed with manual dependencies.
use_editable
Hook to create an editable text.
use_focus
Create a focus manager for a node.
use_focus_for_id
Same as use_focus but providing a Node instead of generating a new one.
use_get_theme
Subscribe to Theme changes, default theme will be used if there is no provided Theme.
use_init_asset_cacher
Initialize the global cache of assets.
use_init_default_theme
Provide the default Theme.
use_init_native_platform
Keep some native features (focused element, preferred theme, etc) on sync between the platform and the components
use_init_theme
Provide a custom Theme.
use_node
Subscribe to a Node layout changes.
use_node_from_signal
use_node_signal
Get a signal to read the latest layout from a Node.
use_node_signal_with_prev
use_node_with_reference
use_platform
Get access to information and features of the platform.
use_platform_information
Get access to information from the platform.
use_popup
Create a popups context which can later be answered using use_popup_answer.
use_popup_answer
Answer a popup created with use_popup.
use_preferred_theme
Access the preferred theme selected by the user.
use_theme
Subscribe to Theme changes.