3
* @brief NME optional plugin for table of contents in HTML.
4
* @author Yves Piguet. Copyright 2007-2008, Yves Piguet.
7
/* License: new BSD license (see NME.h) */
9
#ifndef __NMEPluginTOC__
10
#define __NMEPluginTOC__
18
/** User data for hook (opaque, typically allocated as an automatic (local)
19
variable and passed by address to NMESetTOCOutputFormat)
23
NMEOutputFormat *outputFormat; ///< private
24
NMEInt level1; ///< private
25
NMEInt level2; ///< private
26
NMEBoolean links; ///< private
29
/** Set output format structure for TOC generation
30
@param[in] f address of output format structure, whose contents are filled
31
@param[out] d paragraph hook user data
33
void NMESetTOCOutputFormat(NMEOutputFormat *f, HookTOCData *d);
35
/** User data of NMEPluginTOCEntry
39
NMEConstText src; ///< original NME source code
40
NMEInt srcLen; ///< length of src
43
/** Plugin implementation for calendar using table markup (plugin's data:
45
@param[in] name plugin name, such as "calendar"
46
@param[in] nameLen length of name
47
@param[in] data data text
48
@param[in] dataLen length of data
49
@param[in,out] context current context
50
@param[in] userData pointer passed from the parser, as specified in NMEPlugin
51
@return error code (kNMEErrOk for success)
61
<< toc level1 level2 title
65
NMEErr NMEPluginTOC(NMEConstText name, NMEInt nameLen,
66
NMEConstText data, NMEInt dataLen,
70
/// NMEPlugin entry for table of plugins
71
#define NMEPluginTOCEntry(data) \
72
{"toc", kNMEPluginOptBetweenPar, NMEPluginTOC, (void *)data}