Convert the manual to the new theme syntax. As a result, adds the viewport colour tags which closes FS#11372. Correct multifont tag from %F to %Fl

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26989 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Alex Parker 2010-06-20 12:58:41 +00:00
parent 318e99a61e
commit 64d4ddf216
8 changed files with 113 additions and 119 deletions

View file

@ -231,7 +231,7 @@ are discussed below.
\subsubsection{\label{ref:Viewports}Viewports}
By default, a viewport filling the whole screen contains all the elements
defined in the \fname{.wps} file. The
defined in each theme file. The
\opt{lcd_non-mono}{elements in this viewport are displayed
with the same background/\linebreak{}foreground
\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%
\opt{lcd_non-mono}{ with its own foreground/background
\opt{lcd_color}{colours}\nopt{lcd_color}{shades}}.
This window also has variable dimensions. To
define a viewport a line starting \config{{\%V{\textbar}\dots}} has to be
present in the \fname{.wps} file. The full syntax will be explained later in
define a viewport a line starting \config{{\%V(\dots}} has to be
present in the theme file. The full syntax will be explained later in
this section. All elements placed before the
line defining a viewport are displayed in the default viewport. Elements
defined after a viewport declaration are drawn within that viewport.
@ -263,15 +263,15 @@ area of the screen.
\subsubsection{Conditional Viewports}
Any viewport can be displayed either permanently or conditionally.
Defining a viewport as \config{{\%V{\textbar}\dots}}
Defining a viewport as \config{{\%V(\dots}}
will display it permanently.
\begin{itemize}
\item {\config{\%Vl{\textbar}'identifier'{\textbar}\dots{\textbar}}}
\item {\config{\%Vl(`identifier',\dots)}}
This tag preloads a viewport for later display. `identifier' is a single
lowercase letter (a-z) and the `\dots' parameters use the same logic as
the \config{\%V} tag explained above.
\item {\config{\%Vd'identifier'}} Display the `identifier' viewport.
\item {\config{\%Vd(`identifier')}} Display the `identifier' viewport.
\end{itemize}
Viewports 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
file, and to conditionally select different UI viewports.
\begin{itemize}
\item {\config{\%Vi{\textbar}'label'{\textbar}\dots{\textbar}}}
\item {\config{\%Vi(`label',\dots)}}
This viewport is used as Custom UI Viewport in the case that the theme
doesn't have a ui viewport set in the theme \fname{.cfg} file. Having this
is strongly recommended since it makes you able to use the SBS
@ -300,7 +300,7 @@ file, and to conditionally select different UI viewports.
Info Viewport using the \%VI tag. The `\dots' parameters use the same logic as
the \config{\%V} tag explained above.
\item {\config{\%VI'label'}} Set the Info Viewport to use the viewport called
\item {\config{\%VI(`label')}} Set the Info Viewport to use the viewport called
label, as declared with the previous tag.
\end{itemize}
@ -309,7 +309,7 @@ Additional fonts can be loaded within each screen file to be used in that
screen. In this way not only can you have different fonts between e.g. the menu
and the WPS, but you can use multiple fonts in each of the individual screens.\\
\config{\%F{\textbar}id{\textbar}filename{\textbar}}
\config{\%Fl(`id',filename)}
\begin{itemize}
\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.\\
\fname{/.rockbox/fonts/}
\end{itemize}
An example would be: \config{\%F{\textbar}2{\textbar}12-Nimbus.fnt{\textbar}}
An example would be: \config{\%Fl(2,12-Nimbus.fnt)}
}
@ -383,8 +383,8 @@ Subline related special characters and tags:
\begin{description}
\item[;] Split items on a line into separate sublines
\item[\%t] Set the subline display time. The
`\config{\%t}' is followed by either integer
seconds (\config{\%t5}), or seconds and tenths of a second (\config{\%t3.5}).
`\config{\%t}' is followed by either integer seconds (\config{\%t5}), or seconds
and tenths of a second within () e.g. (\config{\%t(3.5)}).
\end{description}
Each 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
as they are separated into different sublines.
Example subline definition:
\begin{example}
%s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds,
%s%t(4)%ia;%s%it;%t(3)%pc %pr : Display id3 artist for 4 seconds,
Display id3 title for 2 seconds,
Display current and remaining track time
for 3 seconds,
@ -404,7 +404,7 @@ Conditionals can be used with sublines to display a different set and/or number
of sublines on the line depending on the evaluation of the conditional.
Example subline with conditionals:
\begin{example}
%?it{\textless}%t8%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t3%s%ia{\textbar}%t0{\textgreater}\\
%?it{\textless}%t(8)%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t(3)%s%ia{\textbar}%t(0){\textgreater}\\
\end{example}
The format above will do two different things depending if ID3 tags are
@ -438,19 +438,19 @@ displaying images:
% command.
Example on background image use:
\begin{example}
%X|background.bmp|
%X(background.bmp)
\end{example}
The image with filename \fname{background.bmp} is loaded and used in the WPS.
}%
Example on bitmap preloading and use:
\begin{example}
%x|a|static_icon.bmp|50|50|
%xl|b|rep\_off.bmp|16|64|
%xl|c|rep\_all.bmp|16|64|
%xl|d|rep\_one.bmp|16|64|
%xl|e|rep\_shuffle.bmp|16|64|
%?mm<%xdb|%xdc|%xdd|%xde>
%x(a,static_icon.bmp,50,50)
%xl(b,rep\_off.bmp,16,64)
%xl(c,rep\_all.bmp,16,64)
%xl(d,rep\_one.bmp,16,64)
%xl(e,rep\_shuffle.bmp,16,64)
%?mm<%xd(b)|%xd(c)|%xd(d)|%xd(e)>
\end{example}
Four images at the same x and y position are preloaded in the example. Which
image to display is determined by the \config{\%mm} tag (the repeat mode).
@ -467,8 +467,8 @@ title [artist]''.
%\opt{lcd_bitmap}{
% \begin{verbatim}
% %s%?it<%?in<%in. |>%it|%fn>
% %s%?ia<%ia|%?d2<%d2|(root)>>
% %s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>
% %s%?ia<%ia|%?d2<%d(2)|(root)>>
% %s%?id<%id|%?d1<%d(1)|(root)>> %?iy<(%iy)|>
%
% %al%pc/%pt%ar[%pp:%pe]
% %fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>

View file

@ -1,13 +1,13 @@
\begin{example}
%?C<%Vda|%Vdb>
%Vl|a|10|10|50|50|-|-|-|
%Cl|0|0|50|50|
%C
%Vl|a|0|70|70|14|1|-|-|
%?C<%Vd(a)|%Vd(b)>
%Vl(a,10,10,50,50,-)
%Cl(0,0,50,50,c,c)
%Cd
%Vl(a,0,70,70,14,1)
%s%acThere you have it: Album art.
%Vl|b|20|14|50|14|1|ff0000|ffffff|
%t1%acWarning:;%t.1
%Vl|b|20|30|50|50|1|000000|ffffff|
%Vl(b,20,14,50,14,1) %Vf(ff0000) %Vb(ffffff)
%t(1)%acWarning:;%t(.1)
%Vl(b,20,30,50,50,1) %Vf(000000) %Vb(ffffff)
%sNo album art found
%scheck your filenames.
\end{example}

View file

@ -1,6 +1,6 @@
\subsubsection{Viewport Declaration Syntax}
\config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}[fgcolour]{\textbar}[bgcolour]{\textbar}}%
\config{\%V(x,y,[width],[height],[font]) \%Vf([fgcolour]) \%Vb([bgcolour])}%
\begin{itemize}
\item `fgcolour' and `bgcolour' are 6-digit RGB888 colours, e.g. FF00FF.
@ -11,15 +11,16 @@
definitions blank will set them to their default values.
\end{itemize}
\note{The correct number of `{\textbar}'s (vertical bars) with hyphens in
\note{The correct number of commas with hyphens in
blank fields are still needed in any case.}
\begin{example}
%V|12|20|-|-|1|-|-|
%V(12,20,-,-,1) %Vf(000000) %Vb(FFFFFF)
%sThis viewport is displayed permanently. It starts 12px from the left and
%s20px from the top of the screen, and fills the rest of the screen from
%sthat point. The lines will scroll if this text does not fit in the viewport.
%sThe user font is used, as are the default foreground/background colours.
%sThe user font is used, and the foreground and background are set to black
%sand white respectively.
\end{example}
\begin{rbtabular}{.75\textwidth}{XX}{\textbf{Viewport definition} & \textbf{Default value}}{}{}
width/height & remaining part of screen \\

View file

@ -1,13 +1,13 @@
\begin{example}
%?C<%Vda|%Vdb>
%Vl|a|10|10|50|50|-|-|-|
%Cl|0|0|50|50|
%C
%Vl|a|0|70|70|14|1|-|-|
%?C<%Vd(a)|%Vd(b)>
%Vl(a,10,10,50,50,-)
%Cl(0,0,50,50,c,c)
%Cd
%Vl(a,0,70,70,14,1)
%s%acThere you have it: Album art.
%Vl|b|20|14|50|14|1|2|-|
%t1%acWarning:;%t.1
%Vl|b|20|30|50|50|1|-|-|
%Vl(b,20,14,50,14,1)
%t(1)%acWarning:;%t(.1)
%Vl(b,20,30,50,50,1)
%sNo album art found
%scheck your filenames.
\end{example}

View file

@ -1,6 +1,6 @@
\subsubsection{Viewport Declaration Syntax}
\config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}[fgshade]{\textbar}[bgshade]{\textbar}}%
\config{\%V(x,y,[width],[height],[font]) \%Vf([fgshade]) \%Vb([bgshade])}%
\begin{itemize}
\item `fgshade' and `bgshade' are numbers in the range 0 (= black) to 3
@ -12,15 +12,16 @@
definitions blank will set them to their default values.
\end{itemize}
\note{The correct number of `{\textbar}'s (vertical bars) with hyphens in
\note{The correct number of commas with hyphens in
blank fields are still needed in any case.}
\begin{example}
%V|12|20|-|-|1|-|-|
%V(12,20,-,-,1) %Vf(0) %Vb(3)
%sThis viewport is displayed permanently. It starts 12px from the left and
%s20px from the top of the screen, and fills the rest of the screen from
%sthat point. The lines will scroll if this text does not fit in the viewport.
%sThe user font is used, as are the default foreground/background shades.
%sThe user font is used, the foreground colour is set to black and the
%sbackground is set to white.
\end{example}
\begin{rbtabular}{.75\textwidth}{XX}{\textbf{Viewport definition} & \textbf{Default value}}{}{}
width/height & remaining part of screen \\

View file

@ -1,12 +1,12 @@
\begin{example}
%?mh<%Vda|%Vdb>
%Vl|a|10|10|50|50|-|
%?mh<%Vd(a)|%Vd(b)>
%Vl(a,10,10,50,50,-)
%sYou could now show a hold icon using the %%xl and %%xd tags.
%Vl|a|0|70|70|14|1|
%Vl(a,0,70,70,14,1)
%s%acYour DAP is locked.
%Vl|b|20|14|50|14|1|
%t1%acWarning:;%t.1
%Vl|b|20|30|50|50|0|
%Vl(b,20,14,50,14,1)
%t(1)%acWarning:;%t(.1)
%Vl(b,20,30,50,50,0)
%sYou've unlocked your player.
\end{example}
This example checks for hold. Viewport `a' will be displayed if it is on,

View file

@ -1,6 +1,6 @@
\subsubsection{Viewport Declaration Syntax}
\config{\%V{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}}%
\config{\%V(x,y,[width],[height],[font]}%
\begin{itemize}
\item `font' is a number: 0 is the built-in system font, 1 is the
@ -10,11 +10,11 @@
definitions blank will set them to their default values.
\end{itemize}
\note{The correct number of `{\textbar}'s (vertical bars) with hyphens in
\note{The correct number of commas with hyphens in
blank fields are still needed in any case.}
\begin{example}
%V|12|20|-|-|1|
%V(12,20,-,-,1)
%sThis viewport is displayed permanently. It starts 12px from the left and
%s20px from the top of the screen, and fills the rest of the screen from
%sthat point. The lines will scroll if this text does not fit in the viewport.