Metamorphis SDK
(last updated May 9, 2002)
Version requirements: MJ 8.0.267 and above

File called Main.xml is main file for the skin. One skin can have multiple skins inside. For example Main skin can load other skin. So there can be mini-me and mini-mini-me and micro-mini-me etc. You need to include file named TheSkin.gif (jpg,bmp) (preferred size: 310x210) with your skin package, this image will be displayed in Skin Manager.

Main Skin components:

  1. WINDOWS
  2. SCRIPTS
  3. EXTRAS
  4. TOOLTIPS
  5. MENUS

WINDOWS

Metamorphis skinning engine supports as many windows as needed. There is only one rule which should be followed when creating Metamorphis skin: Window with Type="Main" must be present in the XML file and this window must be always visible. The rest of windows you can call as you wish. There can be as few as one window (main window) and as many as 1000. Main window is going to be visible by default, other windows can be made visible on start up by using OnInitialize event of the main window and using script commands to display other windows.

The Metamorphis window can be any shape and the button layouts can be anything the theme designer desires. Care to leave out some buttons or display items you don't care for? Go ahead leave them out -- Metamorphis doesn't care.

If window has ParentWindow attribute it will belong to the window specified in the attribute, and will be always on top of the window and coordinates of this window will be relative to the window coordinates.

Window attributes:

Window can contain the following window items: Buttons, InfoDisplays, Placehoders, Sliders

ZOrder of all windows by default follows window order in the XML file (from top to bottom). It can be changed by using Window Object command SetWindowBehind, see Scripts

In addition to window item a window can handle Events.


EXTRAS

Script

If you want your skin to use script file please specify name of the file. There can be unlimited number of script files used in a skin.

Example:
    <Entry Type="Script" File="script.js" />

Fonts

If you use some fancy font in a theme, there is a good chance that other people will not have that font on their machine. In that case, you should include your font in the theme package. Please make sure that you have the right to distribute that font with theme. If you are unsure of the rights regarding fonts, you may want to use Microsoft's WebFonts, which you can redistribute.

Skin can contain as many fonts as needed, upon loading of a skin all fonts specified in the skin will be installed on the system

Example:
    <Entry Type="Font" File="SomeCoolFont.ttf" />
    <Entry Type="Font" File="AnotherCoolFont.ttf" />

This or any other font can be used in skin items displaying text such as Menus, InfoDisplays, Tooltips

Visualization

Example:
    <Entry Type="Visualization" Group="CoolSkin" File="Blue Spiral.mjv" />
    <Entry Type="Visualization" Group="Planetarium" File="Visualizations\Nevermore.mjv" />

COM

Metamorphis skins can work as a container for COM controls.

Example:
    <Entry Type="COM" File="SomeVeryCoolControl.dll" />


Tooltips

Metamorphis skinning engine allows tooltips to be skinned.

Example:
    <Entry Type="Global">
        <Colors Text="C0C0C0" Background="333333" Frame="dddddd" />
        <Font Facename="Arial" Size="14" Weight="100" Italic="0"/>
    </Entry>


Menus

Metamorphis skinning engine allows menus to be skinned.

Example:
    <Entry Type="Global">
        <Colors Text="C0C0C0" Background="333333" HighlightBackground="C0C0C0" HighlightText="333333" Frame="dddddd" />
        <Font Facename="Arial" Size="14" Weight="100" Italic="0"/>
    </Entry>


Button Items

Buttons in Metamorphis are bitmaps. It doesn't matter which bit depth your theme bitmaps are, but usually 256 color bitmaps will suffice while keeping the size of the skin down.

Button attributes:

After button pressed OnButtonDown event will be sent notifying of state change.

NOTE: Initial State of a button can be changed by using Scripts in combination with Event

Example:
    <Entry Name="Close" Bitmap="Close.bmp" Tip="Close" Position="278,7" />


InfoDisplay Items

InfoDisplay Items define rectangular area in which text will be displayed.

InfoDisplay attributes:

Example:
    <Entry Name="Bitrate" Tip="Bitrate" TrackInfo="BITRATE" Rect="156,137,189,155" Align="Right">
        <Colors Text="ffffff" />
        <Font Facename="Areal" Size="14" Weight="800" Italic="1"/>
    </Entry>


Placeholder Items

Placehoder attributes:

Example 1:
    <Entry Type="Visualization" Name="Visualization" Rect="31,97,130,196" Tip="This is visualization" Bitmap="star.bmp" TransColor="FF00FF" />

Example 2:
    <Entry Type="8856F961-340A-11D0-A96B-00C04FD705A2" Name="Browser" Rect="10,70,380,350"/>


Slider Items

Slider attributes:

If bar width is more than height, then slider is vertical.
Thumb always aligned to the top the top of the slider bar image in case of Horizontal bar, and to the left in case of Vertical one.

Example:
    <Entry Name="Volume" Bitmap="volume_bar.bmp" Tip="Drag to change Volume" Position="277,50" NumberImages="2">
        <Thumb Bitmap="volume_thumb.bmp" />
    </Entry>


Events

Predefined Events:

Window Events:

    Main Window Events:

    NOTE: This event will be sent to the Main window only.

    Init and Exit events:

    State changed events:

    Generic Window Events:

Event attributes:

Example:
    <Entry Event="OnInitialize" Action="Script" ActionData="PlayerInitialUpdate" />

Item Events:

Event attributes:

Generic Item Events - Generic events will be send to all skin items

Button Item Events - Sent only to Button items.

Slider Item Events - Sent only to Slider items.

Example:
    <Entry Event="OnButtonDown" Item="ShowPlaylist" Action="Script" ActionData="PlayerInitialUpdate" />

COM Control Events:

Example:
    <Entry Event="StatusTextChange" Item="Browser" Action="Script" ActionData="OnStatusTextChange" />


Appendix A

Predefined button types

These buttons can be located in any window.

Window State Buttons:

Play State Buttons:

Playlist State Buttons:

Equalizer State Buttons:

Volume:


Actions


Predefined TrackInfo keywords

These TrackInfo keywords can be used to display information about currently playing track

    General Info:

    Time keywords:

    Playback Info:

You can also access this information through MJAutomation object is JScript, for more information about that see SDK for Interface Plug-ins.


Predefined Slider types

These Slider Items can be located in any window.


Predefined Placeholder types

These Placeholder Items can be located in any window.

If Type Attribute is a class id then Metamorphis engine will try to create control with specified Class ID.


Support

If you have questions or concerns not addressed by this SDK, or just have suggestions for making the SDK more understandable, please visit our developer's forum