[−][src]Struct supergtk::SuperGtk
Use it to create and get widgets, and to start gtk
Any widget created by it will be internally saved so you can retreive it with its id
Methods
impl SuperGtk
[src]
pub fn new() -> RefGtk
[src]
Init gtk and creates a Rc<RefCell<SuperGtk>> for ease of use
Use it at the start of the program
pub fn run()
[src]
Run the app
Use it at the end of the program
impl SuperGtk
[src]
Create widgets with specified id
Same widget, kind same id -> will be overwritten
Diffrent widget, same id -> will be added to that id's widget group
pub fn create_win(&mut self, id: &'static str) -> Window
[src]
pub fn create_grid(&mut self, id: &'static str) -> Grid
[src]
pub fn create_button(&mut self, id: &'static str) -> Button
[src]
pub fn create_label(&mut self, id: &'static str) -> Label
[src]
pub fn create_entry(&mut self, id: &'static str) -> Entry
[src]
pub fn create_box(
&mut self,
id: &'static str,
orientation: Orientation,
spacing: i32
) -> Box
[src]
&mut self,
id: &'static str,
orientation: Orientation,
spacing: i32
) -> Box
pub fn create_headerbar(&mut self, id: &'static str) -> HeaderBar
[src]
impl SuperGtk
[src]
Functions to get the widgets back by id
pub fn get_win(&self, id: &str) -> Window
[src]
pub fn get_grid(&self, id: &str) -> Grid
[src]
pub fn get_button(&self, id: &str) -> Button
[src]
pub fn get_label(&self, id: &str) -> Label
[src]
pub fn get_entry(&self, id: &str) -> Entry
[src]
pub fn get_box(&self, id: &str) -> Box
[src]
pub fn get_headerbar(&self, id: &str) -> HeaderBar
[src]
impl SuperGtk
[src]
pub fn str_to_static(s: &str) -> &'static str
[src]
Convert an &str to a &'static str, it has some use cases
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,