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