From: John L. <jr...@us...> - 2007-05-01 14:23:41
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7927/wxLua/docs Modified Files: wxlua.html Log Message: updated docs to say how to run the samples and added an index cleaned up some of the modules wxLua.dsw - wxbind must be built before wxluasocket in the wxlua module shared library since the wxluasocket bindings depend on the wxWindow tag. Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxlua.html 27 Apr 2007 20:26:57 -0000 1.15 --- wxlua.html 1 May 2007 14:23:35 -0000 1.16 *************** *** 1,24 **** <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head> ! <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>wxLua Documentation</title> <meta content="John Labenski" name="author"></head> ! ! <body><h2><u>wxLua Documentation</u></h2> <a href="http://wxlua.sourceforge.net">wxLua</a> is a <a href="http://www.lua.org">lua</a> scripting language wrapper around the <a href="http://www.wxwidgets.org">wxWidgets</a> ! cross-platform GUI library. It consists of two IDE type editors, an executable for running standalone wxLua ! scripts, a lua module to load using "require", and a library for extending C++ programs with a fast, small, fully ! embeddable scripting language.<br> ! <br><b>References:</b><br> <a href="http://wxlua.sourceforge.net">http://wxlua.sourceforge.net</a><br> <a href="http://www.lua.org">http://www.lua.org</a><br> ! <a href="http://www.wxwidgets.org">http://www.wxwidgets.org</a><br> ! <br><h2><u>The wxLua "big picture"</u></h2> ! Lua is an ANSI C compatible scripting language that can load and run interpreted scripts as either files or strings. The language itself is very dynamic and contains a limited number of data types, mainly --- 1,29 ---- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head> ! <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>wxLua Documentation</title> ! <meta content="John Labenski" name="author"></head> ! <body><h2><u>wxLua ! Documentation</u></h2> <a href="http://wxlua.sourceforge.net">wxLua</a> is a <a href="http://www.lua.org">lua</a> scripting language wrapper around the <a href="http://www.wxwidgets.org">wxWidgets</a> ! cross-platform GUI library. It consists of two IDE type editors that ! can edit and run lua programs (wxLua and wxLuaEdit), an executable for running standalone wxLua ! scripts (wxLuaFreeze), a lua module to load using "require", and a ! library for extending C++ programs with a fast, small, fully ! embeddable scripting language.<br><h3>References:</h3> <a href="http://wxlua.sourceforge.net">http://wxlua.sourceforge.net</a><br> <a href="http://www.lua.org">http://www.lua.org</a><br> ! <a href="http://www.wxwidgets.org">http://www.wxwidgets.org</a><br><h2 style="text-decoration: underline;">Contents</h2><ol><li><a href="#The_wxLua_big_picture">The ! wxLua "big picture"</a></li><li><a href="#Version_Information">Version Information</a></li><li><a href="#wxLua_Requirements">Requirements</a></li><li><a href="#Introduction_to_Lua_very_brief">Introduction to Lua ! (very brief)</a></li><li><a href="#wxLua_Programming_in_Lua">Programming in wxLua</a></li><li><a href="#wxLua_Samples">wxLua Samples and How to Run Them</a></li><ol><li><a href="#How_to_run_the_samples">How to Run the Samples</a></li><li><a href="#Provided_samples">Provided Samples</a></li></ol><li><a href="#wxLua_Applications">wxLua Applications</a></li><ol><li><a href="#wxLua">wxLua</a></li><li><a href="#wxLuaFreeze">wxLuaFreeze</a></li><li><a href="#wxLuaEdit">wxLuaEdit</a></li></ol><li><a href="#wxLua_Utils">wxLua Utils</a></li><ol><li><a href="#bin2c.lua">bin2c.lua</a></li><li><a href="#wrapmodule.wx.lua">wrapmodule.wx.lua</a></li></ol><li><a href="#wxLua_Sourcecode_Modules">wxLua Sourcecode Modules</a></li><li><a href="#wxLua_Programming_in_C">wxLua C++ Programming Guide</a></li></ol><h2><a name="The_wxLua_big_picture"></a> ! <u>The wxLua "big picture"</u></h2> ! Lua is a small scripting language written in ANSI ! C that can load and run interpreted scripts as either files or strings. The language itself is very dynamic and contains a limited number of data types, mainly *************** *** 34,40 **** There is no special initialization required in lua and you can use as much or as little of wxWidgets as you like. ! <h2><u>Version Information</u></h2> <ul> <li>Lua 5.1.2</li> <ul> <li>wxLua ! uses an unmodified copy of lua 5.1.2</li> <li>Any program that works using the official release of lua will work in wxLua.</li> </ul> <li>wxWidgets --- 39,46 ---- There is no special initialization required in lua and you can use as much or as little of wxWidgets as you like. ! <h2><a name="Version_Information"></a><u>Version ! Information</u></h2> <ul> <li>Lua 5.1.2</li> <ul> <li>wxLua ! uses an unmodified copy of Lua 5.1.2</li> <li>Any program that works using the official release of lua will work in wxLua.</li> </ul> <li>wxWidgets *************** *** 48,56 **** wxLua makes use of the wxStyledTextCtrl contrib library in wxWidgets/contrib/src/stc. You need to have compiled this into a ! library if you want to compile the wxLua apps.</li> </ul> <li>wxLua version number is set to the stable version of wxWidgets that it has been updated to. It should also compile with newer versions of wxWidgets as well as older ones. </li> ! </ul><h2><u>wxLua Requirements</u></h2> An end user of wxLua can use the binary packages of wxLua and everything that's needed is contained within it. C++ programmers or --- 54,64 ---- wxLua makes use of the wxStyledTextCtrl contrib library in wxWidgets/contrib/src/stc. You need to have compiled this into a ! library if you want to compile the wxLua apps. In wxWidgets >= ! 2.9 the wxStyledTextCtrl is now part of the main library.</li> </ul> ! <li>wxLua version number is set to the stable version of wxWidgets that it has been updated to. It should also compile with newer versions of wxWidgets as well as older ones. </li> ! </ul><h2><a name="wxLua_Requirements"></a><u>Requirements</u></h2> An end user of wxLua can use the binary packages of wxLua and everything that's needed is contained within it. C++ programmers or *************** *** 58,63 **** development library of wxWidgets >=2.6.3, typically the source code itself that's been compiled on your system. More information about ! compiling wxLua is contained in the install.htm file. ! <h2><u>Introduction to Lua (very brief)</u></h2> Assuming that you have a cursory understanding of programming techniques, this primer should give you a good enough feel for lua to --- 66,72 ---- development library of wxWidgets >=2.6.3, typically the source code itself that's been compiled on your system. More information about ! compiling wxLua is contained in the install.htm file and on <a href="http://wxlua.sourceforge.net/">http://wxlua.sourceforge.net</a>. ! <h2><a name="Introduction_to_Lua_very_brief"></a><u>Introduction ! to Lua (very brief)</u></h2> Assuming that you have a cursory understanding of programming techniques, this primer should give you a good enough feel for lua to *************** *** 222,248 **** printHi() do return end; print("hi") end</i> which can be useful for debugging functions.</li> </ul> ! </ul><blockquote> <pre>do<br> -- create a new local scope<br> local a = 2<br>end<br></pre> ! </blockquote><ul> <li><b>if (bool) then ... elseif (bool) then ... else ... end</b></li> ! </ul><blockquote> <pre>local a, b, c = 1, 2, 3 -- can assign multiple values<br>a = 1; b = 2; c = 3 -- use ; for multiple lines of code on single line<br>a, b, c = 1, 2, 3 -- this works too<br>if (a == 1) and ((b <= 2) or (c ~= 3)) then <br> print(a+b/c) <br>elseif a == 2 then -- no parentheses necessary<br> print(a)<br>else<br> print(b)<br>end</pre> ! </blockquote><ul> <ul> <li>There is no case statement, but a table[value] = function() ... end may be used to simulate one.</li> <blockquote> ! <pre>mycase = {}<br>mycase[1] = function() print("Hello #1") end<br>mycase[2] = function() print("Hello #2") end<br>...<br>if mycase[value] then<br> mycase[value]()<br>else<br> print("Unknown case value")<br>end</pre> ! </blockquote> </ul> <li><b>while (bool) ... end</b></li> <ul> <li>Note : there is no <i>continue</i> keyword only <i>break</i></li> </ul> ! </ul><blockquote> <pre>function CheckA(val) if val == 5 then return true end end<br>local a = 1<br>while a < 10 do<br> print(a)<br> a = a + 1 -- no increment operator<br> if CheckA(a) then break end<br>end</pre> ! </blockquote><ul> <ul> <li>You can make a "fake" continue by doing this, doesn't print # 5.</li> </ul> ! </ul><blockquote> <pre>function CheckA(val) if val == 5 then return true end end<br>local a = 1<br>while a < 10 do while true do<br> a = a + 1 -- no increment operator<br> if CheckA(a) then <br> break <br> else<br> print(a)<br> end<br>break end end</pre> ! </blockquote><ul> <li><b>repeat ... until (bool)</b></li> <ul> <li>Note : there is no continue keyword only break</li> </ul> ! </ul><blockquote> <pre>local a = 1<br>repeat<br> local temp = a * 2<br> print(temp, type(temp))<br> a = a + 1 -- no increment operator<br>until a > 10</pre> ! </blockquote><ul> <li><b>for var = init_value, end_value [, increment] do ... end</b></li> <ul> <li>Note : there is no --- 231,257 ---- printHi() do return end; print("hi") end</i> which can be useful for debugging functions.</li> </ul> ! </ul><blockquote> <pre>do<br> -- create a new local scope<br> local a = 2<br>end<br></pre></blockquote><ul><li><b>if ! (bool) then ... elseif (bool) then ... else ... end</b></li> ! </ul><blockquote> <pre>local a, b, c = 1, 2, 3 -- can assign multiple values<br>a = 1; b = 2; c = 3 -- use ; for multiple lines of code on single line<br>a, b, c = 1, 2, 3 -- this works too<br>if (a == 1) and ((b <= 2) or (c ~= 3)) then <br> print(a+b/c) <br>elseif a == 2 then -- no parentheses necessary<br> print(a)<br>else<br> print(b)<br>end</pre></blockquote><ul><ul><li>There ! is no case statement, but a table[value] = function() ... end may be used to simulate one.</li> <blockquote> ! <pre>mycase = {}<br>mycase[1] = function() print("Hello #1") end<br>mycase[2] = function() print("Hello #2") end<br>...<br>if mycase[value] then<br> mycase[value]()<br>else<br> print("Unknown case value")<br>end</pre></blockquote></ul><li><b>while ! (bool) ... end</b></li> <ul> <li>Note : there is no <i>continue</i> keyword only <i>break</i></li> </ul> ! </ul><blockquote> <pre>function CheckA(val) if val == 5 then return true end end<br>local a = 1<br>while a < 10 do<br> print(a)<br> a = a + 1 -- no increment operator<br> if CheckA(a) then break end<br>end</pre></blockquote><ul><ul><li>You ! can make a "fake" continue by doing this, doesn't print # 5.</li> </ul> ! </ul><blockquote> <pre>function CheckA(val) if val == 5 then return true end end<br>local a = 1<br>while a < 10 do while true do<br> a = a + 1 -- no increment operator<br> if CheckA(a) then <br> break <br> else<br> print(a)<br> end<br>break end end</pre></blockquote><ul><li><b>repeat ! ... until (bool)</b></li> <ul> <li>Note : there is no continue keyword only break</li> </ul> ! </ul><blockquote> <pre>local a = 1<br>repeat<br> local temp = a * 2<br> print(temp, type(temp))<br> a = a + 1 -- no increment operator<br>until a > 10</pre></blockquote><ul><li><b>for ! var = init_value, end_value [, increment] do ... end</b></li> <ul> <li>Note : there is no *************** *** 252,257 **** it did before the loop. Copy the loop counter variable to a separate variable if you need to save it when breaking for example.</li> </ul> ! </ul><blockquote> <pre>local a = "hello"<br>for a = 1, 10 --[[, increment]] do -- optional increment value, else 1<br> -- the a here is local to the for loop and you CANNOT change it to affect the loop, use break<br> local temp = a * 2<br> print(temp)<br>end<br>print(a) -- a == "hello" since the a in the for loop above was local to the loop<br></pre> ! </blockquote><ul> <li><b>functions</b></li> <ul> <li>Input any number of values by value, tables are passed by --- 261,265 ---- it did before the loop. Copy the loop counter variable to a separate variable if you need to save it when breaking for example.</li> </ul> ! </ul><blockquote> <pre>local a = "hello"<br>for a = 1, 10 --[[, increment]] do -- optional increment value, else 1<br> -- the a here is local to the for loop and you CANNOT change it to affect the loop, use break<br> local temp = a * 2<br> print(temp)<br>end<br>print(a) -- a == "hello" since the a in the for loop above was local to the loop<br></pre></blockquote><ul><li><b>functions</b></li> <ul> <li>Input any number of values by value, tables are passed by *************** *** 263,268 **** receive return values that you do not want (eg. you only want the second return value, use _ for the first).</li> </ul> ! </ul><blockquote> <pre>function DoStuff(a, b, c)<br> a = b*c -- does not change global and/or input number a<br> local function Calc(a)<br> return a*2<br> end<br> <br> return Calc(a)*b*c -- or for multiple values "return a*b*c, a*b"<br>end<br>-- call function<br>a = 10<br>result = DoStuff(a, 1, 2)<br>-- can also put function into a table<br>stuff = {}<br>stuff.DoStuff = DoStuff<br>result = stuff.DoStuff(1, 2, 3)<br>print(a, result) -- "10, 72" since a is not changed</pre> ! </blockquote><h2><u>wxLua Programming in Lua</u></h2> Programming in wxLua means that you're writing lua programs using the lua --- 271,276 ---- receive return values that you do not want (eg. you only want the second return value, use _ for the first).</li> </ul> ! </ul><blockquote> <pre>function DoStuff(a, b, c)<br> a = b*c -- does not change global and/or input number a<br> local function Calc(a)<br> return a*2<br> end<br> <br> return Calc(a)*b*c -- or for multiple values "return a*b*c, a*b"<br>end<br>-- call function<br>a = 10<br>result = DoStuff(a, 1, 2)<br>-- can also put function into a table<br>stuff = {}<br>stuff.DoStuff = DoStuff<br>result = stuff.DoStuff(1, 2, 3)<br>print(a, result) -- "10, 72" since a is not changed</pre></blockquote><h2><a name="wxLua_Programming_in_Lua"></a><u>Programming ! in wxLua</u></h2> Programming in wxLua means that you're writing lua programs using the lua *************** *** 530,535 **** that creates a new wxRect, sets your extra functions for it, and returns it for use.</li> </ul> </ul> </ul> ! </ul> ! </ul><h2><u><u>wxLua Samples</u></u></h2> There are a number of sample programs in the <i>samples</i> directory. These programs demonstrate how to write simple programs and --- 538,543 ---- that creates a new wxRect, sets your extra functions for it, and returns it for use.</li> </ul> </ul> </ul> ! </ul></ul><h2><a name="wxLua_Samples"></a><u><u>wxLua ! Samples and How to Run Them</u></u></h2> There are a number of sample programs in the <i>samples</i> directory. These programs demonstrate how to write simple programs and *************** *** 540,544 **** be generally useful to the wxLua community. Please understand that any ! code you contribute has to be maintained and so try to keep things simple and clear.<br> <br>If something in wxLua seems to not work as expected it is --- 548,553 ---- be generally useful to the wxLua community. Please understand that any ! code you contribute has to be maintained and easily ! understood so try to keep things simple and clear.<br> <br>If something in wxLua seems to not work as expected it is *************** *** 546,552 **** to duplicate your error in the simplest possible way in one of the samples and ask on the <i>wxl...@li...</i> ! mailing list.<br> <ul> <li><b>calculator.wx.lua</b></li> <ul> ! <li>A simple calculator program the demonstrates loading an XRC resource, accelerator tables, and event handling.</li> </ul> <li><b>choices.wx.lua</b></li> <ul> <li>Demonstrates --- 555,581 ---- to duplicate your error in the simplest possible way in one of the samples and ask on the <i>wxl...@li...</i> ! mailing list.<br><br>Why are the samples named <span style="font-style: italic;">sample.wx.lua</span>? ! To allow them to be colorized correctly in syntax high-lighting ! editors, yet denote to people that they are for wxLua and must ! be run using the wxLua exectuable or the wxLua module. <br><h3><a name="How_to_run_the_samples"></a>How to Run the ! Samples</h3>The ! examples below are for MS Windows .exe executables, but the same ! applies for Linux or OSX, just remove the .exe extension for the ! executable. See also <a href="#wxLua_Applications">wxLua ! Applications</a> for more information about these programs.<ul><li>On ! the command line run <span style="font-weight: bold; font-style: italic;">$wxlua.exe ! sample.wx.lua</span></li><li>On the command line run <span style="font-weight: bold; font-style: italic;">$wxluafreeze.exe ! sample.wx.lua</span></li><li>Open the program in <span style="font-weight: bold;">wxlua.exe</span> and choose ! the menu item Run.</li><li>Open the program in <span style="font-weight: bold;">wxluaedit.exe</span> and ! press the |> play button to run it.</li><li>Use ! wxLua as a lua module (using require), run <span style="font-weight: bold; font-style: italic;">$lua.exe ! ../utils/wrapmodule/wrapmodule.wx.lua sample.wx.lua</span></li><ul><li>Note ! that <span style="font-weight: bold;">wrapmodule.wx.lua</span> ! is in the <span style="font-style: italic;">utils/wrapmodule</span> ! directory so you may have to specify a different path depending on ! where you are running lua.exe from. For more information see <a href="#wrapmodule.wx.lua">wrapmodule.wx.lua</a>. </li></ul></ul><h3><a name="Provided_samples"></a>Provided Samples</h3> <ul> <li><b>calculator.wx.lua</b></li> <ul> ! <li>A simple calculator program the demonstrates loading and ! using controls from an XRC resource, accelerator tables, and event handling.</li> </ul> <li><b>choices.wx.lua</b></li> <ul> <li>Demonstrates *************** *** 557,575 **** demo of how to use coroutines in wxLua using wxEVT_IDLE to call coroutine.resume().</li></ul><li><b>debug.wx.lua</b></li> ! <ul> <li>TODO ?</li> </ul><li><b>dialog.wx.lua</b></li> <ul> <li>A simple temperature conversion program to/from Fahrenheit to/from Celsius. Shows the use of wxSizers, wxButtons, and the wxTextCtrl.</li> </ul> <li><b>editor.wx.lua</b></li> ! <ul> <li>This is the editor that the wxLua application in <i>apps/wxlua</i> ! uses.</li> </ul> <li><b>fldemo.wx.lua</b></li> <ul> <li>Deprecated, wxWidgets is not actively maintaining the docking library FL ! contrib and neither are we.</li> </ul> <li><b>grid.wx.lua</b></li> ! <ul> <li>A very simple demo of the wxGrid class.</li> </ul> <li><b>htmlwin.wx.lua</b></li> <ul> ! <li>Shows the wxLuaHtmlWindow and it's virtual functions.</li> ! </ul> <li><b>mdi.wx.lua</b></li> <ul> ! <li>Shows the MDI classes.</li> </ul> <li><b>minimal.wx.lua</b></li> <ul> <li>A minimal sample that creates a wxFrame, wxMenuBar, and --- 586,615 ---- demo of how to use coroutines in wxLua using wxEVT_IDLE to call coroutine.resume().</li></ul><li><b>debug.wx.lua</b></li> ! <ul> <li>Does not work... TODO ?</li> </ul><li><b>dialog.wx.lua</b></li> <ul> <li>A simple temperature conversion program to/from Fahrenheit to/from Celsius. Shows the use of wxSizers, wxButtons, and the wxTextCtrl.</li> </ul> <li><b>editor.wx.lua</b></li> ! <ul> <li>This is the editor that the wxLua application <i>apps/wxlua</i> ! uses. It uses the wxStyledTextCtrl for the editor and can run and debug ! lua programs. For more information see the wxLua application notes ! below. </li> </ul> <li><b>fldemo.wx.lua</b></li> <ul> <li>Deprecated, wxWidgets is not actively maintaining the docking library FL ! contrib and neither are we. This does not work.</li> </ul> ! <li><b>grid.wx.lua</b></li> ! <ul> <li>A very simple demo of the wxGrid class. A better ! one would be appreciated.</li> </ul> <li><b>htmlwin.wx.lua</b></li> <ul> ! <li>Shows the wxLuaHtmlWindow and it's virtual functions as well ! as adding.custom widgets to a wxHtmlWindow.</li> ! </ul> <li style="font-weight: bold;">luamodule.wx.lua</li><ul><li>A ! sample for the loading the wxLua "wx" module using lua's require ! function when wxLua is compiled as a shared library. Run this program ! using the lua executable and not wxLua or wxLuaFreeze since the wxLua ! library is loaded at run-time. See also <a href="#wrapmodule.wx.lua">wrapmodule.wx.lua</a> for more information about loading lua modules.</li></ul><li><b>mdi.wx.lua</b></li> ! <ul><li>Shows the MDI classes, wxMDIParentFrame and ! wxMDIChildFrame.</li> ! </ul> <li><b>minimal.wx.lua</b></li> <ul> <li>A minimal sample that creates a wxFrame, wxMenuBar, and *************** *** 579,586 **** some wxDC drawing classes in wxLua.</li> </ul> <li><b>scribble.wx.lua</b></li> ! <ul> <li>A simple drawing program that shows wxMouseEvents and ! wxDC drawing.</li> </ul> <li><b>sizer.wx.lua</b></li> ! <ul> <li>A wxSizer demonstration.</li> </ul> <li><b>tree.wx.lua</b></li> <ul> <li>A wxTreeCtrl demonstration.</li> </ul> <li><b>unittest.wx.lua</b></li> <ul> <li>Tests --- 619,629 ---- some wxDC drawing classes in wxLua.</li> </ul> <li><b>scribble.wx.lua</b></li> ! <ul> <li>A simple drawing program that shows how to handle ! wxMouseEvents and ! wxDC drawing as well as creating a custom control.</li> </ul> ! <li><b>sizer.wx.lua</b></li> ! <ul> <li>A simple wxSizer demonstration.</li> </ul> ! <li><b>tree.wx.lua</b></li> <ul> <li>A wxTreeCtrl demonstration.</li> </ul> <li><b>unittest.wx.lua</b></li> <ul> <li>Tests *************** *** 596,606 **** two separate lua tables to make things easier to understand. The sudoku solver code is in the "sudoku" table at the top of the listing and the ! wxWidgets GUI code in the "sudokuGUI" table at the bottom. </li> ! </ul> ! </ul><h2><u>wxLua Applications</u></h2> The applications that wxLua provides are in the apps directory. These are C++ programs that are compiled against the wxWidgets library and the wxWidgets wxStyledTextCtrl library. <br> ! <ul> <li><b>wxLua</b></li> <ul> <li>This is a wxLua IDE editor program written in lua that has a --- 639,650 ---- two separate lua tables to make things easier to understand. The sudoku solver code is in the "sudoku" table at the top of the listing and the ! wxWidgets GUI code in the "sudokuGUI" table at the bottom.</li> ! </ul></ul><h2><a name="wxLua_Applications"></a><u>wxLua ! Applications</u></h2> The applications that wxLua provides are in the apps directory. These are C++ programs that are compiled against the wxWidgets library and the wxWidgets wxStyledTextCtrl library. <br> ! <ul> <li><h3><a name="wxLua"></a>wxLua</h3></li> ! <ul> <li>This is a wxLua IDE editor program written in lua that has a *************** *** 684,688 **** lua arg table starts with [1] = '--' which should probably be ignored.</li> ! </ul> </ul> </ul> </ul> <li><b>wxLuaEdit</b></li> <ul> <li>This is another IDE type program written in C++ that runs --- 728,732 ---- lua arg table starts with [1] = '--' which should probably be ignored.</li> ! </ul> </ul> </ul> </ul> <li><h3><a name="wxLuaEdit"></a>wxLuaEdit</h3></li> <ul> <li>This is another IDE type program written in C++ that runs *************** *** 718,723 **** need to download either the newest version or use CVS to get a copy from wxcode.sourceforge.net in order to compile this editor.</li> ! </ul> <li><b>wxLuaFreeze</b></li> <ul> ! <li>This is the simplest incarnation of a wxLua program that makes use of the wxLua library. Once compiled it can run lua programs on the command line as <i>$wxLuaFreeze program.lua</i>. --- 762,768 ---- need to download either the newest version or use CVS to get a copy from wxcode.sourceforge.net in order to compile this editor.</li> ! </ul> <li><h3><a name="wxLuaFreeze"></a>wxLuaFreeze</h3></li> ! <ul><li>This is the simplest incarnation of a wxLua program ! that makes use of the wxLua library. Once compiled it can run lua programs on the command line as <i>$wxLuaFreeze program.lua</i>. *************** *** 738,751 **** upx can be used to compress the executable to about 1.5 Mb from 4.5 Mb, using VC6 in release mode as the compiler.</li> </ul> ! </ul><h2><u>wxLua Utils</u></h2> Utility programs for wxLua are located in the <i>util</i> directory. ! <ul> <li><b>bin2c</b></li> <ul> <li>bin2c.lua is a lua program to convert a file into a const char* string to be included into a C/C++ program. You can then run the script in C++ by calling <i>wxLuaState::LuaDoBuffer(string_var, string_len, "Lua program")</i>. Help is given if no arguments are ! given when run or you can read its Usage() function.</li> </ul> ! </ul><h2><u>wxLua Sourcecode Modules</u></h2> wxLua is broken up into "modules" that are compiled into libraries so that you can choose to link to some or all of them. The directory --- 783,816 ---- upx can be used to compress the executable to about 1.5 Mb from 4.5 Mb, using VC6 in release mode as the compiler.</li> </ul> ! </ul><h2><a name="wxLua_Utils"></a><u>wxLua ! Utils</u></h2> Utility programs for wxLua are located in the <i>util</i> directory. ! <ul> <li><h3><a name="bin2c.lua"></a>bin2c.lua</h3></li> ! <ul> <li>bin2c.lua is a lua program to convert a file into a const char* string to be included into a C/C++ program. You can then run the script in C++ by calling <i>wxLuaState::LuaDoBuffer(string_var, string_len, "Lua program")</i>. Help is given if no arguments are ! given when run or you can read its Usage() function.</li> </ul><li><h3><a name="wrapmodule.wx.lua"></a>wrapmodule.wx.lua</h3></li><ul><li>This ! is a wrapper program to allow you to use the wx shared library as a lua ! module (using require) to run the provided samples without having to ! edit them. See <a href="#How_to_run_the_samples">How to ! Run the Samples</a> for other ways to run the samples.</li><li>The ! search path for the module may need to be specified if it is not in the ! same directory as the sample you want to run.</li><ul><li>You ! can add a line like this to the top of wrapmodule.wx.lua (adjusted as ! necessary) for your paths.</li><li>The list of paths is a ! semicolon separated list of paths to <span style="font-weight: bold;">?.so</span> (for unix type ! shared libraries) and <span style="font-weight: bold;">?.dll</span> ! (for MSW) .</li><li>? is equivalent to * meaning match ! anything for typical shells (DOS prompt).</li><li>You might ! as well include paths to both unix and MSW libraries so that the script ! can be run on either platform without modification since typically only ! the libraries that work on any given platform will be installed.</li><li>package.cpath ! = ! ";;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;"</li></ul></ul> ! </ul><h2><a name="wxLua_Sourcecode_Modules"></a><u>wxLua ! Sourcecode Modules</u></h2> wxLua is broken up into "modules" that are compiled into libraries so that you can choose to link to some or all of them. The directory *************** *** 796,800 **** the wxlua app.</li> <li>This lib depends on the wxluadebug lib.</li> </ul> ! </ul><h2><u>wxLua Programming in C++</u></h2> The documentation for the wxLua library is in the header files and descriptions are given for each function, enum, etc. Please --- 861,866 ---- the wxlua app.</li> <li>This lib depends on the wxluadebug lib.</li> </ul> ! </ul><h2><a name="wxLua_Programming_in_C"></a><u>wxLua C++ <u>Programming ! Guide</u></u></h2> The documentation for the wxLua library is in the header files and descriptions are given for each function, enum, etc. Please *************** *** 906,909 **** code LUA_ERRXXX or 0 on sucess</li> </ul> <li>The other functions are documented in wxlstate.h.</li> ! </ul><br> ! </body></html> \ No newline at end of file --- 972,974 ---- code LUA_ERRXXX or 0 on sucess</li> </ul> <li>The other functions are documented in wxlstate.h.</li> ! </ul></body></html> \ No newline at end of file |