Index: manual/advanced_topics/viewports/grayscale-vp-syntax.tex =================================================================== --- manual/advanced_topics/viewports/grayscale-vp-syntax.tex (revision 0) +++ manual/advanced_topics/viewports/grayscale-vp-syntax.tex (revision 0) @@ -0,0 +1,28 @@ +\subsubsection{Viewport Declaration Syntax} + +{\config{\%V}}{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}[fgshade]{\textbar}[bgshade]{\textbar}% + + \begin{itemize} + \item 'fgshade' and bgshade are numbers in the range '0' (= black) to '3' (= white). + \item 'font' is a number - '0' is the built-in system font, '1' is the user-selected font. + \item Only the coordinates \emph{have} to be specified. Leaving the other definitions blank will make them fall + back to their their default values. + \note{The correct amount of {\textbar}'s with -'s in the blanks fields is still needed in any case.} + \end{itemize} + +\begin{example} + %V|12|20|-|-|1|-|-| + %sThis viewport is diplayed in any case. It has the size of your screen - 12 px in width + %sand - 20 px in height. The lines will scroll, if this text does not fit your screen. +\end{example} +\begin{table} +\begin{center} +\begin{tabularx}{.75\textwidth}{XX}\toprule +\textbf{Viewport definition} & \textbf{Default value}\\\midrule% + width/height & remaining part of screen \\ + font & user defined \\ + shade & black foreground on white background \\ + \bottomrule +\end{tabularx} +\end{center} +\end{table} Index: manual/advanced_topics/viewports/colour-conditional.tex =================================================================== --- manual/advanced_topics/viewports/colour-conditional.tex (revision 0) +++ manual/advanced_topics/viewports/colour-conditional.tex (revision 0) @@ -0,0 +1,15 @@ +\begin{example} + %?C<%Vda|%Vdb> + %Vl|a|10|10|50|50|-|-|-| + %Cl|0|0|50|50| + %C + %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| + %sNo album art found + %scheck your filenames. +\end{example} +This example checks for album art. Album art will be displayed in viewport 'a', if +it is found. Otherwise a red flashing warning will be displayed in viewport 'b'. Index: manual/advanced_topics/viewports/mono-conditional.tex =================================================================== --- manual/advanced_topics/viewports/mono-conditional.tex (revision 0) +++ manual/advanced_topics/viewports/mono-conditional.tex (revision 0) @@ -0,0 +1,13 @@ +\begin{example} + %?mh<%Vda|%Vdb> + %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| + %s%acYour DAP is locked. + %Vl|b|20|14|50|14|1| + %t1%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, +otherwise viewport 'b' will display a bright flashing warning. Index: manual/advanced_topics/viewports/colour-vp-syntax.tex =================================================================== --- manual/advanced_topics/viewports/colour-vp-syntax.tex (revision 0) +++ manual/advanced_topics/viewports/colour-vp-syntax.tex (revision 0) @@ -0,0 +1,28 @@ +\subsubsection{Viewport Declaration Syntax} + +{\config{\%V}}{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}[fgcolor]{\textbar}[bgcolor]{\textbar}% + + \begin{itemize} + \item 'fgcolor' and bgcolor are 6-digit RGB888 colours - e.g. FF00FF. + \item 'font' is a number - '0' is the built-in system font, '1' is the user-selected font. + \item Only the coordinates \emph{have} to be specified. Leaving the other definitions blank will make them fall + back to their their default values. + \note{The correct amount of {\textbar}'s with -'s in the blanks fields is still needed in any case.} + \end{itemize} + +\begin{example} + %V|12|20|-|-|1|-|-| + %sThis viewport is diplayed in any case. It has the size of your screen - 12 px in width + %sand - 20 px in height. The lines will scroll, if this text does not fit your screen. +\end{example} +\begin{table} +\begin{center} +\begin{tabularx}{.75\textwidth}{XX}\toprule +\textbf{Viewport definition} & \textbf{Default value}\\\midrule% + width/height & remaining part of screen \\ + font & user defined \\ + forground/background colour & defined by theme \\ + \bottomrule +\end{tabularx} +\end{center} +\end{table} Index: manual/advanced_topics/viewports/grayscale-conditional.tex =================================================================== --- manual/advanced_topics/viewports/grayscale-conditional.tex (revision 0) +++ manual/advanced_topics/viewports/grayscale-conditional.tex (revision 0) @@ -0,0 +1,15 @@ +\begin{example} + %?C<%Vda|%Vdb> + %Vl|a|10|10|50|50|-|-|-| + %Cl|0|0|50|50| + %C + %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|-|-| + %sNo album art found + %scheck your filenames. +\end{example} +This example checks for album art. Album art will be displayed in viewport 'a', if +it is found. Otherwise a bright flashing warning will be displayed in viewport 'b'. Index: manual/advanced_topics/viewports/mono-vp-syntax.tex =================================================================== --- manual/advanced_topics/viewports/mono-vp-syntax.tex (revision 0) +++ manual/advanced_topics/viewports/mono-vp-syntax.tex (revision 0) @@ -0,0 +1,28 @@ +\subsubsection{Viewport Declaration Syntax} + +{\config{\%V}}{\textbar}x{\textbar}y{\textbar}[width]{\textbar}[height]{\textbar}[font]{\textbar}[fgshade]{\textbar}[bgshade]{\textbar}% + + \begin{itemize} + \item 'fgshade' and bgshade are numbers in the range '0' (= black) to '3' (= white). + \item 'font' is a number - '0' is the built-in system font, '1' is the user-selected font. + \item Only the coordinates \emph{have} to be specified. Leaving the other definitions blank will make them fall + back to their their default values. + \note{The correct amount of {\textbar}'s with -'s in the blanks fields is still needed in any case.} + \end{itemize} + +\begin{example} + %V|12|20|-|-|1| + %sThis viewport is diplayed in any case. It has the size of your screen - 12 px in width + %sand - 20 px in height. The lines will scroll, if this text does not fit your screen. +\end{example} +\begin{table} +\begin{center} +\begin{tabularx}{.75\textwidth}{XX}\toprule +\textbf{Viewport definition} & \textbf{Default value}\\\midrule% + width/height & remaining part of screen \\ + font & user defined \\ + shade & black foreground on white background \\ + \bottomrule +\end{tabularx} +\end{center} +\end{table} Index: manual/advanced_topics/main.tex =================================================================== --- manual/advanced_topics/main.tex (revision 22489) +++ manual/advanced_topics/main.tex (working copy) @@ -170,11 +170,6 @@ \begin{itemize} \item All characters not preceded by \% are displayed as typed. \item Lines beginning with \# are comments and will be ignored. -\item Maximum file size used is - \opt{lcd_bitmap}{1600} - \opt{player}{400} bytes. - If you have a bigger WPS file, only the first part of it will be - loaded and used. \end{itemize} \note{Keep in mind that your \dap{} resolution is \genericimg{} (with @@ -183,6 +178,47 @@ \opt{HAVE_REMOTE_LCD}{The resolution of the remote is \opt{h100,h300}{128x64x1}\opt{x5,m5}{128x96x2} pixels.}} +\nopt{lcd_charcell}{ +\subsubsection{Viewports} + +By default, a viewport which fills the whole screen contains all the elements +defined in the \fname(.wps) file. The elements in this viewport are displayed +in the same background/foreground colour and the text is rendered in the same +font as in the main menu. These three definitions are loaded by the theme +\fname(.cfg) file (see \reference{ref:configure_rockbox_themes} and +\reference{ref:cfg_specs}). To change this behaviour a custom viewport has to +be defined. A viewport is a rectangular window on the screen with its own +foreground/background colour. This window also has variable dimensions. To +determine the values assigned to a specific viewport, a defining \config{{\%V{\textbar}\dots}} +line (will be explained later in this section) has to be present in the \fname{.wps} file. +All elements placed before the first line defining a viewport are displayed in the +default viewport. Elements defined after a viewport declaration are drawn within the +dimensions specified in and at the coordinates designated by that defining line.\opt{lcd_bitmap}{ Loading +images (see \reference{ref:wps_images}) should be done within the default viewport.} Viewports +sharing the same coordinates and dimensions cannot be displayed +at the same time. Viewports cannot be layered \emph{transparently} over +one another. Subsequent viewport definitions will be drawn over any other +viewports already drawn onto that area of the screen. Defining a viewport +with the \config{{\%V{\textbar}\dots}} line will display it constantly. + +\nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-vp-syntax.tex}} +\nopt{lcd_color}{\input{advanced_topics/viewports/grayscale-vp-syntax.tex}} +\opt{lcd_color}{\input{advanced_topics/viewports/colour-vp-syntax.tex}} +\subsubsection{Conditional Viewports} + +Any viewport can be displayed conditionally. +\begin{itemize} +\item {\config{\%Vl{\textbar}'identifier'{\textbar}\ldots{\textbar}}} +This tag preloads a viewport for later display. 'identifier' is a single lowercase letter (a-z) and the '\ldots' parameters use the same logic as the usual \%V tag explained above. +\item {\config{\%Vd'identifier'}} Display the 'identifier' viewport. +\end{itemize} +The identifiers for different viewports can be used mutliple times. +\nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-conditional.tex}} +\nopt{lcd_color}{\input{advanced_topics/viewports/grayscale-conditional.tex}} +\opt{lcd_color}{\input{advanced_topics/viewports/colour-conditional.tex}} +\nopt{rtc}{\opt{lcd_color}{\input{advanced_topics/viewports/colour-no-rtc-conditional.tex}}} Using an individual identifier for each viewport is not necessary. +\note{The tag to display conditional viewports must be coded in the \fname{.wps} file \emph{before} the tag to preload conditional viewports.} +} \subsubsection{Conditional Tags} \begin{description}