pub struct SystemWindowTabController { /* private fields */ }Expand description
A controller for managing window tabs.
Implementations§
Source§impl SystemWindowTabController
impl SystemWindowTabController
Sourcepub fn tab_groups(&self) -> &FxHashMap<usize, Vec<SystemWindowTab>>
pub fn tab_groups(&self) -> &FxHashMap<usize, Vec<SystemWindowTab>>
Get all tab groups.
Sourcepub fn get_next_tab_group_window(
cx: &mut App,
id: WindowId,
) -> Option<&AnyWindowHandle>
pub fn get_next_tab_group_window( cx: &mut App, id: WindowId, ) -> Option<&AnyWindowHandle>
Get the next tab group window handle.
Sourcepub fn get_prev_tab_group_window(
cx: &mut App,
id: WindowId,
) -> Option<&AnyWindowHandle>
pub fn get_prev_tab_group_window( cx: &mut App, id: WindowId, ) -> Option<&AnyWindowHandle>
Get the previous tab group window handle.
Sourcepub fn tabs(&self, id: WindowId) -> Option<&Vec<SystemWindowTab>>
pub fn tabs(&self, id: WindowId) -> Option<&Vec<SystemWindowTab>>
Get all tabs in the same window.
Sourcepub fn init_visible(cx: &mut App, visible: bool)
pub fn init_visible(cx: &mut App, visible: bool)
Initialize the visibility of the system window tab controller.
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Get the visibility of the system window tab controller.
Sourcepub fn set_visible(cx: &mut App, visible: bool)
pub fn set_visible(cx: &mut App, visible: bool)
Set the visibility of the system window tab controller.
Sourcepub fn update_last_active(cx: &mut App, id: WindowId)
pub fn update_last_active(cx: &mut App, id: WindowId)
Update the last active of a window.
Sourcepub fn update_tab_position(cx: &mut App, id: WindowId, ix: usize)
pub fn update_tab_position(cx: &mut App, id: WindowId, ix: usize)
Update the position of a tab within its group.
Sourcepub fn update_tab_title(cx: &mut App, id: WindowId, title: SharedString)
pub fn update_tab_title(cx: &mut App, id: WindowId, title: SharedString)
Update the title of a tab.
Sourcepub fn add_tab(cx: &mut App, id: WindowId, tabs: Vec<SystemWindowTab>)
pub fn add_tab(cx: &mut App, id: WindowId, tabs: Vec<SystemWindowTab>)
Insert a tab into a tab group.
Sourcepub fn remove_tab(cx: &mut App, id: WindowId) -> Option<SystemWindowTab>
pub fn remove_tab(cx: &mut App, id: WindowId) -> Option<SystemWindowTab>
Remove a tab from a tab group.
Sourcepub fn move_tab_to_new_window(cx: &mut App, id: WindowId)
pub fn move_tab_to_new_window(cx: &mut App, id: WindowId)
Move a tab to a new tab group.
Sourcepub fn merge_all_windows(cx: &mut App, id: WindowId)
pub fn merge_all_windows(cx: &mut App, id: WindowId)
Merge all tab groups into a single group.
Sourcepub fn select_next_tab(cx: &mut App, id: WindowId)
pub fn select_next_tab(cx: &mut App, id: WindowId)
Selects the next tab in the tab group in the trailing direction.
Sourcepub fn select_previous_tab(cx: &mut App, id: WindowId)
pub fn select_previous_tab(cx: &mut App, id: WindowId)
Selects the previous tab in the tab group in the leading direction.
Trait Implementations§
Source§impl Default for SystemWindowTabController
impl Default for SystemWindowTabController
Source§fn default() -> SystemWindowTabController
fn default() -> SystemWindowTabController
Returns the “default value” for a type. Read more
impl Global for SystemWindowTabController
Auto Trait Implementations§
impl Freeze for SystemWindowTabController
impl RefUnwindSafe for SystemWindowTabController
impl Send for SystemWindowTabController
impl Sync for SystemWindowTabController
impl Unpin for SystemWindowTabController
impl UnwindSafe for SystemWindowTabController
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
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReadGlobal for Twhere
T: Global,
impl<T> ReadGlobal for Twhere
T: Global,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().Source§impl<T> UpdateGlobal for Twhere
T: Global,
impl<T> UpdateGlobal for Twhere
T: Global,
Source§fn update_global<C, F, R>(cx: &mut C, update: F) -> R
fn update_global<C, F, R>(cx: &mut C, update: F) -> R
Updates the global instance of the implementing type using the provided closure. Read more
Source§fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
fn set_global<C>(cx: &mut C, global: T)where
C: BorrowAppContext,
Set the global instance of the implementing type.