/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef _pfJournalBook_h
#define _pfJournalBook_h
//////////////////////////////////////////////////////////////////////////////
// //
// pfJournalBook Class //
// A generic, high-level, abstract method of creating various Myst-like //
// books within the game with very little effort, while ensuring that they //
// all remain consistent in appearance and operability. //
// //
//////////////////////////////////////////////////////////////////////////////
// //
// Journal books are created via a journal book template. The template //
// takes the form of an extremely simplified version of HTML. The esHTML //
// has the following tags defined: //
//
- Start of a new paragraph.
isn't used. //
// - Places an image in-line with the text. Options are: //
// align=left/right/center //
// src= //
// link= - Defines the image as clickable. When the user //
// clicks the image, it will generate an event //
// with the given event ID and send it to the //
// calling Python handler. //
// blend=none/alpha - Controls the blending method of drawing //
// the image //
// pos=, - Positions the image absolutely on the page //
// using the upper-left pixel given. Absolute- //
// placed images have no effect on text flow. //
// glow= //
// - Defines a glow special effect, which amounts //
// to the image oscillating in opacity across //
// the time interval specified. Optionally, you //
// can also specify the min and max opacity, //
// from 0 to 1. //
// check= //
// - Makes the image act as a checkbox, flipping //
// between on and off states (as defined by the //
// blending colors) on clicks. Default is either //
// 1 for on or 0 for off. Link notifys are sent //
// by checkboxes, with the event type //
// "kNotifyCheckUnchecked" negative if the //
// state is switching to off. Cannot be used //
// with "glow". //
// resize=yes/no - Defines whether the image will be resized //
// with the book or not, defaults to yes //
// opacity=0 to 1 - Defines the opacity of the image, 0 is //
// completely transparent, 1 is opaque //
// - Page break //
// - Set the font for the following text. Options are: //
// face= //
// size= //
// style=r/b/i/bi //
// color=rrggbb - Hex color //
// spacing= - line spacing in pixels //
// - Optionally sets the cover mipmap for the book. //
// src= - Selects the mipmap to be used, using the //
// same search methods as . Unlike //
// though, has no restriction on //
// mipmap format. //
// tint=rrggbb - Hex color for tinting the cover image //
// tintfirst=yes/no - Tint the cover before applying decals, //
// defaults to yes. A no option overrides the //
// individual tint options on the tags //
// - Optionally sets the margin size in pixels, default is 16 //
// top= //
// left= //
// bottom= //
// right= //
// - Optionally sets the size of the book in percent (0-1), //
// can be overridden by the SetBookSize funtion. //
// height= //
// width= //
// - Optionally specifies a decal to be drawn on the cover in //
// the specified position. Options are: //
// src= - Selects the mipmap to be used, using the //
// same search methods as . Unlike //
// though, has no restrictions on //
// mipmap format. //
// pos=, - Specifies the position of the decal on the //
// cover using the upper-left pixel //
// align=left/right/center //
// - Aligns the decal horizontally, overriding //
// any x coord in the pos option, if no y has //
// been specified, then it places it at the //
// top of the cover //
// resize=yes/no - Defines whether the image will be resized //
// with the book or not, defaults to yes //
// tint=yes/no - Defines whether or not this decal is tinted //
// with the cover. Overridden by the tintfirst //
// option on the tag. Defaults to no //
// - Places a movie (.webm file) inline with the text. Options://
// src= - Selects the movie to be used. (nead search //
// methods here eventually) //
// align=left/right/center //
// - Aligns the movie horizontally, overriding //
// any x coord in the pos option //
// link= - Defines the movie as clickable. When the //
// User clicks the movie, it will generate an //
// event with the given event ID and send it //
// to the calling python handler //
// pos=, - Specifies the position of the movie on the //
// page using the upper left pixel given, does //
// not influence text flow //
// resize=yes/no - Defines whether the movie will be resized //
// with the book or not, defaults to yes //
// oncover=yes/no - Defines whether the movie will be placed on //
// the cover or not, defaults to no. NOTE: //
// setting this to yes causes the link option //
// to be ignored since cover movies can't link //
// loop=yes/no - Defines whether the movie will loop or not //
// defaults to yes //
// - Marks this book as editable (if the GUI supports it) //
// //
// The pages don't render until displayed. As a result, jumping to a given //
// page requires each page from the current position to the destination //
// to be rendered. Normally, this won't be a problem, because by default //
// books open to the first page, at which point each page renders one //
// at a time as the user flips through. //
// //
// The system assumes that no more than one book will ever actually be //
// shown at any time. As a result, the internal geometry for displaying //
// each book can be shared, reducing overhead and potential for errors. //
// //
//////////////////////////////////////////////////////////////////////////////
#include "HeadSpin.h"
#include