blob: 6294d493b1c1c22ab203fee36b30a6a64d24b881 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
<title>Defining intro themes</title>
</head>
<body>
<h2>Defining intro themes</h2>
<p>
A theme defines the overall <em>appearance</em> of the intro. It is simply a way
of grouping all the presentation files (styles and images) in one place that can
be pointed at or switched as one.
</p>
<h3>Definition</h3>
<p>
To define a theme, extend your intro configuration using the
<code>org.eclipse.ui.intro.configExtension</code> and use the <code>theme</code>
element, as shown in the example below:
</p>
<pre>
&lt;extension
point="org.eclipse.ui.intro.configExtension"&gt;
&lt;theme
default="true"
id="org.eclipse.ui.intro.universal.circles"
name="%theme.name.circles"
path="$nl$/themes/circles"
previewImage="themes/circles/preview.png"&gt;
&lt;property
name="launchbarBackground"
value="#a1c2cb"/&gt;
&lt;property
name="launchbarOverviewIcon"
value="$theme$graphics/launchbar/overview16.png"/&gt;
&lt;property
name="launchbarFirststepsIcon"
value="$theme$graphics/launchbar/firststeps16.png"/&gt;
&lt;property
name="launchbarTutorialsIcon"
value="$theme$graphics/launchbar/tutorials16.png"/&gt;
&lt;property
name="launchbarSamplesIcon"
value="$theme$graphics/launchbar/samples16.png"/&gt;
&lt;property
name="launchbarWhatsnewIcon"
value="$theme$graphics/launchbar/whatsnew16.png"/&gt;
&lt;property
name="launchbarMigrateIcon"
value="$theme$graphics/launchbar/migrate16.png"/&gt;
&lt;property
name="launchbarWebresourcesIcon"
value="$theme$graphics/launchbar/webresources16.png"/&gt;
&lt;/theme&gt;
&lt;/extension&gt;
</pre>
<p>
Consult the <a href="../reference/extension-points/org_eclipse_ui_intro_configExtension.html">schema documentation</a>
for details on all the available attributes relating to themes.
</p>
<p>
Each theme has a unique identifier, translatable name, preview image, and a path
to the root theme folder. The intro plug-in does not provide any UI for theme
manipulation. The only way to select a theme is via the preference
<code>org.eclipse.ui.intro/INTRO_THEME</code> in plugin_customization.ini.
</p>
<h3>Enabling themes</h3>
<p>
Theme support by itself does not make intro implementations theme-enabled.
Concrete intro implementations can choose to expose themes in a more substantial
way (and in fact Universal Welcome implementation does exactly that with the
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.platform.introCustomization)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
<b>General &gt; Welcome</b></a>
preference page.
</p>
<p>
Theme-enabled intro implementation must make all the references to style and
presentation resources using the <code>$theme$</code> substitution variable. Absolute paths
for images, pages, styles, etc. will be computed by resolving the substitution
variable using the path of the currently active theme.
</p>
</body>
</html>