Trait tao::platform::windows::WindowBuilderExtWindows [−][src]
pub trait WindowBuilderExtWindows { fn with_parent_window(self, parent: HWND) -> WindowBuilder; fn with_owner_window(self, parent: HWND) -> WindowBuilder; fn with_menu(self, menu: HMENU) -> WindowBuilder; fn with_taskbar_icon(self, taskbar_icon: Option<Icon>) -> WindowBuilder; fn with_no_redirection_bitmap(self, flag: bool) -> WindowBuilder; fn with_drag_and_drop(self, flag: bool) -> WindowBuilder; fn with_theme(self, theme: Option<Theme>) -> WindowBuilder; }
Expand description
Additional methods on WindowBuilder
that are specific to Windows.
Required methods
fn with_parent_window(self, parent: HWND) -> WindowBuilder
[src]
Expand description
Sets a parent to the window to be created.
A child window has the WS_CHILD style and is confined to the client area of its parent window.
For more information, see https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#child-windows
fn with_owner_window(self, parent: HWND) -> WindowBuilder
[src]
Expand description
Set an owner to the window to be created. Can be used to create a dialog box, for example.
Can be used in combination with WindowExtWindows::set_enable(false)
on the owner window to create a modal dialog box.
From MSDN:
- An owned window is always above its owner in the z-order.
- The system automatically destroys an owned window when its owner is destroyed.
- An owned window is hidden when its owner is minimized.
For more information, see https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#owned-windows
fn with_menu(self, menu: HMENU) -> WindowBuilder
[src]
Expand description
Sets a menu on the window to be created.
Parent and menu are mutually exclusive; a child window cannot have a menu!
The menu must have been manually created beforehand with winapi::um::winuser::CreateMenu
or similar.
Note: Dark mode cannot be supported for win32 menus, it’s simply not possible to change how the menus look.
If you use this, it is recommended that you combine it with with_theme(Some(Theme::Light))
to avoid a jarring effect.
fn with_taskbar_icon(self, taskbar_icon: Option<Icon>) -> WindowBuilder
[src]
Expand description
This sets ICON_BIG
. A good ceiling here is 256x256.
fn with_no_redirection_bitmap(self, flag: bool) -> WindowBuilder
[src]
Expand description
This sets WS_EX_NOREDIRECTIONBITMAP
.
fn with_drag_and_drop(self, flag: bool) -> WindowBuilder
[src]
Expand description
Enables or disables drag and drop support (enabled by default). Will interfere with other crates
that use multi-threaded COM API (CoInitializeEx
with COINIT_MULTITHREADED
instead of
COINIT_APARTMENTTHREADED
) on the same thread. Note that tao may still attempt to initialize
COM API regardless of this option. Currently only fullscreen mode does that, but there may be more in the future.
If you need COM API with COINIT_MULTITHREADED
you must initialize it before calling any tao functions.
See https://docs.microsoft.com/en-us/windows/win32/api/objbase/nf-objbase-coinitialize#remarks for more information.
fn with_theme(self, theme: Option<Theme>) -> WindowBuilder
[src]
Expand description
Forces a theme or uses the system settings if None
was provided.
Implementors
impl WindowBuilderExtWindows for WindowBuilder
[src]
impl WindowBuilderExtWindows for WindowBuilder
[src]