%cs (current screen) changes:
[maemo-rb.git] / manual / appendix / wps_tags.tex
blob8946e21ef8a4f6d2221aaf0da0ca06a140be5b8b
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.\\%
166 \config{\%pL} & Peak meter for the left channel. Can be used as a value, %
167 a conditional tag or a bar tag.\\
168 \config{\%pR} & Peak meter for the right channel. Can be used as a value, %
169 a conditional tag or a bar tag.\\
171 \config{\%pn} & Playlist name (without path or extension)\\
172 \config{\%pp} & Playlist position\\
173 \config{\%pr} & Remaining time in song\\
174 \config{\%ps} & ``s'' if shuffle mode is enabled\\
175 \config{\%pt} & Total track time\\
176 \config{\%pv} & Current volume (in dB). Can also be used in a conditional:
177 \config{\%?pv<0|1|2|\ldots|N>}\newline
178 0 is used for mute, the last option is used for values greater than zero.
179 \opt{lcd_bitmap}{This can also be used like \%pb to provide a continuous scale:
180 \config{\%pv(x,y,[width],[height],image.bmp)}} \\
181 \config{\%pS} & Track is starting. An optional number gives how many seconds
182 the tag remains true for after the start of the track. The default is
183 10 seconds if no number is specified.
184 \config{\%?pS(7)<in the first 7 seconds of track|in
185 the rest of the track>}\\
186 \config{\%pE} & Track is ending. An optional number gives how many seconds
187 before the end of the track the tag becomes true. The default is
188 10 seconds if no number is specified.
189 \config{\%?pE(7)<in the last 7 seconds of track|in
190 the rest of the track>}\\
191 \config{\%Sp} & Current playback pitch\\
192 \end{tagmap}
194 \section{Playlist Viewer}
195 \begin{tagmap}
196 \config{\%Vp(start,code to render)} & Display the playlist viewer in
197 the current viewport.\\
198 \end{tagmap}
200 \begin{itemize}
201 \item `start' is the offset relative to the currently playing track for the
202 playlist to display from (0 the current track, 1 is the next track, etc.).
203 \item `code to render' is a line of skin code which will be displayed for
204 each line in the viewer. All text tags are supporte (including conditionals
205 and sublines)
206 \end{itemize}
208 The entire viewport will be used, so don't expect other tags in the same
209 viewport to work well. Supported tags are \%pp, all tags starting with \%i,
210 most tags starting with \%f, \%pt and \%s.\\
212 Example: \config{\%Vp(1,\%pp - \%it,\%pp - \%fn)} -- Display the playlist
213 position, then either the track title (from the tags) or
214 the filename. The viewer will display as many tracks as will fit in the
215 viewport.
217 \section{Runtime Database}
218 \begin{tagmap}
219 \config{\%rp} & Song playcount\\
220 \config{\%rr} & Song rating (0-10). This tag can also be used in a conditional tag: %
221 \config{\%?rr<0|1|2|3|4|5|6|7|8|9|10>}\\
222 \config{\%ra} & Autoscore for the song\\
223 \end{tagmap}
225 \opt{swcodec}{
226 \section{Sound (DSP) settings}
227 \begin{tagmap}
228 \config{\%Sp} & Current playback pitch \\
229 \opt{swcodec}{
230 \config{\%xf} & Crossfade setting, in the order: Off, Auto Skip, Man Skip,
231 Shuffle, Shuffle and Man Skip, Always\\
232 \config{\%rg} & ReplayGain value in use (x.y~dB). If used as a conditional,
233 Replaygain type in use: \config{\%?rg<Off|Track%
234 |Album|TrackShuffle|AlbumShuffle%
235 |No tag>}\\
237 \end{tagmap}
240 \section{Hold}
241 \begin{tagmap}
242 \config{\%mh} & ``h'' if the main unit keys are locked\\
243 \opt{remote_button_hold}{%
244 \config{\%mr} & ``r'' if the remote keys are locked\\
246 \end{tagmap}
248 \section{Virtual LED}
249 \begin{tagmap}
250 \config{\%lh} & ``h'' if the \disk\ is accessed\\
251 \end{tagmap}
253 \section{Repeat Mode}
254 \begin{tagmap}
255 \config{\%mm} & Repeat mode, 0-4, in the order: Off, All, One, Shuffle, A-B\\
256 \end{tagmap}
257 Example: \config{\%?mm<Off|All|One|Shuffle|A-B>}
259 \section{Playback Mode}
260 \begin{tagmap}
261 \config{\%mp} & Play status, 0-4, in the order: Stop, Play, Pause,
262 Fast Forward, Rewind, Recording, Recording paused, FM Radio playing,
263 FM Radio muted\\
264 \end{tagmap}
265 Example: \config{\%?mp<Stop|Play|Pause|Ffwd|Rew|Rec|Rec pause|FM|FM pause>}
267 \section{Current Screen}
268 \begin{tagmap}
269 \config{\%cs} & The current screen, 1-15, in the order:
270 Menus, WPS, Recording screen, FM Radio screen, Current Playlist screen,
271 Settings menus, File browser, Database, Plugins, Quickscreen,
272 Pitchscreen, Setting chooser, Playlist Catalog Viewer, Plugin,
273 Conext Menu, System Info screen, Time and Date Screen,
274 Bookmarks\\
275 \end{tagmap}
276 The tag can also be used as the switch in a conditional tag. For players without
277 some capabilities (e.g. having no FM radio) some values will be never yielded.
279 Example: \config{You are in the \%?cs<Main menu|WPS|Recording screen|FM Radio screen>}
281 \section{List Title (\fname{.sbs} only)}
282 \begin{tagmap}
283 \config{\%Lt} & Title text. Should be used in a conditional so that non-list
284 screens don't show a title when they shouldn't\\
285 \config{\%Li} & Title icon. This uses the same order as custom icons (see
286 \wikilink{CustomIcons} in the wiki) except that here \config{0} is ``no
287 icon''\\
288 \end{tagmap}
290 This tag can be used to give custom formatting to list titles.
291 Define a viewport with the font and formatting desired, and then use
292 \config{\%?Lt<\%Lt>} to display the title within the
293 viewport. If \config{\%Lt} is present anywhere in the \fname{.sbs}, then the
294 \config{\%Vi} viewport will not show the title.
296 \section{Changing Volume}
297 \begin{tagmap}
298 \config{\%mv(t)} & ``v'' if the volume is being changed\\
299 \end{tagmap}
301 The tag produces the letter ``v'' while the volume is being changed and some
302 amount of time after that, i.e. after the volume button has been released. The
303 optional parameter \config{t} specifies that amount of time, in seconds. If it
304 is not specified, 1 second is assumed.
306 The tag can be used as the switch in a conditional tag to display different things
307 depending on whether the volume is being changed. It can produce neat effects
308 when used with conditional viewports.
310 Example: \config{\%?mv(2.5)<Volume changing|\%pv>}
312 The example above will display the text ``Volume changing'' if the volume is
313 being changed and 2.5 seconds after the volume button has been released. After
314 that, it will display the volume value.
316 \section{Settings}
317 \begin{tagmap}
318 \config{\%St(<setting\tabnlindent{}name>)} & The value of the Rockbox
319 setting with the specified name. See \reference{ref:config_file_options}
320 for the list of the available settings.\\
321 \end{tagmap}
323 Examples:
324 \begin{enumerate}
325 \item As a simple tag: \config{\%St(skip length)}
326 \item As a conditional: \config{\%?St(eq enabled)<Eq is enabled|Eq is disabled>}
327 \end{enumerate}
330 \opt{lcd_bitmap}{
331 \section{\label{ref:wps_images}Images}
332 \begin{tagmap}
333 \nopt{archos}{%
334 \config{\%X(filename.bmp)}
335 & Load and set a backdrop image for the WPS.
336 This image must be exactly the same size as your LCD.\\
338 \config{\%x(n,filename,x,y)}
339 & Load and display an image\newline
340 \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\newline
341 \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\newline
342 \config{x}: x coordinate\newline
343 \config{y}: y coordinate.\\
344 \config{\%xl(n,filename,x,y,\tabnlindent[nimages])}
345 & Preload an image for later display (useful for when your images are displayed conditionally).\newline
346 \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\newline
347 \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\newline
348 If the filename is ``\_\_list\_icons\_\_'' the list icon bitmap will be used instead\newline
349 \config{x}: x coordinate\newline
350 \config{y}: y coordinate\newline
351 \config{nimages}: (optional) number of sub-images (tiled vertically, of the same height)
352 contained in the bitmap. Default is 1.\\
353 \config{\%xd(n[i] [,tag] [,offset])} & Display a preloaded image.
354 \config{n}: image ID (a-z and A-Z) as it was specified in \config{\%x} or \config{\%xl}\newline
355 \config{i}: (optional) number of the sub-image to display (a-z for 1-26 and A-Z for 27-52).
356 (ignored when \config{tag} is used)
357 By default the first (i.e. top most) sub-image will be used.\newline
358 \config{tag}: (optional) Another tag to calculate the subimage from e.g \config{\%xd(A, \%mh)} would
359 use the first subimage when \config{\%mh} is on and the second when it is off\newline
360 \config{offset}: (optional) Add this number to the value from the \config{tag} when
361 chosing the subimage (may be negative)\\
362 \end{tagmap}
364 Examples:
365 \begin{enumerate}
366 \item Load and display the image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109:\\
367 \config{\%x(a,bg.bmp,37,109)}
368 \item Load a bitmap strip containing 5 volume icon images (all the same size)
369 with image ID ``M'', and then reference the individual sub-images in a conditional:\\
370 \config{\%xl(M,volume.bmp,134,153,5)}\\
371 \config{\%?pv<\%xd(Ma)|\%xd(Mb)|\%xd(Mc)|%
372 \%xd(Md)|\%xd(Me)>}
373 \end{enumerate}
376 \note{
377 \begin{itemize}
378 \item The images must be in BMP format
379 \item The image tag must be on its own line
380 \item The ID is case sensitive, giving 52 different ID's
381 \item The size of the LCD screen for each \dap{} varies. See table below
382 for appropriate sizes of each device. The x and y coordinates must
383 respect each of the \daps{} limits.
384 \end{itemize}
388 \opt{albumart}{
389 \section{\label{ref:album_art}Album Art}
390 Rockbox allows you to put the album art, or another image related to the music
391 on your \dap{} to display it in the PictureFlow plugin\opt{albumart}{ or in the
392 theme}. For this feature to work, there are a few requirements.
394 \subsection{Limitations}
396 Rockbox supports embedded album art only for formats that use ID3v2 tags, such
397 as MP3. It additionally supports loading images located on the \disk{}.
398 The image files must be in either BMP or JPEG format, while embedded album art
399 is currently limited to JPEG. Rockbox does not support
400 RLE-compressed BMP files, nor does it support progressive and multi-scan
401 JPEG files. Embedded JPEG images must not be unsynchronized.
402 JPEG files must consist of a single scan with interleaved components,
403 as progessive and multi-scan images require much more memory to decode.
404 Pictureflow does not currently support embedded album art.
406 \subsection{Where to put album art}
408 The pictures can be named a number of different ways, and placed to a number of
409 different locations. You can have pictures specific to the file or the album
410 or use a generic picture. You can place the picture in the same directory
411 as the file, in the parent directory or in a fixed directory named
412 \fname{/.rockbox/albumart/}. The order Rockbox uses when looking for a picture
413 is as follows (a list in braces means that those file extensions are tried in
414 that order):
416 \begin{enumerate}
417 \item embedded (JPEG images in ID3v2 or MP4 tags only)
418 \item \fname{./filename.\{jpeg,jpg,bmp\}}
419 \item \fname{./albumtitle.\{jpeg,jpg,bmp\}}
420 \item \fname{./cover.\{jpeg,jpg,bmp\}}
421 \item \fname{./folder.jpg}
422 \item \fname{/.rockbox/albumart/albumartist-albumtitle.\{jpeg,jpg,bmp\}}
423 \item \fname{../albumtitle.\{jpeg,jpg,bmp\}}
424 \item \fname{../cover.\{jpeg,jpg,bmp\}}
425 \end{enumerate}
427 The following characters will be replaced with an underscore (\_) when looking
428 for albumtitle.bmp or albumartist-albumtitle.bmp: \textbackslash{} / : <
429 > ? * |. Doublequotes will be replaced by single quotes.
430 If no album artist is set, artist will be used instead. See \wikilink{AlbumArt}
431 in the wiki for programs that will help you automate the process of putting
432 album art on your \dap{}.
434 \subsection{How to display the album art}
436 Once the album art files are present on your \dap, they can be displayed as
437 follows.
439 \begin{tagmap}
440 \config{\%Cl(x,y,[maxwidth],\tabnlindent[maxheight],\tabnlindent{}hor\_align,\tabnlindent{}vert\_align)}
441 & Define the settings for album art\newline
442 \config{x}: x coordinate\newline
443 \config{y}: y coordinate\newline
444 \config{maxwidth}: Maximum height\newline
445 \config{maxheight}: Maximum width\newline
446 \config{hor\_align}: Horizontal alignment, enter as `l', `c' or `r' for
447 left, centre or right. Centre is default\newline
448 \config{vert\_align}: Vertical alignment, enter as `t', `c' or `b' for
449 top, centre or bottom. Centre is default\\
450 \config{\%Cd} & Display the album art as configured. \\
451 \config{\%C} & Use in a conditional to determine if an image is available. \\
452 \end{tagmap}
454 The picture will be rescaled, preserving aspect ratio to fit the given
455 \config{maxwidth} and \config{maxheight}. If the aspect ratio doesn't match the
456 configured values, the picture will be placed according to the alignment flags.
458 Examples:
459 \begin{enumerate}
460 \item Load albumart at position 20,40 and display it without resizing:\\
461 \config{\%Cl(20,40,,)}
462 \item Load albumart at position 0,20 and resize it to be at most 100$\times$100
463 pixels. If the image isn't square, align it to the bottom-right
464 corner:\\
465 \config{\%Cl(0,20,100,100,r,b)}
466 \end{enumerate}
469 \opt{radio}{
470 \section{FM Radio}
471 \begin{tagmap}
472 \config{\%tt} & Is the tuner tuned?\\
473 \config{\%tm} & Scan or preset mode? Scan is ``true'', preset is ``false''.\\
474 \config{\%ts} & Is the station in stereo?\\
475 \config{\%ta} & Minimum frequency (region specific) in MHz.\\
476 \config{\%tb} & Maximum frequency (region specific) in MHz.\\
477 \config{\%tf} & Current frequency in MHz.\\
478 \config{\%Ti} & Current preset id, i.e. 1-based number of the preset
479 within the presets list (usable in playlist viewer).\\
480 \config{\%Tn} & Current preset name (usable in playlist viewer).\\
481 \config{\%Tf} & Current preset frequency (usable in playlist viewer).\\
482 \config{\%Tc} & Preset count, i.e. the number of stations in the current
483 preset list.\\
484 \config{\%tx} & Is RDS available?\\
485 \config{\%ty} & RDS name.\\
486 \config{\%tz} & RDS text.\\
487 \config{\%tr} & Signal strength (RSSI). Can be used in a conditional or as
488 a bar.\\
489 \end{tagmap}
491 It is also possible to show ``Radio Art'' which can be used to display images
492 associated with presets. The tags are exactly the same as for album art,
493 described above. Images need to be placed in \fname{/.rockbox/fmpresets/},
494 and must have the same name as the preset. They need to be in either
495 \fname{.bmp} or \fname{.jpg} format, and the radio must be in preset mode
496 and tuned to a preset (and not recording) in order for them to be shown.
499 \section{Alignment and language direction}
500 \begin{tagmap}
501 \config{\%al} & Align the text left\\
502 \config{\%aL} & Align the text left, or to the right if RTL language is in use\\
503 \config{\%ac} & Centre the text\\
504 \config{\%ar} & Align the text right\\
505 \config{\%aR} & Align the text right, or to the left if RTL language is in use\\
506 \config{\%ax} & The next tag should follow the set language direction. When
507 prepended to a viewport declaration, the viewport will
508 be horizontally mirrored if the user language is set to
509 a RTL language. Currently the \%Cl, \%V and \%Vl tags
510 support this.\\
511 \config{\%Sr} & Use as a conditional to define options for left to right, or
512 right to left languages. \%?Sr<RTL|LTR>\\
513 \end{tagmap}
515 All alignment tags may be present in one line, but they need to be in the
516 order left -- centre -- right. If the aligned texts overlap, they are merged.
518 Example: \config{\%ax\%V(\dots)}
520 \section{Conditional Tags}
522 \begin{tagmap}
523 \config{\%?xx<true|false>}
524 & If / Else: Evaluate for true or false case \\
525 \config{\%?xx<alt1|alt2|\tabnlindent{}alt3|\dots|else>}
526 & Enumerations: Evaluate for first / second / third / \dots / last condition \\
527 \config{\%if(tag, operator, operand, [option count])}
528 & Allows very simple comparisons with other tags.\newline
529 \config{tag}: the tag to check against.\newline
530 \config{operator}: the comparison to perform - possible options are =, !=,
531 >, >=, <, <=\newline
532 \config{operand}: either a second tag, a number, or text.\newline
533 \config{[option count]}: optional parameter used to select which parameter
534 of a tag to use when the tag has multiple options, e.g. \%?pv<a|b|c|d>\\
535 \end{tagmap}
537 Examples of the \%if tag:\\
539 \config{\%?if(\%pv, >=, 0)<Clipping possible|Volume OK>} will display ``Clipping
540 possible'' if the volume is higher than or equal to 0 dB, ``Volume OK'' if it
541 is lower.\\
543 \config{\%?if(\%ia, =, \%Ia)<same artist>} -- this artist and the next artist
544 are the same.\\
546 \note{When performing a comparison against a string tag such as \%ia, only = and
547 != work, and the comparison is not case sensitive.}
549 \section{Subline Tags}
551 \begin{tagmap}
552 \config{\%t(time)}
553 & Set the subline display cycle time (\%t(5) or \%t(3.4) formats) \\
554 \config{;}
555 & Split items on a line into separate sublines \\
556 \end{tagmap}
558 Allows grouping of several items (sublines) onto one line, with the
559 display cycling round the defined sublines. See
560 \reference{ref:AlternatingSublines} for details.
562 \opt{rtc}{
563 \section{Time and Date}
564 \begin{tagmap}
565 \config{\%cd} & Day of month from 01 to 31\\
566 \config{\%ce} & Zero padded day of month from 1 to 31\\
567 \config{\%cf} & A conditional for 12/24 hour format.\newline
568 \config{\%?cf<24 hour stuff|12 hour stuff>}\\
569 \config{\%cH} & Zero padded hour from 00 to 23 (24 hour format)\\
570 \config{\%ck} & Hour from 0 to 23 (24 hour format)\\
571 \config{\%cI} & Zero padded hour from 01 to 12 (am/pm format)\\
572 \config{\%cl} & Hour from 1 to 12 (am/pm format)\\
573 \config{\%cm} & Month from 01 to 12\\
574 \config{\%cM} & Minutes\\
575 \config{\%cS} & Seconds\\
576 \config{\%cy} & 2-digit year\\
577 \config{\%cY} & 4-digit year\\
578 \config{\%cP} & Capital AM/PM\\
579 \config{\%cp} & Lowercase am/pm\\
580 \config{\%ca} & Weekday name\\
581 \config{\%cb} & Month name\\
582 \config{\%cu} & Day of week from 1 to 7, 1 is Monday\\
583 \config{\%cw} & Day of week from 0 to 6, 0 is Sunday\\
584 \end{tagmap}
587 \section{Text Translation}
588 \begin{tagmap}
589 \config{\%Sx(English)}
590 & Display the translation of ``English'' in the current language\\
591 \end{tagmap}
593 \begin{itemize}
594 \item ``English'' must be a phrase used in the language file.
595 \item It should match the \config{Source:} line in the language file.
596 \end{itemize}
598 \note{checkwps cannot verify that the string is correct, so please check on
599 either the simulator or on target.}
602 \opt{touchscreen}{
603 \section{Touchscreen Areas}
604 \begin{tagmap}
605 \config{\%T(x,y,width,\tabnlindent{}height, action, [options])}
606 & Invoke the action specified when the user presses in the defined
607 touchscreen area.\\
608 \end{tagmap}
610 Possible actions are:
612 \begin{description}
613 \item[play] -- Play/pause playback.
614 \item[stop] -- Stop playback and exit the WPS.
615 \item[prev] -- Previous track/item.
616 \item[next] -- Next track/item.
617 \item[wps\_prev] -- Previous track.
618 \item[wps\_next] -- Next track.
619 \item[ffwd] -- Seek forwards in the track.
620 \item[rwd] -- Seek backwards in the track.
621 \item[menu] -- Go to the main menu.
622 \item[browse] -- Go back to the file browser or database.
623 \item[shuffle] -- Toggle shuffle mode.
624 \item[repmode] -- Cycle through the repeat modes.
625 \item[quickscreen] -- Go to the quickscreen.
626 \item[contextmenu] -- Open the context menu.
627 \item[playlist] -- Go to the playlist viewer.
628 \item[progressbar] -- Seek to the appropriate position in the track based on the touch.
629 \item[volume] -- Set the volume to the appropriate level based on the touch.
630 \item[pitch] -- Open the pitchscreen.
631 \item[voldown] -- Decrease the volume by one step.
632 \item[volup] -- Increase the volume by one step.
633 \item[mute] -- Un/Mute playback.
634 \item[setting\_inc] -- Increment the subsequently specified setting (e.g
635 \config{\%T(0,0, setting\_inc, volume)} increases the volume by one step).
636 \item[setting\_dec] -- Decrement the subsequently specified setting (e.g
637 \config{\%T(0,0, setting\_dec, volume)} decreases the volume by one step).
638 \end{description}
639 Any (or muliple) of the following options can be used after the action is specified
640 \subsection{Options}
641 \begin{description}
642 \item[repeat_press] -- This region will trigger mulitple times when held (i.e for seeking)
643 \item[long_press] -- This region will trigger once after it is held for a long press
644 \item[reverse_bar] -- Reverse the bars touch direction (i.e seek right to left)
645 \item[allow_while_locked] -- Allows the region to be pressable when the
646 skin is locked by the lock touch action
647 \end{description}
649 \section{Last Touchscreen Press}
650 \begin{tagmap}
651 \config{\%Tl} & Indicates that the touchscreen is pressed.\\
652 \end{tagmap}
653 This tag can be used to display text or images or a viewport when the
654 touchscreen is pressed (like an On Screen Display). If you put a number
655 straight after \%Tl it will be used as a timeout in seconds
656 (e.g \%Tl(2.5) will give a 2.5 second timeout) between the touchscreen press
657 being released and the tag going false. If no number is specified it will
658 use a 1 second timeout. It can also be used as a conditional, and can be
659 used with conditional viewports.
662 \section{\label{ref:bar_tags}Bar Tags}
663 Some tags can be used to display a bar which draws according to the value of
664 the tag. To use these tags like a bar you need to use the following parameters
665 (\%XX should be replaced with the actual tag).
667 \begin{tagmap}
668 \config{\%XX(x, y, width, height, [options])}
669 & Draw the specified tag as a bar\newline
670 \config{x}: x co-ordinate at which to start drawing the bar.\newline
671 \config{y}: y co-ordinate at which to start drawing the bar.\newline
672 \config{width}: width of the bar (- for the full viewport width).\newline
673 \config{height}: height of the bar (- to set to the font height for
674 horizontal bars and to the viewport height for vertical bars).\newline
675 \config{options}: any of the options set out below.\\
676 \end{tagmap}
678 \subsection{Options}
679 \begin{description}
680 \item[image] -- the next option is either the filename or image label to
681 use for the fill image.
682 \item[horizontal] -- force the bar to be drawn horizontally.
683 \item[vertical] -- force the bar to be drawn vertically.
684 \item[invert] -- invert the draw direction (i.e. right to left, or top to
685 bottom).
686 \item[slider] -- draw a preloaded image over the top of the bar so that
687 the centre of the image matches the current position. This must be
688 followed by the label of the desired image.
689 \item[backdrop] -- draw a preloaded image under the bar. The full
690 image will be displayed and must be the same size as the bar.
691 This must be followed by the label of the desired image.
692 \item[nofill] -- don't draw the bar, only its frame (for use with the
693 ``slider'' option).
694 \item[nobar] -- don't draw the bar or its frame (for use with the
695 ``slider'' option).
696 \end{description}
698 Example: \config{\%pb(0,0,-,-,-,nofill, slider, slider\_image, invert)} -- draw
699 a horizontal progressbar which doesn't fill and draws the image
700 ``slider\_image'' which moves right to left.
702 \note{If the slider option is used, the bar will be shrunk so that the slider
703 fits inside the specified width and height.}
705 \section{Other Tags}
706 \begin{tagmap}
707 \config{\%(} & The character `('\\
708 \config{\%)} & The character `)'\\
709 \config{\%,} & The character `,'\\
710 \config{\%\%} & The character `\%'\\
711 \config{\%<} & The character `<'\\
712 \config{\%|} & The character `|'\\
713 \config{\%>} & The character `>'\\
714 \config{\%;} & The character `;'\\
715 \config{\%\#} & The character `\#'\\
716 \config{\%s} & Indicate that the line should scroll. Can occur
717 anywhere in a line (given that the text is
718 displayed; see conditionals above). You can specify
719 up to ten scrolling lines. Scrolling lines can not
720 contain dynamic content such as timers, peak meters
721 or progress bars.\\
722 \end{tagmap}