********************************************************************************
* MusicPlayerDaemon - theme_display.xml                                        *
********************************************************************************

Node: display
 The display form
 Root-node: this node can only be used as a root node (it cannot be a sub-node)
 Properties: width* height* theme
 Sub-nodes:
   [node]

Node: group
 A group of object in a display
 Properties: background x y id width height
 Sub-nodes:
   [node]
 Notes: usually width and height have no conequences

Node: text
 A text label
 Properties: background x y width id color size align singleline
 Sub-nodes:
   [text]: This is a template. Values are set using ${val_name}, where val_name
   is one of the following:
     - server: server address
	 - server_port: server port
     - version: MPD server version
     - song: current song
	 - song_{info}: current song {info}; where info is: artist, album, title,
	 	date, genre, track
	 - status: the MPD status
	 - bitrate: bitrate of the current song (in kbps)
	 - position: position of the current song in the playlist
	 - timer: timer_cur or timer_remain (depends on the options)
	 - timer_cur: the current timer
	 - timer_remain: the remaining time
	 - timer_percent: the percent of the passed song
	 - timer_all: the length of the song
	 - timer_full: a string like '${timer}/${timer_all}' or '' if none song is
	 	being played
	 - volume: the volume percent
	 - repeat: 'on' or 'off' text
	 - random: 'on' or 'off' text
	 - single: 'on' or 'off' text
	 - consume: 'on' or 'off' text
	 - xfade: fade time between the songs (in seconds)
	 - stats_artists
	 - stats_albums
	 - stats_songs
	 - stats_uptime
	 - stats_playtime
	 - pl_filter_text: currently used filter
	 NB: All the values are given without their units

Node: image | button
 An image
 Properties: (src | on_paint)* src_over background x y id height width
	preserve_aspect_ratio action on_click

Node: execute
 A line of code to execute
 Sub-nodes:
   [text]: should be one of the following
     dc_vol['bg'] = [color]
     dc_vol['used'] = [color]
     dc_playlist['cur'] = [color]
     dc_playlist['sel'] = [color]
     dc_playlist['sel_bg'] = [color]
	 dc_playlist['text'] = [color]
	 dc_playlist['scroll']['color'] = [color]
	 dc_playlist['scroll']['rounded'] = int
	 dc_playlist['scroll']['border']['width'] = int
	 dc_playlist['scroll']['border']['color'] = [color]

* required property

Properties:
-----------
theme="name"
	The name of the theme (this option is only informative).
background="background"
	The object will not be repainted.
color="[r, g, b, a]"
	RGBA color (values between 0 and 1).
size="8"
	The font will be 8pt high.
align="a"
	Where a is (left | right | center).
src="img_name" | on_paint="function_name"
	What should be painted.
src_over="img_name"
	The mouse over image (background property must not be set)
singleline="1"
	Renders the text on a singe line. If the text is too long it will be stipped.
	By default this option is on.
preserve_aspect_ratio="1"
	When set, the image apect ratio will be preserved.
	In other words: scale_x = scale_y
action="action_string" & on_click="function_name"
	Action send when clicked. The possible functions are:
	 - self.event_button_click:
		toggle_remaining_timer, random, repeat, set_theme {theme_name} (where
		theme_name is the name of a theme), updatedb, reconnect
	 - self.event_player_click:
		play, pause, toggle, stop, prev, next
	 - self.event_playlist_click:
	 	add, playall, del, clear, sort, shuffle, selectcur, move {num} (where
		num is how far the selected object should be moved)
id="obj_id"
	Known obj_id are:
	 - progress_*: the song progress bar
	 	<group id="progress" width="xxx" height="xxx">
			<button id="progress_done" src="pbr_done" on_click="self.event_pbr_click" />
			<button id="progress_bg" src="pbr_bg" on_click="self.event_pbr_click" />
			<image id="progress_left" background="background" src="pbr_left" width="5" x="-5" />
			<image id="progress_right" background="background" src="pbr_right" width="5" />
		</group>
	 - volume:
	 	<button id="volume" width="xxx" height="xxx" action="volume" on_click="self.event_volume_click" on_paint="self.draw_volume" />
	 - repeat & random & single & consume:
	 	<button id="repeat|..." width="xxx" height="xxx" action="repeat|..." src="check_off" on_click="self.event_button_click" />
	 - playlist:
	 	<button id="playlist" width="xxx" height="xxx" action="playlist" on_click="self.event_playlist_click" on_paint="self.draw_playlist" />
	 - playlist_scroll:
	 	<button id="playlist_scroll" width="xxx" height="xxx" action="scroller" on_click="self.event_playlist_click" on_paint="self.draw_playlist_scrollbar" />
	 - coverart:
	 	<image id="coverart" width="xxx" height="xxx" preserve_aspect_ratio="1" />
	 - pl_filter_text:
	 	<text id="pl_filter_text" width="xxx">${pl_filter_text}</text>

********************************************************************************
* MusicPlayerDaemon - menu.xml                                                 *
********************************************************************************

The following command may be used as menu ids:
	- player_{cmd}: where {cmd} is one of the following MPD commands (play,
		pause, toggle, stop, prev, next)
	- playlist_{cmd}: where {cmd} is one of the following (add, playall, del,
		clear, sort, shuffle, selectcur)
	- updatedb: updates the MPD library
	- reconnect: forces the player to reconnect to the MPD server
