Struct egui_dock::StyleBuilder

source ·
pub struct StyleBuilder { /* private fields */ }
Expand description

Builds a Style with custom configuration values.

Implementations§

source§

impl StyleBuilder

source

pub fn new() -> Self

Creates a new StyleBuilder.

source

pub fn from_egui(style: &Style) -> Self

Derives relevant fields from egui::Style and sets the remaining fields to their default values.

See also: Style::from_egui.

source

pub fn with_padding(self, padding: Margin) -> Self

Sets padding to indent from the edges of the window. By Default it’s None.

source

pub fn with_border_color(self, border_color: Color32) -> Self

Sets border_color for the window of “working area”. By Default it’s [egui::Color32::BLACK].

source

pub fn with_border_width(self, border_width: f32) -> Self

Sets border_width for the border. By Default it’s 0.0.

source

pub fn with_selection_color(self, selection_color: Color32) -> Self

Sets selection color for the placing area of the tab where this tab targeted on it. By Default it’s (0, 191, 255) (light blue) with 0.5 capacity.

source

pub fn with_separator_width(self, separator_width: f32) -> Self

Sets separator_size for the rectangle separator between nodes. By Default it’s 1.0.

source

pub fn with_separator_extra(self, separator_extra: f32) -> Self

Sets separator_extra it sets limit for the allowed area for the separator offset. By Default it’s 175.0. bigger value > less allowed offset for the current window size.

source

pub fn with_separator_color_idle(self, separator_color_idle: Color32) -> Self

Sets the idle color for the rectangle separator. By Default it’s [Color32::BLACK].

source

pub fn with_separator_color_hovered( self, separator_color_hovered: Color32 ) -> Self

Sets the hovered color for the rectangle separator. By Default it’s [Color32::GRAY].

source

pub fn with_separator_color_dragged( self, separator_color_dragged: Color32 ) -> Self

Sets the dragged color for the rectangle separator. By Default it’s [Color32::WHITE].

source

pub fn with_tab_bar_background(self, tab_bar_background_color: Color32) -> Self

Sets tab_bar_background_color for the color of tab bar. By Default it’s [Color32::WHITE].

source

pub fn with_tab_bar_height(self, tab_bar_height: f32) -> Self

Sets tab_bar_height for the color of tab bar. By Default it’s 24.0.

source

pub fn with_tab_outline_color(self, tab_outline_color: Color32) -> Self

Sets tab_outline_color for the outline color of tabs. By Default it’s [Color32::BLACK].

source

pub fn with_hline_color(self, hline_color: Color32) -> Self

Sets Style::hline_color, the line separating the tab name area from the tab content area.

By Default it’s [Color32::BLACK].

source

pub fn with_hline_below_active_tab_name( self, hline_below_active_tab_name: bool ) -> Self

Sets Style::hline_below_active_tab_name.

If true, show the hline below the active tabs name. If false, show the active tab as merged with the tab ui area. Default: false.

source

pub fn with_tab_rounding(self, tab_rounding: Rounding) -> Self

Sets tab_rounding for the tab rounding.

source

pub fn with_tab_background_color(self, tab_background: Color32) -> Self

Sets tab_background_color for the current tab background color.

source

pub fn with_close_tab_color(self, close_tab_color: Color32) -> Self

Sets close_tab_color for the close tab button color.

source

pub fn with_close_tab_active_color_color( self, close_tab_active_color: Color32 ) -> Self

Sets close_tab_active_color for the active close tab button color.

source

pub fn with_close_tab_background_color_color( self, close_tab_background_color: Color32 ) -> Self

Sets close_tab_background_color for the background close tab button color.

source

pub fn show_close_buttons(self, show_close_buttons: bool) -> Self

Shows / Hides the tab close buttons.

source

pub fn with_add_tab_align(self, add_tab_align: TabAddAlign) -> Self

Sets add_tab_align for the add tab button color.

source

pub fn with_add_tab_color(self, add_tab_color: Color32) -> Self

Sets add_tab_color for the add tab button color.

source

pub fn with_add_tab_active_color_color( self, add_tab_active_color: Color32 ) -> Self

Sets add_tab_active_color for the active add tab button color.

source

pub fn with_add_tab_background_color_color( self, add_tab_background_color: Color32 ) -> Self

Sets add_tab_background_color for the background add tab button color.

source

pub fn show_add_buttons(self, show_add_buttons: bool) -> Self

Shows / Hides the tab add buttons.

source

pub fn show_add_popup(self, show_add_popup: bool) -> Self

Shows / Hides the add button popup.

source

pub fn with_tab_text_color_unfocused( self, tab_text_color_unfocused: Color32 ) -> Self

Color of tab title when an inactive tab is unfocused.

source

pub fn with_tab_text_color_focused( self, tab_text_color_focused: Color32 ) -> Self

Color of tab title when an inactive tab is focused.

source

pub fn with_tab_text_color_active_unfocused( self, tab_text_color_active_unfocused: Color32 ) -> Self

Color of tab title when an active tab is unfocused.

source

pub fn with_tab_text_color_active_focused( self, tab_text_color_active_focused: Color32 ) -> Self

Color of tab title when an active tab is focused.

source

pub fn tabs_are_draggable(self, tabs_are_draggable: bool) -> Self

Whether tabs can be dragged between nodes and reordered on the tab bar.

source

pub fn expand_tabs(self, expand_tabs: bool) -> Self

Whether tab titles expand to fill the width of their tab bars.

source

pub fn show_context_menu(self, show_context_menu: bool) -> Self

Whether tabs show a context menu.

source

pub fn with_tab_scroll_area(self, tab_include_scrollarea: bool) -> Self

Whether tabs have a ScrollArea out of the box.

source

pub fn show_name_when_hovered(self, tab_hover_name: bool) -> Self

Whether tabs show their name when hovered over them.

source

pub fn build(self) -> Style

Returns Style with set values.

Trait Implementations§

source§

impl Default for StyleBuilder

source§

fn default() -> StyleBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.