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]
impl TabGroup
pub fn show(&mut self, _ctx: &UI)
[src]
pub fn show(&mut self, _ctx: &UI)
pub fn hide(&mut self, _ctx: &UI)
[src]
pub fn hide(&mut self, _ctx: &UI)
pub unsafe fn from_raw(uiTab: *mut uiTab) -> TabGroup
[src]
pub unsafe fn from_raw(uiTab: *mut uiTab) -> TabGroup
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]
pub fn ptr(&self) -> *mut uiTab
Return the underlying pointer for this control.
impl TabGroup
[src]
impl TabGroup
pub fn new(_ctx: &UI) -> TabGroup
[src]
pub fn new(_ctx: &UI) -> TabGroup
Create a new, empty group of tabs.
pub fn append<T: Into<Control>>(
&mut self,
_ctx: &UI,
name: &str,
control: T
) -> u64
[src]
pub fn append<T: Into<Control>>(
&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]
pub fn insert_at<T: Into<Control>>(
&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]
pub fn delete(&mut self, _ctx: &UI, index: u64) -> Result<u64, UIError>
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]
pub fn margined(&self, _ctx: &UI, page: u64) -> bool
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]
pub fn set_margined(&mut self, _ctx: &UI, page: u64, margined: bool)
Set whether or not the tab group provides margins around its children.
Trait Implementations
impl Drop for TabGroup
[src]
impl Drop for TabGroup
impl Clone for TabGroup
[src]
impl Clone for TabGroup
fn clone(&self) -> TabGroup
[src]
fn clone(&self) -> TabGroup
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Into<Control> for TabGroup
[src]
impl Into<Control> for TabGroup