#[non_exhaustive]#[repr(u32)]pub enum StyleColor {
Show 53 variants
Text = 0,
TextDisabled = 1,
WindowBg = 2,
ChildBg = 3,
PopupBg = 4,
Border = 5,
BorderShadow = 6,
FrameBg = 7,
FrameBgHovered = 8,
FrameBgActive = 9,
TitleBg = 10,
TitleBgActive = 11,
TitleBgCollapsed = 12,
MenuBarBg = 13,
ScrollbarBg = 14,
ScrollbarGrab = 15,
ScrollbarGrabHovered = 16,
ScrollbarGrabActive = 17,
CheckMark = 18,
SliderGrab = 19,
SliderGrabActive = 20,
Button = 21,
ButtonHovered = 22,
ButtonActive = 23,
Header = 24,
HeaderHovered = 25,
HeaderActive = 26,
Separator = 27,
SeparatorHovered = 28,
SeparatorActive = 29,
ResizeGrip = 30,
ResizeGripHovered = 31,
ResizeGripActive = 32,
Tab = 33,
TabHovered = 34,
TabActive = 35,
TabUnfocused = 36,
TabUnfocusedActive = 37,
PlotLines = 38,
PlotLinesHovered = 39,
PlotHistogram = 40,
PlotHistogramHovered = 41,
TableHeaderBg = 42,
TableBorderStrong = 43,
TableBorderLight = 44,
TableRowBg = 45,
TableRowBgAlt = 46,
TextSelectedBg = 47,
DragDropTarget = 48,
NavHighlight = 49,
NavWindowingHighlight = 50,
NavWindowingDimBg = 51,
ModalWindowDimBg = 52,
}
Expand description
A color identifier for styling.
Which color does what can sometimes be be unobvious. A good way to find a particular color is to use
the crate::Ui::show_default_style_editor
window, set a color to a very bright color, and explore the
crate::Ui::show_demo_window
until you spot it
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Text = 0
Default color of text througout application
TextDisabled = 1
Text in areas disabled e.g via crate::Ui::begin_disabled
WindowBg = 2
Background of normal windows
ChildBg = 3
Background of child windows
PopupBg = 4
Background of popups, menus, tooltips windows
Border = 5
Border around windows, frames, etc
BorderShadow = 6
Used for a drop-shadow/emboss style effect wherever Border
is used
FrameBg = 7
Background of checkbox, radio button, plot, slider, text input
FrameBgHovered = 8
Same as FrameBg
but when mouse is hovering over the widget
FrameBgActive = 9
Same as FrameBg
but when the mouse is active (e.g mouse is down)
TitleBg = 10
Window title for inactive windows. Also used as the “docked window tab area” when docking is enabled.
TitleBgActive = 11
Window title for active windows.
TitleBgCollapsed = 12
Color of a floating window when it is “rolled up”
MenuBarBg = 13
Main menu bar background, see crate::Ui::main_menu_bar
ScrollbarBg = 14
Background area of scrollbar
ScrollbarGrab = 15
Movable area of scollbar when “idle”
ScrollbarGrabHovered = 16
Moveable area of scrollbar when mouse is over it
ScrollbarGrabActive = 17
Moveable area of scollbar when it is being clicked on
CheckMark = 18
The color of the tick character inside the checkbox
SliderGrab = 19
Color of interactive handle inside various slider widgets
SliderGrabActive = 20
Interactive handle when being clicked on
Button = 21
Main frame color of default button
ButtonHovered = 22
Button when mouse hovers over it
ButtonActive = 23
Button when mouse is down
Header = 24
Inactive color for header sections, such as crate::Ui::collapsing_header
HeaderHovered = 25
As with Header
but when hovered
HeaderActive = 26
As with Header
but when mouse is down
Separator = 27
Dividing line, e.g crate::Ui::separator
SeparatorHovered = 28
Dividing line when mouse hovered
SeparatorActive = 29
Dividing line when mouse button down
ResizeGrip = 30
Resize handle on windows
ResizeGripHovered = 31
Resize handle when mouse hovered over handle
ResizeGripActive = 32
Resize handle when mouse button down
Tab = 33
Inactive tab color. Applies to both tab widgets and docked windows
TabHovered = 34
Hovered tab (applies regardless if tab is active, or is in the active window)
TabActive = 35
Color of currently selected tab
TabUnfocused = 36
Non-selected, when in an unfocused window
TabUnfocusedActive = 37
Selected tab, in an unfocused window
PlotLines = 38
Lines in crate::Ui::plot_lines
PlotLinesHovered = 39
PlotLines
when hovered
PlotHistogram = 40
Used for crate::Ui::plot_histogram
PlotHistogramHovered = 41
PlotHistogram
when hovered
TableHeaderBg = 42
Background color of header rows in table widget
TableBorderStrong = 43
Main border color for table, used around whole table and around header cells
TableBorderLight = 44
Used within border to separate cells
TableRowBg = 45
Background of cells in table
TableRowBgAlt = 46
Used for alternating row colors, if enabled by TableFlags::ROW_BG
TextSelectedBg = 47
The highlight color used for selection in text inputs
DragDropTarget = 48
Used for drag-and-drop system
Gamepad/keyboard: current highlighted item
Highlight window when using CTRL+TAB
Darken/colorize entire screen behind the CTRL+TAB window list, when active
ModalWindowDimBg = 52
Darken/colorize entire screen behind a modal window, when one is active
Implementations§
Trait Implementations§
Source§impl Clone for StyleColor
impl Clone for StyleColor
Source§fn clone(&self) -> StyleColor
fn clone(&self) -> StyleColor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StyleColor
impl Debug for StyleColor
Source§impl Display for StyleColor
impl Display for StyleColor
Source§impl Hash for StyleColor
impl Hash for StyleColor
Source§impl Index<StyleColor> for Style
impl Index<StyleColor> for Style
Source§impl IndexMut<StyleColor> for Style
impl IndexMut<StyleColor> for Style
Source§impl PartialEq for StyleColor
impl PartialEq for StyleColor
Source§impl TryFrom<u32> for StyleColor
impl TryFrom<u32> for StyleColor
Source§type Error = InvalidStyleColorValue
type Error = InvalidStyleColorValue
Source§fn try_from(
value: u32,
) -> Result<StyleColor, <StyleColor as TryFrom<u32>>::Error>
fn try_from( value: u32, ) -> Result<StyleColor, <StyleColor as TryFrom<u32>>::Error>
Source§impl TryFrom<usize> for StyleColor
impl TryFrom<usize> for StyleColor
Source§type Error = InvalidStyleColorValue
type Error = InvalidStyleColorValue
Source§fn try_from(
value: usize,
) -> Result<StyleColor, <StyleColor as TryFrom<usize>>::Error>
fn try_from( value: usize, ) -> Result<StyleColor, <StyleColor as TryFrom<usize>>::Error>
impl Copy for StyleColor
impl Eq for StyleColor
impl StructuralPartialEq for StyleColor
Auto Trait Implementations§
impl Freeze for StyleColor
impl RefUnwindSafe for StyleColor
impl Send for StyleColor
impl Sync for StyleColor
impl Unpin for StyleColor
impl UnwindSafe for StyleColor
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<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