xref: /dokuwiki/inc/parser/renderer.php (revision 9ff28cfd2b2516ce05253dead4a074b943244cdb)
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_open($level) {}
47
48    function section_close() {}
49
50    function cdata($text) {}
51
52    function p_open() {}
53
54    function p_close() {}
55
56    function linebreak() {}
57
58    function hr() {}
59
60    function strong_open() {}
61
62    function strong_close() {}
63
64    function emphasis_open() {}
65
66    function emphasis_close() {}
67
68    function underline_open() {}
69
70    function underline_close() {}
71
72    function monospace_open() {}
73
74    function monospace_close() {}
75
76    function subscript_open() {}
77
78    function subscript_close() {}
79
80    function superscript_open() {}
81
82    function superscript_close() {}
83
84    function deleted_open() {}
85
86    function deleted_close() {}
87
88    function footnote_open() {}
89
90    function footnote_close() {}
91
92    function listu_open() {}
93
94    function listu_close() {}
95
96    function listo_open() {}
97
98    function listo_close() {}
99
100    function listitem_open($level) {}
101
102    function listitem_close() {}
103
104    function listcontent_open() {}
105
106    function listcontent_close() {}
107
108    function unformatted($text) {}
109
110    function php($text) {}
111
112    function html($text) {}
113
114    function preformatted($text) {}
115
116    function file($text) {}
117
118    function quote_open() {}
119
120    function quote_close() {}
121
122    function code($text, $lang = NULL) {}
123
124    function acronym($acronym) {}
125
126    function smiley($smiley) {}
127
128    function wordblock($word) {}
129
130    function entity($entity) {}
131
132    // 640x480 ($x=640, $y=480)
133    function multiplyentity($x, $y) {}
134
135    function singlequoteopening() {}
136
137    function singlequoteclosing() {}
138
139    function doublequoteopening() {}
140
141    function doublequoteclosing() {}
142
143    // $link like 'SomePage'
144    function camelcaselink($link) {}
145
146    // $link like 'wiki:syntax', $title could be an array (media)
147    function internallink($link, $title = NULL) {}
148
149    // $link is full URL with scheme, $title could be an array (media)
150    function externallink($link, $title = NULL) {}
151
152    // $link is the original link - probably not much use
153    // $wikiName is an indentifier for the wiki
154    // $wikiUri is the URL fragment to append to some known URL
155    function interwikilink($link, $title = NULL, $wikiName, $wikiUri) {}
156
157    // Link to file on users OS, $title could be an array (media)
158    function filelink($link, $title = NULL) {}
159
160    // Link to a Windows share, , $title could be an array (media)
161    function windowssharelink($link, $title = NULL) {}
162
163//  function email($address, $title = NULL) {}
164    function emaillink($address, $name = NULL) {}
165
166    function internalmedialink (
167        $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
168        ) {}
169
170    function externalmedialink(
171        $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
172        ) {}
173
174    function table_open($maxcols = NULL, $numrows = NULL){}
175
176    function table_close(){}
177
178    function tablerow_open(){}
179
180    function tablerow_close(){}
181
182    function tableheader_open($colspan = 1, $align = NULL){}
183
184    function tableheader_close(){}
185
186    function tablecell_open($colspan = 1, $align = NULL){}
187
188    function tablecell_close(){}
189
190}
191
192
193//Setup VIM: ex: et ts=4 enc=utf-8 :
194