pub struct SettingsWindow {
pub settings_ui: SettingsUI,
/* private fields */
}Expand description
Manages a separate settings window with its own egui context and wgpu renderer
Fields§
§settings_ui: SettingsUISettings UI component
Implementations§
Source§impl SettingsWindow
impl SettingsWindow
Sourcepub async fn new(
event_loop: &ActiveEventLoop,
config: Config,
supported_vsync_modes: Vec<VsyncMode>,
) -> Result<Self>
pub async fn new( event_loop: &ActiveEventLoop, config: Config, supported_vsync_modes: Vec<VsyncMode>, ) -> Result<Self>
Create a new settings window
Sourcepub fn should_close(&self) -> bool
pub fn should_close(&self) -> bool
Check if the window should close
Sourcepub fn inject_paste(&mut self, text: String)
pub fn inject_paste(&mut self, text: String)
Queue a paste event for the next egui frame.
Used when the macOS menu accelerator intercepts Cmd+V before the keypress reaches egui.
Sourcepub fn inject_event(&mut self, event: Event)
pub fn inject_event(&mut self, event: Event)
Queue an egui event for the next frame.
Used when menu accelerators intercept Cmd+C, Cmd+X, Cmd+A, etc. before egui sees them.
Sourcepub fn update_config(&mut self, config: Config)
pub fn update_config(&mut self, config: Config)
Update the config in the settings UI
Sourcepub fn force_update_config(&mut self, config: Config)
pub fn force_update_config(&mut self, config: Config)
Force-update the config, bypassing the has_changes guard.
Used when the ACP agent changes config — must propagate even if
the user has pending edits in the settings window.
Sourcepub fn set_shader_error(&mut self, error: Option<String>)
pub fn set_shader_error(&mut self, error: Option<String>)
Set a shader compilation error message
Sourcepub fn set_cursor_shader_error(&mut self, error: Option<String>)
pub fn set_cursor_shader_error(&mut self, error: Option<String>)
Set a cursor shader compilation error message
Sourcepub fn clear_shader_error(&mut self)
pub fn clear_shader_error(&mut self)
Clear shader error
Sourcepub fn clear_cursor_shader_error(&mut self)
pub fn clear_cursor_shader_error(&mut self)
Clear cursor shader error
Sourcepub fn sync_shader_states(
&mut self,
custom_shader_enabled: bool,
cursor_shader_enabled: bool,
)
pub fn sync_shader_states( &mut self, custom_shader_enabled: bool, cursor_shader_enabled: bool, )
Sync shader enabled states from external source (e.g., keybinding toggle) This prevents the settings window from overwriting externally toggled states
Sourcepub fn handle_window_event(
&mut self,
event: WindowEvent,
) -> SettingsWindowAction
pub fn handle_window_event( &mut self, event: WindowEvent, ) -> SettingsWindowAction
Handle a window event
Sourcepub fn request_redraw(&self)
pub fn request_redraw(&self)
Request a redraw
Sourcepub fn is_focused(&self) -> bool
pub fn is_focused(&self) -> bool
Check if the settings window currently has focus.
Auto Trait Implementations§
impl !Freeze for SettingsWindow
impl !RefUnwindSafe for SettingsWindow
impl Send for SettingsWindow
impl !Sync for SettingsWindow
impl Unpin for SettingsWindow
impl UnsafeUnpin for SettingsWindow
impl !UnwindSafe for SettingsWindow
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more