Book

From MegaZine3
Revision as of 09:33, 19 June 2017 by Hnuecke (talk | contribs) (added htmlFavicon)
Jump to navigation Jump to search

<css> /* Make toc float left, to better use the space right to it */

#toc { float:left; margin:1em 2em 1em 0; }

</css>

The book tag of an XML book definition is the outermost node, root node to all other nodes. It defines basic behavior of the engine.

Book attributes are in general global settings, such as page turning behavior (speed, area in which a page turn can be triggered, and so on). Some of the attributes are inherited by the chapters the book contains, such as the pages' background color.

All listed attributes titles are prefixed with a small icon. When annotated with Display-related setting, that means the setting is primarily graphics related, i.e. it means the settings changes how something is displayed. Behavior-related setting on the other hand means that the setting is primarily used to control the book's behavior.

Obviously not all settings can be be put into one of these two categories 100%, so there might be some discrepancy in expectance, meaning the icons should only serve as very rough, primary orientation.

Attributes

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/7/7e/Autodrag.jpg" _fck_mw_filename="Autodrag.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/5/5c/Bggradient.jpg" _fck_mw_filename="Bggradient.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

When set to false this will re-trigger corner hinting when the cursor idles outside a page.

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/5/53/Dragkeepdist.jpg" _fck_mw_filename="Dragkeepdist.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

<img src="/wiki/images/1/17/Dragrange.jpg" _fck_mw_filename="Dragrange.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR


Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/0/0d/Foldfx.jpg" _fck_mw_filename="Foldfx.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/5/5a/Handcursor.jpg" _fck_mw_filename="Handcursor.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR


Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/1/1b/Reflection.jpg" _fck_mw_filename="Reflection.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/f/f0/Rotate.jpg" _fck_mw_filename="Rotate.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

<img src="/wiki/images/9/95/Shadows.jpg" _fck_mw_filename="Shadows.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

<img src="/wiki/images/1/12/Spinecurvature.jpg" _fck_mw_filename="Spinecurvature.jpg" _fck_mw_location="right" _fck_mw_type="frame" alt="" class="fck_mw_frame fck_mw_right" />

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR

Template:AttributefckLR


Template:AttributefckLR

Child Nodes

The book may have chapter child nodes, one for each chapter, to define the actual contents of the book.

Two child nodes can be used to define an overall background of the book, background for a static, global background, and pagebackground for a background bound to the page's position and size (i.e. it will also be scaled when zooming in or out). Those two nodes take any number of ASUL elements as their children, which will then be displayed as their actual children on the stage. The variables for the parent size and height (pw, ph) will be the total space available to the engine for background (which is the whole stage size when using the release as it is), and the page width and height for the pagebackground. The origin (top left, coordinates 0,0) is the top left of the overall space available to the engine for the background and the position of the top left corner of the book for the pagebackground.

As of version 2.0.8 it is also possible to define an overall foreground via foreground, which may contain ASUL elements to be shown on top of everything else.

Plugins may use additional nodes to let the user define additional properties, as does the sidebar plugin.

Examples

<book
    pagewidth="400"
    pageheight="600"
    bgcolor="0xffffff"
    plugins="navigationbar, gallery, links, anchors"
    lang="en,de"
    minscale="0.5"
>
    <background>
        <box anchors="0,0,pw,ph" background="image(data/overall_bg.png)"/>
    </background>
    <pagebackground>
        <box width="pagew" height="pageh" background="image(data/prepage.jpg)"/>
    </pagebackground>

    <chapter>
        <page>
            <img src="data/cover.jpg"/>
        </page>
        <!-- ... -->
    </chapter>
    <!-- ... -->
</book>
MegaZine3 Core-related articles
Book elements Book · Chapter · Page · Spreadpage
Page elements Area · GIF · Image · Navigation · Sound · Text · Video