Struct native_windows_gui::Window [−][src]
pub struct Window { pub handle: ControlHandle, }
Expand description
A basic top level window. At least one top level window is required to make a NWG application.
Windows can be heavily customized using the window flags. If your application don’t need a visible window
(ex: a system tray app), use MessageWindow
instead.
Builder parameters:
flags
: The window flags. SeeWindowFlags
ex_flags
: A combination of win32 window extended flags. Unlikeflags
, ex_flags must be used straight from winapititle
: The text in the window title barsize
: The default size of the windowposition
: The default position of the window in the desktopicon
: The window iconaccept_file
: If the window should accept files by drag & dropmaximized
: If the window should be maximized at creationminimized
: If the window should be minimized at creationcenter
: Center the window in the current monitor based on its size. Iftrue
, this overridesposition
topmost
: If the window should always be on top of other system windowparent
: Logical parent of the window, unlike children controls, this is NOT required.
Control events:
OnInit
: The window was createdMousePress(_)
: Generic mouse press events on the buttonOnMouseMove
: Generic mouse mouse eventOnMouseWheel
: Generic mouse wheel eventOnPaint
: Generic on paint eventOnKeyPress
: Generic key pressOnKeyRelease
: Generic ket releaseOnResize
: When the window is resizedOnResizeBegin
: Just before the window begins being resized by the userOnResizeEnd
: Just after the user stops resizing the windowOnWindowMaximize
: When the window is maximizedOnWindowMinimize
: When the window is minimizedOnMove
: When the window is moved by the userOnFileDrop
: When a file is dropped in the window (only raised if accept_file is set)OnMinMaxInfo
: When the size or position of the window is about to change and the size of the windows must be restricted
Fields
handle: ControlHandle
Implementations
Force the window to refraw iteself and all its children
Set the icon in the window
- icon: The new icon. If None, the icon is removed
Return true if the control user can interact with the control, return false otherwise
Enable or disable the control
Return true if the control is visible to the user. Will return true even if the control is outside of the parent client view (ex: at the position (10000, 10000))
Show or hide the control to the user
Set the position of the button in the parent window
Winapi class name used during control creation
Winapi flags required by the control
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Window
impl UnwindSafe for Window