Mailspring/docs/ThemeManager.html
2015-10-03 13:39:16 -07:00

113 lines
3.4 KiB
HTML

---
layout: docs
title: ThemeManager
edit_url: "https://github.com/nylas/N1/blob/master/src/theme-manager.coffee"
---
<h2>Summary</h2>
<div class="markdown-from-sourecode">
<p><p>Handles loading and activating available themes.</p>
<p>An instance of this class is always available as the <code>atom.themes</code> global.</p>
</p>
</div>
<ul>
<li><a href="#Event Subscription">Event Subscription</a></li>
<li><a href="#Accessing Loaded Themes">Accessing Loaded Themes</a></li>
<li><a href="#Accessing Active Themes">Accessing Active Themes</a></li>
<li><a href="#Managing Enabled Themes">Managing Enabled Themes</a></li>
</ul>
<h3>Instance Methods</h3>
<h4 id=onDidChangeActiveThemes class="function-name">
onDidChangeActiveThemes(<span class="args"><span class="arg">callback</span></span>) <a href="#onDidChangeActiveThemes" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Invoke <code>callback</code> when style sheet changes associated with
updating the list of active themes have completed.</p>
</p>
</div>
<strong>Parameters</strong>
<table class="arguments">
<tr>
<th>Argument</th>
<th>Description</th>
</tr>
<tr>
<td style="width:15%;">
<em>callback</em>
</td>
<td class="markdown-from-sourecode">
<p><a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/function'>Function</a> </p>
</td>
</tr>
</table>
<h4 id=getLoadedThemeNames class="function-name">
getLoadedThemeNames(<span class="args"></span>) <a href="#getLoadedThemeNames" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get an array of all the loaded theme names. </p>
</p>
</div>
<h4 id=getLoadedThemes class="function-name">
getLoadedThemes(<span class="args"></span>) <a href="#getLoadedThemes" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get an array of all the loaded themes. </p>
</p>
</div>
<h4 id=getActiveThemeNames class="function-name">
getActiveThemeNames(<span class="args"></span>) <a href="#getActiveThemeNames" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get an array of all the active theme names. </p>
</p>
</div>
<h4 id=getActiveThemes class="function-name">
getActiveThemes(<span class="args"></span>) <a href="#getActiveThemes" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get an array of all the active themes. </p>
</p>
</div>
<h4 id=getEnabledThemeNames class="function-name">
getEnabledThemeNames(<span class="args"></span>) <a href="#getEnabledThemeNames" class="link"></a>
</h4>
<div class="function-description markdown-from-sourecode">
<p><p>Get the enabled theme names from the config.</p>
</p>
</div>
<strong>Returns</strong>
<table class="arguments">
<tr>
<th>Return Values</th>
</tr>
<tr><td class="markdown-from-sourecode"><p>Returns an array of theme names in the order that they should be activated.</p>
</td></tr>
</table>