Struct iui::controls::TabGroup
[−]
[src]
pub struct TabGroup { /* fields omitted */ }
Group of tabs, each of which shows a different sub-control.
Methods
impl TabGroup
[src]
pub fn show(&mut self, _ctx: &UI)
[src]
pub fn hide(&mut self, _ctx: &UI)
[src]
pub unsafe fn from_raw(uiTab: *mut uiTab) -> TabGroup
[src]
Create an iui
struct for this control from the raw pointer for it.
Unsafety
The given pointer must point to a valid control or memory unsafety may result.
pub fn ptr(&self) -> *mut uiTab
[src]
Return the underlying pointer for this control.
impl TabGroup
[src]
pub fn new(_ctx: &UI) -> TabGroup
[src]
Create a new, empty group of tabs.
pub fn append<T: Into<Control>>(
&mut self,
_ctx: &UI,
name: &str,
control: T
) -> u64
[src]
&mut self,
_ctx: &UI,
name: &str,
control: T
) -> u64
Add the given control as a new tab in the tab group with the given name.
Returns the number of tabs in the group after adding the new tab.
pub fn insert_at<T: Into<Control>>(
&mut self,
_ctx: &UI,
name: &str,
before: u64,
control: T
) -> u64
[src]
&mut self,
_ctx: &UI,
name: &str,
before: u64,
control: T
) -> u64
Add the given control before the given index in the tab group, as a new tab with a given name.
Returns the number of tabs in the group after adding the new tab.
pub fn delete(&mut self, _ctx: &UI, index: u64) -> Result<u64, UIError>
[src]
Remove the control at the given index in the tab group.
Returns the number of tabs in the group after removing the tab, or an error if that index was out of bounds.
NOTE: This will leak the deleted control! We have no way of actually getting it
to decrement its reference count per libui
's UI as of today, unless we maintain a
separate list of children ourselves…
pub fn margined(&self, _ctx: &UI, page: u64) -> bool
[src]
Determine whether or not the tab group provides margins around its children.
pub fn set_margined(&mut self, _ctx: &UI, page: u64, margined: bool)
[src]
Set whether or not the tab group provides margins around its children.
Trait Implementations
impl Drop for TabGroup
[src]
impl Clone for TabGroup
[src]
fn clone(&self) -> TabGroup
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more