Struct sciter::window::Window
[−]
[src]
pub struct Window { /* fields omitted */ }
Sciter window.
Methods
impl Window
[src]
fn new() -> Window
Create a new main window.
fn with_size(size: (i32, i32), flags: SCITER_CREATE_WINDOW_FLAGS) -> Window
Create new window with specified size(width, height)
and flags.
fn with_rect(
rect: (i32, i32, i32, i32),
flags: SCITER_CREATE_WINDOW_FLAGS
) -> Window
rect: (i32, i32, i32, i32),
flags: SCITER_CREATE_WINDOW_FLAGS
) -> Window
Create new window with specified position as rect(x, y, width, height)
and flags.
fn create(
rect: (i32, i32, i32, i32),
flags: SCITER_CREATE_WINDOW_FLAGS,
parent: Option<HWINDOW>
) -> Window
rect: (i32, i32, i32, i32),
flags: SCITER_CREATE_WINDOW_FLAGS,
parent: Option<HWINDOW>
) -> Window
Create new window with specified position as rect(x, y, width, height)
, flags and optional parent window.
fn attach(hwnd: HWINDOW) -> Window
Attach Sciter to existing native window.
fn get_host(&self) -> Rc<Host>
Obtain reference to Host
which allows you to control sciter engine and windows.
fn sciter_handler<T: HostHandler + Sized>(&mut self, handler: T)
Set callback for sciter engine events.
fn event_handler<T: EventHandler>(&mut self, handler: T)
Attach dom::EventHandler
to the Sciter window.
You can install Window EventHandler only once - it will survive all document reloads.
fn load_file(&mut self, uri: &str)
Load HTML document from file.
fn load_html(&mut self, html: &[u8], uri: Option<&str>)
Load HTML document from memory.
fn get_hwnd(&self) -> HWINDOW
Get native window handle.
fn collapse(&self, hide: bool)
Minimize or hide window.
fn expand(&self, maximize: bool)
Show or maximize window.
fn dismiss(&self)
Close window.
fn set_title(&mut self, title: &str)
Set title of native window.
fn get_title(&self) -> String
Get native window title.
fn run_app(self)
Show window and run the main app message loop until window been closed.
fn run_loop(&self)
Run the main app message loop with already configured window.
fn quit_app(&self)
Post app quit message.