pub struct EguiState { /* private fields */ }Expand description
State for an nice-plug-egui editor.
Implementations§
Source§impl EguiState
impl EguiState
Sourcepub fn from_size(width: u32, height: u32) -> Arc<EguiState>
pub fn from_size(width: u32, height: u32) -> Arc<EguiState>
Initialize the GUI’s state. This value can be passed to create_egui_editor(). The window
size is in logical pixels, so before it is multiplied by the DPI scaling factor.
Sourcepub fn size(&self) -> (u32, u32)
pub fn size(&self) -> (u32, u32)
Returns a (width, height) pair for the current size of the GUI in logical pixels.
Sourcepub fn set_requested_size(&self, new_size: (u32, u32))
pub fn set_requested_size(&self, new_size: (u32, u32))
Set the new size (in logical pixels) that will be used to resize the window if the host allows.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EguiState
impl<'de> Deserialize<'de> for EguiState
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
Auto Trait Implementations§
impl !Freeze for EguiState
impl RefUnwindSafe for EguiState
impl Send for EguiState
impl Sync for EguiState
impl Unpin for EguiState
impl UnsafeUnpin for EguiState
impl UnwindSafe for EguiState
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