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
FooThemeWithstructs 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
Accordioncomponent. - Accordion
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - 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
Bodycomponent. - Body
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Bottom
TabTheme - Theming properties for the
BottomTabcomponent. - Bottom
TabTheme With - You can use this to change a theme for only one component, with the
themeproperty. - Button
Theme - Theming properties for the
Buttoncomponent. - Button
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Checkbox
Theme - Theming properties for the
Checkboxcomponent. - Checkbox
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Colors
Sheet - Dropdown
Item Theme - Theming properties for the
DropdownItemcomponent. - Dropdown
Item Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Dropdown
Theme - Theming properties for the
Dropdowncomponent. - Dropdown
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - 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
themeproperty. Theming properties for Fonts. - Graph
Theme - Theming properties for the
Graphcomponent. - Graph
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Icon
Theme - Theming properties for the
Iconcomponent. - Icon
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Input
Theme - Theming properties for the
Inputcomponent. - Input
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Line
- A text line from a TextEditor
- Lines
Iterator - Iterator over text lines.
- Link
Theme - Theming properties for the
Linkcomponent. - Link
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Loader
Theme - Theming properties for the
Loadercomponent. - Loader
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Menu
Container Theme - Theming properties for the
MenuContainercomponent. - Menu
Container Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Menu
Item Theme - Theming properties for the
MenuItemcomponent. - Menu
Item Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Navigation
Mark - Popup
Theme - Theming properties for the
Popupcomponent. - Popup
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Progress
BarTheme - Theming properties for the
ProgressBarcomponent. - Progress
BarTheme With - You can use this to change a theme for only one component, with the
themeproperty. - Radio
Theme - Theming properties for the
Radiocomponent. - Radio
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Resizable
Handle Theme - Theming properties for the
ResizableHandlecomponent. - Resizable
Handle Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Rope
- A utf8 text rope.
- Rope
Editor - TextEditor implementing a Rope
- Scroll
BarTheme - Theming properties for the
ScrollBarcomponent. - Scroll
BarTheme With - You can use this to change a theme for only one component, with the
themeproperty. - Sidebar
Item Theme - Theming properties for the
SidebarItemcomponent. - Sidebar
Item Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Sidebar
Theme - Theming properties for the
Sidebarcomponent. - Sidebar
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Slider
Theme - Theming properties for the
Slidercomponent. - Slider
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Snack
BarTheme - Theming properties for the
SnackBarcomponent. - Snack
BarTheme With - You can use this to change a theme for only one component, with the
themeproperty. - Switch
Theme - Theming properties for the
Switchcomponent. - Switch
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - TabTheme
- Theming properties for the
Tabcomponent. - TabTheme
With - You can use this to change a theme for only one component, with the
themeproperty. - Table
Theme - Theming properties for the
Tablecomponent. - Table
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Text
Cursor - Holds the position of a cursor in a text
- Text
Event - Events for TextEditor
- Theme
- Ticker
- Tile
Theme - Theming properties for the
Tilecomponent. - Tile
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Tooltip
Theme - Theming properties for the
Tooltipcomponent. - Tooltip
Theme With - You can use this to change a theme for only one component, with the
themeproperty. - Uniforms
Builder - Pass uniform values to a Shader.
- UseAnimation
- Animate your elements. Use
use_animationto 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
Themechanges, 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
Themechanges.