Struct TabControl

Source
pub struct TabControl {
Show 13 fields pub tabs_view: ScrollView, pub tabs: Elements<usize, Tab, Tab>, pub drag_tab_view: View, pub drag_tab: Tab, pub page_view: View, pub hover: Quad, pub tab_fill: Quad, pub animator: Animator, pub _dragging_tab: Option<(FingerMoveEvent, usize)>, pub _tab_id_alloc: usize, pub _tab_now_selected: Option<usize>, pub _tab_last_selected: Option<usize>, pub _focussed: bool,
}

Fields§

§tabs_view: ScrollView§tabs: Elements<usize, Tab, Tab>§drag_tab_view: View§drag_tab: Tab§page_view: View§hover: Quad§tab_fill: Quad§animator: Animator§_dragging_tab: Option<(FingerMoveEvent, usize)>§_tab_id_alloc: usize§_tab_now_selected: Option<usize>§_tab_last_selected: Option<usize>§_focussed: bool

Implementations§

Source§

impl TabControl

Source

pub fn proto(cx: &mut Cx) -> Self

Source

pub fn handle_tab_control( &mut self, cx: &mut Cx, event: &mut Event, ) -> TabControlEvent

Source

pub fn tab_control_style() -> StyleId

Source

pub fn style(cx: &mut Cx, opt: &StyleOptions)

Source

pub fn get_tab_rects(&mut self, cx: &Cx) -> Vec<Rect>

Source

pub fn set_tab_control_focus(&mut self, cx: &mut Cx, focus: bool)

Source

pub fn get_tabs_view_rect(&mut self, cx: &Cx) -> Rect

Source

pub fn get_content_drop_rect(&mut self, cx: &Cx) -> Rect

Source

pub fn begin_tabs(&mut self, cx: &mut Cx) -> ViewRedraw

Source

pub fn get_draw_tab( &mut self, cx: &mut Cx, label: &str, selected: bool, closeable: bool, ) -> &mut Tab

Source

pub fn draw_tab( &mut self, cx: &mut Cx, label: &str, selected: bool, closeable: bool, )

Source

pub fn end_tabs(&mut self, cx: &mut Cx)

Source

pub fn begin_tab_page(&mut self, cx: &mut Cx) -> ViewRedraw

Source

pub fn end_tab_page(&mut self, cx: &mut Cx)

Trait Implementations§

Source§

impl Clone for TabControl

Source§

fn clone(&self) -> TabControl

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

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

Performs copy-assignment from source. 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> 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.