Difference between revisions of "Metamorphis Scripts"

From JRiverWiki
Jump to: navigation, search
m (Reverted edits by LaoloBasri (Talk); changed back to last version by Gateley)
 
(11 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
==Metamorphis Object Commands==
 
==Metamorphis Object Commands==
 
===Functions===
 
===Functions===
void SetBitmap(string Bitmap, string TransparentColor)<br>
+
'''void SetBitmap(string Bitmap, string TransparentColor)'''<br>
Description: Sets image for the window. Relative paths can be used. SetBitmap function can be used to change image and region for a window.<br>
+
'''Description''': Sets image for the window. Relative paths can be used. SetBitmap function can be used to change image and region for a window.<br>
Parameters:<br>
+
'''Parameters''':<br>
:Bitmap - new bitmap file for the window.<br>
+
:''Bitmap'' - new bitmap file for the window.<br>
        TransparentColor- transparent color of new image.<br>
+
:''TransparentColor''- transparent color of new image.<br>
 
+
'''Example''':<br>
        Example:<br>
+
Player.SetBitmap( "coolpic.gif", "ff00ff");
 
+
----
          Player.SetBitmap( "coolpic.gif", "ff00ff");<br>
+
'''bool LoadSkinState()'''<br>
 
+
'''Description''': Loads previously saved state of the skin, usually called in handler for OnInitialize event.<br>
    bool LoadSkinState()<br>
+
'''Return Values''': true if skin state was previously saved using SaveSkinState function, otherwise false.<br>
 
+
'''Example''':<br>
        Description: Loads previously saved state of the skin, usually called in handler for OnInitialize event.<br>
+
if(Metamorphis.LoadSkinState() == false)
 
+
{
        Return Values: true if skin state was previously saved using SaveSkinState function, otherwise false.<br>
+
  EQ.ShowWindow(true);
 
+
}
        Example:<br>
+
----
 
+
'''void SaveSkinState()'''<br>
        if(Metamorphis.LoadSkinState() == false)<br>
+
'''Description''': Saves skin state, usually called in handler for OnExit event.<br>
        {<br>
+
'''Example''':<br>
            EQ.ShowWindow(true);<br>
+
Metamorphis.SaveSkinState();
        }<br>
+
----
 
+
'''void SetStateValue(string Name, variant Value)'''<br>
    void SaveSkinState()<br>
+
'''Description''': Sets state variable. This variable will be saved in state.xml and can be retrieved when skin is loaded or at any other time. Supported types: number, string, boolean, double<br>
 
+
'''Parameters''':<br>
        Description: Saves skin state, usually called in handler for OnExit event.<br>
+
:''Name'' - Name of the value to be set.<br>
 
+
:''Value'' - Specifies the data to be stored.<br>
        Example:<br>
+
'''Example''':<br>
 
+
Metamorphis.SetStateValue("SomeName", "SomeValue");
        Metamorphis.SaveSkinState();<br>
+
Metamorphis.SetStateValue("SomeName2", 1);
 
+
----
    void SetStateValue(string Name, variant Value)<br>
+
'''variant GetStateValue(string Name)'''<br>
 
+
'''Description''': Retrieves previously set state value. Supported types: number, string, boolean, double<br>
        Description: Sets state variable. This variable will be saved in state.xml and can be retrieved when skin is loaded or at any other time. Supported types: number, string, boolean, double<br>
+
'''Parameters''':<br>
 
+
:''Name'' - Name of the value to be retrieved.<br>
        Parameters:<br>
+
'''Return Values''': the value's data<br>
        Name - Name of the value to be set.<br>
+
'''Example''':<br>
        Value - Specifies the data to be stored.<br>
+
var SoveValue = Metamorphis.GetStateValue("SomeName");
 
+
// check if value was previously set
        Example:<br>
+
if( SomeValue == null) // value was not set
 
+
{
        Metamorphis.SetStateValue("SomeName", "SomeValue");
+
    ... do something
        Metamorphis.SetStateValue("SomeName2", 1);
+
}
 
+
----
    variant GetStateValue(string Name)<br>
+
'''long StartTimer(long Timeout, string FunctionName)'''<br>
 
+
'''Description''': This function creates a timer with the specified time-out value.<br>
        Description: Retrieves previously set state value. Supported types: number, string, boolean, double<br>
+
'''Parameters''':<br>
 
+
:''Timeout'' - specifies the time-out value, in milliseconds<br>
        Parameters:<br>
+
:''FunctionName'' - name the function to be notified when the time-out value elapses.<br>
        Name - Name of the value to be retrieved.<br>
+
'''Return Values''': Identifier of the new timer.<br>
 
+
'''Example''':<br>
        Return Values: the value's data<br>
+
var TimerID = Metamorphis.StartTimer(1000, DoExtraCoolStuff );
 
+
----
        Example:<br>
+
'''void StopTimer(long TimerID)'''<br>
 
+
'''Description''': The function destroys the specified timer.<br>
        var SoveValue = Metamorphis.GetStateValue("SomeName");
+
'''Parameters''':<br>
        // check if value was previously set
+
:''TimerID''- Identifier of the timer.<br>
        if( SomeValue == null) // value was not set
+
'''Example''':<br>
        {
+
Metamorphis.StopTimer(TimerID );
            ... do something
+
----
        }
+
'''bool IsAlwaysOnTop ()'''<br>
 
+
'''Description''': Retrieves Always on State state<br>
    long StartTimer(long Timeout, string FunctionName)<br>
+
'''Return Values''': 0 - off, 1- on<br>
 
+
'''Example''':<br>
        Description: This function creates a timer with the specified time-out value.<br>
+
var State = Metamorphis.IsAlwaysOnTop();
 
+
'''void Minimize()'''<br>
        Parameters:<br>
+
'''Description''': Minimizes the skin.<br>
        Timeout - specifies the time-out value, in milliseconds<br>
+
'''void Maximize()'''<br>
        FunctionName - name the function to be notified when the time-out value elapses.<br>
+
'''Description''': Returns Media Jukebox to MEGA-ME state.<br>
 
+
'''void Close()'''<br>
        Return Values: Identifier of the new timer.<br>
+
'''Description''': Closes Media Jukebox.<br>
 
+
'''void Restore()'''<br>
        Example:<br>
+
'''Description''': If a skin was minimized it will be restored.<br>
 
+
'''bool IsMinimized()'''<br>
        var TimerID = Metamorphis.StartTimer(1000, DoExtraCoolStuff );
+
'''Description''': Returns true if a skin is minimized.<br>
 
+
'''void EnableTooltips(bool bEnable)'''<br>
    void StopTimer(long TimerID)<br>
+
'''Description''': Turns tooltips on and off.<br>
 
+
'''Parameters''':<br>
        Description: The function destroys the specified timer.<br>
+
:''bEnable'' - true(default) - to turn tooltips on, false - to turn tooltips off<br>
 
+
'''long GetScreenWidth()'''<br>
        Parameters:<br>
+
'''Description''': retrieves screen width.<br>
        TimerID- Identifier of the timer.<br>
+
'''long GetScreenHeight()'''<br>
 
+
'''Description''': retrieves screen height.<br>
        Example:<br>
+
'''long GetScreenLeft()'''<br>
 
+
'''Description''': retrieves screen left.<br>
        Metamorphis.StopTimer(TimerID );
+
'''long GetScreenTop()'''<br>
 
+
'''Descriptio'''n: retrieves screen top.<br>
    bool IsAlwaysOnTop ()<br>
 
 
 
        Description: Retrieves Always on State state<br>
 
 
 
        Return Values: 0 - off, 1- on<br>
 
 
 
        Example:<br>
 
 
 
        var State = Metamorphis.IsAlwaysOnTop();
 
 
 
    void Minimize()<br>
 
 
 
        Description: Minimizes the skin.<br>
 
 
 
    void Maximize()<br>
 
 
 
        Description: Returns Media Jukebox to MEGA-ME state.<br>
 
 
 
    void Close()<br>
 
 
 
        Description: Closes Media Jukebox.<br>
 
 
 
    void Restore()<br>
 
 
 
        Description: If a skin was minimized it will be restored.<br>
 
 
 
    bool IsMinimized()<br>
 
 
 
        Description: Returns true if a skin is minimized.<br>
 
 
 
    void EnableTooltips(bool bEnable)<br>
 
 
 
        Description: Turns tooltips on and off.<br>
 
 
 
        Parameters:<br>
 
        bEnable - true(default) - to turn tooltips on, false - to turn tooltips off<br>
 
 
 
    long GetScreenWidth()<br>
 
 
 
        Description: retrieves screen width.<br>
 
 
 
    long GetScreenHeight()<br>
 
 
 
        Description: retrieves screen height.<br>
 
 
 
    long GetScreenLeft()<br>
 
 
 
        Description: retrieves screen left.<br>
 
 
 
    long GetScreenTop()<br>
 
 
 
        Description: retrieves screen top.<br>
 
 
 
 
==Window Commands==
 
==Window Commands==
 
===Functions===
 
===Functions===
 
+
'''void SetWindowPos( long x, long y)'''<br>
    void SetWindowPos( long x, long y)<br>
+
'''Description''': Sets position of the window to x, y point.<br>
 
+
'''Parameters''':<br>
        Description: Sets position of the window to x, y point.<br>
+
:''x'' , ''y'' - coordinates are Desktop coordinates.<br>
 
+
'''Example''':<br>
        Parameters:<br>
+
Playlist.SetWindowPos(101, 107);
        x , y - coordinates are Desktop coordinates.<br>
+
'''void ShowWindow(bool ShowCommand)'''<br>
 
+
'''Description''': Changes visual state of the window.<br>
        Example:<br>
+
'''Parameters''':<br>
 
+
:''ShowCommand'' - true - Show, false - Hide<br>
            Playlist.SetWindowPos(101, 107);
+
'''Example''':<br>
 
+
  Playlist.ShowWindow(true);
    void ShowWindow(bool ShowCommand)<br>
+
'''void MoveWindowAnimated(long OffsetX, long OffsetY, long Speed)'''<br>
 
+
'''Description''': Moves the window from current point to x+OffsetX and y+OffsetY<br>
        Description: Changes visual state of the window.<br>
+
'''Parameters''':<br>
 
+
:''Speed'' - value from 1 to 100, determines how fast the movement will be performed.<br>
        Parameters:<br>
+
'''Example''':<br>
        ShowCommand - true - Show, false - Hide<br>
+
Equalizer.ShowWindowAnimated(101, 0, -100, 107, 4);
 
+
'''void SetWindowBehind(Object Window)'''<br>
        Example:<br>
+
'''Description''': Changes ZOrder of the window, by inserting the window behind specified window.<br>
 
+
'''Parameters''':<br>
            Playlist.ShowWindow(true);
+
:''Window'' - one of Window objects of the skin, for example 'Player'<br>
 
+
'''Example''':<br>
    void MoveWindowAnimated(long OffsetX, long OffsetY, long Speed)<br>
+
Equalizer.SetWindowBehind(Player);
 
+
'''void GetSkinItem(long MainType, string Name)'''<br>
        Description: Moves the window from current point to x+OffsetX and y+OffsetY<br>
+
'''Description''':<br>
 
+
'''Parameters''':<br>
        Parameters:<br>
+
:''MainType'' - 0 - Button, 1 - Placeholder, 2 - Slider, 3 - InfoDisplay<br>
        Speed - value from 1 to 100, determines how fast the movement will be performed.<br>
+
'''Example''':<br>
 
+
Player.GetSkinItem(0, "ShowEqualizer").SetItemState("Show");
        Example:<br>
+
'''bool IsWindowVisible()'''<br>
 
+
'''Description''': The function retrieves the visibility state of the specified window.<br>
            Equalizer.ShowWindowAnimated(101, 0, -100, 107, 4);
 
 
 
    void SetWindowBehind(Object Window)<br>
 
 
 
        Description: Changes ZOrder of the window, by inserting the window behind specified window.<br>
 
 
 
        Parameters:<br>
 
        Window - one of Window objects of the skin, for example 'Player'<br>
 
 
 
        Example:<br>
 
 
 
            Equalizer.SetWindowBehind(Player);
 
 
 
    void GetSkinItem(long MainType, string Name)<br>
 
 
 
        Description:<br>
 
 
 
        Parameters:<br>
 
        MainType - 0 - Button, 1 - Placeholder, 2 - Slider, 3 - InfoDisplay<br>
 
 
 
        Example:<br>
 
 
 
            Player.GetSkinItem(0, "ShowEqualizer").SetItemState("Show");
 
 
 
    bool IsWindowVisible()<br>
 
 
 
        Description: The function retrieves the visibility state of the specified window.<br>
 
 
 
        Example:<br>
 
 
 
 
===Properties===
 
===Properties===
 
+
'''long Left'''<br>
    long Left<br>
+
'''Description''':<br>
 
+
'''Example''':<br>
        Description:<br>
+
var x = Player.PositionX;
 
+
'''long Top'''<br>
        Example:<br>
+
'''Description''':<br>
 
+
'''Example''':<br>
            var x = Player.PositionX;
+
var y = Player.PositionY;
 
+
'''long Width'''
    long Top<br>
+
'''Example''':<br>
 
+
var Width = Player.Width;
        Description:<br>
+
'''long Height'''<br>
 
+
'''Example''':<br>
        Example:<br>
+
var Height = Player.Height;
 
 
            var y = Player.PositionY;
 
 
 
    long Width
 
 
 
        Description:<br>
 
 
 
        Example:<br>
 
 
 
            var Width = Player.Width;
 
 
 
    long Height<br>
 
 
 
        Description:<br>
 
 
 
        Example:<br>
 
 
 
            var Height = Player.Height;
 
 
 
 
==SkinItem Commands==
 
==SkinItem Commands==
 
To get skin item use GetSkinItem function
 
To get skin item use GetSkinItem function
 
 
===Functions===
 
===Functions===
 
+
'''void SetPosition(long x, long y)'''<br>
    void SetPosition(long x, long y)<br>
+
'''Description''': Sets new position of the skin item.<br>
 
+
'''Parameters''':<br>
        Description: Sets new position of the skin item.<br>
+
:''x'', ''y'' - new coordinates, coordinates of the item..<br>
 
+
'''Example''':<br>
        Parameters:<br>
+
Player.GetSkinItem(0, "HidePlaylist").SetPosition(10, 100);
        x, y - new coordinates, coordinates of the item..<br>
+
'''void SetBitmap(string Bitmap, string TransparentColor)'''<br>
 
+
'''Description''': Sets image for the item. That property can be used with Buttons and Placeholders. Relative paths can be used. If used with Placeholder, this function will change painting region of the item.<br>
        Example:<br>
+
'''Parameters''':<br>
 
+
:''Bitmap'' - new bitmap file for the item.<br>
            Player.GetSkinItem(0, "HidePlaylist").SetPosition(10, 100);
+
:''TransparentColor''- transparent color of new image.<br>
 
+
'''Example''':<br>
    void SetBitmap(string Bitmap, string TransparentColor)<br>
+
Player.GetSkinItem(0, "Play").SetBitmap( "coolpic.gif", "ffffff");
 
+
'''void SetPicture(string Picture)'''<br>
        Description: Sets image for the item. That property can be used with Buttons and Placeholders. Relative paths can be used. If used with Placeholder, this function will change painting region of the item.<br>
+
'''Description''': Sets picture for the Pictureholder(Picture) item. Relative paths can be used.<br>
 
+
'''Parameters''':<br>
        Parameters:<br>
+
:''Picture''- new picture file for the item. Animated gif files can be used in this case.<br>
        Bitmap - new bitmap file for the item.<br>
+
'''Example''':<br>
        TransparentColor- transparent color of new image.<br>
+
Player.GetSkinItem(1, "Picture1").SetBitmap( "Animation.gif");
 
+
'''bool IsVisible()'''<br>
        Example:<br>
+
'''Description''': The function retrieves the visibility state of the specified skin item.<br>
 
+
'''bool IsDisabled()'''<br>
          Player.GetSkinItem(0, "Play").SetBitmap( "coolpic.gif", "ffffff");
+
'''Description''': The function determines whether the specified skin item is disabled for mouse and keyboard input.<br>
 
 
    void SetPicture(string Picture)<br>
 
 
 
        Description: Sets picture for the Pictureholder(Picture) item. Relative paths can be used.<br>
 
 
 
        Parameters:<br>
 
        Picture- new picture file for the item. Animated gif files can be used in this case.<br>
 
 
 
        Example:<br>
 
 
 
          Player.GetSkinItem(1, "Picture1").SetBitmap( "Animation.gif");
 
 
 
    bool IsVisible()<br>
 
 
 
        Description: The function retrieves the visibility state of the specified skin item.<br>
 
 
 
        Example:
 
 
 
    bool IsDisabled()<br>
 
 
 
        Description: The function determines whether the specified skin item is disabled for mouse and keyboard input.<br>
 
 
 
        Example:
 
 
 
 
===Properties===
 
===Properties===
 
+
'''long State'''<br>
    long State<br>
+
'''Description''': Changes state of skin item.<br>
 
+
'''Parameters''':  1 - Normal, 2 - Pressed, 3 - Disabled, 4 - Hidden. NOTE: Pressed state can only be set for button items.<br>
        Description: Changes state of skin item.<br>
+
'''Example''':<br>
 
+
Player.GetSkinItem(0, "ShowEqualizer").State = 2;
        Parameters:  1 - Normal, 2 - Pressed, 3 - Disabled, 4 - Hidden. NOTE: Pressed state can only be set for button items.<br>
+
'''long Left'''<br>
 
+
'''Description''': Gets and sets left position of item<br>
        Example:<br>
+
'''Example''':<br>
 
+
Player.GetSkinItem(0, "ShowEqualizer").Left = 10;
          Player.GetSkinItem(0, "ShowEqualizer").State = 2;
+
'''long Top'''<br>
 
+
'''Description''': Gets and sets top position of item<br>
    long Left<br>
+
'''Example''':<br>
 
+
Player.GetSkinItem(0, "ShowEqualizer").Top = 10;
        Description: Gets and sets left position of item<br>
+
'''long Width'''<br>
 
+
'''Description''': Gets and sets width of item<br>
        Example:<br>
+
'''Example''':<br>
 
+
Player.GetSkinItem(0, "ShowEqualizer").Width = 100;
          Player.GetSkinItem(0, "ShowEqualizer").Left = 10;
+
'''long Height'''<br>
 
+
'''Description''': Gets and sets Height of item<br>
    long Top<br>
+
'''Example''':<br>
 
+
Player.GetSkinItem(0, "ShowEqualizer").Height = 100;
        Description: Gets and sets top position of item<br>
+
'''string Tooltip'''<br>
 
+
'''Description''': Gets and sets tooltip of item<br>
        Example:<br>
+
'''Example''':<br>
 
+
Player.GetSkinItem(0, "ShowEqualizer").Tooltip = "Cool";
          Player.GetSkinItem(0, "ShowEqualizer").Top = 10;
+
'''string Text'''<br>
 
+
'''Description''': Gets and sets text of an item. NOTE: This property can be used only with InfoDisplay items. Also, trackinfo keywords can be passed to this property.<br>
    long Width<br>
+
'''Example''':<br>
 
+
Player.GetSkinItem(3, "ShowEqualizer").Tooltip = "Cool";
        Description: Gets and sets width of item<br>
+
'''long SliderPosition'''<br>
 
+
'''Description''': Gets and sets slider position. Range for the property is 0 to 100. NOTE: This property can be used only with Slider items<br>
        Example:<br>
+
'''Example''':<br>
 
+
Player.GetSkinItem(3, "Volume").SliderPosition = 10;
          Player.GetSkinItem(0, "ShowEqualizer").Width = 100;
 
 
 
    long Height<br>
 
 
 
        Description: Gets and sets Height of item<br>
 
 
 
        Example:<br>
 
 
 
          Player.GetSkinItem(0, "ShowEqualizer").Height = 100;
 
 
 
    string Tooltip<br>
 
 
 
        Description: Gets and sets tooltip of item<br>
 
 
 
        Example:<br>
 
 
 
          Player.GetSkinItem(0, "ShowEqualizer").Tooltip = "Cool";
 
 
 
    string Text<br>
 
 
 
        Description: Gets and sets text of an item. NOTE: This property can be used only with InfoDisplay items. Also, trackinfo keywords can be passed to this property.<br>
 
 
 
        Example:<br>
 
 
 
          Player.GetSkinItem(3, "ShowEqualizer").Tooltip = "Cool";
 
 
 
    long SliderPosition<br>
 
 
 
        Description: Gets and sets slider position. Range for the property is 0 to 100. NOTE: This property can be used only with Slider items<br>
 
 
 
        Example:<br>
 
 
 
          Player.GetSkinItem(3, "Volume").SliderPosition = 10;
 

Latest revision as of 11:06, 14 January 2008

Metamorphis Scripts requires MJ 8.0.253 and above, or any version of Media Center.

Metamorphis uses JScript to do scripting. There are multiple objects which JScript can access: Metamorphis, Window ( exact name depends on window name, for example if you have window called Player in you Main.xml file that name of the object will be Player), MJAutomation (you can access many object through MJAutomation object see Interface Plug-ins SDK)

Metamorphis Object Commands

Functions

void SetBitmap(string Bitmap, string TransparentColor)
Description: Sets image for the window. Relative paths can be used. SetBitmap function can be used to change image and region for a window.
Parameters:

Bitmap - new bitmap file for the window.
TransparentColor- transparent color of new image.

Example:

Player.SetBitmap( "coolpic.gif", "ff00ff");

bool LoadSkinState()
Description: Loads previously saved state of the skin, usually called in handler for OnInitialize event.
Return Values: true if skin state was previously saved using SaveSkinState function, otherwise false.
Example:

if(Metamorphis.LoadSkinState() == false)
{
  EQ.ShowWindow(true);
}

void SaveSkinState()
Description: Saves skin state, usually called in handler for OnExit event.
Example:

Metamorphis.SaveSkinState();

void SetStateValue(string Name, variant Value)
Description: Sets state variable. This variable will be saved in state.xml and can be retrieved when skin is loaded or at any other time. Supported types: number, string, boolean, double
Parameters:

Name - Name of the value to be set.
Value - Specifies the data to be stored.

Example:

Metamorphis.SetStateValue("SomeName", "SomeValue");
Metamorphis.SetStateValue("SomeName2", 1);

variant GetStateValue(string Name)
Description: Retrieves previously set state value. Supported types: number, string, boolean, double
Parameters:

Name - Name of the value to be retrieved.

Return Values: the value's data
Example:

var SoveValue = Metamorphis.GetStateValue("SomeName");
// check if value was previously set
if( SomeValue == null) // value was not set
{
    ... do something
}

long StartTimer(long Timeout, string FunctionName)
Description: This function creates a timer with the specified time-out value.
Parameters:

Timeout - specifies the time-out value, in milliseconds
FunctionName - name the function to be notified when the time-out value elapses.

Return Values: Identifier of the new timer.
Example:

var TimerID = Metamorphis.StartTimer(1000, DoExtraCoolStuff );

void StopTimer(long TimerID)
Description: The function destroys the specified timer.
Parameters:

TimerID- Identifier of the timer.

Example:

Metamorphis.StopTimer(TimerID );

bool IsAlwaysOnTop ()
Description: Retrieves Always on State state
Return Values: 0 - off, 1- on
Example:

var State = Metamorphis.IsAlwaysOnTop();

void Minimize()
Description: Minimizes the skin.
void Maximize()
Description: Returns Media Jukebox to MEGA-ME state.
void Close()
Description: Closes Media Jukebox.
void Restore()
Description: If a skin was minimized it will be restored.
bool IsMinimized()
Description: Returns true if a skin is minimized.
void EnableTooltips(bool bEnable)
Description: Turns tooltips on and off.
Parameters:

bEnable - true(default) - to turn tooltips on, false - to turn tooltips off

long GetScreenWidth()
Description: retrieves screen width.
long GetScreenHeight()
Description: retrieves screen height.
long GetScreenLeft()
Description: retrieves screen left.
long GetScreenTop()
Description: retrieves screen top.

Window Commands

Functions

void SetWindowPos( long x, long y)
Description: Sets position of the window to x, y point.
Parameters:

x , y - coordinates are Desktop coordinates.

Example:

Playlist.SetWindowPos(101, 107);

void ShowWindow(bool ShowCommand)
Description: Changes visual state of the window.
Parameters:

ShowCommand - true - Show, false - Hide

Example:

 Playlist.ShowWindow(true);

void MoveWindowAnimated(long OffsetX, long OffsetY, long Speed)
Description: Moves the window from current point to x+OffsetX and y+OffsetY
Parameters:

Speed - value from 1 to 100, determines how fast the movement will be performed.

Example:

Equalizer.ShowWindowAnimated(101, 0, -100, 107, 4);

void SetWindowBehind(Object Window)
Description: Changes ZOrder of the window, by inserting the window behind specified window.
Parameters:

Window - one of Window objects of the skin, for example 'Player'

Example:

Equalizer.SetWindowBehind(Player);

void GetSkinItem(long MainType, string Name)
Description:
Parameters:

MainType - 0 - Button, 1 - Placeholder, 2 - Slider, 3 - InfoDisplay

Example:

Player.GetSkinItem(0, "ShowEqualizer").SetItemState("Show");

bool IsWindowVisible()
Description: The function retrieves the visibility state of the specified window.

Properties

long Left
Description:
Example:

var x = Player.PositionX;

long Top
Description:
Example:

var y = Player.PositionY;

long Width Example:

var Width = Player.Width;

long Height
Example:

var Height = Player.Height;

SkinItem Commands

To get skin item use GetSkinItem function

Functions

void SetPosition(long x, long y)
Description: Sets new position of the skin item.
Parameters:

x, y - new coordinates, coordinates of the item..

Example:

Player.GetSkinItem(0, "HidePlaylist").SetPosition(10, 100);

void SetBitmap(string Bitmap, string TransparentColor)
Description: Sets image for the item. That property can be used with Buttons and Placeholders. Relative paths can be used. If used with Placeholder, this function will change painting region of the item.
Parameters:

Bitmap - new bitmap file for the item.
TransparentColor- transparent color of new image.

Example:

Player.GetSkinItem(0, "Play").SetBitmap( "coolpic.gif", "ffffff");

void SetPicture(string Picture)
Description: Sets picture for the Pictureholder(Picture) item. Relative paths can be used.
Parameters:

Picture- new picture file for the item. Animated gif files can be used in this case.

Example:

Player.GetSkinItem(1, "Picture1").SetBitmap( "Animation.gif");

bool IsVisible()
Description: The function retrieves the visibility state of the specified skin item.
bool IsDisabled()
Description: The function determines whether the specified skin item is disabled for mouse and keyboard input.

Properties

long State
Description: Changes state of skin item.
Parameters: 1 - Normal, 2 - Pressed, 3 - Disabled, 4 - Hidden. NOTE: Pressed state can only be set for button items.
Example:

Player.GetSkinItem(0, "ShowEqualizer").State = 2;

long Left
Description: Gets and sets left position of item
Example:

Player.GetSkinItem(0, "ShowEqualizer").Left = 10;

long Top
Description: Gets and sets top position of item
Example:

Player.GetSkinItem(0, "ShowEqualizer").Top = 10;

long Width
Description: Gets and sets width of item
Example:

Player.GetSkinItem(0, "ShowEqualizer").Width = 100;

long Height
Description: Gets and sets Height of item
Example:

Player.GetSkinItem(0, "ShowEqualizer").Height = 100;

string Tooltip
Description: Gets and sets tooltip of item
Example:

Player.GetSkinItem(0, "ShowEqualizer").Tooltip = "Cool";

string Text
Description: Gets and sets text of an item. NOTE: This property can be used only with InfoDisplay items. Also, trackinfo keywords can be passed to this property.
Example:

Player.GetSkinItem(3, "ShowEqualizer").Tooltip = "Cool";

long SliderPosition
Description: Gets and sets slider position. Range for the property is 0 to 100. NOTE: This property can be used only with Slider items
Example:

Player.GetSkinItem(3, "Volume").SliderPosition = 10;