summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manual/advanced_topics/main.tex46
-rw-r--r--manual/advanced_topics/viewports/colour-conditional.tex16
-rw-r--r--manual/advanced_topics/viewports/colour-vp-syntax.tex9
-rw-r--r--manual/advanced_topics/viewports/grayscale-conditional.tex16
-rw-r--r--manual/advanced_topics/viewports/grayscale-vp-syntax.tex9
-rw-r--r--manual/advanced_topics/viewports/mono-conditional.tex12
-rw-r--r--manual/advanced_topics/viewports/mono-vp-syntax.tex6
-rw-r--r--manual/appendix/wps_tags.tex118
8 files changed, 113 insertions, 119 deletions
diff --git a/manual/advanced_topics/main.tex b/manual/advanced_topics/main.tex
index 8580fc54b8..78cc32d90d 100644
--- a/manual/advanced_topics/main.tex
+++ b/manual/advanced_topics/main.tex
@@ -231,7 +231,7 @@ are discussed below.
231\subsubsection{\label{ref:Viewports}Viewports} 231\subsubsection{\label{ref:Viewports}Viewports}
232 232
233By default, a viewport filling the whole screen contains all the elements 233By default, a viewport filling the whole screen contains all the elements
234defined in the \fname{.wps} file. The 234defined in each theme file. The
235\opt{lcd_non-mono}{elements in this viewport are displayed 235\opt{lcd_non-mono}{elements in this viewport are displayed
236 with the same background/\linebreak{}foreground 236 with the same background/\linebreak{}foreground
237 \opt{lcd_color}{colours}\nopt{lcd_color}{shades} and the} 237 \opt{lcd_color}{colours}\nopt{lcd_color}{shades} and the}
@@ -241,8 +241,8 @@ be defined. A viewport is a rectangular window on the screen%
241\opt{lcd_non-mono}{ with its own foreground/background 241\opt{lcd_non-mono}{ with its own foreground/background
242\opt{lcd_color}{colours}\nopt{lcd_color}{shades}}. 242\opt{lcd_color}{colours}\nopt{lcd_color}{shades}}.
243This window also has variable dimensions. To 243This window also has variable dimensions. To
244define a viewport a line starting \config{{\%V{\textbar}\dots}} has to be 244define a viewport a line starting \config{{\%V(\dots}} has to be
245present in the \fname{.wps} file. The full syntax will be explained later in 245present in the theme file. The full syntax will be explained later in
246this section. All elements placed before the 246this section. All elements placed before the
247line defining a viewport are displayed in the default viewport. Elements 247line defining a viewport are displayed in the default viewport. Elements
248defined after a viewport declaration are drawn within that viewport. 248defined after a viewport declaration are drawn within that viewport.
@@ -263,15 +263,15 @@ area of the screen.
263\subsubsection{Conditional Viewports} 263\subsubsection{Conditional Viewports}
264 264
265Any viewport can be displayed either permanently or conditionally. 265Any viewport can be displayed either permanently or conditionally.
266Defining a viewport as \config{{\%V{\textbar}\dots}} 266Defining a viewport as \config{{\%V(\dots}}
267will display it permanently. 267will display it permanently.
268 268
269\begin{itemize} 269\begin{itemize}
270\item {\config{\%Vl{\textbar}'identifier'{\textbar}\dots{\textbar}}} 270\item {\config{\%Vl(`identifier',\dots)}}
271This tag preloads a viewport for later display. `identifier' is a single 271This tag preloads a viewport for later display. `identifier' is a single
272lowercase letter (a-z) and the `\dots' parameters use the same logic as 272lowercase letter (a-z) and the `\dots' parameters use the same logic as
273the \config{\%V} tag explained above. 273the \config{\%V} tag explained above.
274\item {\config{\%Vd'identifier'}} Display the `identifier' viewport. 274\item {\config{\%Vd(`identifier')}} Display the `identifier' viewport.
275\end{itemize} 275\end{itemize}
276 276
277Viewports can share identifiers so that you can display multiple viewports 277Viewports can share identifiers so that you can display multiple viewports
@@ -292,7 +292,7 @@ As mentioned above, it is possible to set a UI viewport via the theme
292file, and to conditionally select different UI viewports. 292file, and to conditionally select different UI viewports.
293 293
294 \begin{itemize} 294 \begin{itemize}
295 \item {\config{\%Vi{\textbar}'label'{\textbar}\dots{\textbar}}} 295 \item {\config{\%Vi(`label',\dots)}}
296 This viewport is used as Custom UI Viewport in the case that the theme 296 This viewport is used as Custom UI Viewport in the case that the theme
297 doesn't have a ui viewport set in the theme \fname{.cfg} file. Having this 297 doesn't have a ui viewport set in the theme \fname{.cfg} file. Having this
298 is strongly recommended since it makes you able to use the SBS 298 is strongly recommended since it makes you able to use the SBS
@@ -300,7 +300,7 @@ file, and to conditionally select different UI viewports.
300 Info Viewport using the \%VI tag. The `\dots' parameters use the same logic as 300 Info Viewport using the \%VI tag. The `\dots' parameters use the same logic as
301 the \config{\%V} tag explained above. 301 the \config{\%V} tag explained above.
302 302
303 \item {\config{\%VI'label'}} Set the Info Viewport to use the viewport called 303 \item {\config{\%VI(`label')}} Set the Info Viewport to use the viewport called
304 label, as declared with the previous tag. 304 label, as declared with the previous tag.
305 \end{itemize} 305 \end{itemize}
306 306
@@ -309,7 +309,7 @@ Additional fonts can be loaded within each screen file to be used in that
309screen. In this way not only can you have different fonts between e.g. the menu 309screen. In this way not only can you have different fonts between e.g. the menu
310and the WPS, but you can use multiple fonts in each of the individual screens.\\ 310and the WPS, but you can use multiple fonts in each of the individual screens.\\
311 311
312\config{\%F{\textbar}id{\textbar}filename{\textbar}} 312\config{\%Fl(`id',filename)}
313 313
314 \begin{itemize} 314 \begin{itemize}
315 \item `id' is the number you want to use in viewport declerations, 0 and 1 315 \item `id' is the number you want to use in viewport declerations, 0 and 1
@@ -318,7 +318,7 @@ and the WPS, but you can use multiple fonts in each of the individual screens.\\
318 \fname{/.rockbox/fonts/} 318 \fname{/.rockbox/fonts/}
319 \end{itemize} 319 \end{itemize}
320 320
321 An example would be: \config{\%F{\textbar}2{\textbar}12-Nimbus.fnt{\textbar}} 321 An example would be: \config{\%Fl(2,12-Nimbus.fnt)}
322 322
323} 323}
324 324
@@ -383,8 +383,8 @@ Subline related special characters and tags:
383\begin{description} 383\begin{description}
384\item[;] Split items on a line into separate sublines 384\item[;] Split items on a line into separate sublines
385\item[\%t] Set the subline display time. The 385\item[\%t] Set the subline display time. The
386`\config{\%t}' is followed by either integer 386`\config{\%t}' is followed by either integer seconds (\config{\%t5}), or seconds
387seconds (\config{\%t5}), or seconds and tenths of a second (\config{\%t3.5}). 387and tenths of a second within () e.g. (\config{\%t(3.5)}).
388\end{description} 388\end{description}
389 389
390Each alternating subline can still be optionally scrolled while it is 390Each alternating subline can still be optionally scrolled while it is
@@ -393,7 +393,7 @@ line with non{}-scrollable formats (such as track elapsed time) as long
393as they are separated into different sublines. 393as they are separated into different sublines.
394Example subline definition: 394Example subline definition:
395\begin{example} 395\begin{example}
396 %s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds, 396 %s%t(4)%ia;%s%it;%t(3)%pc %pr : Display id3 artist for 4 seconds,
397 Display id3 title for 2 seconds, 397 Display id3 title for 2 seconds,
398 Display current and remaining track time 398 Display current and remaining track time
399 for 3 seconds, 399 for 3 seconds,
@@ -404,7 +404,7 @@ Conditionals can be used with sublines to display a different set and/or number
404of sublines on the line depending on the evaluation of the conditional. 404of sublines on the line depending on the evaluation of the conditional.
405Example subline with conditionals: 405Example subline with conditionals:
406\begin{example} 406\begin{example}
407 %?it{\textless}%t8%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t3%s%ia{\textbar}%t0{\textgreater}\\ 407 %?it{\textless}%t(8)%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t(3)%s%ia{\textbar}%t(0){\textgreater}\\
408\end{example} 408\end{example}
409 409
410The format above will do two different things depending if ID3 tags are 410The format above will do two different things depending if ID3 tags are
@@ -438,19 +438,19 @@ displaying images:
438 % command. 438 % command.
439 Example on background image use: 439 Example on background image use:
440 \begin{example} 440 \begin{example}
441 %X|background.bmp| 441 %X(background.bmp)
442 \end{example} 442 \end{example}
443 The image with filename \fname{background.bmp} is loaded and used in the WPS. 443 The image with filename \fname{background.bmp} is loaded and used in the WPS.
444}% 444}%
445 445
446Example on bitmap preloading and use: 446Example on bitmap preloading and use:
447\begin{example} 447\begin{example}
448 %x|a|static_icon.bmp|50|50| 448 %x(a,static_icon.bmp,50,50)
449 %xl|b|rep\_off.bmp|16|64| 449 %xl(b,rep\_off.bmp,16,64)
450 %xl|c|rep\_all.bmp|16|64| 450 %xl(c,rep\_all.bmp,16,64)
451 %xl|d|rep\_one.bmp|16|64| 451 %xl(d,rep\_one.bmp,16,64)
452 %xl|e|rep\_shuffle.bmp|16|64| 452 %xl(e,rep\_shuffle.bmp,16,64)
453 %?mm<%xdb|%xdc|%xdd|%xde> 453 %?mm<%xd(b)|%xd(c)|%xd(d)|%xd(e)>
454\end{example} 454\end{example}
455Four images at the same x and y position are preloaded in the example. Which 455Four images at the same x and y position are preloaded in the example. Which
456image to display is determined by the \config{\%mm} tag (the repeat mode). 456image to display is determined by the \config{\%mm} tag (the repeat mode).
@@ -467,8 +467,8 @@ title [artist]''.
467%\opt{lcd_bitmap}{ 467%\opt{lcd_bitmap}{
468% \begin{verbatim} 468% \begin{verbatim}
469% %s%?it<%?in<%in. |>%it|%fn> 469% %s%?it<%?in<%in. |>%it|%fn>
470% %s%?ia<%ia|%?d2<%d2|(root)>> 470% %s%?ia<%ia|%?d2<%d(2)|(root)>>
471% %s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|> 471% %s%?id<%id|%?d1<%d(1)|(root)>> %?iy<(%iy)|>
472% 472%
473% %al%pc/%pt%ar[%pp:%pe] 473% %al%pc/%pt%ar[%pp:%pe]
474% %fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)> 474% %fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>
diff --git a/manual/advanced_topics/viewports/colour-conditional.tex b/manual/advanced_topics/viewports/colour-conditional.tex
index f8fc1fa50a..d864194205 100644
--- a/manual/advanced_topics/viewports/colour-conditional.tex
+++ b/manual/advanced_topics/viewports/colour-conditional.tex
@@ -1,13 +1,13 @@
1\begin{example} 1\begin{example}
2 %?C<%Vda|%Vdb> 2 %?C<%Vd(a)|%Vd(b)>
3 %Vl|a|10|10|50|50|-|-|-| 3 %Vl(a,10,10,50,50,-)
4 %Cl|0|0|50|50| 4 %Cl(0,0,50,50,c,c)
5 %C 5 %Cd
6 %Vl|a|0|70|70|14|1|-|-| 6 %Vl(a,0,70,70,14,1)
7 %s%acThere you have it: Album art. 7 %s%acThere you have it: Album art.
8 %Vl|b|20|14|50|14|1|ff0000|ffffff| 8 %Vl(b,20,14,50,14,1) %Vf(ff0000) %Vb(ffffff)
9 %t1%acWarning:;%t.1 9 %t(1)%acWarning:;%t(.1)
10 %Vl|b|20|30|50|50|1|000000|ffffff| 10 %Vl(b,20,30,50,50,1) %Vf(000000) %Vb(ffffff)
11 %sNo album art found 11 %sNo album art found
12 %scheck your filenames. 12 %scheck your filenames.
13\end{example} 13\end{example}
diff --git a/manual/advanced_topics/viewports/colour-vp-syntax.tex b/manual/advanced_topics/viewports/colour-vp-syntax.tex
index 10b879241b..e6d0c82cf8 100644
--- a/manual/advanced_topics/viewports/colour-vp-syntax.tex
+++ b/manual/advanced_topics/viewports/colour-vp-syntax.tex
@@ -1,6 +1,6 @@
1\subsubsection{Viewport Declaration Syntax} 1\subsubsection{Viewport Declaration Syntax}
2 2
3\config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}[fgcolour]{\textbar}[bgcolour]{\textbar}}% 3\config{\%V(x,y,[width],[height],[font]) \%Vf([fgcolour]) \%Vb([bgcolour])}%
4 4
5 \begin{itemize} 5 \begin{itemize}
6 \item `fgcolour' and `bgcolour' are 6-digit RGB888 colours, e.g. FF00FF. 6 \item `fgcolour' and `bgcolour' are 6-digit RGB888 colours, e.g. FF00FF.
@@ -11,15 +11,16 @@
11 definitions blank will set them to their default values. 11 definitions blank will set them to their default values.
12 \end{itemize} 12 \end{itemize}
13 13
14\note{The correct number of `{\textbar}'s (vertical bars) with hyphens in 14\note{The correct number of commas with hyphens in
15 blank fields are still needed in any case.} 15 blank fields are still needed in any case.}
16 16
17\begin{example} 17\begin{example}
18 %V|12|20|-|-|1|-|-| 18 %V(12,20,-,-,1) %Vf(000000) %Vb(FFFFFF)
19 %sThis viewport is displayed permanently. It starts 12px from the left and 19 %sThis viewport is displayed permanently. It starts 12px from the left and
20 %s20px from the top of the screen, and fills the rest of the screen from 20 %s20px from the top of the screen, and fills the rest of the screen from
21 %sthat point. The lines will scroll if this text does not fit in the viewport. 21 %sthat point. The lines will scroll if this text does not fit in the viewport.
22 %sThe user font is used, as are the default foreground/background colours. 22 %sThe user font is used, and the foreground and background are set to black
23 %sand white respectively.
23\end{example} 24\end{example}
24\begin{rbtabular}{.75\textwidth}{XX}{\textbf{Viewport definition} & \textbf{Default value}}{}{} 25\begin{rbtabular}{.75\textwidth}{XX}{\textbf{Viewport definition} & \textbf{Default value}}{}{}
25 width/height & remaining part of screen \\ 26 width/height & remaining part of screen \\
diff --git a/manual/advanced_topics/viewports/grayscale-conditional.tex b/manual/advanced_topics/viewports/grayscale-conditional.tex
index acca85a9e7..698f815172 100644
--- a/manual/advanced_topics/viewports/grayscale-conditional.tex
+++ b/manual/advanced_topics/viewports/grayscale-conditional.tex
@@ -1,13 +1,13 @@
1\begin{example} 1\begin{example}
2 %?C<%Vda|%Vdb> 2 %?C<%Vd(a)|%Vd(b)>
3 %Vl|a|10|10|50|50|-|-|-| 3 %Vl(a,10,10,50,50,-)
4 %Cl|0|0|50|50| 4 %Cl(0,0,50,50,c,c)
5 %C 5 %Cd
6 %Vl|a|0|70|70|14|1|-|-| 6 %Vl(a,0,70,70,14,1)
7 %s%acThere you have it: Album art. 7 %s%acThere you have it: Album art.
8 %Vl|b|20|14|50|14|1|2|-| 8 %Vl(b,20,14,50,14,1)
9 %t1%acWarning:;%t.1 9 %t(1)%acWarning:;%t(.1)
10 %Vl|b|20|30|50|50|1|-|-| 10 %Vl(b,20,30,50,50,1)
11 %sNo album art found 11 %sNo album art found
12 %scheck your filenames. 12 %scheck your filenames.
13\end{example} 13\end{example}
diff --git a/manual/advanced_topics/viewports/grayscale-vp-syntax.tex b/manual/advanced_topics/viewports/grayscale-vp-syntax.tex
index a8460703a9..1c0c8bf532 100644
--- a/manual/advanced_topics/viewports/grayscale-vp-syntax.tex
+++ b/manual/advanced_topics/viewports/grayscale-vp-syntax.tex
@@ -1,6 +1,6 @@
1\subsubsection{Viewport Declaration Syntax} 1\subsubsection{Viewport Declaration Syntax}
2 2
3\config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}[fgshade]{\textbar}[bgshade]{\textbar}}% 3\config{\%V(x,y,[width],[height],[font]) \%Vf([fgshade]) \%Vb([bgshade])}%
4 4
5 \begin{itemize} 5 \begin{itemize}
6 \item `fgshade' and `bgshade' are numbers in the range 0 (= black) to 3 6 \item `fgshade' and `bgshade' are numbers in the range 0 (= black) to 3
@@ -12,15 +12,16 @@
12 definitions blank will set them to their default values. 12 definitions blank will set them to their default values.
13 \end{itemize} 13 \end{itemize}
14 14
15\note{The correct number of `{\textbar}'s (vertical bars) with hyphens in 15\note{The correct number of commas with hyphens in
16 blank fields are still needed in any case.} 16 blank fields are still needed in any case.}
17 17
18\begin{example} 18\begin{example}
19 %V|12|20|-|-|1|-|-| 19 %V(12,20,-,-,1) %Vf(0) %Vb(3)
20 %sThis viewport is displayed permanently. It starts 12px from the left and 20 %sThis viewport is displayed permanently. It starts 12px from the left and
21 %s20px from the top of the screen, and fills the rest of the screen from 21 %s20px from the top of the screen, and fills the rest of the screen from
22 %sthat point. The lines will scroll if this text does not fit in the viewport. 22 %sthat point. The lines will scroll if this text does not fit in the viewport.
23 %sThe user font is used, as are the default foreground/background shades. 23 %sThe user font is used, the foreground colour is set to black and the
24 %sbackground is set to white.
24\end{example} 25\end{example}
25\begin{rbtabular}{.75\textwidth}{XX}{\textbf{Viewport definition} & \textbf{Default value}}{}{} 26\begin{rbtabular}{.75\textwidth}{XX}{\textbf{Viewport definition} & \textbf{Default value}}{}{}
26 width/height & remaining part of screen \\ 27 width/height & remaining part of screen \\
diff --git a/manual/advanced_topics/viewports/mono-conditional.tex b/manual/advanced_topics/viewports/mono-conditional.tex
index 399832cc79..af6e6f6d2d 100644
--- a/manual/advanced_topics/viewports/mono-conditional.tex
+++ b/manual/advanced_topics/viewports/mono-conditional.tex
@@ -1,12 +1,12 @@
1\begin{example} 1\begin{example}
2 %?mh<%Vda|%Vdb> 2 %?mh<%Vd(a)|%Vd(b)>
3 %Vl|a|10|10|50|50|-| 3 %Vl(a,10,10,50,50,-)
4 %sYou could now show a hold icon using the %%xl and %%xd tags. 4 %sYou could now show a hold icon using the %%xl and %%xd tags.
5 %Vl|a|0|70|70|14|1| 5 %Vl(a,0,70,70,14,1)
6 %s%acYour DAP is locked. 6 %s%acYour DAP is locked.
7 %Vl|b|20|14|50|14|1| 7 %Vl(b,20,14,50,14,1)
8 %t1%acWarning:;%t.1 8 %t(1)%acWarning:;%t(.1)
9 %Vl|b|20|30|50|50|0| 9 %Vl(b,20,30,50,50,0)
10 %sYou've unlocked your player. 10 %sYou've unlocked your player.
11\end{example} 11\end{example}
12This example checks for hold. Viewport `a' will be displayed if it is on, 12This example checks for hold. Viewport `a' will be displayed if it is on,
diff --git a/manual/advanced_topics/viewports/mono-vp-syntax.tex b/manual/advanced_topics/viewports/mono-vp-syntax.tex
index 8c84607499..81194a99d0 100644
--- a/manual/advanced_topics/viewports/mono-vp-syntax.tex
+++ b/manual/advanced_topics/viewports/mono-vp-syntax.tex
@@ -1,6 +1,6 @@
1\subsubsection{Viewport Declaration Syntax} 1\subsubsection{Viewport Declaration Syntax}
2 2
3\config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}}% 3\config{\%V(x,y,[width],[height],[font]}%
4 4
5 \begin{itemize} 5 \begin{itemize}
6 \item `font' is a number: 0 is the built-in system font, 1 is the 6 \item `font' is a number: 0 is the built-in system font, 1 is the
@@ -10,11 +10,11 @@
10 definitions blank will set them to their default values. 10 definitions blank will set them to their default values.
11 \end{itemize} 11 \end{itemize}
12 12
13\note{The correct number of `{\textbar}'s (vertical bars) with hyphens in 13\note{The correct number of commas with hyphens in
14 blank fields are still needed in any case.} 14 blank fields are still needed in any case.}
15 15
16\begin{example} 16\begin{example}
17 %V|12|20|-|-|1| 17 %V(12,20,-,-,1)
18 %sThis viewport is displayed permanently. It starts 12px from the left and 18 %sThis viewport is displayed permanently. It starts 12px from the left and
19 %s20px from the top of the screen, and fills the rest of the screen from 19 %s20px from the top of the screen, and fills the rest of the screen from
20 %sthat point. The lines will scroll if this text does not fit in the viewport. 20 %sthat point. The lines will scroll if this text does not fit in the viewport.
diff --git a/manual/appendix/wps_tags.tex b/manual/appendix/wps_tags.tex
index 0707d14b5c..22735f19f0 100644
--- a/manual/appendix/wps_tags.tex
+++ b/manual/appendix/wps_tags.tex
@@ -37,36 +37,33 @@ show the information for the next song to be played.
37 \section{Viewports} 37 \section{Viewports}
38 \begin{tagmap} 38 \begin{tagmap}
39 \nopt{lcd_non-mono}{% 39 \nopt{lcd_non-mono}{%
40 \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}% 40 \config{\%V(x,y,[width],[height],[font])}
41 [height]{\textbar}[font]{\textbar}}
42 & See section \ref{ref:Viewports}\\} 41 & See section \ref{ref:Viewports}\\}
43 42
44 \nopt{lcd_color}{\opt{lcd_non-mono}{% 43 \nopt{lcd_color}{\opt{lcd_non-mono}{%
45 \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}% 44 \config{\%V(x,y,[width],[height],[font]) \%Vf([fgshade]) \%Vb([bgshade])}
46 [height]{\textbar}[font]{\textbar}[fgshade]{\textbar}[bgshade]{\textbar}}
47 & See section \ref{ref:Viewports}\\}} 45 & See section \ref{ref:Viewports}\\}}
48 46
49 \opt{lcd_color}{% 47 \opt{lcd_color}{%
50 \config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}% 48 \config{\%V(x,y,[width],[height],[font])}
51 [height]{\textbar}[font]{\textbar}[fgcolour]{\textbar}[bgcolour]{\textbar}} 49 \config{\%Vf([fgcolour]) \%Vb([bgcolour])}
52 & See section \ref{ref:Viewports}\\} 50 & See section \ref{ref:Viewports}\\}
53 51
54 \config{\%Vd'identifier'} & Display the `identifier' viewport. E.g. 52 \config{\%Vd('identifier')} & Display the `identifier' viewport. E.g.
55 \config{\%?C{\textless}\%Vda{\textbar}\%Vdb{\textgreater}} 53 \config{\%?C{\textless}\%Vd(a){\textbar}\%Vd(b){\textgreater}}
56 will show viewport `a' if album art is found, and `b' if it isn't.\\ 54 will show viewport `a' if album art is found, and `b' if it isn't.\\
57 55
58 \config{\%Vi{\textbar}'label'{\textbar}\dots{\textbar}} & 56 \config{\%Vi(`label',\dots)} &
59 Declare a Custom UI Viewport. The `\dots' parameters use the same logic as 57 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}.\\ 58 the \config{\%V} tag explained above. See section \ref{ref:Viewports}.\\
61 59
62 \config{\%VI'label'} & Set the Info Viewport to use the viewport called 60 \config{\%VI(`label')} & Set the Info Viewport to use the viewport called
63 label, as declared with the previous tag.\\ 61 label, as declared with the previous tag.\\
64 \end{tagmap} 62 \end{tagmap}
65 63
66 \section{Additional Fonts} 64 \section{Additional Fonts}
67 \begin{tagmap} 65 \begin{tagmap}
68 \config{\%F{\textbar}id{\textbar}filename{\textbar}} & 66 \config{\%Fl(`id',filename)} & See section \ref{ref:multifont}.\\
69 See section \ref{ref:multifont}.\\
70 \end{tagmap} 67 \end{tagmap}
71 68
72} 69}
@@ -79,6 +76,9 @@ show the information for the next song to be played.
79 2{\textbar}\ldots{\textbar}N{\textgreater}}, 76 2{\textbar}\ldots{\textbar}N{\textgreater}},
80 where the value $-1$ is used when the battery level isn't 77 where the value $-1$ is used when the battery level isn't
81 known (it usually is)\\ 78 known (it usually is)\\
79 & An image can also be used, the proportion of the image
80 shown correspinds to the battery level:
81 \config{\%bl(x,y,[width],[height],image.bmp)}\\
82 \config{\%bv} & The battery level in volts\\ 82 \config{\%bv} & The battery level in volts\\
83 \config{\%bt} & Estimated battery time left\\ 83 \config{\%bt} & Estimated battery time left\\
84 \config{\%bp} & ``p'' if the charger is connected (only on targets 84 \config{\%bp} & ``p'' if the charger is connected (only on targets
@@ -110,16 +110,16 @@ show the information for the next song to be played.
110 \config{\%fp} & File Path\\ 110 \config{\%fp} & File Path\\
111 \config{\%fs} & File Size (in Kilobytes)\\ 111 \config{\%fs} & File Size (in Kilobytes)\\
112 \config{\%fv} & ``(avg)'' if variable bit rate or empty string if constant bit rate\\ 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\\ 113 \config{\%d(1)} & First directory from the end of the file path\\
114 \config{\%d2} & Second directory from the end of the file path\\ 114 \config{\%d(2)} & Second directory from the end of the file path\\
115 \config{\%d3} & Third directory from the end of the file path\\ 115 \config{\%d(3)} & Third directory from the end of the file path\\
116 \end{tagmap} 116 \end{tagmap}
117Example for the \config{\%dN} commands: If the path is 117Example for the \config{\%d(N)} commands: If the path is
118``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d1} is ``Isola'', 118``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d(1)} is ``Isola'',
119\config{\%d2} is ``Kent'' and \config{\%d3} is ``Rock''. 119\config{\%d(2)} is ``Kent'' and \config{\%d(3)} is ``Rock''.
120 120
121These tags, when written with the first letter capitalized (e.g. \config{\%Fn} or \config{\%D2}), 121These tags, when written with the first letter capitalized (e.g. \config{\%Fn}
122produce the information for the next file to be played. 122or \config{\%D(2)}), produce the information for the next file to be played.
123 123
124\section{Playlist/Song Info} 124\section{Playlist/Song Info}
125 \begin{tagmap} 125 \begin{tagmap}
@@ -131,7 +131,7 @@ produce the information for the next file to be played.
131 & This will replace the entire line with a progress bar. \\ 131 & This will replace the entire line with a progress bar. \\
132 & You can set the position, width and height of the progressbar % 132 & You can set the position, width and height of the progressbar %
133 (in pixels) and load a custom image for it: % 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}}} \\ 134 \config{\%pb(x,y,[width],[height],image.bmp)}} \\
135 \opt{player}{% 135 \opt{player}{%
136 \config{\%pf} & Full-line progress bar \& time display\\ 136 \config{\%pf} & Full-line progress bar \& time display\\
137 }% 137 }%
@@ -152,16 +152,16 @@ produce the information for the next file to be played.
152 {\textbar}N{\textgreater}}\\ 152 {\textbar}N{\textgreater}}\\
153 & 0 is used for mute, the last option is used for values greater than zero.\\ 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: 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}}} \\ 155 \config{\%pv(x,y,[width],[height],image.bmp)}} \\
156 \config{\%pS} & Track is starting. An optional number gives how many seconds 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 157 the tag remains true for after the start of the track. The default is
158 10 seconds if no number is specified.\\ 158 10 seconds if no number is specified.\\
159 & \config{\%pS7{\textless}in the first 7 seconds of track{\textbar}in 159 & \config{\%pS(7){\textless}in the first 7 seconds of track{\textbar}in
160 the rest of the track{\textgreater}}\\ 160 the rest of the track{\textgreater}}\\
161 \config{\%pE} & Track is ending. An optional number gives how many seconds 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 162 before the end of the track the tag becomes true. The default is
163 10 seconds if no number is specified.\\ 163 10 seconds if no number is specified.\\
164 & \config{\%pE7{\textless}in the last 7 seconds of track{\textbar}in 164 & \config{\%pE(7){\textless}in the last 7 seconds of track{\textbar}in
165 the rest of the track{\textgreater}}\\ 165 the rest of the track{\textgreater}}\\
166 \config{\%Sp} & Current Playback Pitch\\ 166 \config{\%Sp} & Current Playback Pitch\\
167 \end{tagmap} 167 \end{tagmap}
@@ -259,7 +259,7 @@ Recording screen{\textbar}FM Radio screen{\textgreater}}
259 259
260\section{Changing Volume} 260\section{Changing Volume}
261 \begin{tagmap} 261 \begin{tagmap}
262 \config{\%mv[t]} & ``v'' if the volume is being changed\\ 262 \config{\%mv(t)} & ``v'' if the volume is being changed\\
263 \end{tagmap} 263 \end{tagmap}
264 264
265The tag produces the letter ``v'' while the volume is being changed and some 265The tag produces the letter ``v'' while the volume is being changed and some
@@ -271,7 +271,7 @@ The tag can be used as the switch in a conditional tag to display different thin
271depending on whether the volume is being changed. It can produce neat effects 271depending on whether the volume is being changed. It can produce neat effects
272when used with conditional viewports. 272when used with conditional viewports.
273 273
274Example: \config{\%?mv2.5{\textless}Volume changing{\textbar}\%pv{\textgreater}} 274Example: \config{\%?mv(2.5){\textless}Volume changing{\textbar}\%pv{\textgreater}}
275 275
276The example above will display the text ``Volume changing'' if the volume is 276The example above will display the text ``Volume changing'' if the volume is
277being changed and 2.5 seconds after the volume button has been released. After 277being changed and 2.5 seconds after the volume button has been released. After
@@ -279,15 +279,15 @@ that, it will display the volume value.
279 279
280\section{Settings} 280\section{Settings}
281 \begin{tagmap} 281 \begin{tagmap}
282 \config{\%St{\textbar}<setting name>{\textbar}} & The value of the Rockbox 282 \config{\%St(<setting name>)} & The value of the Rockbox
283 setting with the specified name. See \reference{ref:config_file_options} 283 setting with the specified name. See \reference{ref:config_file_options}
284 for the list of the available settings.\\ 284 for the list of the available settings.\\
285 \end{tagmap} 285 \end{tagmap}
286 286
287Examples: 287Examples:
288\begin{enumerate} 288\begin{enumerate}
289\item As a simple tag: \config{\%St{\textbar}skip length{\textbar}} 289\item As a simple tag: \config{\%St(skip length)}
290\item As a conditional: \config{\%?St{\textbar}eq enabled{\textbar}{\textless}Eq is enabled{\textbar}Eq is disabled{\textgreater}} 290\item As a conditional: \config{\%?St(eq enabled){\textless}Eq is enabled{\textbar}Eq is disabled{\textgreater}}
291\end{enumerate} 291\end{enumerate}
292 292
293 293
@@ -295,17 +295,17 @@ Examples:
295\section{\label{ref:wps_images}Images} 295\section{\label{ref:wps_images}Images}
296 \begin{tagmap} 296 \begin{tagmap}
297 \nopt{archos}{% 297 \nopt{archos}{%
298 \config{\%X{\textbar}filename.bmp{\textbar}} 298 \config{\%X(filename.bmp)}
299 & Load and set a backdrop image for the WPS. 299 & Load and set a backdrop image for the WPS.
300 This image must be exactly the same size as your LCD.\\ 300 This image must be exactly the same size as your LCD.\\
301 }% 301 }%
302 \config{\%x{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}} 302 \config{\%x(n,filename,x,y)}
303 & Load and display an image\\ 303 & Load and display an image\\
304 & \config{n}: image ID (a-z and A-Z) for later referencing in \config{\%xd}\\ 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''\\ 305 & \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\\
306 & \config{x}: x coordinate\\ 306 & \config{x}: x coordinate\\
307 & \config{y}: y coordinate.\\ 307 & \config{y}: y coordinate.\\
308 \config{\%xl{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}[nimages{\textbar}]} 308 \config{\%xl(n,filename,x,y,[nimages])}
309 & Preload an image for later display (useful for when your images are displayed conditionally)\\ 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}\\ 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''\\ 311 & \config{filename}: file name relative to \fname{/.rockbox/} and including ``.bmp''\\
@@ -313,7 +313,7 @@ Examples:
313 & \config{y}: y coordinate\\ 313 & \config{y}: y coordinate\\
314 & \config{nimages}: (optional) number of sub-images (tiled vertically, of the same height) 314 & \config{nimages}: (optional) number of sub-images (tiled vertically, of the same height)
315 contained in the bitmap. Default is 1.\\ 315 contained in the bitmap. Default is 1.\\
316 \config{\%xdn[i]} & Display a preloaded image\\ 316 \config{\%xd(n[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}\\ 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). 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.\\ 319 By default the first (i.e. top most) sub-image will be used.\\
@@ -322,12 +322,12 @@ Examples:
322Examples: 322Examples:
323\begin{enumerate} 323\begin{enumerate}
324\item Load and display the image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109:\\ 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}} 325\config{\%x(a,bg.bmp,37,109)}
326\item Load a bitmap strip containing 5 volume icon images (all the same size) 326\item Load a bitmap strip containing 5 volume icon images (all the same size)
327with image ID ``M'', and then reference the individual sub-images in a conditional:\\ 327with 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}}\\ 328\config{\%xl(M,volume.bmp,134,153,5)}\\
329\config{\%?pv<\%xdMa{\textbar}\%xdMb{\textbar}\%xdMc{\textbar}\%xdMd{\textbar}% 329\config{\%?pv<\%xd(Ma){\textbar}\%xd(Mb){\textbar}\%xd(Mc){\textbar}%
330\%xdMe>} 330\%xd(Md){\textbar}\%xd(Me)>}
331\end{enumerate} 331\end{enumerate}
332 332
333 333
@@ -390,43 +390,32 @@ Once the album art files are present on your \dap, they can be displayed as
390follows. 390follows.
391 391
392 \begin{tagmap} 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}} 393 \config{\%Cl(x,y,[maxwidth],[maxheight],hor\_align,vert\_align)}
394 & Define the settings for albumart\\ 394 & Define the settings for albumart\\
395 & \config{x}: x coordinate\\ 395 & \config{x}: x coordinate\\
396 & \config{y}: y coordinate\\ 396 & \config{y}: y coordinate\\
397 & \config{maxwidth}: Maximum height\\ 397 & \config{maxwidth}: Maximum height\\
398 & \config{maxheight}: Maximum width\\ 398 & \config{maxheight}: Maximum width\\
399 & \config{hor\_align}: Horizontal alignment, enter as `l', `c' or `r' for
400 left, centre or right. Centre is default\\
401 & \config{vert\_align}: Vertical alignment, enter as `t', `c' or `b' for
402 top, centre or bottom. Centre is default\\
399 \config{\%Cd} & Display the album art as configured. \\ 403 \config{\%Cd} & Display the album art as configured. \\
400 \config{\%C} & USe in a conditional to determine if an image is available. \\ 404 \config{\%C} & Use in a conditional to determine if an image is available. \\
401 \end{tagmap} 405 \end{tagmap}
402 406
403The picture will be rescaled, preserving aspect ratio to fit the given 407The 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 408\config{maxwidth} and \config{maxheight}. If the aspect ratio doesn't match the
405configured values, the picture will be placed according to the flags to the 409configured values, the picture will be placed according to the alignment flags.
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}
421 410
422Examples: 411Examples:
423\begin{enumerate} 412\begin{enumerate}
424 \item Load albumart at position 20,40 and display it without resizing:\\ 413 \item Load albumart at position 20,40 and display it without resizing:\\
425 \config{\%Cl{\textbar}20{\textbar}40{\textbar}{\textbar}{\textbar}} 414 \config{\%Cl(20,40,,)}
426 \item Load albumart at position 0,20 and resize it to be at most 100$\times$100 415 \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 416 pixels. If the image isn't square, align it to the bottom-right
428 corner:\\ 417 corner:\\
429 \config{\%CL{\textbar}0{\textbar}20{\textbar}r100{\textbar}b100{\textbar}} 418 \config{\%Cl(0,20,100,100,r,b)}
430\end{enumerate} 419\end{enumerate}
431} 420}
432 421
@@ -484,8 +473,8 @@ order left -- centre -- right. If the aligned texts overlap, they are merged.
484\section{Subline Tags} 473\section{Subline Tags}
485 474
486\begin{tagmap} 475\begin{tagmap}
487\config{\%t{\textless}time{\textgreater}} 476\config{\%t{\textless}(time){\textgreater}}
488 & Set the subline display cycle time (\%t5 or \%t3.4 formats) \\ 477 & Set the subline display cycle time (\%t(5) or \%t(3.4) formats) \\
489\config{;} 478\config{;}
490 & Split items on a line into separate sublines \\ 479 & Split items on a line into separate sublines \\
491\end{tagmap} 480\end{tagmap}
@@ -534,7 +523,7 @@ Example:
534 523
535\section{Text Translation} 524\section{Text Translation}
536 \begin{tagmap} 525 \begin{tagmap}
537 \config{\%Sx{\textbar}{\textless}English{\textgreater}{\textbar}} 526 \config{\%Sx(English)}
538 & Display the translation of ``English'' in the current language\\ 527 & Display the translation of ``English'' in the current language\\
539 \end{tagmap} 528 \end{tagmap}
540 529
@@ -550,8 +539,7 @@ Example:
550\opt{touchscreen}{ 539\opt{touchscreen}{
551 \section{Touchscreen Areas (WPS only)} 540 \section{Touchscreen Areas (WPS only)}
552 \begin{tagmap} 541 \begin{tagmap}
553 \config{\%T{\textbar}x{\textbar}y{\textbar}width{\textbar}height% 542 \config{\%T(x,y,[width],[height],action)}
554 {\textbar}action{\textbar}}
555 & Invoke the action specified when the user presses in the defined 543 & Invoke the action specified when the user presses in the defined
556 touchscreen area.\\ 544 touchscreen area.\\
557 \end{tagmap} 545 \end{tagmap}
@@ -585,7 +573,7 @@ Example:
585 This tag can be used to display text or images or a viewport when the 573 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 574 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 575 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 576 (e.g \%Tl(2.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 577 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 578 use a 1 second timeout. It can also be used as a conditional, and can be
591 used with conditional viewports. 579 used with conditional viewports.
@@ -593,11 +581,15 @@ Example:
593 581
594\section{Other Tags} 582\section{Other Tags}
595\begin{tagmap} 583\begin{tagmap}
584 \config{\%(} & The character `('\\
585 \config{\%)} & The character `)'\\
586 \config{\%,} & The character `,'\\
596 \config{\%\%} & The character `\%'\\ 587 \config{\%\%} & The character `\%'\\
597 \config{\%{\textless}} & The character `{\textless}'\\ 588 \config{\%{\textless}} & The character `{\textless}'\\
598 \config{\%{\textbar}} & The character `{\textbar}'\\ 589 \config{\%{\textbar}} & The character `{\textbar}'\\
599 \config{\%{\textgreater}} & The character `{\textgreater}'\\ 590 \config{\%{\textgreater}} & The character `{\textgreater}'\\
600 \config{\%;} & The character `;'\\ 591 \config{\%;} & The character `;'\\
592 \config{\#} & The character `\#'\\
601 \config{\%s} & Indicate that the line should scroll. Can occur 593 \config{\%s} & Indicate that the line should scroll. Can occur
602 anywhere in a line (given that the text is 594 anywhere in a line (given that the text is
603 displayed; see conditionals above). You can specify 595 displayed; see conditionals above). You can specify