# RWT Themeable Widgets

###### Identifier:

org.eclipse.rap.ui.themeableWidgets

###### Since:

RAP 1.0

###### Description:

This extension point is used to register custom RWT widgets which also support theming. To support theming, a widget provides a couple of files that are relevant for the theming. These files must conform to a naming convention. Once a custom widget is registered with this extension point, the theme-relevant files are found by their names. Thus, only the custom widget class must be registered.

The custom widget must provide the theme-relevant files in a package with is named after the schema `<package>.internal.<widget>kit` where `<package>` is the package name and `<widget>` is the lower case class name of the custom control. This is the same package that also contains the lifecycle adapter (LCA).

Theming relevant files include:

- A theme definiton file with the name `<Widget>.theme.xml`. This file defines new theming keys.
- A theme adapter class that implements `ControlThemeAdapter` and is named `<Widget>ThemeAdapter`. The theme adapter provides the control with the current values of theming-dependent properties.
- An appearance fragment file with the name `<Widget>.appearances.js`. This file defines new qooxdoo appearances.

None of these files are mandatory, files which are found are respected, but files which are missing do not hurt.

###### Configuration Markup:

<!ELEMENT extension (widget+)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

<!ELEMENT widget EMPTY>

<!ATTLIST widget

id CDATA #REQUIRED

name CDATA #IMPLIED

class CDATA #REQUIRED>

- id - a unique name that identifies this themeable widget
- name - an optional name for the themable widget
- class - the name of a class that implements the custom widget

###### Examples:

The following is an example of a themeable widget extension definition:

    <extension
        point="org.eclipse.rap.ui.themeableWidgets">
      <widget
          id="my.custom.datepicker"
          class="my.custom.controls.DatePicker">
      </widget>
    </extension>

Copyright (c) 2007, 2015 EclipseSource and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html