summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/scrn-pag.lua
blob: bd65e53d960a7b4a9edd682f724b42ee4fd2b49c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
if not modules then modules = { } end modules ['scrn-pag'] = {
    version   = 1.001,
    comment   = "companion to scrn-pag.mkiv",
    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
    copyright = "PRAGMA ADE / ConTeXt Development Team",
    license   = "see context related readme files"
}

interactions         = interactions or { }
interactions.pages   = interactions.pages or { }
local pages          = interactions.pages

local implement      = interfaces.implement

local codeinjections = backends.codeinjections

function pages.setupcanvas(specification)
    codeinjections.setupcanvas(specification)
end

function pages.setpagetransition(specification)
    codeinjections.setpagetransition(specification)
end

implement {
    name      = "setupcanvas",
    actions   = pages.setupcanvas,
    arguments = {
        {
            { "mode" },
            { "singlesided", "boolean" },
            { "doublesided", "boolean" },
            { "leftoffset", "dimen" },
            { "topoffset", "dimen" },
            { "width", "dimen" },
            { "height", "dimen" },
            { "paperwidth", "dimen" },
            { "paperheight", "dimen" },
            { "cropoffset", "dimen" },
            { "bleedoffset", "dimen" },
            { "artoffset", "dimen" },
            { "trimoffset", "dimen" },
            { "copies", "integer" },
        }
    }
}

implement {
    name      = "setpagetransition",
    actions   = pages.setpagetransition,
    arguments = {
        {
            { "n" },
            { "delay", "integer" },
        }
    }
}