summaryrefslogtreecommitdiffstats
path: root/manual/appendix/wps_tags.tex
blob: f75fd2f00c8dc3704bda2ca1635f0ee1e98320d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
% $Id$ %
\chapter{\label{ref:wps_tags}Theme Tags}
Themeing is discussed in detail in section \reference{ref:ConfiguringtheWPS},
what follows is a list of the available tags.

\section{Status Bar}
\begin{tagmap}
  \config{\%we} & Display Status Bar\\
  \config{\%wd} & Hide Status Bar\\
  \config{\%wi} & Display the inbuilt Status Bar in the current viewport\\
\end{tagmap}
These tags override the player setting for the display of the status bar.
They must be noted on their own line (which will not be shown in the WPS).

\section{Information from the track tags}
  \begin{tagmap}
    \config{\%ia} & Artist\\
    \config{\%ic} & Composer\\
    \config{\%iA} & Album Artist\\
    \config{\%id} & Album Name\\
    \config{\%iG} & Grouping\\
    \config{\%ig} & Genre Name\\
    \config{\%in} & Track Number\\
    \config{\%it} & Track Title\\
    \config{\%iC} & Comment\\
    \config{\%iv} & ID3 version (1.0, 1.1, 2.2, 2.3, 2.4, or empty if not an ID3 tag)\\
    \config{\%iy} & Year\\
    \config{\%ik} & Disc Number\\
  \end{tagmap}
Remember that this information is not always available, so use the 
conditionals to show alternate information in preference to assuming.

These tags, when written with a capital ``I'' (e.g. \config{\%Ia} or \config{\%Ic}),
show the information for the next song to be played.

