pub struct WindowState { /* private fields */ }Expand description
State for an nice-plug-iced editor window.
Implementations§
Source§impl WindowState
impl WindowState
Sourcepub fn from_logical_size(width: u32, height: u32) -> Arc<WindowState>
pub fn from_logical_size(width: u32, height: u32) -> Arc<WindowState>
Initialize the GUI’s state. This value can be passed to
create_iced_editor(). The window size is in logical
pixels, so before it is multiplied by the DPI scaling factor.
Sourcepub fn logical_size(&self) -> (u32, u32)
pub fn logical_size(&self) -> (u32, u32)
Returns a (width, height) pair for the current size of the GUI in logical pixels.
Sourcepub fn set_requested_logical_size(&self, new_size: (u32, u32))
pub fn set_requested_logical_size(&self, new_size: (u32, u32))
Set the new size that will be used to resize the window if the host allows.
Trait Implementations§
Source§impl Debug for WindowState
impl Debug for WindowState
Source§impl<'de> Deserialize<'de> for WindowState
impl<'de> Deserialize<'de> for WindowState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> PersistentField<'a, WindowState> for Arc<WindowState>
impl<'a> PersistentField<'a, WindowState> for Arc<WindowState>
Source§fn set(&self, new_value: WindowState)
fn set(&self, new_value: WindowState)
Update the stored
T value using interior mutability.Source§fn map<F, R>(&self, f: F) -> Rwhere
F: Fn(&WindowState) -> R,
fn map<F, R>(&self, f: F) -> Rwhere
F: Fn(&WindowState) -> R,
Get a reference to the stored
T value, and apply a function to it. This is used to
serialize the T value.Auto Trait Implementations§
impl !Freeze for WindowState
impl RefUnwindSafe for WindowState
impl Send for WindowState
impl Sync for WindowState
impl Unpin for WindowState
impl UnsafeUnpin for WindowState
impl UnwindSafe for WindowState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Turns some type into the initial state of some
Application.