pub enum BuiltinFunction {
Show 61 variants
GetWindowScaleFactor,
GetWindowDefaultFontSize,
AnimationTick,
Debug,
Mod,
Round,
Ceil,
Floor,
Abs,
Sqrt,
Cos,
Sin,
Tan,
ACos,
ASin,
ATan,
ATan2,
Log,
Pow,
SetFocusItem,
ClearFocusItem,
ShowPopupWindow,
ClosePopupWindow,
ShowPopupMenu,
SetSelectionOffsets,
ItemMemberFunction(SmolStr),
ItemFontMetrics,
StringToFloat,
StringIsFloat,
StringIsEmpty,
StringCharacterCount,
ColorRgbaStruct,
ColorHsvaStruct,
ColorBrighter,
ColorDarker,
ColorTransparentize,
ColorMix,
ColorWithAlpha,
ImageSize,
ArrayLength,
Rgb,
Hsv,
ColorScheme,
SupportsNativeMenuBar,
SetupNativeMenuBar,
Use24HourFormat,
MonthDayCount,
MonthOffset,
FormatDate,
DateNow,
ValidDate,
ParseDate,
TextInputFocused,
SetTextInputFocused,
ImplicitLayoutInfo(Orientation),
ItemAbsolutePosition,
RegisterCustomFontByPath,
RegisterCustomFontByMemory,
RegisterBitmapFont,
Translate,
UpdateTimers,
}
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
Pow
SetFocusItem
ClearFocusItem
ShowPopupWindow
ClosePopupWindow
ShowPopupMenu
Show a context popup menu.
Arguments are (parent, entries, position)
The first argument (parent) is a reference to the ContectMenu
native item
The second argument (entries) can either be of type Array of MenuEntry, or a reference to a MenuItem tree.
When it is a menu item tree, it 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
SetSelectionOffsets
ItemMemberFunction(SmolStr)
A function that belongs to an item (such as TextInput’s select-all function).
ItemFontMetrics
StringToFloat
the “42”.to_float()
StringIsFloat
the “42”.is_float()
StringIsEmpty
the “42”.is_empty
StringCharacterCount
the “42”.length
ColorRgbaStruct
ColorHsvaStruct
ColorBrighter
ColorDarker
ColorTransparentize
ColorMix
ColorWithAlpha
ImageSize
ArrayLength
Rgb
Hsv
ColorScheme
SupportsNativeMenuBar
SetupNativeMenuBar
Setup the native menu bar, or the item-tree based menu bar
arguments ate: (ref entries, ref sub-menu, ref activated, item_tree_root?)
When there are 4 arguments, the last one is a reference to the MenuItem tree root (just like the entries in the Self::ShowPopupMenu
call)
then the code will assign the callback handler and properties
Use24HourFormat
MonthDayCount
MonthOffset
FormatDate
DateNow
ValidDate
ParseDate
TextInputFocused
SetTextInputFocused
ImplicitLayoutInfo(Orientation)
ItemAbsolutePosition
RegisterCustomFontByPath
RegisterCustomFontByMemory
RegisterBitmapFont
Translate
UpdateTimers
Implementations§
Trait Implementations§
Source§impl Clone for BuiltinFunction
impl Clone for BuiltinFunction
Source§fn clone(&self) -> BuiltinFunction
fn clone(&self) -> BuiltinFunction
1.0.0 · 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
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 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
impl Eq for BuiltinFunction
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 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
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<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