VDJPedia



 Skin menu

Back to Skin SDK

Skin SDK: The <menu> element



Defines an area on your screen, where a menu will be offered when clicked and also defines the content of this menu.


The syntax of the menu element is <menu> and has no parameters.

The menu element can have the following children :
  • <size width="" height="" /> : Give the width and height of the area on the screen where the menu will be offered when clicked.
  • <pos x="" y="" /> : Give the position top-left X,Y pos of the area on the screen where the menu will be offered when clicked.
  • <up x="" y="" /> : Give the coordinate of the graphic to use while the menu is not displayed
  • <over x="" y="" /> : Give the coordinate of the graphic to use when mouse is over the menu area
  • <down x="" y="" /> : Give the coordinate of the graphics to use while the menu is displayed
  • <item text="" action="" check="" hascheck="" /> : Use an item child for each item offered from the menu. The item child has the following parameters.
    • text="" : Provide the displayed text of the menu item. Have text="-" to display a separator line in your menu, instead of an item
    • action="" : Provide the action that will be executed when the menu item is clicked.
    • hascheck="" : If set to true (default value) , the menu item will offer a check-mark depending of the true/false status of the action or the check parameters. If hascheck is set to false, then no check-mark will be offered for the menu item, regardless the status of the action and check parameters..
    • check="" : A check-mark will be displayed at the left side of the menu item, if the action of the check parameter returns true. If no check parameter is provided, the check-mark will be displayed if the action parameter returns true.

  • <submenu text="" > : A menu can have nested menus. Use the submenu child to nest other items



Example
The following code ...

<menu>
<pos y="315" x="324"/>
<size width="14" height="14"/>
<off y="1683" x="757"/>
<over y="1683" x="777"/>
<down y="1683" x="777"/>
<item text="Edit CUEs and POIs..." action="edit_poi" hascheck="false"/>
<item text="Read-only (Lock)" action="lock_cues" hascheck="true"/>
<item text="Smart Cue" action="smart_cue" hascheck="true"/>
<item text="Quantize on Set" action="quantize_setcue" hascheck="true"/>
<item text="-"/>
<submenu text="Display mode">
<item text="Cue number" action="cue_display 'number'" hascheck="true"/>
<item text="Name" action="cue_display 'name'" hascheck="true"/>
<item text="Time Pos" action="cue_display 'position'" hascheck="true"/>
<item text="Time left" action="cue_display 'distance'" hascheck="true"/>
<item text="Beats left" action="cue_display 'beat'" hascheck="true"/>
</submenu>
</menu>

... provides this menu...






Back to Skin SDK