CAPH.WUI.WIDGET.THEMEMGR
ThemeMgr allows to you apply custom themes easily.
Constructor
ThemeMgr | ||
Description | ||
Create Instance that have theme list. | ||
Emulator Support | Y | |
SDK Constraint | Support from version 5.1 | |
Example | ||
var ThemeMgr = caph.wui.widget.ThemeMgr; var t = new ThemeMgr(); |
Methods
ThemeMgr | ||
Description | ||
(Constructor) Create Instance that have theme list. | ||
Parameters | ■void | |
Return | ■Object - Theme instance | |
Emulator Support | Y | |
SDK Constraint | Support from version 5.1 | |
Example | ||
var ThemeMgr = caph.wui.widget.ThemeMgr; var t = new ThemeMgr(); |
enableTheme | ||
Description | ||
Enable a theme according themeName. | ||
Parameters | ■themeName - String - This is theme name you able. | |
Return | ■void | |
Emulator Support | Y | |
SDK Constraint | Support from version 5.1 | |
Example | ||
var ThemeMgr = caph.wui.widget.ThemeMgr; var t = new ThemeMgr(); var defaultTheme = 'caph'; var theme1 = 'theme1'; var path = '../../../../../build/1.0.0/caph.css'; t.addTheme(defaultTheme, path); t.enableTheme(defaultTheme); |
disableTheme | ||
Description | ||
Disable a theme according themeName. | ||
Parameters | ■themeName - String - This is theme name you disable. | |
Return | ■void | |
Emulator Support | Y | |
SDK Constraint | Support from version 5.1 | |
Example | ||
var ThemeMgr = caph.wui.widget.ThemeMgr; var t = new ThemeMgr(); var defaultTheme = 'caph'; var theme1 = 'theme1'; var path = '../../../../../build/1.0.0/caph.css'; t.addTheme(defaultTheme, path); t.enableTheme(defaultTheme); t.disableTheme(defaultTheme); |
addTheme | ||
Description | ||
Add a user theme. If one user theme has exist, next theme with the same name will cover previous exist theme. | ||
Parameters | ■themeName - String - This is theme name you add. ■path - String - This is css file path of theme you add. | |
Return | ■void | |
Emulator Support | Y | |
SDK Constraint | Support from version 5.1 | |
Example | ||
var ThemeMgr = caph.wui.widget.ThemeMgr; var t = new ThemeMgr(); var defaultTheme = 'caph'; var theme1 = 'theme1'; var path = '../../../../../build/1.0.0/caph.css'; t.addTheme(defaultTheme, path); |
removeTheme | ||
Description | ||
Remove a theme, current theme can't be removed | ||
Parameters | ■themeName - String - This is theme name you remove. | |
Return | ■void | |
Emulator Support | Y | |
SDK Constraint | Support from version 5.1 | |
Example | ||
var ThemeMgr = caph.wui.widget.ThemeMgr; var t = new ThemeMgr(); var defaultTheme = 'caph'; var theme1 = 'theme1'; var path = '../../../../../build/1.0.0/caph.css'; t.addTheme(defaultTheme, path); t.removeTheme(defaultTheme); |