Specifications

Chapter 13. Advanced Topics 141
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. Loading images (see Appendix section C.20 (page 164)) should be done
within the default viewport. A viewport ends either with the end of the file, or with the
next viewport declaration line. Viewports sharing the same coordinates and dimensions
cannot be displayed at the same time. Viewports cannot be layered transparently over
one another. Subsequent viewports will be drawn over any other viewports already
drawn onto that area of the screen.
Viewport Declaration Syntax
%V(x,y,[width],[height],[font]
‘font’ is a number: 0 is the built-in system font, 1 is the current menu font, and
2-9 are additional skin loaded fonts (see section 13.2.4 (page 142)).
Only the coordinates have to be specified. Leaving the other definitions blank will
set them to their default values.
Note: The correct number of commas with hyphens in blank fields are still needed.
b
Example
%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.
%sThe user font is used.
Viewport definition Default value
width/height remaining part of screen
font user defined
Conditional Viewports
Any viewport can be displayed either permanently or conditionally. Defining a viewport
as %V(... will display it permanently.
%Vl(’identifier’,...) This tag preloads a viewport for later display. ‘identifier’
is a single lowercase letter (a-z) and the ‘. . . parameters use the same logic as the
%V tag explained above.
%Vd(’identifier’) Display the ‘identifier’ viewport.
Viewports can share identifiers so that you can display multiple viewports with one
%Vd line.
The Rockbox manual (version rUnversioned directory-150515) Archos Recorder