From: John L. <jr...@us...> - 2007-05-31 17:19:50
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14219/wxLua/docs Modified Files: binding.html changelog.txt wxlua.html wxluaref.html Log Message: Huge changes, overloaded functions by default replace wx.wxNull with wx.NULL change WXLUA_VERSION and others with wxLUA_VERSION class member enums are part of class table static class member functions are part of class table %properties are generated on the fly ... and more, see docs/changelog.txt Index: wxluaref.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxluaref.html,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxluaref.html 13 Mar 2007 05:01:01 -0000 1.17 --- wxluaref.html 31 May 2007 17:18:47 -0000 1.18 *************** *** 35,39 **** <a href="#wxBitmapButton">wxBitmapButton</a><br> <a href="#wxBitmapDataObject">wxBitmapDataObject</a><br> ! <a href="#wxBitmapHandler">wxBitmapHandler</a><br> <a href="#wxBookCtrlBase">wxBookCtrlBase</a> - (Not in wxWidgets reference manual)<br> <a href="#wxBookCtrlBaseEvent">wxBookCtrlBaseEvent</a> - (Not in wxWidgets reference manual)<br> --- 35,39 ---- <a href="#wxBitmapButton">wxBitmapButton</a><br> <a href="#wxBitmapDataObject">wxBitmapDataObject</a><br> ! wxBitmapHandler - (Not wrapped)<br> <a href="#wxBookCtrlBase">wxBookCtrlBase</a> - (Not in wxWidgets reference manual)<br> [...8906 lines suppressed...] - <font color=#000077> <i>%property</i>=LinesAdded, read, write</font><br> - <font color=#000077> <i>%property</i>=Line, read, write</font><br> - <font color=#000077> <i>%property</i>=FoldLevelNow, read, write</font><br> - <font color=#000077> <i>%property</i>=FoldLevelPrev, read, write</font><br> - <font color=#000077> <i>%property</i>=Margin, read, write</font><br> - <font color=#000077> <i>%property</i>=Message, read, write</font><br> - <font color=#000077> <i>%property</i>=WParam, read, write</font><br> - <font color=#000077> <i>%property</i>=LParam, read, write</font><br> - <font color=#000077> <i>%property</i>=ListType, read, write</font><br> - <font color=#000077> <i>%property</i>=X, read, write</font><br> - <font color=#000077> <i>%property</i>=Y, read, write</font><br> - <font color=#000077> <i>%property</i>=DragText, read, write</font><br> - <font color=#000077> <i>%property</i>=DragAllowMove, read, write</font><br> - <font color=#000077> <i>%property</i>=DragResult, read, write</font><br> - <font color=#000077> <i>%property</i>=Shift, read</font><br> - <font color=#000077> <i>%property</i>=Control, read</font><br> - <font color=#000077> <i>%property</i>=Alt, read</font><br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> --- 17652,17655 ---- Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxlua.html 21 May 2007 01:07:59 -0000 1.18 --- wxlua.html 31 May 2007 17:18:47 -0000 1.19 *************** *** 11,14 **** --- 11,15 ---- </head> + <body> *************** *** 190,195 **** everything that's needed is contained within it. C++ programmers or users on platforms that we don't provide binaries will need a ! 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 --- 191,197 ---- everything that's needed is contained within it. C++ programmers or users on platforms that we don't provide binaries will need a ! development library of wxWidgets, typically the source ! code itself that you have 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 *************** *** 480,485 **** return multiple values and be passed less or more variables ! than specified. The unhandled returns or inputs are set to ! <span style="font-style: italic;">nil</span> or if there are extra thrown out. </li> --- 482,486 ---- return multiple values and be passed less or more variables ! than specified. The unhandled returns or inputs are set to <span style="font-style: italic;">nil</span> or if there are extra thrown out. </li> *************** *** 776,780 **** "classes" in the namespace <b><i>wx</i></b> from ! wxWidgets. <br> <br> --- 777,783 ---- "classes" in the namespace <b><i>wx</i></b> from ! wxWidgets. Additional libraries may be added as bindings and can be ! placed in their own "namespace" table, but for the examples below we ! will use the wx table. <br> <br> *************** *** 852,861 **** <li>All ! enums that are members of classes are available as <i>wx.CLASSNAME_ENUM_NAME</i></li> <ul> <li>Example : <i>"enum wxFTP::TransferMode { ! ASCII, ... }"</i> is accessible as <i>wx.wxFTP_ASCII</i></li> </ul> --- 855,864 ---- <li>All ! enums that are members of classes are available as <i>wx.CLASSNAME.ENUM_NAME</i></li> <ul> <li>Example : <i>"enum wxFTP::TransferMode { ! ASCII, ... }"</i> is accessible as <i>wx.wxFTP.ASCII</i></li> </ul> *************** *** 899,904 **** <ul> ! <li>All ! <i>wxEVT_XXX</i> wxEventTypes (a number) are available as <i>wx.wxEVT_XXX</i></li> --- 902,906 ---- <ul> ! <li>All <i>wxEVT_XXX</i> wxEventTypes (a number) are available as <i>wx.wxEVT_XXX</i></li> *************** *** 1014,1025 **** <li>Example : <i>"pt = wx.wxPoint(1, ! 2); pt2 = wx.wxPointCopy(pt)"</i>, but some functions ! are overloaded, using the <i>%overload</i> tag in the ! interface files, meaning that the proper function to call ! is determined at runtime so <i>"pt3 = wx.wxPoint(pt2)"</i> ! also works. Since the binding generator needs to generate the <i>wx.wxPointCopy</i> ! function anyway, it is available, but using the overloaded function is ! much nicer. The interface files declare renamed constructors using the <i>%constructor</i> ! tag.</li> </ul> --- 1016,1030 ---- <li>Example : <i>"pt = wx.wxPoint(1, ! 2); pt2 = wx.wxPoint(pt)"</i>.</li> ! ! <li>Functions with the same ! name are overloaded (as in C++) and ! the proper function to call ! is determined at runtime. </li> ! ! <li>The Classes are tables in lua, but have a __call ! metatable so they can be called as a function. If you need to get the ! constructor function itself you can use <i>CLASS_NAME.new(...)</i> ! which is the constructor exposed as a function.</li> </ul> *************** *** 1047,1054 **** tag in the interface files. You call the functions using the name after the <i>%rename</i> tag with the same parameters as the ! original function. This is done for the cases where the C++ function is ! overloaded, meaning that there are two or more functions with the same ! name that take different parameters, see also <span style="font-style: italic;">%overload</span> binding ! tag.</li> </ul> --- 1052,1057 ---- tag in the interface files. You call the functions using the name after the <i>%rename</i> tag with the same parameters as the ! original function. This is only done for special cases that ! would be awkward, if not impossible, to wrap otherwise.</li> </ul> *************** *** 1060,1065 **** <ul> ! <li>Declared in the interface files using the <i>%property</i> ! tag.</li> </ul> --- 1063,1071 ---- <ul> ! <li>These are generated on the fly when the function is called and work only for these functions.</li> ! <ul> ! <li>GetXXX() takes no values and returns one.</li> ! <li>SetXXX() takes one value and returns one.</li> ! </ul> </ul> *************** *** 1113,1116 **** --- 1119,1144 ---- </ul> + <li><b>Static functions</b> are part of the + table that holds the class and can be called with or without a class + instance.</li> + + <ul> + + <li>Example : <i>f = wx.wxFileName('dummy'); + f:GetCwd() == wx.wxFileName.GetCwd()</i></li> + + </ul> + + <li><b>Enum members</b> are also part of the + table that holds the class and are used by accessing the class table + itself.</li> + + <ul> + + <li>Example : <i>"enum wxFTP::TransferMode { + ASCII, ... }"</i> is accessible as <i>wx.wxFTP.ASCII</i></li> + + </ul> + <li><b>Operator functions</b> allow you to use *************** *** 1129,1137 **** declare the remaining ones as functions.</li> ! <li>Declaring every operator for all classes in wxLua is usually not necessary because in C++ they typically shadow an existing function that wxLua already wraps.</li> <li>Declared in the interface files using the <i>%operator</i> --- 1157,1168 ---- declare the remaining ones as functions.</li> ! <li>Note also that declaring every operator for all classes in wxLua is usually not necessary because in C++ they typically shadow an existing function that wxLua already wraps.</li> + <li>The lua = operator for a class object will merely + create a reference to the object and this itself is useful.</li> + <li>Declared in the interface files using the <i>%operator</i> *************** *** 1669,1674 **** line, set break points, view call stack, etc.</li> ! <li>The ! <i>File</i>, <i>Edit</i>, and <i>Search</i> menus offer typical editor functionality.</li> --- 1700,1704 ---- line, set break points, view call stack, etc.</li> ! <li>The <i>File</i>, <i>Edit</i>, and <i>Search</i> menus offer typical editor functionality.</li> *************** *** 1727,1735 **** debuggee process.</li> ! <li><i>Step</i> - Take one step in debugging the program.</li> ! <li><i>Step Over</i> - Step over a function call.</li> - <li><i>Step Out</i> - Step out of a function call.</li> - <li><i>Continue</i> - Continue running the program.</li> <li><i>Break</i> - Break a running program.</li> --- 1757,1772 ---- debuggee process.</li> ! <li><i>Step</i> - Take one step in debugging ! the program.</li> ! ! <li><i>Step Over</i> - Step over a function ! call.</li> ! ! <li><i>Step Out</i> - Step out of a function ! call.</li> ! ! <li><i>Continue</i> - Continue running the ! program.</li> <li><i>Break</i> - Break a running program.</li> *************** *** 1742,1747 **** of variables for the lua program being currently debugged.</li> ! <li><i>Show Output Window</i> - Show or hide the output window for messages during debugging.</li> ! <li><i>Clear Output Window</i> - When checked, clear the text in the output window when starting to debug.</li> </ul> --- 1779,1788 ---- of variables for the lua program being currently debugged.</li> ! ! <li><i>Show Output Window</i> - Show or hide ! the output window for messages during debugging.</li> ! ! <li><i>Clear Output Window</i> - When checked, ! clear the text in the output window when starting to debug.</li> </ul> Index: binding.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/binding.html,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** binding.html 3 May 2007 21:05:33 -0000 1.16 --- binding.html 31 May 2007 17:18:47 -0000 1.17 *************** *** 1,15 **** <!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 Binding HowTo</title> <meta content="John Labenski" name="author"></head> ! <body><h2><u>wxLuaBinding - writing and generating the binding files</u> ! </h2><div style="text-align: justify;"> ! The binding generator for wxLua provides information for lua code to interface to a C/C++ API. The C/C++ objects are created in lua as [...2072 lines suppressed...] %__WXPM__<br> + %__WXSTUBS__<br> + %__WXXT__<br> + %__WXX11__<br> + %__WXWINE__<br> + %__WXUNIVERSAL__<br> + %__X__<br> + %__WXWINCE__<br> ! ! <br> ! ! </body> ! </html> Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** changelog.txt 22 May 2007 03:27:54 -0000 1.30 --- changelog.txt 31 May 2007 17:18:47 -0000 1.31 *************** *** 23,26 **** --- 23,67 ---- wxTreeCtrl that tries to act like a listctrl. Cleaner, faster, and smaller. + - **** Big changes to the wxLua syntax! **** + Hopefully this will be the last since it is now a little more flexible and + logical with far fewer gotcha's since it matches the C++ documentation + very closely now. + - Removed wx.wxNull, the NULL tag for NULL pointers. Use wx.NULL now. + - *** Removed MOST %renamed functions so that they are not overloaded. + For example wxSizer::AddWindow/AddSizer is now just wxSizer::Add! + Removed most renamed constructors so like wxEmptyBitmap, wxBitmapFromFile + and you now need only call wxBitmap(...) and wxLua will determine which + appropriate function to call. + - Changed class member enums to be accessed by + wx.ClassName.enumName instead of previously wx.ClassName_enumName. + - Changed static class member functions to be accessed by + wx.ClassName.StaticFuncName instead of previously wx.ClassName_StaticFuncName + - Changed the class constructor functions to be a lua table instead of a C + function. You can call the table using the __call metable, there is no + code change required for wxLua scripts. You can get a pointer to the C + function using the "new" table item of the class table if you actually want + to get at the function. + - Binding changes: + Replaced %define %string with %define_string. + Replaced %define %pointer with %define_pointer. + Replaced %define %object with %define_object. + Replaced %define %event with %define_event. + Note: %define alone is still just for numbers. + Removed %overload tag since this is done automatically. + Added %override_name tag to enforce the name of the C function to use since + the binding generator will append 1,2,3,... to overloaded functions. + Removed %static and %static_only since these are automatically handled + and static functions are put into the class table. + Removed %property tag since these are generated on the fly and + - Changed version strings and numbers to match how wxWidgets defines them. + WXLUA_MAJOR_VERSION -> wxLUA_MAJOR_VERSION + WXLUA_MINOR_VERSION -> wxLUA_MINOR_VERSION + WXLUA_RELEASE_VERSION -> wxLUA_RELEASE_NUMBER + WXLUA_SUBRELEASE_VERSION -> wxLUA_SUBRELEASE_NUMBER + WXLUA_VERSION_STRING -> wxLUA_VERSION_STRING + WXCHECK_WXLUA_VERSION -> wxLUA_CHECK_VERSION + Added wxLUA_CHECK_VERSION_FULL + + version 2.8.0.0 (released 24/12/2006) -------------------------------------------------------------------- |