diff options
Diffstat (limited to 'manual')
-rw-r--r-- | manual/advanced_topics/main.tex | 71 |
1 files changed, 32 insertions, 39 deletions
diff --git a/manual/advanced_topics/main.tex b/manual/advanced_topics/main.tex index 4b51325715..41b52e0367 100644 --- a/manual/advanced_topics/main.tex +++ b/manual/advanced_topics/main.tex | |||
@@ -46,8 +46,9 @@ the information displayed on the \daps\ screen whilst an audio track is | |||
46 | being played. The default WPS is a relatively simple screen displaying | 46 | being played. The default WPS is a relatively simple screen displaying |
47 | Track name, Artist, Album etc. in the default font as a purely text based | 47 | Track name, Artist, Album etc. in the default font as a purely text based |
48 | layout. There are a number of WPS files included in Rockbox, and you can | 48 | layout. There are a number of WPS files included in Rockbox, and you can |
49 | load one of these at anytime by selecting it\dots\\ | 49 | load one of these at anytime by selecting it in |
50 | \setting{General Settings $\rightarrow$ Display $\rightarrow$ Browse .wps files}\\ | 50 | \setting{General Settings $\rightarrow$ Display $\rightarrow$ Browse .wps files}. |
51 | |||
51 | \opt{h1xx,h300}{There is a related option to browse \fname{.rwps} files for | 52 | \opt{h1xx,h300}{There is a related option to browse \fname{.rwps} files for |
52 | \daps\ with LCD remote controls installed. This will load a similar WPS | 53 | \daps\ with LCD remote controls installed. This will load a similar WPS |
53 | screen for the remote but with usually a simpler and more concise layout.} | 54 | screen for the remote but with usually a simpler and more concise layout.} |
@@ -72,21 +73,21 @@ encoding. This can be done in most editors, for example Notepad in Windows 2000 | |||
72 | or XP (but not in 9x/ME) can do this. See appendix \ref{ref:wps_tags} for all | 73 | or XP (but not in 9x/ME) can do this. See appendix \ref{ref:wps_tags} for all |
73 | the tags that are available. | 74 | the tags that are available. |
74 | 75 | ||
75 | \begin{description} | 76 | \begin{itemize} |
76 | \item All characters not preceded by \% are displayed as typed. | 77 | \item All characters not preceded by \% are displayed as typed. |
77 | \item Lines beginning with \# are comments and will be ignored. | 78 | \item Lines beginning with \# are comments and will be ignored. |
78 | \item Maximum file size used is | 79 | \item Maximum file size used is |
79 | \opt{recorder,recorderv2fm,ondio,h1xx,h300,ipodcolor,ipodnano}{1600} | 80 | \opt{recorder,recorderv2fm,ondio,h1xx,h300,ipodcolor,ipodnano}{1600} |
80 | \opt{player}{400} bytes.\\ | 81 | \opt{player}{400} bytes. |
81 | If you have a bigger WPS file, only the first part of it will be | 82 | If you have a bigger WPS file, only the first part of it will be |
82 | loaded and used. | 83 | loaded and used. |
83 | \end{description} | 84 | \end{itemize} |
84 | 85 | ||
85 | \subsubsection{Conditional Tags} | 86 | \subsubsection{Conditional Tags} |
86 | 87 | ||
87 | \begin{description} | 88 | \begin{description} |
88 | \item[If/else: ] | 89 | \item[If/else: ] |
89 | Syntax: \config{\%?xx{\textless}true{\textbar}false{\textgreater}}\\ | 90 | Syntax: \config{\%?xx{\textless}true{\textbar}false{\textgreater}} |
90 | 91 | ||
91 | If the tag specified by ``\config{xx}'' has a value, the text between the | 92 | If the tag specified by ``\config{xx}'' has a value, the text between the |
92 | ``\config{{\textless}}'' and the ``\config{{\textbar}}'' is displayed (the true | 93 | ``\config{{\textless}}'' and the ``\config{{\textbar}}'' is displayed (the true |
@@ -97,11 +98,10 @@ specified if no else part is desired. The conditionals nest, so the text in the | |||
97 | if and else part can contain all \config{\%} commands, including conditionals. | 98 | if and else part can contain all \config{\%} commands, including conditionals. |
98 | 99 | ||
99 | \item[Enumerations: ] | 100 | \item[Enumerations: ] |
100 | Syntax: \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}...{\textbar}else{\textgreater}}\\ | 101 | Syntax: \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}} |
101 | 102 | ||
102 | For tags with multiple values, like Play status, the conditional can hold a | 103 | For tags with multiple values, like Play status, the conditional can hold a |
103 | list of alternatives, one for each value the tag can have. | 104 | list of alternatives, one for each value the tag can have. |
104 | |||
105 | Example enumeration: | 105 | Example enumeration: |
106 | \begin{example} | 106 | \begin{example} |
107 | \%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater} | 107 | \%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}Ffwd{\textbar}Rew{\textgreater} |
@@ -117,12 +117,12 @@ You can display information about the next song -- the song that is | |||
117 | about to play after the one currently playing (unless you change the | 117 | about to play after the one currently playing (unless you change the |
118 | plan). | 118 | plan). |
119 | 119 | ||
120 | If you use the upper--case versions of the | 120 | If you use the upper-case versions of the |
121 | three tags: \config{F}, \config{I} and \config{D}, they will instead refer to | 121 | three tags: \config{F}, \config{I} and \config{D}, they will instead refer to |
122 | the next song instead of the current one. Example: \config{\%Ig} is the genre | 122 | the next song instead of the current one. Example: \config{\%Ig} is the genre |
123 | name used in the next song and \config{\%Ff} is the mp3 frequency. | 123 | name used in the next song and \config{\%Ff} is the mp3 frequency. |
124 | 124 | ||
125 | \note{The next song information WILL NOT be available at all | 125 | \note{The next song information \emph{will not} be available at all |
126 | times, but will most likely be available at the end of a song. We | 126 | times, but will most likely be available at the end of a song. We |
127 | suggest you use the conditional display tag a lot when displaying | 127 | suggest you use the conditional display tag a lot when displaying |
128 | information about the next song!} | 128 | information about the next song!} |
@@ -141,20 +141,18 @@ time (in seconds and optional tenths of a second) for the subline to be | |||
141 | displayed. | 141 | displayed. |
142 | 142 | ||
143 | Subline related special characters and tags: | 143 | Subline related special characters and tags: |
144 | 144 | \begin{description} | |
145 | \config{;} : Split items on a line into separate sublines | 145 | \item[;] Split items on a line into separate sublines |
146 | 146 | \item[\%t] Set the subline display time. The | |
147 | \config{\%t} : Set the subline display time. The | ||
148 | '\config{\%t}' is followed by either integer | 147 | '\config{\%t}' is followed by either integer |
149 | seconds (\config{\%t5}), or seconds and tenths of a second (\config{\%t3.5}). | 148 | seconds (\config{\%t5}), or seconds and tenths of a second (\config{\%t3.5}). |
149 | \end{description} | ||
150 | 150 | ||
151 | Each alternating subline can still be optionally scrolled while it is | 151 | Each alternating subline can still be optionally scrolled while it is |
152 | being displayed, and scrollable formats can be displayed on the same | 152 | being displayed, and scrollable formats can be displayed on the same |
153 | line with non{}-scrollable formats (such as track elapsed time) as long | 153 | line with non{}-scrollable formats (such as track elapsed time) as long |
154 | as they are separated into different sublines. | 154 | as they are separated into different sublines. |
155 | |||
156 | Example subline definition: | 155 | Example subline definition: |
157 | |||
158 | \begin{example} | 156 | \begin{example} |
159 | %s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds, | 157 | %s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds, |
160 | Display id3 title for 2 seconds, | 158 | Display id3 title for 2 seconds, |
@@ -165,30 +163,25 @@ Example subline definition: | |||
165 | 163 | ||
166 | Conditionals can be used with sublines to display a different set and/or number | 164 | Conditionals can be used with sublines to display a different set and/or number |
167 | of sublines on the line depending on the evaluation of the conditional. | 165 | of sublines on the line depending on the evaluation of the conditional. |
168 | |||
169 | Example subline with conditionals: | 166 | Example subline with conditionals: |
170 | |||
171 | \begin{example} | 167 | \begin{example} |
172 | %?it{\textless}%t8%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t3%s%ia{\textbar}%t0{\textgreater}\\ | 168 | %?it{\textless}%t8%s%it{\textbar}%s%fn{\textgreater};%?ia{\textless}%t3%s%ia{\textbar}%t0{\textgreater}\\ |
173 | \end{example} | 169 | \end{example} |
174 | 170 | ||
175 | The format above will do two different things depending if ID3 tags are | 171 | The format above will do two different things depending if ID3 tags are |
176 | present. If the ID3 artist and title are present: | 172 | present. If the ID3 artist and title are present: |
177 | 173 | \begin{itemize} | |
178 | Display id3 title for 8 seconds,\\ | 174 | \item Display id3 title for 8 seconds, |
179 | 175 | \item Display id3 artist for 3 seconds, | |
180 | Display id3 artist for 3 seconds,\\ | 176 | \item repeat\dots |
181 | 177 | \end{itemize} | |
182 | repeat...\\ | 178 | If the ID3 artist and title are not present: |
183 | 179 | \begin{itemize} | |
184 | If the ID3 artist and title are not present:\\ | 180 | \item Display the filename continuously. |
185 | 181 | \end{itemize} | |
186 | Display the filename continuously.\\ | ||
187 | |||
188 | Note that by using a subline display time of 0 in one branch of a conditional, | 182 | Note that by using a subline display time of 0 in one branch of a conditional, |
189 | a subline can be skipped (not displayed) when that condition is met. | 183 | a subline can be skipped (not displayed) when that condition is met. |
190 | 184 | ||
191 | |||
192 | \subsubsection{Using Images} | 185 | \subsubsection{Using Images} |
193 | You can have as many as 52 images in your WPS. There are various ways of | 186 | You can have as many as 52 images in your WPS. There are various ways of |
194 | displaying images: | 187 | displaying images: |
@@ -205,27 +198,27 @@ displaying images: | |||
205 | \optv{HAVE_LCD_COLOR}{ | 198 | \optv{HAVE_LCD_COLOR}{ |
206 | Example on background image use: | 199 | Example on background image use: |
207 | \begin{example} | 200 | \begin{example} |
208 | %X|background.bmp|\\ | 201 | %X|background.bmp| |
209 | \end{example} | 202 | \end{example} |
210 | The image with filename \fname{background.bmp} is loaded and used in the WPS. | 203 | The image with filename \fname{background.bmp} is loaded and used in the WPS. |
211 | } | 204 | } |
212 | 205 | ||
213 | Example on bitmap preloading and use: | 206 | Example on bitmap preloading and use: |
214 | \begin{example} | 207 | \begin{example} |
215 | \%x|a|static\_icon.bmp|50|50|\\ | 208 | %x|a|static_icon.bmp|50|50| |
216 | \%xl|b|rep\_off.bmp|16|64|\\ | 209 | %xl|b|rep\_off.bmp|16|64| |
217 | \%xl|c|rep\_all.bmp|16|64|\\ | 210 | %xl|c|rep\_all.bmp|16|64| |
218 | \%xl|d|rep\_one.bmp|16|64|\\ | 211 | %xl|d|rep\_one.bmp|16|64| |
219 | \%xl|e|rep\_shuffle.bmp|16|64|\\ | 212 | %xl|e|rep\_shuffle.bmp|16|64| |
220 | \%?mm<%xdb|%xdc|%xdd|%xde>\\ | 213 | %?mm<%xdb|%xdc|%xdd|%xde> |
221 | \end{example} | 214 | \end{example} |
222 | Four images at the same x and y position are preloaded in the example. Which | 215 | Four images at the same x and y position are preloaded in the example. Which |
223 | image to display is determined by the \config{\%mm} tag (the repeat mode). | 216 | image to display is determined by the \config{\%mm} tag (the repeat mode). |
224 | 217 | ||
225 | \subsubsection{Example File} | 218 | \subsubsection{Example File} |
226 | \begin{example} | 219 | \begin{example} |
227 | \%s\%?in<\%in - >\%?it<\%it|\%fn> \%?ia<[\%ia\%?id<, \%id>]> | 220 | %s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]> |
228 | \%pb\%pc/\%pt | 221 | %pb%pc/%pt |
229 | \end{example} | 222 | \end{example} |
230 | That is, ``tracknum -- title [artist, album]'', where most fields are only | 223 | That is, ``tracknum -- title [artist, album]'', where most fields are only |
231 | displayed if available. Could also be rendered as ``filename'' or ``tracknum -- | 224 | displayed if available. Could also be rendered as ``filename'' or ``tracknum -- |