azul_core::window

Struct FullWindowState

Source
pub struct FullWindowState {
Show 15 fields pub title: String, pub size: WindowSize, pub position: Option<PhysicalPosition<u32>>, pub flags: WindowFlags, pub debug_state: DebugState, pub keyboard_state: KeyboardState, pub mouse_state: MouseState, pub ime_position: Option<LogicalPosition>, pub platform_specific_options: PlatformSpecificOptions, pub css: Css, pub previous_window_state: Option<Box<FullWindowState>>, pub hovered_file: Option<PathBuf>, pub dropped_file: Option<PathBuf>, pub focused_node: Option<(DomId, NodeId)>, pub hovered_nodes: BTreeMap<DomId, BTreeMap<NodeId, HitTestItem>>,
}

Fields§

§title: String

Current title of the window

§size: WindowSize

Size of the window + max width / max height: 800 x 600 by default

§position: Option<PhysicalPosition<u32>>

The x and y position, or None to let the WM decide where to put the window (default)

§flags: WindowFlags

Flags such as whether the window is minimized / maximized, fullscreen, etc.

§debug_state: DebugState

Mostly used for debugging, shows WebRender-builtin graphs on the screen. Used for performance monitoring and displaying frame times (rendering-only).

§keyboard_state: KeyboardState

Current keyboard state - NOTE: mutating this field (currently) does nothing (doesn’t get synchronized with OS-level window)!

§mouse_state: MouseState

Current mouse state

§ime_position: Option<LogicalPosition>

Sets location of IME candidate box in client area coordinates relative to the top left of the window.

§platform_specific_options: PlatformSpecificOptions

Window options that can only be set on a certain platform (WindowsWindowOptions / LinuxWindowOptions / MacWindowOptions).

§css: Css

The style of this window

§previous_window_state: Option<Box<FullWindowState>>

Previous window state, used for determining mouseout, etc. events

§hovered_file: Option<PathBuf>

Whether there is a file currently hovering over the window

§dropped_file: Option<PathBuf>

Whether there was a file currently dropped on the window

§focused_node: Option<(DomId, NodeId)>

What node is currently hovered over, default to None. Only necessary internal to the crate, for emitting On::FocusReceived and On::FocusLost events, as well as styling :focus elements

§hovered_nodes: BTreeMap<DomId, BTreeMap<NodeId, HitTestItem>>

Currently hovered nodes, default to an empty Vec. Important for styling :hover elements.

Implementations§

Source§

impl FullWindowState

Source

pub fn get_mouse_state(&self) -> &MouseState

Source

pub fn get_keyboard_state(&self) -> &KeyboardState

Source

pub fn get_hovered_file(&self) -> Option<&PathBuf>

Source

pub fn get_dropped_file(&self) -> Option<&PathBuf>

Source

pub fn get_previous_window_state(&self) -> Option<&Box<FullWindowState>>

Returns the window state of the previous frame, useful for calculating metrics for dragging motions. Note that you can’t call this function recursively - calling get_previous_window_state() on the returned WindowState will yield a None value.

Trait Implementations§

Source§

impl Clone for FullWindowState

Source§

fn clone(&self) -> FullWindowState

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FullWindowState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FullWindowState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<FullWindowState> for WindowState

Source§

fn from(full_window_state: FullWindowState) -> WindowState

Converts to this type from the input type.
Source§

impl From<WindowState> for FullWindowState

Source§

fn from(window_state: WindowState) -> FullWindowState

Creates a FullWindowState from a regular WindowState, fills non-available fields with their default values

Source§

impl PartialEq for FullWindowState

Source§

fn eq(&self, other: &FullWindowState) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FullWindowState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.