WindowThemePolicy

public enum WindowThemePolicy

Window theme policies that define which windows should be automatically themed, if any.

Swift

By default, all application windows (except NSPanel) will be themed (.themeAllWindows).

  • themeAllWindows: Theme all application windows, except NSPanel subclasses (default).
  • themeSomeWindows: Only theme windows of the specified classes.
  • doNotThemeSomeWindows: Do not theme windows of the specified classes.
  • doNotThemeWindows: Do not theme any window.E.g.:

E.g.:

ThemeManager.shared.windowThemePolicy = .themeSomeWindows(windowClasses: [CustomWindow.self])

Objective-C

By default, all application windows (except NSPanel) will be themed (TKThemeManagerWindowThemePolicyThemeAllWindows).

  • TKThemeManagerWindowThemePolicyThemeAllWindows: Theme all application windows, except NSPanel subclasses (default).
  • TKThemeManagerWindowThemePolicyThemeSomeWindows: Only theme windows of the specified classes (use themableWindowClasses property).
  • TKThemeManagerWindowThemePolicyDoNotThemeSomeWindows: Do not theme windows of the specified classes (use notThemableWindowClasses property).
  • TKThemeManagerWindowThemePolicyDoNotThemeWindows: Do not theme any window.

Example:

[TKThemeManager sharedManager].windowThemePolicy = TKThemeManagerWindowThemePolicyThemeSomeWindows;
[TKThemeManager sharedManager].themableWindowClasses = @[[CustomWindow class]];

NSWindow Extension