1-- ----------------------------------------------------------------------------
2-- Rules to build the wxWidgets reference for wxLua
3--  load using : $lua -e"rulesFilename=\"rules.lua\"" genidocs.lua
4-- ----------------------------------------------------------------------------
5
6-- ----------------------------------------------------------------------------
7-- Set the root directory of the wxLua distribution, used only in this file
8wxlua_dir = "../"
9
10-- ============================================================================
11-- Set the output filename for the generated html
12output_filename = wxlua_dir.."/docs/wxluaref.html"
13
14-- ============================================================================
15-- A list of interface files to use to make the bindings. These files will be
16--   converted into a html file and placed in the output_filepath directory.
17--   The files are loaded from the file_path.
18interface_fileTable =
19{
20    {
21        ["namespace"] = "wx",
22        ["file_path"] = "wxwidgets/",
23        ["prepend_name"] = "wxbase/",
24        ["datatypes_filename"] = "wxbase_datatypes.lua",
25        ["files"] = {
26            "wxbase_base.i",
27            "wxbase_config.i",
28            "wxbase_data.i",
29            "wxbase_datetime.i",
30            "wxbase_file.i",
31        }
32    },
33    {
34        ["namespace"] = "wx",
35        ["file_path"] = "wxwidgets/",
36        ["prepend_name"] = "wxcore/",
37        ["datatypes_filename"] = "wxcore_datatypes.lua",
38        ["files"] = {
39            "wxcore_appframe.i",
40            "wxcore_clipdrag.i",
41            "wxcore_controls.i",
42            "wxcore_core.i",
43            "wxcore_defsutils.i",
44            "wxcore_dialogs.i",
45            "wxcore_event.i",
46            "wxcore_gdi.i",
47            "wxcore_geometry.i",
48            "wxcore_help.i",
49            "wxcore_image.i",
50            "wxcore_mdi.i",
51            "wxcore_menutool.i",
52            "wxcore_picker.i",
53            "wxcore_print.i",
54            "wxcore_sizer.i",
55            "wxcore_windows.i",
56        }
57    },
58    {
59        ["namespace"] = "wx",
60        ["file_path"] = "wxwidgets/",
61        ["prepend_name"] = "wxadv/",
62        ["datatypes_filename"] = "wxadv_datatypes.lua",
63        ["files"] = {
64            "wxadv_adv.i",
65            "wxadv_grid.i"
66        }
67    },
68    {
69        ["namespace"] = "wx",
70        ["file_path"] = "wxwidgets/",
71        ["prepend_name"] = "wxnet/",
72        ["datatypes_filename"] = "wxnet_datatypes.lua",
73        ["files"] = {
74            "wxnet_net.i"
75        }
76    },
77    {
78        ["namespace"] = "wx",
79        ["file_path"] = "wxwidgets/",
80        ["prepend_name"] = "wxmedia/",
81        ["datatypes_filename"] = "wxmedia_datatypes.lua",
82        ["files"] = {
83            "wxmedia_media.i"
84        }
85    },
86    {
87        ["namespace"] = "wx",
88        ["file_path"] = "wxwidgets/",
89        ["prepend_name"] = "wxgl/",
90        ["datatypes_filename"] = "wxgl_datatypes.lua",
91        ["files"] = {
92            "wxgl_gl.i"
93        }
94    },
95    {
96        ["namespace"] = "wx",
97        ["file_path"] = "wxwidgets/",
98        ["prepend_name"] = "wxxml/",
99        ["datatypes_filename"] = "wxxml_datatypes.lua",
100        ["files"] = {
101            "wxxml_xml.i"
102        }
103    },
104    {
105        ["namespace"] = "wx",
106        ["file_path"] = "wxwidgets/",
107        ["prepend_name"] = "wxxrc/",
108        ["datatypes_filename"] = "wxxrc_datatypes.lua",
109        ["files"] = {
110            "wxxrc_xrc.i"
111        }
112    },
113
114    {
115        ["namespace"] = "wxaui",
116        ["file_path"] = "wxwidgets/",
117        ["prepend_name"] = "wxaui/",
118        ["datatypes_filename"] = "wxaui_datatypes.lua",
119        ["files"] = {
120            "wxaui_aui.i"
121        }
122    },
123    {
124        ["namespace"] = "wxhtml",
125        ["file_path"] = "wxwidgets/",
126        ["prepend_name"] = "wxhtml/",
127        ["datatypes_filename"] = "wxhtml_datatypes.lua",
128        ["files"] = {
129            "wxhtml_html.i"
130        }
131    },
132    {
133        ["namespace"] = "wxstc",
134        ["file_path"] = "wxwidgets/",
135        ["prepend_name"] = "wxstc/",
136        ["datatypes_filename"] = "wxstc_datatypes.lua",
137        ["files"] = {
138            "wxstc_stc.i"
139        }
140    },
141    {
142        ["namespace"] = "wxwebview",
143        ["file_path"] = "wxwidgets/",
144        ["prepend_name"] = "wxwebview/",
145        ["datatypes_filename"] = "wxwebview_datatypes.lua",
146        ["files"] = {
147            "wxwebview_webview.i"
148        }
149    },
150
151    {
152        ["namespace"] = "wxlua",
153        ["file_path"] = "wxlua/",
154        ["prepend_name"] = "wxlua/",
155        ["datatypes_filename"] = "wxlua_datatypes.lua",
156        ["files"] = {
157            "wxlua.i"
158        }
159    },
160    {
161        ["namespace"] = "wxlua",
162        ["file_path"] = "wxlua_debugger/",
163        ["prepend_name"] = "wxluadebugger/",
164        ["datatypes_filename"] = "wxluadebugger_datatypes.lua",
165        ["files"] = {
166            "wxluadebugger.i"
167        }
168    }
169}
170
171-- ============================================================================
172-- A list of files that contain class names only that should be a complete
173-- list of all classes that could be wrapped.
174-- This will be mixed in with the classes in the interface files to explicitly
175-- show what is and isn't wrapped.
176completeClassRefFileTable = { "wxwidgets/wxclassref.txt" }
177
178-- If you specify the complete list above, name the col that will be checked
179-- if the class wrapped by lua in in the complete list
180completeClassRefColLabel = "In wxWidgets Manual"
181
182-- A message to append to the class name in the index for classes.
183msgForClassInIndex = {
184    ["wxAccessible"]        = "MS Windows only and disabled by default in wxWidgets",
185    ["wxAppTraits"]         = "Most functions are available elsewhere",
186    ["wxArray"]             = "Not a real class, see implementations (wxArrayInt)",
187    ["wxArrayInt"]          = "Interchangeable with a numeric indexed Lua table",
188    ["wxArrayDouble"]       = "Interchangeable with a numeric indexed Lua table",
189    ["wxArrayString"]       = "Interchangeable with a numeric indexed Lua table",
190    ["wxBitmapHandler"]     = "Base class for bitmap loaders, not needed",
191    ["wxCondition"]         = "For threading in C",
192    ["wxCmdLineParser"]     = "Easier to implement in Lua",
193    ["wxCSConv"]            = "Lua uses ANSI 8-bit strings",
194
195    ["wxDb"]                = "Deprecated and will not be in wxWidgets 3.0",
196    ["wxDbColDataPtr"]      = "Deprecated and will not be in wxWidgets 3.0",
197    ["wxDbColDef"]          = "Deprecated and will not be in wxWidgets 3.0",
198    ["wxDbColFor"]          = "Deprecated and will not be in wxWidgets 3.0",
199    ["wxDbColInf"]          = "Deprecated and will not be in wxWidgets 3.0",
200    ["wxDbConnectInf"]      = "Deprecated and will not be in wxWidgets 3.0",
201    ["wxDbGridColInfo"]     = "Deprecated and will not be in wxWidgets 3.0",
202    ["wxDbGridTableBase"]   = "Deprecated and will not be in wxWidgets 3.0",
203    ["wxDbIdxDef"]          = "Deprecated and will not be in wxWidgets 3.0",
204    ["wxDbInf"]             = "Deprecated and will not be in wxWidgets 3.0",
205    ["wxDbTable"]           = "Deprecated and will not be in wxWidgets 3.0",
206    ["wxDbTableInf"]        = "Deprecated and will not be in wxWidgets 3.0",
207
208    ["wxDirTraverser"]      = "Use wxDir::GetFirst() and GetNext()",
209    ["wxDllLoader"]         = "Deprecated since version 2.4, see wxDynamicLibrary",
210    ["wxEncodingConverter"] = "Lua uses ANSI 8-bit strings",
211    ["wxHashMap"]           = "Lua tables are hash tables",
212    ["wxHashSet"]           = "Lua tables are hash tables",
213    ["wxHashTable"]         = "Lua tables are hash tables",
214    ["wxMBConv"]            = "Lua uses ANSI 8-bit strings",
215    ["wxMBConvFile"]        = "Lua uses ANSI 8-bit strings",
216    ["wxMBConvUTF16"]       = "Lua uses ANSI 8-bit strings",
217    ["wxMBConvUTF32"]       = "Lua uses ANSI 8-bit strings",
218    ["wxMBConvUTF7"]        = "Lua uses ANSI 8-bit strings",
219    ["wxMBConvUTF8"]        = "Lua uses ANSI 8-bit strings",
220    ["wxModule"]            = "Useable in C++ only",
221    ["wxMutex"]             = "For threading in C",
222    ["wxMutexLocker"]       = "For threading in C",
223    ["wxRealPoint"]         = "Not used anywhere in wxWidgets",
224    ["wxRecursionGuard"]    = "Easier to implement in Lua",
225    ["wxRecursionGuardFlag"]= "Easier to implement in Lua",
226    ["wxScopedArray"]       = "Useable in C++ only (unnecessary in Lua)",
227    ["wxScopedPtr"]         = "Useable in C++ only (unnecessary in Lua)",
228    ["wxScopedTiedPtr"]     = "Useable in C++ only (unnecessary in Lua)",
229    ["wxSemaphore"]         = "For threading in C",
230    ["wxSortedArrayString"] = "Interchangeable with a numeric indexed Lua table",
231    ["wxString"]            = "Interchangeable with a Lua string",
232    ["wxStringBuffer"]      = "Useable in C++ only (unnecessary in Lua)",
233    ["wxStringBufferLength"]= "Useable in C++ only (unnecessary in Lua)",
234    ["wxVariant"]           = "Unnecessary in Lua",
235    ["wxVariantData"]       = "Unnecessary in Lua",
236}
237
238-- ============================================================================
239-- The HTML header for the generated file.
240htmlHeader = [[
241<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
242<html>
243<head>
244    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
245    <title>wxLua Reference Manual</title>
246    <meta content="John Labenski" name="author">
247    <META content="wxLua Reference Manual" name="description">
248    <LINK rel="stylesheet" type="text/css" href="wxlua.css">
249</head>
250<body>
251
252<h1>wxLua 2.8.12.2 Reference Manual for wxWidgets 2.8.12</h1>
253]]
254
255