#[non_exhaustive]pub enum Icon {
Show 68 variants
Check,
ChevronRight,
ChevronDown,
ChevronUp,
ChevronLeft,
Close,
Plus,
Minus,
Dot,
Diamond,
Search,
Settings,
Folder,
File,
Up,
Info,
Warning,
Error,
Success,
Undo,
Redo,
Reset,
Copy,
Cut,
Paste,
PasteSpecial,
Delete,
Keyboard,
Command,
Menu,
More,
Edit,
Help,
Save,
Fullscreen,
ExitFullscreen,
Notification,
Theme,
Visible,
Hidden,
History,
Home,
Lock,
Unlock,
Picker,
TriangleRight,
TriangleDown,
TriangleUp,
Grip,
WindowMinimize,
WindowMaximize,
WindowRestore,
WindowClose,
Circle,
Disc,
Square,
Triangle,
Asterisk,
Corner,
Phosphor(PhosphorIcon),
Layout,
LayoutLeft,
LayoutLeftOff,
LayoutBottom,
LayoutBottomOff,
LayoutRight,
LayoutRightOff,
Custom(CustomIcon),
}Expand description
What an icon means. Each has a glyph in the icon font (with the
phosphor feature) and a painted fallback.
Need (icon): an icon by name.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Check
A tick: a checked menu item, a passed check.
ChevronRight
A submenu, a collapsed section.
ChevronDown
An open section, a drop-down.
ChevronUp
ChevronLeft
Close
Close, dismiss, clear.
Plus
Minus
Dot
A small filled dot: a changed value, a status.
Diamond
A small filled diamond: a value moved by someone else.
Search
Settings
Folder
File
Up
Up one folder.
Info
Warning
Error
Success
Undo
Redo
Reset
Back to the default.
Copy
Cut
Cut: scissors.
Paste
Paste: a clipboard.
PasteSpecial
Paste with a choice (format, transform, parts): a clipboard holding lines.
Delete
Keyboard
Command
The command palette.
Menu
A menu (a list).
More
More actions.
Edit
Help
Save
Fullscreen
ExitFullscreen
Notification
Theme
Light and dark.
Visible
Hidden
History
Recent items.
Home
Lock
Locked: not to be changed.
Unlock
Unlocked: free to change.
Picker
An eyedropper: pick a value or a colour from the image.
TriangleRight
A filled triangle pointing to the end: a closed branch (always painted, like the dot).
TriangleDown
A filled triangle pointing down: an open branch, a descending sort.
TriangleUp
A filled triangle pointing up: an ascending sort.
Grip
Two dots one above the other: something to grab or to open (a folded area’s strip); always painted.
WindowMinimize
A window’s buttons, drawn by the application: a line, a square, two squares, a cross, on the pixel grid; always painted.
WindowMaximize
WindowRestore
WindowClose
Circle
Marks filling their square, always painted: what a dot, an LED or
a flag shows by default (the kit’s led-* and flag-* glyph
roles). A hollow ring.
Disc
A filled disc.
Square
A filled square.
Triangle
A filled triangle, point up.
Asterisk
Three crossed strokes.
Corner
A triangle filling a corner of its square (the top start one when drawn alone; a corner flag turns it to its corner).
Phosphor(PhosphorIcon)
A glyph of the Phosphor font by name (phosphor:grid-four,
registry); only with the phosphor feature.
Layout
The window’s layout, as a frame of areas: a button opening the layout’s choices (VS Code’s “Customize layout”); always painted.
LayoutLeft
A frame with its left area filled: that area shows (a toggle on).
The -off icons outline the area instead: it is folded or hidden.
Always painted, on the pixel grid.
LayoutLeftOff
LayoutBottom
A frame with its bottom area filled, or outlined (-off).
LayoutBottomOff
LayoutRight
A frame with its right area filled, or outlined (-off).
LayoutRightOff
Custom(CustomIcon)
An icon the application registered (icon_set::register): an SVG
file, drawn from textures made when the theme is installed.
Implementations§
Source§impl Icon
impl Icon
Sourcepub fn by_name(name: &str) -> Option<Icon>
pub fn by_name(name: &str) -> Option<Icon>
The icon of a name (settings), as Icon::name gives it:
egui-pop’s, then the Phosphor glyphs’ (phosphor:<name>), then
the registered ones (icon_set::register). Resolved once
(registry::lookup); registry::resolve also reports a name
that does not resolve.
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
Its name in kebab case (chevron-right): for the debug bridge and
the gallery.
Sourcepub fn glyph(self) -> Option<&'static str>
pub fn glyph(self) -> Option<&'static str>
Its glyph in the icon font; None without the phosphor feature,
and for the marks that are always painted (dot, diamond, the
triangles).
Sourcepub fn size(self, size: Size) -> IconWidget
pub fn size(self, size: Size) -> IconWidget
Sized for a place.
Sourcepub fn tone(self, tone: Tone) -> IconWidget
pub fn tone(self, tone: Tone) -> IconWidget
Coloured by a tone.
Sourcepub fn label(self, label: &str) -> IconWidget
pub fn label(self, label: &str) -> IconWidget
With an accessible name.
Trait Implementations§
Source§impl Ord for Icon
impl Ord for Icon
Source§impl PartialOrd for Icon
impl PartialOrd for Icon
impl Copy for Icon
impl Eq for Icon
impl StructuralPartialEq for Icon
Auto Trait Implementations§
impl Freeze for Icon
impl RefUnwindSafe for Icon
impl Send for Icon
impl Sync for Icon
impl Unpin for Icon
impl UnsafeUnpin for Icon
impl UnwindSafe for Icon
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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