[][src]Struct supergtk::SuperGtk

pub struct SuperGtk { /* fields omitted */ }

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]

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

impl Default for SuperGtk[src]

Auto Trait Implementations

impl !Send for SuperGtk

impl !Sync for SuperGtk

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]