Crate hello_egui_utils

Source
Expand description

§hello_egui_utils

egui_ver Latest version Documentation unsafe forbidden License

This crate contains helper methods and structs used all over the hello_egui project.

Modules§

center
Helper struct to easily align things with unknown sizes

Macros§

async_fn_def
This macro generates the async fn
asyncify
This macro generates a callback based and a async version of the function
call_self_fn
Matches the self reference of the callback fn
concat_idents
This macros makes it possible to concatenate identifiers at compile time and use them as normal. It’s an extension/replacement of std::concat_idents, since in comprassion to the std-solution, the idents here can be used everywhere.
fn_def
This macro generates the callback fn
fnify
This macro generates the async fn and the callback fn

Traits§

MaybeSend
Marker trait for types that can be sent between threads (this will be not be Send on wasm) Types that can be transferred across thread boundaries.
MaybeSync
Marker trait for types that can be shared between threads (this will be not be Sync on wasm) Types for which it is safe to share references between threads.

Functions§

current_scroll_delta
Returns the approximate current scroll delta of the ui
measure_text
Returns the size of the text in the current ui (based on the max width of the ui)

Type Aliases§

CallbackType
Type of the callback function