pub struct TabItems<'a> { /* private fields */ }
gui
only.Expand description
Exposes the methods of a Tab
control.
You cannot directly instantiate this object, it is created internally by the control.
Implementations§
source§impl<'a> TabItems<'a>
impl<'a> TabItems<'a>
sourcepub unsafe fn add(&self, title: &str) -> TabItem<'a>
pub unsafe fn add(&self, title: &str) -> TabItem<'a>
Manually appends a new tab by sending a
tcm::InsertItem
message, and returns
the newly added item.
§Safety
By adding a tab item manually, you are responsible for all the message
handling. Prefer adding items automatically by filling the
TabOpts::items
member when calling the
Tab::new
function.
sourcepub fn count(&self) -> u32
pub fn count(&self) -> u32
Retrieves the total number of items by sending an
tcm::GetItemCount
message.
sourcepub unsafe fn delete_all(&self)
pub unsafe fn delete_all(&self)
Deletes all items by sending a
tcm::DeleteAllItems
message.
§Safety
If you delete a tab automatically created, which has a container window attached to it, the rendering will be out-of-order.
sourcepub const fn get(&self, index: u32) -> TabItem<'a>
pub const fn get(&self, index: u32) -> TabItem<'a>
Retrieves the item at the given zero-based position.
Note: This method is cheap – even if index
is beyond the range of
existing items, an object will still be returned. However, operations
upon this object will produce no effect.
sourcepub fn focused(&self) -> Option<TabItem<'a>>
pub fn focused(&self) -> Option<TabItem<'a>>
Returns the focused item by sending a
tcm::GetCurSel
message.
sourcepub fn selected(&self) -> Option<TabItem<'a>>
pub fn selected(&self) -> Option<TabItem<'a>>
Returns the selected item by sending a
tcm::GetCurSel
message.