Struct epi::NativeOptions
source · [−]pub struct NativeOptions {
pub always_on_top: bool,
pub maximized: bool,
pub decorated: bool,
pub drag_and_drop_support: bool,
pub icon_data: Option<IconData>,
pub initial_window_pos: Option<Pos2>,
pub initial_window_size: Option<Vec2>,
pub min_window_size: Option<Vec2>,
pub max_window_size: Option<Vec2>,
pub resizable: bool,
pub transparent: bool,
}
Expand description
Options controlling the behavior of a native window.
Only a single native window is currently supported.
Fields
always_on_top: bool
Sets whether or not the window will always be on top of other windows.
maximized: bool
Show window in maximized mode
decorated: bool
On desktop: add window decorations (i.e. a frame around your app)? If false it will be difficult to move and resize the app.
drag_and_drop_support: bool
On Windows: enable drag and drop support.
Default is false
to avoid issues with crates such as cpal
which
will hang when combined with drag-and-drop.
See https://github.com/rust-windowing/winit/issues/1255.
icon_data: Option<IconData>
The application icon, e.g. in the Windows task bar etc.
initial_window_pos: Option<Pos2>
The initial (inner) position of the native window in points (logical pixels).
initial_window_size: Option<Vec2>
The initial inner size of the native window in points (logical pixels).
min_window_size: Option<Vec2>
The minimum inner window size
max_window_size: Option<Vec2>
The maximum inner window size
resizable: bool
Should the app window be resizable?
transparent: bool
On desktop: make the window transparent.
You control the transparency with App::clear_color()
.
You should avoid having a egui::CentralPanel
, or make sure its frame is also transparent.
Trait Implementations
sourceimpl Clone for NativeOptions
impl Clone for NativeOptions
sourcefn clone(&self) -> NativeOptions
fn clone(&self) -> NativeOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for NativeOptions
impl Send for NativeOptions
impl Sync for NativeOptions
impl Unpin for NativeOptions
impl UnwindSafe for NativeOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more