View Single Post
Old 06-12-2010, 11:13 AM   #11
fjtorres
Grand Sorcerer
fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.fjtorres ought to be getting tired of karma fortunes by now.
 
Posts: 11,732
Karma: 128354696
Join Date: May 2009
Location: 26 kly from Sgr A*
Device: T100TA,PW2,PRS-T1,KT,FireHD 8.9,K2, PB360,BeBook One,Axim51v,TC1000
Quote:
Originally Posted by Schnitzelbrain View Post
Not fully documented u must be kidding, its totally Undocumented.
Or do u have some translaitions of a howto avail.
One tries to be polite.
Something about trapping flies with honey instead of vinegar.

That said, the Theme creator pack comes with an RTF that google translate renders as below. At least one person on this forum used the tool to modify an existing Theme to their taste; the LastOpen Theme.

__________________________________________________ _____________
Creating themes for PocketBook

PocketBook interface allows you to customize any of the items of your choice. This is done with the aid of themes. R is an archive containing a file with the configuration of the theme (fonts, colors, position of elements, etc.), and resource files.
The configuration file topic - a plain text file in UTF-8 string containing the type optname = value. Parameters can be of several types:

Type Description Example
INTEGER Integer val = 12345
STRING string UTF-8. In most cases, it searches for strings in the language file, ie "@ Menu" will be shown as "Menu" str1 = Hello
str2 = @ Books
FONT Font format [#] face, size, color
# - Do not use anti-aliasing
(Recommended for menu items)
face - the font name
size - size in pixels
color - the default color font1 = arial, 10,0
font2 = # default, 16,0 xffffff
COLOR Color format 0xRRGGBB
For e-ink display with 4 shades:
0x000000 - Black
0x555555 - dark gray
0xaaaaaa - light gray
0xffffff - white color = 0x555555
RECT coordinates of the object in the format:
x, y, w, h, flags
x, y - coordinates of the upper-left point
w, h - length, height
flags - the attributes of alignment:
L - Left
C - center
R - right
F - the width
T - to the upper edge
M - vertically centered
B - to the bottom
D - add ... if the text is not
placed in the assigned
region
V - rotate text 90 ° pos1 = 10,10,80,55, LT
pos2 = 30,0,20,800, CMVD


Common Elements theme

Parameter Type Description
title.font FONT Font page header
title.height INTEGER header height
header.font FONT Header Font menus and dialogs
header.color COLOR Color of the title menu and dialogs
window.font FONT Font dialog
window.color COLOR Color dialog
keyboard.font FONT Font virtual keyboard
menu.font.normal FONT Font menu item is inactive
menu.font.active FONT Font menu of an active element
menu.color.normal COLOR The color of inactive menu items
menu.color.selected COLOR Font menu item active
menu.color.disabled COLOR prohibited Font menu item
button.font.normal FONT Font inactive button dialogue
button.font.active FONT Font button active dialogue
hintline.position RECT Position Tips
hintline.font FONT Font Tips
bookmark.caption.position RECT Position labels tab
bookmark.caption.font.normal FONT Font inscriptions bookmarks
bookmark.caption.font.active FONT Font inscriptions active bookmark
contents.font.normal FONT Font element content
contents.font.active FONT Font active element content
book.textarea RECT area output text books (v301.08)
dictionary.font.normal FONT main font dictionary
dictionary.font.bold FONT Bold Dictionary
dictionary.font.translation FONT Font Translation
dictionary.font.extra FONT Additional font translation
notepad.div.font FONT Font separator notes in a notebook
notepad.list.font FONT Font list of notes
panel.caption.font FONT Font inscriptions on the panel at the bottom of the screen
panel.caption.offset INTEGER vertical displacement of the inscriptions
panel.title.font FONT font name of the book on the panel
panel.title.offset INTEGER vertical displacement of the book's title
panel.progressbar.offset INTEGER vertical displacement of the progress bar
panel.progressbar.width INTEGER width of the progress bar
tab.caption.position RECT position inscription on the tab bar
tab.caption.font.normal FONT Font tab labels
tab.caption.font.active FONT Font inscriptions active tab
Elements of MP3 player (on the upper left corner of the player)
mplayer.list.position RECT position list of songs
mplayer.list.font.normal FONT Font inactive list item
mplayer.list.font.active FONT Font active element list
mplayer.color.selected COLOR Color of the selected item
mplayer.progress.position RECT position of progress bar
mplayer.info.position RECT position information about the current song
mplayer.info.font FONT font of information about the current song
mplayer.mode.position RECT Role Play mode
mplayer.volume.position RECT position of the volume


Menu item

Each element of the main menu, described by such parameters (all coordinates relative to the upper left corner, N - number of elements):

Parameter Type Description
menu.item.N.position RECT Position element
menu.item.N.caption.position RECT position of the item's name
menu.item.N.caption.text STRING Name of element
menu.item.N.caption.font.normal FONT font name of the active element
menu.item.N.caption.font.active FONT Font name of the inactive element
menu.item.N.action STRING action element


The action parameter can take these values:

OPEN, path View the book, run the application
path - the path to
OPENDIR, path, title, hint Open folder
path - the path to
title - The title list
hint - hint tekct, if the folder is empty
PHOTO View Photo
MUSIC View MP3 Player
SETUP Settings
SEARCH Search Books
ABOUT About PocketBook

The path to the folder or file can not start with "/" (embedded application) or with one of the prefixes:
FLASH: / - built-in memory
SDCARD: / - SD-Card
ANY: / - «mixed" content (for OPENDIR)


Also, the main menu can display a list of recent books read (10). The position of the list given the option:

Parameter Type Description
lastopen.position RECT Position List

Type the list items described similar type element bookshelf (see below).


Types bookshelf

You can create up to 5 different types of book shelves. For each type you can specify various design elements of the list. If the width of elements allows, they will be posted on the screen in multiple columns.

Parameter Type Description
viewN.name STRING Name of the type of book shelves
viewN.item.width INTEGER width of the element
viewN.item.height INTEGER height of the element
viewN.icon.position RECT Position icon "File Type"
viewN.mediaicon.position RECT position indicator "carrier"
viewN.readicon.position RECT Position icon "book opening"
viewN.mark.position RECT position tags in the group selection
For each type of item:
type = folder, file, application, album, image, music
C - number of labels (supports up to 7 titles):
viewN.type.caption.C.position RECT Position label
viewN.type.caption.C.font.normal FONT Font inscriptions (inactive e-t)
viewN.type.caption.C.font.active FONT Font inscriptions (an active e-t)
viewN.type.caption.C.text STRING TEXT
viewN.type.cover.position RECT Position cover (thumbnail)
viewN.type.shortcut.position RECT Position icon "link (shortcut)"

Kind of a bookshelf by default for different lists:

Parameter Type Description
defaultview.list INTEGER view a list of standard bookshelf
defaultview.news INTEGER view a list of "news"
defaultview.games INTEGER view a list of "games"
defaultview.photo INTEGER List View "photography"

Text labels may contain special tags that will be replaced by information displays files. Recognize such tags (if you set the tag in the upper register information will be translated to upper case):

% Number% number of the element
% Title% title
% Author% Author
% Genre% Genre
% Series% Series
% Filename% Filename without extension
% Ext% File extension
% Size% size
% Ctime% Created file
% Type% file type



Quick View Menu

You can define the elements of speed menu for the three programs (fbreader, pdfviewer, djviewer). For each element, given name (displayed at the top menu) and the action. Element number N takes a value from 0 to 8.

Parameter Type Description
qmenu.fbreader.N.text STRING Name of element
qmenu.fbreader.N.action STRING action
qmenu.pdfviewer.N.text STRING Name of element
qmenu.pdfviewer.N.action STRING action
qmenu.djviewer.N.text STRING Name of element
qmenu.djviewer.N.action STRING action

Available actions for the elements:

@ KA_none No action
@ KA_prev Previous pages in
@ KA_next Sleduyuschay page
@ KA_pr10 Back 10 pages
@ KA_nx10 Next 10 pages
@ KA_goto Go to page
@ KA_frst Home Page
@ KA_last the last page
@ KA_prse Previous Section
@ KA_nxse Next Section
@ KA_obmk Bookmarks bar
@ KA_nbmk Set / reset a bookmark
@ KA_nnot New Note
@ KA_savp Save this page as a note
@ KA_onot Open Notebook
@ KA_olnk mode options
@ KA_blnk Back to link
@ KA_cnts Contents
@ KA_srch Search
@ KA_dict Dictionary
@ KA_zoom Scale
@ KA_zmin Zoom
@ KA_zout Zoom
@ KA_rtte Rotation
@ KA_mpdf Mode PDF
@ KA_mmnu Main Menu
@ KA_exit Output
@ KA_mp3o View player
@ KA_mp3p Pause / Play
@ KA_conf configuration

Resources

As resources are recognized images and fonts. Images must be recorded in a format BMP (16 or 256 colors), while the color RGB (128,128,64) is transparent. If multiple elements appear to be identical, the packer is to recognize it, the picture will then be recorded in a single copy. Packer does not make any image transformation (dithering, etc.), you need to prepare images in finished form.
Fonts - any TTF fonts (note that all of the fonts of the current topics are held in memory in unpacked form, so invest in a theme Arial Unicode MS - not a good idea The name of the font file can be substituted as a face in the elements FONT.

For versions of 301.08 are defined such images:

batt_N battery, N = 0 .. 5 (0-empty, 5-fully charged)
batt_c battery during charging
bmk_active active tab
bmk_actnew New bookmark
bmk_inactive Inactive tab
bmk_panel Bookmarks bar
bmk_flag «Area" tab on the page
broken_image Broken Link
button_normal button dialogue
button_selected button active dialogue
clock_dN Large digit hours (N = 0 .. 9)
clock_colon separator hours and minutes
contents_background Wallpaper book content
contents_active Wallpaper active element content of the book
contents_inactive Wallpaper inactive element content of the book
book_background_p Wallpaper vertical page book (v301.08)
book_background_l Wallpaper horizontal page book (v301.08)
leaf_open Open site content (-)
leaf_closed Private site content (+)
djviewer_menu Quick Menu for books DjVu
fbreader_menu Quick Menu for books TXT, FB2, PRC, HTM, CHM ...
pdfviewer_menu Quick Menu for books PDF
hourglass hourglass
ICON_FILE icon unrecognized file
ICON_FOLDER folder icon
ICON_PHOTO Icon album
ICON_ext icon for the file extension ext
icon_error icon dialogue errors
icon_information image information dialogue
icon_question icon interrogative dialogue
icon_warning icon warning dialog
icon_flash icon internal memory
icon_sdcard icon SD Cards
icon_mixed icon "mixed" directory (memory + SD)
Icon_playing icon notes (including MP3 player)
menu_bg Wallpaper menu (may contain elements at once)
menu_N N-th menu item (optional)
menu_Na N-th active menu item (optional). If not specified, the active element will be allocated to frame
mplayer_bitmap Wallpaper MP3 player
pageentry Dialog page
panel information panel at the bottom
Dialogue rotate the screen orientation changes
dicmenu Menu Dictionary
sel_folder folder icon in the folder selection dialog
sel_new new folder icon in the folder selection dialog
sel_ok icon of the current folder in the folder selection dialog
tab_active active tab panel
tab_inactive inactive tab panel
usb_exchange Wallpaper connecting USB
For each type of book shelves:
(If the image of the active element is not specified, it will be allocated frame)
viewN_background Wallpaper (v301.08)
Figure viewN_bookopen already opened the book
viewN_bookclosed Figure unread books
viewN_mark0 icon is not selected "in the mode of group selection
viewN_mark1 icon "selected" in the mode of group selection
viewN_shortcut link icon
viewN_album Wallpaper element "album"
viewN_album_a Wallpaper active element "album"
viewN_app Wallpaper element "application"
viewN_app_a Wallpaper active element "application"
viewN_file Wallpaper element "book"
viewN_file_a Wallpaper active element "book"
viewN_folder Wallpaper element "folder"
viewN_folder_a Wallpaper active element "folder"
viewN_image Wallpaper element "picture"
viewN_image_a Wallpaper active element "picture"
viewN_music Wallpaper element "music file"
viewN_music_a Wallpaper active element "music file"



Features of e-ink display

To make sure your theme looked nice and work fast, you need to take into account some features of technology e-ink.
E-ink display uses three update modes: full, partial and partial black and white. In most cases (for example, page flipping) using the full update - with black shading. This is the slowest method. To speed up the response of menu items and lists using partial update. However, if there is a change only black and white pixels (even if the region contains updates immutable gray), used a monochrome update, but it is about 4 times faster than usual. Therefore, for items that require quick response, it is desirable to use the fonts without antialiasing, and all the images to calculate such a way that the selection changed only black and white.
Partial update on the screen are the traces of previous images, especially noticeable in gray areas. It also features technology to get rid of it programmatically impossible.


Creating pbt-File

As an example, we have recorded the theme default unpacked (catalog example). You can try to change it as you wish, and then burn to PocketBook folder / system / themes and see what happened. Configuration theme is in the file mytheme.txt, resources - in a folder resource. To create pbt file, simply run the script create.bat.
The new version PocketThemes added viewer in order - you can immediately see how looks the topic started. Overview is an abridged emulator PocketBook 301 (only function bookshelf). Folders ext1 and ext2 subdirectory system \ mnt viewer perceives respectively as internal memory and SD card - here you can copy the books and see how the list will look in the bookshelf.
The archives are theme_sources.zip source of all three standard themes.
If you make a mistake in any setting, and PocketBook not loaded with the selected topic or shows something totally unimaginable, you can always boot in safe mode. To do this, when you turn on hold "-" before the bookshelf.
Good luck!
fjtorres is offline   Reply With Quote