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§
- Accordion
Theme - Theming properties for the
Accordion
component. - Accordion
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Activable
Route Context - Anim
Color - Animate a color.
- Anim
Configuration - AnimNum
- Animate a numeric value.
- Anim
Sequential - Chain a sequence of animated values.
- Animation
Context - Asset
Cacher - Asset
Configuration - Configuration for a given Asset.
- Body
Theme - Theming properties for the
Body
component. - Body
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Bottom
TabTheme - Theming properties for the
BottomTab
component. - Bottom
TabTheme With - You can use this to change a theme for only one component, with the
theme
property. - Button
Theme - Theming properties for the
Button
component. - Button
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Checkbox
Theme - Theming properties for the
Checkbox
component. - Checkbox
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Colors
Sheet - Dropdown
Item Theme - Theming properties for the
DropdownItem
component. - Dropdown
Item Theme With - You can use this to change a theme for only one component, with the
theme
property. - Dropdown
Theme - Theming properties for the
Dropdown
component. - Dropdown
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Editable
Config - Create a configuration for a
UseEditable
. - Editor
History - Font
Theme - Theming properties for Fonts.
- Font
Theme With - You can use this to change a theme for only one component, with the
theme
property. Theming properties for Fonts. - Graph
Theme - Theming properties for the
Graph
component. - Graph
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Icon
Theme - Theming properties for the
Icon
component. - Icon
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Input
Theme - Theming properties for the
Input
component. - Input
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Line
- A text line from a TextEditor
- Lines
Iterator - Iterator over text lines.
- Link
Theme - Theming properties for the
Link
component. - Link
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Loader
Theme - Theming properties for the
Loader
component. - Loader
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Menu
Container Theme - Theming properties for the
MenuContainer
component. - Menu
Container Theme With - You can use this to change a theme for only one component, with the
theme
property. - Menu
Item Theme - Theming properties for the
MenuItem
component. - Menu
Item Theme With - You can use this to change a theme for only one component, with the
theme
property. - Navigation
Mark - Popup
Theme - Theming properties for the
Popup
component. - Popup
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Progress
BarTheme - Theming properties for the
ProgressBar
component. - Progress
BarTheme With - You can use this to change a theme for only one component, with the
theme
property. - Radio
Theme - Theming properties for the
Radio
component. - Radio
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Resizable
Handle Theme - Theming properties for the
ResizableHandle
component. - Resizable
Handle Theme With - You can use this to change a theme for only one component, with the
theme
property. - Rope
- A utf8 text rope.
- Rope
Editor - TextEditor implementing a Rope
- Scroll
BarTheme - Theming properties for the
ScrollBar
component. - Scroll
BarTheme With - You can use this to change a theme for only one component, with the
theme
property. - Sidebar
Item Theme - Theming properties for the
SidebarItem
component. - Sidebar
Item Theme With - You can use this to change a theme for only one component, with the
theme
property. - Sidebar
Theme - Theming properties for the
Sidebar
component. - Sidebar
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Slider
Theme - Theming properties for the
Slider
component. - Slider
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Snack
BarTheme - Theming properties for the
SnackBar
component. - Snack
BarTheme With - You can use this to change a theme for only one component, with the
theme
property. - Switch
Theme - Theming properties for the
Switch
component. - Switch
Theme With - You can use this to change a theme for only one component, with the
theme
property. - TabTheme
- Theming properties for the
Tab
component. - TabTheme
With - You can use this to change a theme for only one component, with the
theme
property. - Table
Theme - Theming properties for the
Table
component. - Table
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Text
Cursor - Holds the position of a cursor in a text
- Text
Event - Events for TextEditor
- Theme
- Ticker
- Tile
Theme - Theming properties for the
Tile
component. - Tile
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Tooltip
Theme - Theming properties for the
Tooltip
component. - Tooltip
Theme With - You can use this to change a theme for only one component, with the
theme
property. - Uniforms
Builder - 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.
- UseCanvas
Runner - UseEditable
- Manage an editable text.
- UseFocus
- Manage the focus operations of given Node
- UsePlatform
- UsePlatform
Events - UsePopup
- Created using use_popup.
- UsePopup
Answer
Enums§
- Anim
Direction - Controls the direction of the animation.
- Asset
Age - Defines the duration for which an Asset will remain cached after it’s user has stopped using it. The default is 1h (3600s).
- Ease
- Editable
Event - Events emitted to the
UseEditable
. - Editable
Mode - How the editable content must behave.
- Function
- History
Change - OnDeps
Change - 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
- Text
Dragging - Indicates the type of text dragging being done.
- Uniform
Value - Uniform value to be passed to a Shader.
- UsePlatform
Error
Constants§
Traits§
- Animated
Value - Text
Editor - 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 providedTheme
. - 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.