Skip to content

Latest commit

 

History

History
85 lines (58 loc) · 2.44 KB

File metadata and controls

85 lines (58 loc) · 2.44 KB

Import :

const ThemeManager = brackets.getModule("view/ThemeManager")

EVENT_THEME_CHANGE : string

Event when theme is changed

Kind: global constant

EVENT_THEME_LOADED : string

Event when theme is loaded

Kind: global constant

getCurrentTheme() ⇒ Theme

Get current theme object that is loaded in the editor.

Kind: global function
Returns: Theme - the current theme instance

getAllThemes() ⇒ Array.<Theme>

Gets all available themes

Kind: global function
Returns: Array.<Theme> - collection of all available themes

refresh(force)

Refresh current theme in the editor

Kind: global function

Param Type Description
force boolean Forces a reload of the current theme. It reloads the theme file.

loadFile(fileName, options) ⇒ $.Promise

Loads a theme from a file.

Kind: global function
Returns: $.Promise - promise object resolved with the theme to be loaded from fileName

Param Type Description
fileName string is the full path to the file to be opened
options Object is an optional parameter to specify metadata for the theme.

loadPackage(themePackage) ⇒ $.Promise

Loads a theme from an extension package.

Kind: global function
Returns: $.Promise - promise object resolved with the theme to be loaded from the pacakge

Param Type Description
themePackage Object is a package from the extension manager for the theme to be loaded.

isOSInDarkTheme()

Detects if the os settings is set to dark theme or not

Kind: global function

setCurrentTheme(themeID) ⇒ boolean

Sets the current theme for the given theme id if present.

Kind: global function
Returns: boolean - true if the theme was applied, else false

Param Type
themeID string