New Touchscreen region type... 'mute' which un/mutes volume without pausing playback
[maemo-rb.git] / manual / appendix / wps_tags.tex
blob92bc2097284c2d683fbdc9092f872e7df17a6bda
1 % $Id$ %
2 \chapter{\label{ref:wps_tags}Theme Tags}
3 Themeing is discussed in detail in section \reference{ref:ConfiguringtheWPS},
4 what follows is a list of the available tags.
6 \note{The ``bar-type tags'' (such as \%pb, \%pv, \%bl etc.) can be further
7 themed -- see \reference{ref:bar_tags}.}
9 \section{Status Bar}
10 \begin{tagmap}
11 \config{\%we} & Display Status Bar\\
12 \config{\%wd} & Hide Status Bar\\
13 \config{\%wi} & Display the inbuilt Status Bar in the current viewport\\
14 \end{tagmap}
15 These tags override the player setting for the display of the status bar.
16 They must be noted on their own line (which will not be shown in the WPS).
18 \section{Hardware Capabilities}
19 \begin{tagmap}
20 \config{\%cc} & Check for presence of a real time clock, returns ``c''
21 when used unconditionally\\
22 \config{\%tp} & Does this target have a radio?\\
23 \config{\%Tp} & Indicates that the target has a touchscreen\\
24 \end{tagmap}
25 With the above tags it is possible to find out about the presence of certain
26 hardware and make the theme adapt to it. This can be very useful for designing
27 a theme that works on multiple targets with differing hardware capabilities, e.g.
28 targets that do and do not have a clock. When used conditionally, the ``true''
29 branch is completely ignored if it does not apply.
31 Example:
32 \config{\%?cc<\%cH:\%cM|No clock detected>}
35 \section{Information from the track tags}
36 \begin{tagmap}
37 \config{\%ia} & Artist\\
38 \config{\%ic} & Composer\\
39 \config{\%iA} & Album Artist\\
40 \config{\%id} & Album Name\\
41 \config{\%iG} & Grouping\\
42 \config{\%ig} & Genre Name\\
43 \config{\%in} & Track Number\\
44 \config{\%it} & Track Title\\
45 \config{\%iC} & Comment\\
46 \config{\%iv} & ID3 version (1.0, 1.1, 2.2, 2.3, 2.4, or empty if not an ID3 tag)\\
47 \config{\%iy} & Year\\
48 \config{\%ik} & Disc Number\\
49 \end{tagmap}
50 Remember that this information is not always available, so use the
51 conditionals to show alternate information in preference to assuming.
53 These tags, when written with a capital ``I'' (e.g. \config{\%Ia} or \config{\%Ic}),
54 show the information for the next song to be played.
56 \nopt{lcd_charcell}{
57 \section{Viewports}
58 \begin{tagmap}
59 \nopt{lcd_non-mono}{%
60 \config{\%V(x,y,[width],\tabnlindent[height],[font])}
61 & See section \ref{ref:Viewports}\\}
63 \nopt{lcd_color}{\opt{lcd_non-mono}{%
64 \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline
65 \config{\%Vf([fgshade])}\newline
66 \config{\%Vb([bgshade])}
67 & See section \ref{ref:Viewports}\\}}
69 \opt{lcd_color}{%
70 \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline
71 \config{\%Vf([fgcolour])}\newline
72 \config{\%Vb([bgcolour])}
73 & See section \ref{ref:Viewports}\\}
75 \config{\%Vl('identifier',\newline\dots)} & Preloads a viewport for later
76 display. `identifier' is a single lowercase letter (a-z) and the `\dots'
77 parameters use the same logic as the \%V tag explained above.\\
79 \config{\%Vd('identifier')} & Display the `identifier' viewport. E.g.
80 \config{\%?C<\%Vd(a)|\%Vd(b)>}
81 will show viewport `a' if album art is found, and `b' if it isn't.\\
83 \config{\%Vi('label',\dots)} &
84 Declare a Custom UI Viewport. The `\dots' parameters use the same logic as
85 the \config{\%V} tag explained above. See section \ref{ref:Viewports}.\\
87 \config{\%VI('label')} & Set the Info Viewport to use the viewport called
88 label, as declared with the previous tag.\\
89 \end{tagmap}
91 \section{Additional Fonts}
92 \begin{tagmap}
93 \config{\%Fl('id',filename)} & See section \ref{ref:multifont}.\\
94 \end{tagmap}
98 \section{Power Related Information}
99 \begin{tagmap}
100 \config{\%bl} & Numeric battery level in percents.
101 Can also be used in a conditional:
102 \config{\%?bl<-1|0|1|2|\ldots|N>},
103 where the value $-1$ is used when the battery level isn't
104 known (it usually is). The value $N$ is only used when the
105 battery level is exactly 100 percent.
106 An image can also be used, the proportion of the image
107 shown corresponds to the battery level:
108 \config{\%bl(x,y,[width],[height],image.bmp)}\\
109 \config{\%bv} & The battery level in volts\\
110 \config{\%bt} & Estimated battery time left\\
111 \config{\%bp} & ``p'' if the charger is connected (only on targets
112 that can charge batteries)\\
113 \config{\%bc} & ``c'' if the unit is currently charging the battery (only on
114 targets that have software charge control or monitoring)\\
115 \config{\%bs} & Remaining time of the sleep timer (if it is set)\\
116 \end{tagmap}
118 \section{Information about the file}
119 \begin{tagmap}
120 \config{\%fb} & File Bitrate (in kbps)\\
121 \config{\%fc} & File Codec (e.g. ``MP3'' or ``FLAC'').
122 This tag can also be used in a conditional tag:
123 \config{\%?fc<mp1|mp2|mp3|aiff|wav|ogg|\newline
124 flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|\newline
125 speex|spc|ape|wma|mod|sap|unknown>}.
126 The codec order is as follows: MP1, MP2, MP3, AIFF, WAV,
127 Ogg Vorbis (OGG), FLAC, MPC, AC3, WavPack (WV), ALAC, AAC,
128 Shorten (SHN), SID, ADX, NSF, Speex, SPC, APE, WMA, MOD, SAP.\\
129 \config{\%ff} & File Frequency (in Hz)\\
130 \config{\%fk} & File Frequency (in kHz)\\
131 \config{\%fm} & File Name\\
132 \config{\%fn} & File Name (without extension)\\
133 \config{\%fp} & File Path\\
134 \config{\%fs} & File Size (in Kilobytes)\\
135 \config{\%fv} & ``(avg)'' if variable bit rate or empty string if constant bit rate\\
136 \config{\%d(N)} & N-th segment from the end of the file's directory
137 (N can be 1, 2, 3, \dots)\\
138 \end{tagmap}
139 Example for the \config{\%d(N)} commands: If the file is
140 ``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d(1)} is ``Isola'',
141 \config{\%d(2)} is ``Kent'' and \config{\%d(3)} is ``Rock''.
143 These tags, when written with the first letter capitalized (e.g. \config{\%Fn}
144 or \config{\%D(2)}), produce the information for the next file to be played.
146 \section{Playlist/Song Info}
147 \begin{tagmap}
148 \config{\%pb} & Progress Bar.
149 \opt{player}{
150 This will display a one character ``cup''
151 that empties as the time progresses.}
152 \opt{lcd_bitmap}{
153 This will replace the entire line with a progress bar.
154 You can set the position, width and height of the progressbar
155 (in pixels) and load a custom image for it:
156 \config{\%pb(x,y,[width],[height],image.bmp)}} \\
157 \opt{player}{%
158 \config{\%pf} & Full-line progress bar \& time display\\
160 \config{\%px} & Percentage played in song\\
161 \config{\%pc} & Current time in song\\
162 \config{\%pe} & Total number of playlist entries\\
163 \nopt{player}{%
164 \config{\%pm} & Peak Meter. The entire line is used as %
165 volume peak meter.\\%
167 \config{\%pn} & Playlist name (without path or extension)\\
168 \config{\%pp} & Playlist position\\
169 \config{\%pr} & Remaining time in song\\
170 \config{\%ps} & ``s'' if shuffle mode is enabled\\
171 \config{\%pt} & Total track time\\
172 \config{\%pv} & Current volume (in dB). Can also be used in a conditional:
173 \config{\%?pv<0|1|2|\ldots|N>}\newline
174 0 is used for mute, the last option is used for values greater than zero.
175 \opt{lcd_bitmap}{This can also be used like \%pb to provide a continuous scale:
176 \config{\%pv(x,y,[width],[height],image.bmp)}} \\
177 \config{\%pS} & Track is starting. An optional number gives how many seconds
178 the tag remains true for after the start of the track. The default is
179 10 seconds if no number is specified.
180 \config{\%?pS(7)<in the first 7 seconds of track|in
181 the rest of the track>}\\
182 \config{\%pE} & Track is ending. An optional number gives how many seconds
183 before the end of the track the tag becomes true. The default is
184 10 seconds if no number is specified.
185 \config{\%?pE(7)<in the last 7 seconds of track|in
186 the rest of the track>}\\
187 \config{\%Sp} & Current playback pitch\\
188 \end{tagmap}
190 \section{Playlist Viewer}
191 \begin{tagmap}
192 \config{\%Vp(start,code to render)} & Display the playlist viewer in
193 the current viewport.\\
194 \end{tagmap}
196 \begin{itemize}
197 \item `start' is the offset relative to the currently playing track for the
198 playlist to display from (0 the current track, 1 is the next track, etc.).
199 \item `code to render' is a line of skin code which will be displayed for
200 each line in the viewer. All text tags are supporte (including conditionals
201 and sublines)
202 \end{itemize}
204 The entire viewport will be used, so don't expect other tags in the same
205 viewport to work well. Supported tags are \%pp, all tags starting with \%i,
206 most tags starting with \%f, \%pt and \%s.\\
208 Example: \config{\%Vp(1,\%pp - \%it,\%pp - \%fn)} -- Display the playlist
209 position, then either the track title (from the tags) or
210 the filename. The viewer will display as many tracks as will fit in the
211 viewport.
213 \section{Runtime Database}
214 \begin{tagmap}
215 \config{\%rp} & Song playcount\\
216 \config{\%rr} & Song rating (0-10). This tag can also be used in a conditional tag: %
217 \config{\%?rr<0|1|2|3|4|5|6|7|8|9|10>}\\
218 \config{\%ra} & Autoscore for the song\\
219 \end{tagmap}
221 \opt{swcodec}{
222 \section{Sound (DSP) settings}
223 \begin{tagmap}
224 \config{\%Sp} & Current playback pitch \\
225 \opt{swcodec}{
226 \config{\%xf} & Crossfade setting, in the order: Off, Auto Skip, Man Skip,
227 Shuffle, Shuffle and Man Skip, Always\\
228 \config{\%rg} & ReplayGain value in use (x.y~dB). If used as a conditional,
229 Replaygain type in use: \config{\%?rg<Off|Track%
230 |Album|TrackShuffle|AlbumShuffle%
231 |No tag>}\\
233 \end{tagmap}
236 \section{Hold}
237 \begin{tagmap}
238 \config{\%mh} & ``h'' if the main unit keys are locked\\
239 \opt{remote_button_hold}{%
240 \config{\%mr} & ``r'' if the remote keys are locked\\
242 \end{tagmap}
244 \section{Virtual LED}
245 \begin{tagmap}
246 \config{\%lh} & ``h'' if the \disk\ is accessed\\
247 \end{tagmap}
249 \section{Repeat Mode}
250 \begin{tagmap}
251 \config{\%mm} & Repeat mode, 0-4, in the order: Off, All, One, Shuffle, A-B\\
252 \end{tagmap}
253 Example: \config{\%?mm<Off|All|One|Shuffle|A-B>}
255 \section{Playback Mode}
256 \begin{tagmap}
257 \config{\%mp} & Play status, 0-4, in the order: Stop, Play, Pause,
258 Fast Forward, Rewind, Recording, Recording paused, FM Radio playing,
259 FM Radio muted\\
260 \end{tagmap}
261 Example: \config{\%?mp<Stop|Play|Pause|Ffwd|Rew|Rec|Rec pause|FM|FM pause>}
263 \section{Current Screen}
264 \begin{tagmap}
265 \config{\%cs} & The current screen, 1-5, in the order:
266 Menus, WPS, Recording screen, FM Radio screen, Current Playlist screen\\
267 \end{tagmap}
268 The tag can also be used as the switch in a conditional tag. For players without
269 some capabilities (e.g. having no FM radio) some values will be never yielded.
271 Example: \config{You are in the \%?cs<Main menu|WPS|Recording screen|FM Radio screen>}
273 \section{List Title (\fname{.sbs} only)}
274 \begin{tagmap}
275 \config{\%Lt} & Title text. Should be used in a conditional so that non-list
276 screens don't show a title when they shouldn't\\
277 \config{\%Li} & Title icon. This uses the same order as custom icons (see
278 \wikilink{CustomIcons} in the wiki) except that here \config{0} is ``no
279 icon''\\
280 \end{tagmap}
282 This tag can be used to give custom formatting to list titles.
283 Define a viewport with the font and formatting desired, and then use
284 \config{\%?Lt<\%Lt>} to display the title within the
285 viewport. If \config{\%Lt} is present anywhere in the \fname{.sbs}, then the
286 \config{\%Vi} viewport will not show the title.
288 \section{Changing Volume}
289 \begin{tagmap}
290 \config{\%mv(t)} & ``v'' if the volume is being changed\\
291 \end{tagmap}
293 The tag produces the letter ``v'' while the volume is being changed and some
294 amount of time after that, i.e. after the volume button has been released. The
295 optional parameter \config{t} specifies that amount of time, in seconds. If it
296 is not specified, 1 second is assumed.
298 The tag can be used as the switch in a conditional tag to display different things
299 depending on whether the volume is being changed. It can produce neat effects
300 when used with conditional viewports.
302 Example: \config{\%?mv(2.5)<Volume changing|\%pv>}
304 The example above will display the text ``Volume changing'' if the volume is
305 being changed and 2.5 seconds after the volume button has been released. After
306 that, it will display the volume value.
308 \section{Settings}
309 \begin{tagmap}
310 \config{\%St(<setting\tabnlindent{}name>)} & The value of the Rockbox
311 setting with the specified name. See \reference{ref:config_file_options}
312 for the list of the available settings.\\
313 \end{tagmap}
315 Examples:
316 \begin{enumerate}
317 \item As a simple tag: \config{\%St(skip length)}
318 \item As a conditional: \config{\%?St(eq enabled)<Eq is enabled|Eq is disabled>}
319 \end{enumerate}
322 \opt{lcd_bitmap}{
323 \section{\label{ref:wps_images}Images}
324 \begin{tagmap}
325 \nopt{archos}{%
326 \config{\%X(filename.bmp)}
327 & Load and set a backdrop image for the WPS.
328 This image must be exactly the same size as your LCD.\\
330 \config{\%x(n,filename,x,y)}
331 & Load and display an image\newline
332 \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\newline
333 \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\newline
334 \config{x}: x coordinate\newline
335 \config{y}: y coordinate.\\
336 \config{\%xl(n,filename,x,y,\tabnlindent[nimages])}
337 & Preload an image for later display (useful for when your images are displayed conditionally).\newline
338 \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\newline
339 \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\newline
340 If the filename is ``\_\_list\_icons\_\_'' the list icon bitmap will be used instead\newline
341 \config{x}: x coordinate\newline
342 \config{y}: y coordinate\newline
343 \config{nimages}: (optional) number of sub-images (tiled vertically, of the same height)
344 contained in the bitmap. Default is 1.\\
345 \config{\%xd(n[i] [,tag] [,offset])} & Display a preloaded image.
346 \config{n}: image ID (a-z and A-Z) as it was specified in \config{\%x} or \config{\%xl}\newline
347 \config{i}: (optional) number of the sub-image to display (a-z for 1-26 and A-Z for 27-52).
348 (ignored when \config{tag} is used)
349 By default the first (i.e. top most) sub-image will be used.\newline
350 \config{tag}: (optional) Another tag to calculate the subimage from e.g \config{\%xd(A, \%mh)} would
351 use the first subimage when \config{\%mh} is on and the second when it is off\newline
352 \config{offset}: (optional) Add this number to the value from the \config{tag} when
353 chosing the subimage (may be negative)\\
354 \end{tagmap}
356 Examples:
357 \begin{enumerate}
358 \item Load and display the image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109:\\
359 \config{\%x(a,bg.bmp,37,109)}
360 \item Load a bitmap strip containing 5 volume icon images (all the same size)
361 with image ID ``M'', and then reference the individual sub-images in a conditional:\\
362 \config{\%xl(M,volume.bmp,134,153,5)}\\
363 \config{\%?pv<\%xd(Ma)|\%xd(Mb)|\%xd(Mc)|%
364 \%xd(Md)|\%xd(Me)>}
365 \end{enumerate}
368 \note{
369 \begin{itemize}
370 \item The images must be in BMP format
371 \item The image tag must be on its own line
372 \item The ID is case sensitive, giving 52 different ID's
373 \item The size of the LCD screen for each \dap{} varies. See table below
374 for appropriate sizes of each device. The x and y coordinates must
375 respect each of the \daps{} limits.
376 \end{itemize}
380 \opt{albumart}{
381 \section{\label{ref:album_art}Album Art}
382 Rockbox allows you to put the album art, or another image related to the music
383 on your \dap{} to display it in the PictureFlow plugin\opt{albumart}{ or in the
384 theme}. For this feature to work, there are a few requirements.
386 \subsection{Limitations}
388 Rockbox does not support album art embedded in your files' tags, and will
389 instead look for a picture located on disk. In addition to this, the
390 pictures must be in either BMP or JPEG format. Rockbox does not support
391 RLE-compressed BMP files, nor does it support progressive and multi-scan
392 JPEG files. JPEG files must consist of a single scan with interleaved components,
393 as progessive and multi-scan images require much more memory to decode.
395 \subsection{Where to put album art}
397 The pictures can be named a number of different ways, and placed to a number of
398 different locations. You can have pictures specific to the file or the album
399 or use a generic picture. You can place the picture in the same directory
400 as the file, in the parent directory or in a fixed directory named
401 \fname{/.rockbox/albumart/}. The order Rockbox uses when looking for a picture
402 is as follows (a list in braces means that those file extensions are tried in
403 that order):
405 \begin{enumerate}
406 \item \fname{./filename.\{jpeg,jpg,bmp\}}
407 \item \fname{./albumtitle.\{jpeg,jpg,bmp\}}
408 \item \fname{./cover.\{jpeg,jpg,bmp\}}
409 \item \fname{./folder.jpg}
410 \item \fname{/.rockbox/albumart/albumartist-albumtitle.\{jpeg,jpg,bmp\}}
411 \item \fname{../albumtitle.\{jpeg,jpg,bmp\}}
412 \item \fname{../cover.\{jpeg,jpg,bmp\}}
413 \end{enumerate}
415 The following characters will be replaced with an underscore (\_) when looking
416 for albumtitle.bmp or albumartist-albumtitle.bmp: \textbackslash{} / : <
417 > ? * |. Doublequotes will be replaced by single quotes.
418 If no album artist is set, artist will be used instead. See \wikilink{AlbumArt}
419 in the wiki for programs that will help you automate the process of putting
420 album art on your \dap{}.
422 \subsection{How to display the album art}
424 Once the album art files are present on your \dap, they can be displayed as
425 follows.
427 \begin{tagmap}
428 \config{\%Cl(x,y,[maxwidth],\tabnlindent[maxheight],\tabnlindent{}hor\_align,\tabnlindent{}vert\_align)}
429 & Define the settings for album art\newline
430 \config{x}: x coordinate\newline
431 \config{y}: y coordinate\newline
432 \config{maxwidth}: Maximum height\newline
433 \config{maxheight}: Maximum width\newline
434 \config{hor\_align}: Horizontal alignment, enter as `l', `c' or `r' for
435 left, centre or right. Centre is default\newline
436 \config{vert\_align}: Vertical alignment, enter as `t', `c' or `b' for
437 top, centre or bottom. Centre is default\\
438 \config{\%Cd} & Display the album art as configured. \\
439 \config{\%C} & Use in a conditional to determine if an image is available. \\
440 \end{tagmap}
442 The picture will be rescaled, preserving aspect ratio to fit the given
443 \config{maxwidth} and \config{maxheight}. If the aspect ratio doesn't match the
444 configured values, the picture will be placed according to the alignment flags.
446 Examples:
447 \begin{enumerate}
448 \item Load albumart at position 20,40 and display it without resizing:\\
449 \config{\%Cl(20,40,,)}
450 \item Load albumart at position 0,20 and resize it to be at most 100$\times$100
451 pixels. If the image isn't square, align it to the bottom-right
452 corner:\\
453 \config{\%Cl(0,20,100,100,r,b)}
454 \end{enumerate}
457 \opt{radio}{
458 \section{FM Radio}
459 \begin{tagmap}
460 \config{\%tt} & Is the tuner tuned?\\
461 \config{\%tm} & Scan or preset mode? Scan is ``true'', preset is ``false''.\\
462 \config{\%ts} & Is the station in stereo?\\
463 \config{\%ta} & Minimum frequency (region specific) in MHz.\\
464 \config{\%tb} & Maximum frequency (region specific) in MHz.\\
465 \config{\%tf} & Current frequency in MHz.\\
466 \config{\%Ti} & Current preset id, i.e. 1-based number of the preset
467 within the presets list (usable in playlist viewer).\\
468 \config{\%Tn} & Current preset name (usable in playlist viewer).\\
469 \config{\%Tf} & Current preset frequency (usable in playlist viewer).\\
470 \config{\%Tc} & Preset count, i.e. the number of stations in the current
471 preset list.\\
472 \config{\%tx} & Is RDS available?\\
473 \config{\%ty} & RDS name.\\
474 \config{\%tz} & RDS text.\\
475 \config{\%tr} & Signal strength (RSSI). Can be used in a conditional or as
476 a bar.\\
477 \end{tagmap}
479 It is also possible to show ``Radio Art'' which can be used to display images
480 associated with presets. The tags are exactly the same as for album art,
481 described above. Images need to be placed in \fname{/.rockbox/fmpresets/},
482 and must have the same name as the preset. They need to be in either
483 \fname{.bmp} or \fname{.jpg} format, and the radio must be in preset mode
484 and tuned to a preset (and not recording) in order for them to be shown.
487 \section{Alignment and language direction}
488 \begin{tagmap}
489 \config{\%al} & Align the text left\\
490 \config{\%aL} & Align the text left, or to the right if RTL language is in use\\
491 \config{\%ac} & Centre the text\\
492 \config{\%ar} & Align the text right\\
493 \config{\%aR} & Align the text right, or to the left if RTL language is in use\\
494 \config{\%ax} & The next tag should follow the set language direction. When
495 prepended to a viewport declaration, the viewport will
496 be horizontally mirrored if the user language is set to
497 a RTL language. Currently the \%Cl, \%V and \%Vl tags
498 support this.\\
499 \config{\%Sr} & Use as a conditional to define options for left to right, or
500 right to left languages. \%?Sr<RTL|LTR>\\
501 \end{tagmap}
503 All alignment tags may be present in one line, but they need to be in the
504 order left -- centre -- right. If the aligned texts overlap, they are merged.
506 Example: \config{\%ax\%V(\dots)}
508 \section{Conditional Tags}
510 \begin{tagmap}
511 \config{\%?xx<true|false>}
512 & If / Else: Evaluate for true or false case \\
513 \config{\%?xx<alt1|alt2|\tabnlindent{}alt3|\dots|else>}
514 & Enumerations: Evaluate for first / second / third / \dots / last condition \\
515 \config{\%if(tag, operator, operand, [option count])}
516 & Allows very simple comparisons with other tags.\newline
517 \config{tag}: the tag to check against.\newline
518 \config{operator}: the comparison to perform - possible options are =, !=,
519 >, >=, <, <=\newline
520 \config{operand}: either a second tag, a number, or text.\newline
521 \config{[option count]}: optional parameter used to select which parameter
522 of a tag to use when the tag has multiple options, e.g. \%?pv<a|b|c|d>\\
523 \end{tagmap}
525 Examples of the \%if tag:\\
527 \config{\%?if(\%pv, >=, 0)<Clipping possible|Volume OK>} will display ``Clipping
528 possible'' if the volume is higher than or equal to 0 dB, ``Volume OK'' if it
529 is lower.\\
531 \config{\%?if(\%ia, =, \%Ia)<same artist>} -- this artist and the next artist
532 are the same.\\
534 \note{When performing a comparison against a string tag such as \%ia, only = and
535 != work, and the comparison is not case sensitive.}
537 \section{Subline Tags}
539 \begin{tagmap}
540 \config{\%t(time)}
541 & Set the subline display cycle time (\%t(5) or \%t(3.4) formats) \\
542 \config{;}
543 & Split items on a line into separate sublines \\
544 \end{tagmap}
546 Allows grouping of several items (sublines) onto one line, with the
547 display cycling round the defined sublines. See
548 \reference{ref:AlternatingSublines} for details.
550 \opt{rtc}{
551 \section{Time and Date}
552 \begin{tagmap}
553 \config{\%cd} & Day of month from 01 to 31\\
554 \config{\%ce} & Zero padded day of month from 1 to 31\\
555 \config{\%cf} & A conditional for 12/24 hour format.\newline
556 \config{\%?cf<24 hour stuff|12 hour stuff>}\\
557 \config{\%cH} & Zero padded hour from 00 to 23 (24 hour format)\\
558 \config{\%ck} & Hour from 0 to 23 (24 hour format)\\
559 \config{\%cI} & Zero padded hour from 01 to 12 (am/pm format)\\
560 \config{\%cl} & Hour from 1 to 12 (am/pm format)\\
561 \config{\%cm} & Month from 01 to 12\\
562 \config{\%cM} & Minutes\\
563 \config{\%cS} & Seconds\\
564 \config{\%cy} & 2-digit year\\
565 \config{\%cY} & 4-digit year\\
566 \config{\%cP} & Capital AM/PM\\
567 \config{\%cp} & Lowercase am/pm\\
568 \config{\%ca} & Weekday name\\
569 \config{\%cb} & Month name\\
570 \config{\%cu} & Day of week from 1 to 7, 1 is Monday\\
571 \config{\%cw} & Day of week from 0 to 6, 0 is Sunday\\
572 \end{tagmap}
575 \section{Text Translation}
576 \begin{tagmap}
577 \config{\%Sx(English)}
578 & Display the translation of ``English'' in the current language\\
579 \end{tagmap}
581 \begin{itemize}
582 \item ``English'' must be a phrase used in the language file.
583 \item It should match the \config{Source:} line in the language file.
584 \end{itemize}
586 \note{checkwps cannot verify that the string is correct, so please check on
587 either the simulator or on target.}
590 \opt{touchscreen}{
591 \section{Touchscreen Areas}
592 \begin{tagmap}
593 \config{\%T(x,y,[width],\tabnlindent[height],action)}
594 & Invoke the action specified when the user presses in the defined
595 touchscreen area.\\
596 \end{tagmap}
597 If the action starts with \& then the area must be held. Possible actions are:
599 \begin{description}
600 \item[play] -- Play/pause playback.
601 \item[stop] -- Stop playback and exit the WPS.
602 \item[prev] -- Previous track.
603 \item[next] -- Next track.
604 \item[ffwd] -- Seek forwards in the track.
605 \item[rwd] -- Seek backwards in the track.
606 \item[menu] -- Go to the main menu.
607 \item[browse] -- Go back to the file browser or database.
608 \item[shuffle] -- Toggle shuffle mode.
609 \item[repmode] -- Cycle through the repeat modes.
610 \item[quickscreen] -- Go to the quickscreen.
611 \item[contextmenu] -- Open the context menu.
612 \item[playlist] -- Go to the playlist viewer.
613 \item[progressbar] -- Seek to the appropriate position in the track based on the touch.
614 \item[volume] -- Set the volume to the appropriate level based on the touch.
615 \item[pitch] -- Open the pitchscreen.
616 \item[voldown] -- Decrease the volume by one step.
617 \item[volup] -- Increase the volume by one step.
618 \item[mute] -- Un/Mute playback.
619 \end{description}
621 \section{Last Touchscreen Press}
622 \begin{tagmap}
623 \config{\%Tl} & Indicates that the touchscreen is pressed.\\
624 \end{tagmap}
625 This tag can be used to display text or images or a viewport when the
626 touchscreen is pressed (like an On Screen Display). If you put a number
627 straight after \%Tl it will be used as a timeout in seconds
628 (e.g \%Tl(2.5) will give a 2.5 second timeout) between the touchscreen press
629 being released and the tag going false. If no number is specified it will
630 use a 1 second timeout. It can also be used as a conditional, and can be
631 used with conditional viewports.
634 \section{\label{ref:bar_tags}Bar Tags}
635 Some tags can be used to display a bar which draws according to the value of
636 the tag. To use these tags like a bar you need to use the following parameters
637 (\%XX should be replaced with the actual tag).
639 \begin{tagmap}
640 \config{\%XX(x, y, width, height, [options])}
641 & Draw the specified tag as a bar\newline
642 \config{x}: x co-ordinate at which to start drawing the bar.\newline
643 \config{y}: y co-ordinate at which to start drawing the bar.\newline
644 \config{width}: width of the bar (- for the full viewport width).\newline
645 \config{height}: height of the bar (- to set to the font height for
646 horizontal bars and to the viewport height for vertical bars).\newline
647 \config{options}: any of the options set out below.\\
648 \end{tagmap}
650 \subsection{Options}
651 \begin{description}
652 \item[image] -- the next option is either the filename or image label to
653 use for the fill image.
654 \item[horizontal] -- force the bar to be drawn horizontally.
655 \item[vertical] -- force the bar to be drawn vertically.
656 \item[invert] -- invert the draw direction (i.e. right to left, or top to
657 bottom).
658 \item[slider] -- draw an preloaded image over the top of the bar so that
659 the centre of the image matches the current position. This must be
660 followed by the label of the desired image.
661 \item[nofill] -- don't draw the bar, only its frame (for use with the
662 ``slider'' option).
663 \item[nobar] -- don't draw the bar or its frame (for use with the
664 ``slider'' option).
665 \end{description}
667 Example: \config{\%pb(0,0,-,-,-,nofill, slider, slider\_image, invert)} -- draw
668 a horizontal progressbar which doesn't fill and draws the image
669 ``slider\_image'' which moves right to left.
671 \note{If the slider option is used, the bar will be shrunk so that the slider
672 fits inside the specified width and height.}
674 \section{Other Tags}
675 \begin{tagmap}
676 \config{\%(} & The character `('\\
677 \config{\%)} & The character `)'\\
678 \config{\%,} & The character `,'\\
679 \config{\%\%} & The character `\%'\\
680 \config{\%<} & The character `<'\\
681 \config{\%|} & The character `|'\\
682 \config{\%>} & The character `>'\\
683 \config{\%;} & The character `;'\\
684 \config{\%\#} & The character `\#'\\
685 \config{\%s} & Indicate that the line should scroll. Can occur
686 anywhere in a line (given that the text is
687 displayed; see conditionals above). You can specify
688 up to ten scrolling lines. Scrolling lines can not
689 contain dynamic content such as timers, peak meters
690 or progress bars.\\
691 \end{tagmap}