Struct iui::controls::Button [−][src]
pub struct Button { /* fields omitted */ }A textual button which users can click on, causing a callback to run.
Methods
impl Button[src]
impl Buttonpub 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(uiButton: *mut uiButton) -> Button[src]
pub unsafe fn from_raw(uiButton: *mut uiButton) -> ButtonCreate 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 uiButton[src]
pub fn ptr(&self) -> *mut uiButtonReturn the underlying pointer for this control.
impl Button[src]
impl Buttonpub fn new(_ctx: &UI, text: &str) -> Button[src]
pub fn new(_ctx: &UI, text: &str) -> ButtonCreate a new button with the given text as its label.
pub fn text(&self, _ctx: &UI) -> String[src]
pub fn text(&self, _ctx: &UI) -> StringGet a copy of the existing text on the button.
pub fn text_ref(&self, _ctx: &UI) -> &CStr[src]
pub fn text_ref(&self, _ctx: &UI) -> &CStrGet a reference to the existing text on the button.
pub fn set_text(&mut self, _ctx: &UI, text: &str)[src]
pub fn set_text(&mut self, _ctx: &UI, text: &str)Set the text on the button.
pub fn on_clicked<F: FnMut(&mut Button)>(&mut self, _ctx: &UI, callback: F)[src]
pub fn on_clicked<F: FnMut(&mut Button)>(&mut self, _ctx: &UI, callback: F)Run the given callback when the button is clicked.
Trait Implementations
impl Drop for Button[src]
impl Drop for Buttonimpl Clone for Button[src]
impl Clone for Buttonfn clone(&self) -> Button[src]
fn clone(&self) -> ButtonReturns 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)1.0.0
[src]Performs copy-assignment from source. Read more
impl Into<Control> for Button[src]
impl Into<Control> for Button