// Created by Newton Book Maker 1.1
//  Note: This file may contain needed resources !! 
// Document
book := {
	version: 2,
	isbn: "Pix:DTS",
	title: "The Picture Story",
	shortTitle: "Pix",
	data: {},   // Authors own data
	contents: Array(2, NIL),
	styles: [], hints: Array(2, NIL),
	browsers: [], templates: [], rendering: []};
output.book := book;

// Shared Map Functions
func MakePage(aTemplate)
	{template: aTemplate, blocks: []};
func MakeBlock(aBounds, anItem)
	{bounds: aBounds, item: anItem};

// Shared Scripts
gotoDestScript := func() begin
	if (curRendering = 0) then :TurnToPage(destPage);
	else :TurnToPage(:FindPageByContent(kioskDest, 0, NIL));
end;

// Hints
book.hints[0] := StuffHex("100020000010A0000000000000002000200000002010003C00002000000000000000000000100004002000090002000010011800000800180000003000000000000000002090200400080000200240080000000000800018208200002004100C0000000000000000000000000000000000000000000000000000000000000000",'data);

// Text Styles
s0 := {
	family: 'Geneva,
	face: 0,
	size: 9};
AddArraySlot(book.styles, s0);

s1 := {
	family: 'Geneva,
	face: 0,
	size: 9};
AddArraySlot(book.styles, s1);

s2 := {
	family: 'NewYork,
	face: 1,
	size: 18};
AddArraySlot(book.styles, s2);


// Contents
c1 := {
	data: "This is the simplest story ever told:

Once upon a time there was a little girl who added pictures to books with the greatest of ease. 
",
	styles: [39, s1, 1, s2, 97, s1]
};
book.contents[0] := c1;

c2 := {
	data: GetNamedResource("PICT", "18259", 'picture)
};
book.contents[1] := c2;


// Kiosk (menu page) references

// Page Templates
NBMDefault := {
	nColumns: 1,
	column: [{
	width: 12,
	type: 0}]
};
AddArraySlot(book.templates, NBMDefault);

// Bounds List
bnd1 := [0,16,240,87];
bnd2 := [0,87,219,269];

// Pages
pageList := {pageSize: {left: 0, top: 0, right: 240, bottom: 318},
	contents: [], pages: []};

// Page 1
page := MakePage(NBMDefault);
AddArraySlot(page.blocks, MakeBlock(bnd1, c1));
AddArraySlot(page.blocks, MakeBlock(bnd2, c2));
AddArraySlot(pageList.pages, page);

AddArraySlot(book.rendering, pageList);

// Browsers & Page Hints
b1 := {
	name: "Contents",  list: []
};
bp1 := [];		// Page Hints for list browser

AddArraySlot(book.browsers, b1);
AddArraySlot(pageList.contents, bp1);


// Indices and Sub-Indices
