pub struct IdeThemeManager { /* private fields */ }Expand description
IDE-specific theme manager wrapper
Provides IDE-specific functionality on top of the base ThemeManager, including integration with IDE configuration and storage.
Implementations§
Source§impl IdeThemeManager
impl IdeThemeManager
Sourcepub fn with_theme(theme: Theme) -> Self
pub fn with_theme(theme: Theme) -> Self
Create an IDE theme manager with a specific theme
Sourcepub fn with_registry(registry: ThemeRegistry) -> Self
pub fn with_registry(registry: ThemeRegistry) -> Self
Create an IDE theme manager with a custom registry
Sourcepub fn switch_by_name(&self, name: &str) -> Result<()>
pub fn switch_by_name(&self, name: &str) -> Result<()>
Switch to a theme by name
Sourcepub fn available_themes(&self) -> Vec<&'static str>
pub fn available_themes(&self) -> Vec<&'static str>
Get all available theme names
Sourcepub fn current_name(&self) -> Result<String>
pub fn current_name(&self) -> Result<String>
Get the current theme name
Sourcepub fn load_custom_theme(&self, path: &Path) -> Result<()>
pub fn load_custom_theme(&self, path: &Path) -> Result<()>
Load a custom theme from a file
Sourcepub fn load_custom_themes_from_directory(
&self,
dir: &Path,
) -> Result<Vec<Theme>>
pub fn load_custom_themes_from_directory( &self, dir: &Path, ) -> Result<Vec<Theme>>
Load all custom themes from a directory
Sourcepub fn load_and_register_custom_themes(&self, dir: &Path) -> Result<Vec<String>>
pub fn load_and_register_custom_themes(&self, dir: &Path) -> Result<Vec<String>>
Load all custom themes from a directory and register them
Sourcepub fn save_custom_theme(&self, path: &Path) -> Result<()>
pub fn save_custom_theme(&self, path: &Path) -> Result<()>
Save current theme as a custom theme
Sourcepub fn save_theme_as_custom(&self, theme: &Theme, path: &Path) -> Result<()>
pub fn save_theme_as_custom(&self, theme: &Theme, path: &Path) -> Result<()>
Save a specific theme as a custom theme
Sourcepub fn delete_custom_theme(&self, name: &str, path: &Path) -> Result<()>
pub fn delete_custom_theme(&self, name: &str, path: &Path) -> Result<()>
Delete a custom theme file and unregister it
Sourcepub fn custom_themes_directory() -> Result<PathBuf>
pub fn custom_themes_directory() -> Result<PathBuf>
Get the default custom themes directory
Sourcepub fn registry(&self) -> &ThemeRegistry
pub fn registry(&self) -> &ThemeRegistry
Get the theme registry
Sourcepub fn list_all_themes(&self) -> Result<Vec<String>>
pub fn list_all_themes(&self) -> Result<Vec<String>>
List all available themes (built-in and custom)
Sourcepub fn list_builtin_themes(&self) -> Vec<String>
pub fn list_builtin_themes(&self) -> Vec<String>
List all built-in themes
Sourcepub fn list_custom_themes(&self) -> Result<Vec<String>>
pub fn list_custom_themes(&self) -> Result<Vec<String>>
List all custom themes
Sourcepub fn register_theme(&self, theme: Theme) -> Result<()>
pub fn register_theme(&self, theme: Theme) -> Result<()>
Register a custom theme in the registry
Sourcepub fn unregister_theme(&self, name: &str) -> Result<()>
pub fn unregister_theme(&self, name: &str) -> Result<()>
Unregister a custom theme from the registry
Sourcepub fn theme_exists(&self, name: &str) -> bool
pub fn theme_exists(&self, name: &str) -> bool
Check if a theme exists
Sourcepub fn is_builtin_theme(&self, name: &str) -> bool
pub fn is_builtin_theme(&self, name: &str) -> bool
Check if a theme is built-in
Sourcepub fn is_custom_theme(&self, name: &str) -> Result<bool>
pub fn is_custom_theme(&self, name: &str) -> Result<bool>
Check if a theme is custom
Sourcepub fn builtin_theme_count(&self) -> usize
pub fn builtin_theme_count(&self) -> usize
Get the number of built-in themes
Sourcepub fn custom_theme_count(&self) -> Result<usize>
pub fn custom_theme_count(&self) -> Result<usize>
Get the number of custom themes
Sourcepub fn reset_colors(&self) -> Result<()>
pub fn reset_colors(&self) -> Result<()>
Reset all colors in the current theme to their default values
Sourcepub fn reset_theme(&self) -> Result<()>
pub fn reset_theme(&self) -> Result<()>
Reset the current theme to its built-in default
Sourcepub fn reset_color(&self, color_name: &str) -> Result<()>
pub fn reset_color(&self, color_name: &str) -> Result<()>
Reset a specific color field in the current theme to its default value
Sourcepub fn get_default_color(&self, color_name: &str) -> Result<Color>
pub fn get_default_color(&self, color_name: &str) -> Result<Color>
Get the default color value for a specific color field in the current theme
Sourcepub fn reset_manager(&self) -> &ThemeResetManager
pub fn reset_manager(&self) -> &ThemeResetManager
Get the theme reset manager
Sourcepub fn on_theme_changed<F>(&self, listener: F) -> Result<()>
pub fn on_theme_changed<F>(&self, listener: F) -> Result<()>
Register a listener for theme changes
Sourcepub fn inner(&self) -> &ThemeManager
pub fn inner(&self) -> &ThemeManager
Get the underlying theme manager
Trait Implementations§
Source§impl Clone for IdeThemeManager
impl Clone for IdeThemeManager
Source§fn clone(&self) -> IdeThemeManager
fn clone(&self) -> IdeThemeManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IdeThemeManager
impl Debug for IdeThemeManager
Auto Trait Implementations§
impl Freeze for IdeThemeManager
impl RefUnwindSafe for IdeThemeManager
impl Send for IdeThemeManager
impl Sync for IdeThemeManager
impl Unpin for IdeThemeManager
impl UnwindSafe for IdeThemeManager
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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