\nopt{lcd_charcell}{
  \section{Viewports}
    \begin{tagmap}
      \nopt{lcd_non-mono}{%
        \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}%
        [height]{\textbar}[font]{\textbar}}
        & See section \ref{ref:Viewports}\\}

      \nopt{lcd_color}{\opt{lcd_non-mono}{%
        \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}%
        [height]{\textbar}[font]{\textbar}[fgshade]{\textbar}[bgshade]{\textbar}}
        & See section \ref{ref:Viewports}\\}}

      \opt{lcd_color}{%
        \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}%
        [height]{\textbar}[font]{\textbar}[fgcolour]{\textbar}[bgcolour]{\textbar}}
        & See section \ref{ref:Viewports}\\}

      \config{\%Vd'identifier'} & Display the `identifier' viewport. E.g.
      \config{\%?C{\textless}\%Vda{\textbar}\%Vdb{\textgreater}}
      will show viewport `a' if album art is found, and `b' if it isn't.\\

      \config{\%Vi{\textbar}'label'{\textbar}\dots{\textbar}} &
      Declare a Custom UI Viewport. The `\dots' parameters use the same logic as
      the \config{\%V} tag explained above. See section \ref{ref:Viewports}.\\ 

      \config{\%VI'label'} & Set the Info Viewport to use the viewport called
      label, as declared with the previous tag.\\
    \end{tagmap}
}

\section{Power Related Information}
  \begin{tagmap}
    \config{\%bl} & Numeric battery level in percents\\
                  & Can also be used in a conditional: 
                    \config{\%?bl{\textless}-1{\textbar}0{\textbar}1{\textbar}%
                    2{\textbar}\ldots{\textbar}N{\textgreater}},
                    where the value $-1$ is used when the battery level isn't
                    known (it usually is)\\
    \config{\%bv} & The battery level in volts\\
    \config{\%bt} & Estimated battery time left\\
    \config{\%bp} & ``p'' if the charger is connected (only on targets
                    that can charge batteries)\\
    \config{\%bc} & ``c'' if the unit is currently charging the battery (only on
                    targets that have software charge control or monitoring)\\
    \config{\%bs} & Remaining time of the sleep timer (if it is set)\\
  \end{tagmap}

\section{Information about the file}
  \begin{tagmap}
    \config{\%fb} & File Bitrate (in kbps)\\
    \config{\%fc} & File Codec (e.g. ``MP3'' or ``FLAC''). %
           This tag can also be used in a conditional tag, %
           \config{\%?fc{\textless}mp1\-{\textbar}mp2\-{\textbar}mp3\-%
           {\textbar}aiff\-{\textbar}wav\-{\textbar}ogg\-{\textbar}flac\-%
           {\textbar}mpc\-{\textbar}a52\-{\textbar}wavpack\-{\textbar}alac\-%
           {\textbar}aac\-{\textbar}shn\-{\textbar}sid\-{\textbar}adx\-%
           {\textbar}nsf\-{\textbar}speex\-{\textbar}spc\-{\textbar}ape\-%
           {\textbar}wma\-{\textbar}mod\-{\textbar}sap%
           {\textbar}unknown{\textgreater}}.\\
                  & The codec order is as follows: MP1, MP2, MP3, AIFF, WAV,
           Ogg Vorbis (OGG), FLAC, MPC, AC3, WavPack (WV), ALAC, AAC,
           Shorten (SHN), SID, ADX, NSF, Speex, SPC, APE, WMA, MOD, SAP.\\
    \config{\%ff} & File Frequency (in Hz)\\
    \config{\%fk} & File Frequency (in kHz)\\
    \config{\%fm} & File Name\\
    \config{\%fn} & File Name (without extension)\\
    \config{\%fp} & File Path\\
    \config{\%fs} & File Size (in Kilobytes)\\
    \config{\%fv} & ``(avg)'' if variable bit rate or empty string if constant bit rate\\
    \config{\%d1} & First directory from the end of the file path\\
    \config{\%d2} & Second directory from the end of the file path\\
    \config{\%d3} & Third directory from the end of the file path\\
  \end{tagmap}
Example for the \config{\%dN} commands: If the path is 
``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d1} is ``Isola'', 
\config{\%d2} is ``Kent'' and \config{\%d3} is ``Rock''.

These tags, when written with the first letter capitalized (e.g. \config{\%Fn} or \config{\%D2}),
produce the information for the next file to be played.

\section{Playlist/Song Info}
  \begin{tagmap}
    \config{\%pb} & Progress Bar\\
    \opt{player}{
          & This will display a one character ``cup''
            that empties as the time progresses.}
    \opt{lcd_bitmap}{
         & This will replace the entire line with a progress bar. \\
         & You can set the position, width and height of the progressbar %
           (in pixels) and load a custom image for it: %
           \config{\%pb{\textbar}image.bmp{\textbar}x{\textbar}y{\textbar}width{\textbar}height{\textbar}}} \\
    \opt{player}{%
    \config{\%pf} & Full-line progress bar \& time display\\
    }%
    \config{\%px} & Percentage Played In Song\\
    \config{\%pc} & Current Time In Song\\
    \config{\%pe} & Total Number of Playlist Entries\\
    \nopt{player}{%
    \config{\%pm} & Peak Meter. The entire line is used as %
                    volume peak meter.\\%
    }%
    \config{\%pn} & Playlist Name (without path or extension)\\
    \config{\%pp} & Playlist Position\\
    \config{\%pr} & Remaining Time In Song\\
    \config{\%ps} & ``s'' if shuffle mode is enabled\\
    \config{\%pt} & Total Track Time\\
    \config{\%pv} & Current volume (in dB). Can also be used in a conditional: \\
         & \config{\%?pv{\textless}0{\textbar}1{\textbar}2{\textbar}\ldots%
           {\textbar}N{\textgreater}}\\
         & 0 is used for mute, the last option is used for values greater than zero.\\
         \opt{lcd_bitmap}{& This can also be used like \%pb to provide a continuous scale:
         \config{\%pv{\textbar}image.bmp{\textbar}x{\textbar}y{\textbar}width{\textbar}height{\textbar}}} \\
    \config{\%pS} & Track is starting. An optional number gives how many seconds
         the tag remains true for after the start of the track. The default is
         10 seconds if no number is specified.\\
         & \config{\%pS7{\textless}in the first 7 seconds of track{\textbar}in
           the rest of the track{\textgreater}}\\
    \config{\%pE} & Track is ending. An optional number gives how many seconds
         before the end of the track the tag becomes true. The default is
         10 seconds if no number is specified.\\
         & \config{\%pE7{\textless}in the last 7 seconds of track{\textbar}in
           the rest of the track{\textgreater}}\\
    \config{\%Sp} & Current Playback Pitch\\
  \end{tagmap}

\section{Runtime Database}
  \begin{tagmap}
    \config{\%rp} & Song playcount\\
    \config{\%rr} & Song rating (0-10). This tag can also be used in a conditional tag: %
           \config{\%?rr{\textless}0{\textbar}1{\textbar}2{\textbar}3{\textbar}%
           4{\textbar}5{\textbar}6{\textbar}7{\textbar}8{\textbar}9{\textbar}%
           10{\textgreater}}\\
    \config{\%ra} & Autoscore for the song\\
  \end{tagmap}

\opt{swcodec}{
\section{Sound (DSP) settings}
  \begin{tagmap}
    \config{\%Sp} & Current playback pitch \\
  \opt{swcodec}{
    \config{\%xf} & Crossfade setting, in the order: Off, Auto Skip, Man Skip,
           Shuffle, Shuffle and Man Skip, Always\\
    \config{\%rg} & ReplayGain value in use (x.y~dB). If used as a conditional,
           Replaygain type in use: \config{\%?rg{\textless}Off{\textbar}Track%
           {\textbar}Album{\textbar}TrackShuffle{\textbar}AlbumShuffle%
           {\textbar}No tag{\textgreater}}\\
  }
  \end{tagmap}
}

% this will not include the "remote hold switch" tag for targets lacking 
% a main unit hold switch
\opt{hold_button}{
  \opt{remote_button_hold}{
    \section{Hold Switches}
      \begin{tagmap}
        \config{\%mh} & ``h'' if the main unit hold switch is on\\
        \config{\%mr} & ``r'' if the remote hold switch is on\\
      \end{tagmap}
  }
  \nopt{remote_button_hold}{
    \section{Hold Switch}
      \begin{tagmap}
        \config{\%mh} & ``h'' if the hold switch is on\\
      \end{tagmap}
  }
}

\section{Virtual LED}
  \begin{tagmap}
    \config{\%lh} & ``h'' if the \disk\ is accessed\\
  \end{tagmap}

\section{Repeat Mode}
  \begin{tagmap}
    \config{\%mm} & Repeat mode, 0-4, in the order: Off, All, One, Shuffle, A-B\\
  \end{tagmap}
Example: \config{\%?mm{\textless}Off{\textbar}All{\textbar}One{\textbar}Shuffle%
{\textbar}A-B{\textgreater}}

\section{Playback Mode}
  \begin{tagmap}
    \config{\%mp} & Play status, 0-4, in the order: Stop, Play, Pause, 
           Fast Forward, Rewind, Recording, Recording paused, FM Radio playing,
           FM Radio muted\\
  \end{tagmap}
Example: \config{\%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}%
Ffwd{\textbar}Rew{\textbar}Rec{\textbar}Rec pause{\textbar}FM{\textbar}%
FM pause{\textgreater}}

\section{Current Screen}
  \begin{tagmap}
    \config{\%cs} & The current screen, 1-5, in the order:
                Menus, WPS, Recording screen, FM Radio screen, Current Playlist screen\\
  \end{tagmap}
The tag can also be used as the switch in a conditional tag. For players without
some capabilities (e.g. having no FM radio) some values will be never yielded.

Example: \config{You are in the \%?cs{\textless}Main menu{\textbar}WPS{\textbar}%
Recording screen{\textbar}FM Radio screen{\textgreater}}

\section{List Title (\fname{.sbs} only)}
  \begin{tagmap}
    \config{\%Lt} & Title text. Should be used in a conditional so that non-list
      screens don't show a title when they shouldn't\\
    \config{\%Li} & Title icon. This uses the same order as custom icons (see
      \wikilink{CustomIcons} in the wiki) except that here \config{0} is ``no
      icon''\\
  \end{tagmap}

  This tag can be used to give custom formatting to list titles.
  Define a viewport with the font and formatting desired, and then use
  \config{\%?Lt{\textless}\%Lt{\textgreater}} to display the title within the
  viewport.  If \config{\%Lt} is present anywhere in the \fname{.sbs}, then the
  \config{\%Vi} viewport will not show the title.

\section{Changing Volume}
  \begin{tagmap}
    \config{\%mv[t]} & ``v'' if the volume is being changed\\
  \end{tagmap}

The tag produces the letter ``v'' while the volume is being changed and some
amount of time after that, i.e. after the volume button has been released. The
optional parameter \config{t} specifies that amount of time, in seconds. If it
is not specified, 1 second is assumed.

The tag can be used as the switch in a conditional tag to display different things
depending on whether the volume is being changed. It can produce neat effects
when used with conditional viewports.

Example: \config{\%?mv2.5{\textless}Volume changing{\textbar}\%pv{\textgreater}}

The example above will display the text ``Volume changing'' if the volume is
being changed and 2.5 seconds after the volume button has been released. After
that, it will display the volume value.

\section{Settings}
  \begin{tagmap}
    \config{\%St{\textbar}<setting name>{\textbar}} & The value of the Rockbox
             setting with the specified name. See \reference{ref:config_file_options}
             for the list of the available settings.\\
  \end{tagmap}

Examples:
\begin{enumerate}
\item As a simple tag: \config{\%St{\textbar}skip length{\textbar}}
\item As a conditional: \config{\%?St{\textbar}eq enabled{\textbar}{\textless}Eq is enabled{\textbar}Eq is disabled{\textgreater}}
\end{enumerate}


\opt{lcd_bitmap}{
\section{\label{ref:wps_images}Images}
  \begin{tagmap}
    \nopt{archos}{%
    \config{\%X{\textbar}filename.bmp{\textbar}}
        & Load and set a backdrop image for the WPS.
          This image must be exactly the same size as your LCD.\\
    }%
    \config{\%x{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}}
        & Load and display an image\\
        & \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\\
        & \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\\
        & \config{x}: x coordinate\\
        & \config{y}: y coordinate.\\
    \config{\%xl{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}[nimages{\textbar}]}
        & Preload an image for later display (useful for when your images are displayed conditionally)\\
        & \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\\
        & \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\\
        & \config{x}: x coordinate\\
        & \config{y}: y coordinate\\
        & \config{nimages}: (optional) number of sub-images (tiled vertically, of the same height)
          contained in the bitmap. Default is 1.\\
    \config{\%xdn[i]} & Display a preloaded image\\
        & \config{n}: image ID (a-z and A-Z) as it was specified in \config{\%x} or \config{\%xl}\\
        & \config{i}: (optional) number of the sub-image to display (a-z for 1-26 and A-Z for 27-52).
          By default the first (i.e. top most) sub-image will be used.\\
  \end{tagmap}

Examples:
\begin{enumerate}
\item Load and display the image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109:\\
\config{\%x{\textbar}a{\textbar}bg.bmp{\textbar}37{\textbar}109{\textbar}}
\item Load a bitmap strip containing 5 volume icon images (all the same size)
with image ID ``M'', and then reference the individual sub-images in a conditional:\\
\config{\%xl{\textbar}M{\textbar}volume.bmp{\textbar}134{\textbar}153{\textbar}5{\textbar}}\\
\config{\%?pv<\%xdMa{\textbar}\%xdMb{\textbar}\%xdMc{\textbar}\%xdMd{\textbar}%
\%xdMe>}
\end{enumerate}


\note{
  \begin{itemize}
  \item The images must be in BMP format
  \item The image tag must be on its own line
  \item The ID is case sensitive, giving 52 different ID's
  \item The size of the LCD screen for each player varies. See table below 
        for appropriate sizes of each device. The x and y coordinates must 
        repect each of the players' limits.
  \end{itemize}
}
}

\opt{albumart}{
\section{Album Art}
  \begin{tagmap}
    \config{\%Cl{\textbar}x{\textbar}y{\textbar}[[l{\textbar}c{\textbar}r]maxwidth]{\textbar}[[t{\textbar}c{\textbar}b]maxheight]{\textbar}}
        & Define the settings for albumart\\
        & \config{x}: x coordinate\\
        & \config{y}: y coordinate\\
        & \config{maxwidth}: Maximum height\\
        & \config{maxheight}: Maximum width\\
    \config{\%C}  & Display the album art as configured. This tag can also be used as a conditional.\\
  \end{tagmap}

The picture will be rescaled, preserving aspect ratio to fit the given
\config{maxwidth} and \config{maxheight}. If the aspect ratio doesn't match the
configured values, the picture will be placed according to the flags to the
\config{maxwidth} and \config{maxheight} parameters:
\begin{itemize}
  \item \config{maxwidth}:
    \begin{description}
      \item[\config{l}.] Align left
      \item[\config{c}.] Align centre (default)
      \item[\config{r}.] Align right
    \end{description}
  \item \config{maxheight}:
    \begin{description}
      \item[\config{t}.] Align top
      \item[\config{c}.] Align centre (default)
      \item[\config{b}.] Align bottom
    \end{description}
\end{itemize}

Examples:
\begin{enumerate}
  \item Load albumart at position 20,40 and display it without resizing:\\
  \config{\%Cl{\textbar}20{\textbar}40{\textbar}{\textbar}{\textbar}}
  \item Load albumart at position 0,20 and resize it to be at most 100$\times$100
        pixels. If the image isn't square, align it to the bottom-right
        corner:\\
  \config{\%CL{\textbar}0{\textbar}20{\textbar}r100{\textbar}b100{\textbar}}
\end{enumerate}
}

\section{FM Radio}
  \begin{tagmap}
    \config{\%tp} & Does this target have a radio? If it doesn't, the ``true''
      branch of this conditional is completly ignored so you don't need to
      worry about tags which are not recognized on non radio targets.\\
    \config{\%tt} & Is the tuner tuned?\\
    \config{\%tm} & Scan or preset mode? Scan is ``true'', preset is ``false''.\\
    \config{\%ts} & Is the station in stereo?\\
    \config{\%ta} & Minimum frequency (region specific) in MHz.\\
    \config{\%tb} & Maximum frequency (region specific) in MHz.\\
    \config{\%tf} & Current frequency in MHz.\\
    \config{\%Ti} & Current preset id, i.e. 1-based number of the preset
      within the presets list (usable in playlist viewer).\\
    \config{\%Tn} & Current preset name (usable in playlist viewer).\\
    \config{\%Tf} & Current preset frequency (usable in playlist viewer).\\
    \config{\%Tc} & Preset count, i.e. the number of stations in the current
      preset list.\\
    \config{\%tx} & Is RDS available?\\
    \config{\%ty} & RDS name.\\
    \config{\%tz} & RDS text.\\
  \end{tagmap}

It is also possible to show ``Radio Art'' which can be used to display images
associated with presets. The tags are exactly the same as for album art,
described above. Images need to be placed in \fname{/.rockbox/fmpresets/},
and must have the same name as the preset. They need to be in either
\fname{.bmp} or \fname{.jpg} format, and the radio must be in preset mode
and tuned to a preset (and not recording) in order for them to be shown.

\section{Alignment}
  \begin{tagmap}
    \config{\%al} & Align the text left\\
    \config{\%aL} & Align the text left, or to the right if RTL language is in use\\
    \config{\%ac} & Centre the text\\
    \config{\%ar} & Align the text right\\
    \config{\%aR} & Align the text right, or to the left if RTL language is in use\\
  \end{tagmap}
All alignment tags may be present in one line, but they need to be in the 
order left -- centre -- right. If the aligned texts overlap, they are merged.

\section{Conditional Tags}

\begin{tagmap}
\config{\%?xx{\textless}true{\textbar}false{\textgreater}}
    & If / Else: Evaluate for true or false case \\
\config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}}
    & Enumerations: Evaluate for first / second / third / \dots / last condition \\
\end{tagmap}

\section{Subline Tags}

\begin{tagmap}
\config{\%t{\textless}time{\textgreater}}
    & Set the subline display cycle time (\%t5 or \%t3.4 formats) \\
\config{;}
    & Split items on a line into separate sublines \\
\end{tagmap}

Allows grouping of several items (sublines) onto one line, with the
display cycling round the defined sublines. See
\reference{ref:AlternatingSublines} for details. 


\section{Time and Date}
    \begin{tagmap}
    \opt{rtc}{
      \config{\%cd}          & Day of month from 01 to 31\\
      \config{\%ce}          & Zero padded day of month from 1 to 31\\
      \config{\%cf}          & A conditional for 12/24 hour format. \%?cf{\textless}24 hour stuff{\textbar}12 hour stuff{\textgreater}\\
      \config{\%cH}          & Zero padded hour from 00 to 23 (24 hour format)\\
      \config{\%ck}          & Hour from 0 to 23 (24 hour format)\\
      \config{\%cI}          & Zero padded hour from 01 to 12 (am/pm format)\\
      \config{\%cl}          & Hour from 1 to 12 (am/pm format)\\
      \config{\%cm}          & Month from 01 to 12\\
      \config{\%cM}          & Minutes\\
      \config{\%cS}          & Seconds\\
      \config{\%cy}          & 2-digit year\\
      \config{\%cY}          & 4-digit year\\
      \config{\%cP}          & Capital AM/PM\\
      \config{\%cp}          & Lowercase am/pm\\
      \config{\%ca}          & Weekday name\\
      \config{\%cb}          & Month name\\
      \config{\%cu}          & Day of week from 1 to 7, 1 is Monday\\
      \config{\%cw}          & Day of week from 0 to 6, 0 is Sunday\\
    }
      \config{\%cc}          & Check for presence of the clock hardware\\
    \end{tagmap}
The \%cc tag returns ``c'' if the necessary hardware is present and can also be
used as a conditional. This can be very useful for designing a WPS that works on
multiple targets, some with and some without a clock. By using this tag as a
conditional it is possible to display current date and time on those targets that
support this
\opt{rtc}{ (like the \playertype)},
or alternate information on those that do not
\nopt{rtc}{ (like the \playertype)}%
.

Example:
\config{\%?cc{\textless}\%cH:\%cM{\textbar}No clock detected{\textgreater}}

\section{Text Translation}
  \begin{tagmap}
    \config{\%Sx{\textbar}{\textless}English{\textgreater}{\textbar}}
    & Display the translation of ``English'' in the current language\\
  \end{tagmap}
  
  \begin{itemize}
    \item ``English'' must be a phrase used in the language file.
    \item It should match the \config{Source:} line in the language file.
  \end{itemize}

  \note{checkwps cannot verify that the string is correct, so please check on
    either the simulator or on target.}


\opt{touchscreen}{
  \section{Touchscreen Areas (WPS only)}
    \begin{tagmap}
      \config{\%T{\textbar}x{\textbar}y{\textbar}width{\textbar}height%
      {\textbar}action{\textbar}}
      & Invoke the action specified when the user presses in the defined
      touchscreen area.\\
    \end{tagmap}
  If the action starts with \& then the area must be held. Possible actions are:

  \begin{description}
    \item[play] -- Play/pause playback.
    \item[stop] -- Stop playback and exit the WPS.
    \item[prev] -- Previous track.
    \item[next] -- Next track.
    \item[ffwd] -- Seek forwards in the track.
    \item[rwd] -- Seek backwards in the track.
    \item[menu] -- Go to the main menu.
    \item[browse] -- Go back to the file browser or database.
    \item[shuffle] -- Toggle shuffle mode.
    \item[repmode] -- Cycle through the repeat modes.
    \item[quickscreen] -- Go to the quickscreen.
    \item[contextmenu] -- Open the context menu.
    \item[playlist] -- Go to the playlist viewer.
    \item[progressbar] -- Seek to the appropriate position in the track based on the touch.
    \item[volume] -- Set the volume to the appropriate level based on the touch.
    \item[pitch] -- Open the pitchscreen.
    \item[voldown] -- Decrease the volume by one step.
    \item[volup] -- Increase the volume by one step.
  \end{description}

  \section{Last Touchscreen Press (WPS only)}
    \begin{tagmap}
      \config{\%Tl} & Indicates that the touchscreen is pressed.\\
    \end{tagmap}
  This tag can be used to display text or images or a viewport when the
  touchscreen is pressed (like an On Screen Display). If you put a number
  straight after \%Tl it will be used as a timeout in seconds
  (e.g \%Tl2.5 will give a 2.5 second timeout) between the touchscreen press
  being released and the tag going false. If no number is specified it will
  use a 1 second timeout.  It can also be used as a conditional, and can be
  used with conditional viewports.
}

\section{Other Tags}
\begin{tagmap}
  \config{\%\%}          & The character `\%'\\
  \config{\%{\textless}} & The character `{\textless}'\\
  \config{\%{\textbar}}  & The character `{\textbar}'\\
  \config{\%{\textgreater}} & The character `{\textgreater}'\\
  \config{\%;}           & The character `;'\\
  \config{\%s}           & Indicate that the line should scroll. Can occur 
                           anywhere in a line (given that the text is 
                           displayed; see conditionals above). You can specify 
                           up to ten scrolling lines. Scrolling lines can not 
                           contain dynamic content such as timers, peak meters 
                           or progress bars.\\
\end{tagmap}