Skip to main content

TabViewStyle

Struct TabViewStyle 

Source
pub struct TabViewStyle {
Show 17 fields pub position: TabPosition, pub selected_style: Style, pub normal_style: Style, pub focused_style: Style, pub disabled_style: Style, pub badge_style: Style, pub content_border_style: Style, pub divider: &'static str, pub tab_width: Option<u16>, pub tab_height: u16, pub bordered_content: bool, pub show_indicator: bool, pub indicator: &'static str, pub scroll_left: &'static str, pub scroll_right: &'static str, pub scroll_up: &'static str, pub scroll_down: &'static str,
}
Expand description

Style configuration for the tab view

Fields§

§position: TabPosition

Position of the tab bar

§selected_style: Style

Style for selected tab

§normal_style: Style

Style for normal (unselected) tabs

§focused_style: Style

Style for focused tab (when component has focus)

§disabled_style: Style

Style for disabled tabs

§badge_style: Style

Style for badge text

§content_border_style: Style

Style for the content area border

§divider: &'static str

Tab divider character(s)

§tab_width: Option<u16>

Fixed width for vertical tabs (None = auto)

§tab_height: u16

Height for horizontal tabs

§bordered_content: bool

Whether to show border around content

§show_indicator: bool

Whether to show selection indicator

§indicator: &'static str

Selection indicator character

§scroll_left: &'static str

Scroll left indicator

§scroll_right: &'static str

Scroll right indicator

§scroll_up: &'static str

Scroll up indicator

§scroll_down: &'static str

Scroll down indicator

Implementations§

Source§

impl TabViewStyle

Source

pub fn top() -> Self

Create a style with tabs on top

Source

pub fn bottom() -> Self

Create a style with tabs on bottom

Source

pub fn left() -> Self

Create a style with tabs on left

Source

pub fn right() -> Self

Create a style with tabs on right

Source

pub fn minimal() -> Self

Create a minimal style (no borders, simple)

Source

pub fn position(self, position: TabPosition) -> Self

Set the tab position

Source

pub fn tab_width(self, width: u16) -> Self

Set the tab width for vertical tabs

Source

pub fn tab_height(self, height: u16) -> Self

Set the tab height for horizontal tabs

Source

pub fn bordered_content(self, bordered: bool) -> Self

Set whether content is bordered

Source

pub fn selected_style(self, style: Style) -> Self

Set selected tab style

Source

pub fn normal_style(self, style: Style) -> Self

Set normal tab style

Source

pub fn divider(self, divider: &'static str) -> Self

Set the divider between tabs

Trait Implementations§

Source§

impl Clone for TabViewStyle

Source§

fn clone(&self) -> TabViewStyle

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TabViewStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TabViewStyle

Source§

fn default() -> Self

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

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.