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