Struct Tab

Source
pub struct Tab {
    pub handle: ControlHandle,
}
Expand description

A subwindow in a TabContainer widget. A Tab control can only be added as a child of a TabContainer.

A Tab controls doesn’t do much on its own. See TabContainer for the tab specific events.

Builder parameters:

  • parent: Required. The Tab parent container.
  • text: The tab text
  • image_index: The tab icon index in the tab container image list

Fields§

§handle: ControlHandle

Implementations§

Source§

impl Tab

Source

pub fn builder<'a>() -> TabBuilder<'a>

Source

pub fn set_text<'a>(&self, text: &'a str)

Sets the title of the tab

Source

pub fn set_image_index(&self, index: Option<i32>)

Sets the image of the tab. index is the index of the image in the tab container image list.

This is only available if the “image-list” feature is enabled

Source

pub fn image_index(&self) -> Option<i32>

Returns the index of image of the tab. The index maps to the image list of the tab container.

This is only available if the “image-list” feature is enabled

Source

pub fn visible(&self) -> bool

Returns true if the control is visible to the user. Will return true even if the control is outside of the parent client view (ex: at the position (10000, 10000))

Source

pub fn set_visible(&self, v: bool)

Show or hide the control to the user

Source

pub fn class_name(&self) -> &'static str

Winapi class name used during control creation

Source

pub fn flags(&self) -> u32

Winapi base flags used during window creation

Source

pub fn forced_flags(&self) -> u32

Winapi flags required by the control

Trait Implementations§

Source§

impl Debug for Tab

Source§

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

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

impl Default for Tab

Source§

fn default() -> Tab

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

impl Drop for Tab

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<&Tab> for ControlHandle

Source§

fn from(control: &Tab) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Tab> for ControlHandle

Source§

fn from(control: &mut Tab) -> Self

Converts to this type from the input type.
Source§

impl PartialEq<ControlHandle> for Tab

Source§

fn eq(&self, other: &ControlHandle) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Tab> for ControlHandle

Source§

fn eq(&self, other: &Tab) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Tab

Source§

fn eq(&self, other: &Tab) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Tab

Source§

impl StructuralPartialEq for Tab

Auto Trait Implementations§

§

impl Freeze for Tab

§

impl RefUnwindSafe for Tab

§

impl !Send for Tab

§

impl !Sync for Tab

§

impl Unpin for Tab

§

impl UnwindSafe for Tab

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> 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, 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.