Struct winsafe::gui::WindowMain
source · pub struct WindowMain(/* private fields */);
Available on crate feature
gui
only.Expand description
An user main window, which can handle events. Usually, this is the first
window of your application, launched directly from the main
function. Can
be programmatically created or load a dialog resource from a .res
file.
Implementations§
source§impl WindowMain
impl WindowMain
sourcepub fn new(opts: WindowMainOpts) -> Self
pub fn new(opts: WindowMainOpts) -> Self
Instantiates a new WindowMain
object, to be created internally with
HWND::CreateWindowEx
.
Trait Implementations§
source§impl Clone for WindowMain
impl Clone for WindowMain
source§fn clone(&self) -> WindowMain
fn clone(&self) -> WindowMain
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl GuiParent for WindowMain
impl GuiParent for WindowMain
source§fn on(&self) -> &WindowEvents
fn on(&self) -> &WindowEvents
Exposes methods to handle the basic window messages, plus timer and
native control notifications. Read more
source§fn spawn_new_thread<F>(&self, func: F)
fn spawn_new_thread<F>(&self, func: F)
This method calls
std::thread::spawn
, but it allows the returning of
an error value. This error value will be forwarded to the original UI
thread, allowing it to be caught at
WindowMain::run_main
. Read moresource§impl GuiParentPopup for WindowMain
impl GuiParentPopup for WindowMain
source§impl GuiWindow for WindowMain
impl GuiWindow for WindowMain
source§impl GuiWindowText for WindowMain
impl GuiWindowText for WindowMain
source§fn set_text(&self, text: &str)
fn set_text(&self, text: &str)
Sets the text by calling
HWND::SetWindowText
.source§fn text(&self) -> String
fn text(&self) -> String
Retrieves the text by calling
HWND::GetWindowText
.impl Send for WindowMain
Auto Trait Implementations§
impl Freeze for WindowMain
impl !RefUnwindSafe for WindowMain
impl !Sync for WindowMain
impl Unpin for WindowMain
impl !UnwindSafe for WindowMain
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more