xref: /dokuwiki/inc/parser/renderer.php (revision 11e384f72d646266f90cc7ff18c59dea58fd30c7)
1<?php
2/**
3 * Renderer for XHTML output
4 *
5 * @author Harry Fuecks <hfuecks@gmail.com>
6 * @author Andreas Gohr <andi@splitbrain.org>
7 */
8if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
9
10require_once DOKU_INC . 'inc/parser/renderer.php';
11require_once DOKU_INC . 'inc/pluginutils.php';
12
13class Doku_Renderer {
14    var $info = array(
15        'cache' => TRUE, // may the rendered result cached?
16        'toc'   => TRUE, // render the TOC?
17    );
18
19
20    function nocache() {
21        $this->info['cache'] = FALSE;
22    }
23
24    function notoc() {
25        $this->info['toc'] = FALSE;
26    }
27
28    //handle plugin rendering
29    function plugin($name,$data){
30        $plugin =& plugin_load('syntax',$name);
31        if($plugin != null){
32            // determine mode from renderer class name - format = "Doku_Renderer_<mode>"
33            $mode = substr(get_class($this), 14);
34            $plugin->render($mode,$this,$data);
35        }
36    }
37
38    function document_start() {}
39
40    function document_end() {}
41
42    function render_TOC() { return ''; }
43
44    function header($text, $level, $pos) {}
45
46    function section_edit($start, $end, $level, $name) {}
47
48    function section_open($level) {}
49
50    function section_close() {}
51
52    function cdata($text) {}
53
54    function p_open() {}
55
56    function p_close() {}
57
58    function linebreak() {}
59
60    function hr() {}
61
62    function strong_open() {}
63
64    function strong_close() {}
65
66    function emphasis_open() {}
67
68    function emphasis_close() {}
69
70    function underline_open() {}
71
72    function underline_close() {}
73
74    function monospace_open() {}
75
76    function monospace_close() {}
77
78    function subscript_open() {}
79
80    function subscript_close() {}
81
82    function superscript_open() {}
83
84    function superscript_close() {}
85
86    function deleted_open() {}
87
88    function deleted_close() {}
89
90    function footnote_open() {}
91
92    function footnote_close() {}
93
94    function listu_open() {}
95
96    function listu_close() {}
97
98    function listo_open() {}
99
100    function listo_close() {}
101
102    function listitem_open($level) {}
103
104    function listitem_close() {}
105
106    function listcontent_open() {}
107
108    function listcontent_close() {}
109
110    function unformatted($text) {}
111
112    function php($text) {}
113
114    function html($text) {}
115
116    function preformatted($text) {}
117
118    function file($text) {}
119
120    function quote_open() {}
121
122    function quote_close() {}
123
124    function code($text, $lang = NULL) {}
125
126    function acronym($acronym) {}
127
128    function smiley($smiley) {}
129
130    function wordblock($word) {}
131
132    function entity($entity) {}
133
134    // 640x480 ($x=640, $y=480)
135    function multiplyentity($x, $y) {}
136
137    function singlequoteopening() {}
138
139    function singlequoteclosing() {}
140
141    function doublequoteopening() {}
142
143    function doublequoteclosing() {}
144
145    // $link like 'SomePage'
146    function camelcaselink($link) {}
147
148    // $link like 'wiki:syntax', $title could be an array (media)
149    function internallink($link, $title = NULL) {}
150
151    // $link is full URL with scheme, $title could be an array (media)
152    function externallink($link, $title = NULL) {}
153
154    // $link is the original link - probably not much use
155    // $wikiName is an indentifier for the wiki
156    // $wikiUri is the URL fragment to append to some known URL
157    function interwikilink($link, $title = NULL, $wikiName, $wikiUri) {}
158
159    // Link to file on users OS, $title could be an array (media)
160    function filelink($link, $title = NULL) {}
161
162    // Link to a Windows share, , $title could be an array (media)
163    function windowssharelink($link, $title = NULL) {}
164
165//  function email($address, $title = NULL) {}
166    function emaillink($address, $name = NULL) {}
167
168    function internalmedialink (
169        $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
170        ) {}
171
172    function externalmedialink(
173        $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
174        ) {}
175
176    function table_open($maxcols = NULL, $numrows = NULL){}
177
178    function table_close(){}
179
180    function tablerow_open(){}
181
182    function tablerow_close(){}
183
184    function tableheader_open($colspan = 1, $align = NULL){}
185
186    function tableheader_close(){}
187
188    function tablecell_open($colspan = 1, $align = NULL){}
189
190    function tablecell_close(){}
191
192}
193
194
195//Setup VIM: ex: et ts=4 enc=utf-8 :
196