pub enum BuiltinFunction {
Show 83 variants
GetWindowScaleFactor,
GetWindowDefaultFontSize,
AnimationTick,
Debug,
Mod,
Round,
Ceil,
Floor,
Abs,
Sqrt,
Cos,
Sin,
Tan,
ACos,
ASin,
ATan,
ATan2,
Log,
Ln,
Pow,
Exp,
ToFixed,
ToPrecision,
ToStringUnlocalized,
SetFocusItem,
ClearFocusItem,
ShowPopupWindow,
ClosePopupWindow,
ShowPopupMenu,
ShowPopupMenuInternal,
SetSelectionOffsets,
ItemFontMetrics,
StringToFloat,
StringIsFloat,
StringIsEmpty,
StringCharacterCount,
StringToLowercase,
StringToUppercase,
KeysToString,
ColorRgbaStruct,
ColorHsvaStruct,
ColorOklchStruct,
ColorBrighter,
ColorDarker,
ColorTransparentize,
ColorMix,
ColorWithAlpha,
ImageSize,
ArrayLength,
Rgb,
Hsv,
Oklch,
ColorScheme,
AccentColor,
SupportsNativeMenuBar,
SetupMenuBar,
SetupSystemTrayIcon,
Use24HourFormat,
MonthDayCount,
MonthOffset,
FormatDate,
DateNow,
ValidDate,
ParseDate,
TextInputFocused,
SetTextInputFocused,
ImplicitLayoutInfo(Orientation),
ItemAbsolutePosition,
RegisterCustomFontByPath,
RegisterCustomFontByMemory,
RegisterBitmapFont,
Translate,
UpdateTimers,
DetectOperatingSystem,
StartTimer,
StopTimer,
RestartTimer,
OpenUrl,
MacosBringAllWindowsToFront,
ParseMarkdown,
StringToStyledText,
ColorToStyledText,
DecimalSeparator,
}Expand description
A function built into the run-time
Variants§
GetWindowScaleFactor
GetWindowDefaultFontSize
AnimationTick
Debug
Mod
Round
Ceil
Floor
Abs
Sqrt
Cos
Sin
Tan
ACos
ASin
ATan
ATan2
Log
Ln
Pow
Exp
ToFixed
ToPrecision
ToStringUnlocalized
SetFocusItem
ClearFocusItem
ShowPopupWindow
ClosePopupWindow
ShowPopupMenu
Show a context popup menu.
Arguments are (parent, menu_tree, position)
The first argument (parent) is a reference to the ContextMenu native item
The second argument (menu_tree) is a ElementReference to the root of the tree,
and in the LLR, a NumberLiteral to an index in crate::llr::SubComponent::menu_item_trees
ShowPopupMenuInternal
Show a context popup menu from a list of entries.
Arguments are (parent, entries, position)
The entries argument is an array of MenuEntry
SetSelectionOffsets
ItemFontMetrics
StringToFloat
the “42”.to_float()
StringIsFloat
the “42”.is_float()
StringIsEmpty
the “42”.is_empty
StringCharacterCount
the “42”.length
StringToLowercase
StringToUppercase
KeysToString
ColorRgbaStruct
ColorHsvaStruct
ColorOklchStruct
ColorBrighter
ColorDarker
ColorTransparentize
ColorMix
ColorWithAlpha
ImageSize
ArrayLength
Rgb
Hsv
Oklch
ColorScheme
AccentColor
SupportsNativeMenuBar
SetupMenuBar
Setup the menu bar
arguments are: (ref entries, ref sub-menu, ref activated, item_tree_root, no_native_menu_bar, <condition>)
item_tree_root is a reference to the MenuItem tree root (just like in the Self::ShowPopupMenu call).
no_native_menu_bar is a boolean literal that is true when we shouldn’t try to setup the native menu bar.
condition is an optional expression that is the expression to if condition : MenuBar { ... } for optional menu
SetupSystemTrayIcon
Setup the menu of a SystemTrayIcon.
Arguments are (system_tray_ref, menu_tree_root) where menu_tree_root is an ElementReference to the root of
the MenuItem tree, lowered to a NumberLiteral index into crate::llr::SubComponent::menu_item_trees in the LLR.
Use24HourFormat
MonthDayCount
MonthOffset
FormatDate
DateNow
ValidDate
ParseDate
TextInputFocused
SetTextInputFocused
ImplicitLayoutInfo(Orientation)
ItemAbsolutePosition
RegisterCustomFontByPath
RegisterCustomFontByMemory
RegisterBitmapFont
Translate
UpdateTimers
DetectOperatingSystem
StartTimer
StopTimer
RestartTimer
OpenUrl
MacosBringAllWindowsToFront
ParseMarkdown
StringToStyledText
ColorToStyledText
Converts a color to a hex string wrapped in StyledText.
Used for <font color='\{expr}'> interpolation in @markdown,
because parse_interpolated takes StyledText arguments.
DecimalSeparator
Implementations§
Trait Implementations§
Source§impl Clone for BuiltinFunction
impl Clone for BuiltinFunction
Source§fn clone(&self) -> BuiltinFunction
fn clone(&self) -> BuiltinFunction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuiltinFunction
impl Debug for BuiltinFunction
impl Eq for BuiltinFunction
Source§impl From<BuiltinFunction> for Callable
impl From<BuiltinFunction> for Callable
Source§fn from(function: BuiltinFunction) -> Self
fn from(function: BuiltinFunction) -> Self
Source§impl From<BuiltinFunction> for BuiltinPropertyInfo
impl From<BuiltinFunction> for BuiltinPropertyInfo
Source§fn from(function: BuiltinFunction) -> Self
fn from(function: BuiltinFunction) -> Self
Source§impl From<BuiltinFunction> for LookupResult
impl From<BuiltinFunction> for LookupResult
Source§fn from(function: BuiltinFunction) -> Self
fn from(function: BuiltinFunction) -> Self
Source§impl PartialEq for BuiltinFunction
impl PartialEq for BuiltinFunction
Source§fn eq(&self, other: &BuiltinFunction) -> bool
fn eq(&self, other: &BuiltinFunction) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BuiltinFunction
Auto Trait Implementations§
impl Freeze for BuiltinFunction
impl RefUnwindSafe for BuiltinFunction
impl Send for BuiltinFunction
impl Sync for BuiltinFunction
impl Unpin for BuiltinFunction
impl UnsafeUnpin for BuiltinFunction
impl UnwindSafe for BuiltinFunction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more