[−][src]Struct druid::WindowHandle
A handle to a platform window object.
Methods
impl WindowHandle
[src]
pub fn show(&self)
[src]
Make this window visible.
This is part of the initialization process; it should only be called once, when a window is first created.
pub fn close(&self)
[src]
Close the window.
pub fn resizable(&self, resizable: bool)
[src]
Set whether the window should be resizable
pub fn show_titlebar(&self, show_titlebar: bool)
[src]
Set whether the window should show titlebar
pub fn bring_to_front_and_focus(&self)
[src]
Bring this window to the front of the window stack and give it focus.
pub fn invalidate(&self)
[src]
Request invalidation of the entire window contents.
pub fn set_title(&self, title: &str)
[src]
Set the title for this menu.
pub fn set_menu(&self, menu: Menu)
[src]
Set the top-level menu for this window.
pub fn text(&self) -> <D2DRenderContext as RenderContext>::Text
[src]
Get access to a type that can perform text layout.
pub fn request_timer(&self, deadline: Instant) -> TimerToken
[src]
Schedule a timer.
This causes a WinHandler::timer()
call at the deadline. The
return value is a token that can be used to associate the request
with the handler call.
Note that this is not a precise timer. On Windows, the typical resolution is around 10ms. Therefore, it's best used for things like blinking a cursor or triggering tooltips, not for anything requiring precision.
pub fn set_cursor(&mut self, cursor: &Cursor)
[src]
Set the cursor icon.
pub fn open_file_sync(&mut self, options: FileDialogOptions) -> Option<FileInfo>
[src]
Prompt the user to chose a file to open.
Blocks while the user picks the file.
pub fn save_as_sync(&mut self, options: FileDialogOptions) -> Option<FileInfo>
[src]
Prompt the user to chose a path for saving.
Blocks while the user picks a file.
pub fn show_context_menu(&self, menu: Menu, pos: Point)
[src]
Display a pop-up menu at the given position.
Point
is in the coordinate space of the window.
pub fn get_idle_handle(&self) -> Option<IdleHandle>
[src]
Get a handle that can be used to schedule an idle task.
pub fn get_dpi(&self) -> f32
[src]
Get the dpi of the window.
TODO: we want to migrate this from dpi (with 96 as nominal) to a scale factor (with 1 as nominal).
Trait Implementations
impl Clone for WindowHandle
[src]
fn clone(&self) -> WindowHandle
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for WindowHandle
[src]
fn default() -> WindowHandle
[src]
impl From<WindowHandle> for WindowHandle
[src]
fn from(src: WindowHandle) -> WindowHandle
[src]
Auto Trait Implementations
impl !RefUnwindSafe for WindowHandle
impl !Send for WindowHandle
impl !Sync for WindowHandle
impl Unpin for WindowHandle
impl !UnwindSafe for WindowHandle
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
fn round_into(self) -> U
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,