From: John L. <jr...@us...> - 2008-10-21 04:23:27
|
Update of /cvsroot/wxlua/wxLua/docs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23977/wxLua/docs Modified Files: binding.html wxlua.html wxluaref.html Log Message: Add operators for <<, >>, %, ~ Index: wxluaref.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxluaref.html,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** wxluaref.html 31 Jan 2008 05:09:19 -0000 1.50 --- wxluaref.html 21 Oct 2008 04:23:18 -0000 1.51 *************** *** 449,452 **** --- 449,457 ---- <td> <tr> + <td><a href="#wxClipboardLocker">wxClipboardLocker</a> + <td bgcolor=FFAAAA> + <td align="center" bgcolor=AAFFAA>X + <td> + <tr> <td><a href="#wxClipboardTextEvent">wxClipboardTextEvent</a> <td align="center" bgcolor=AAFFAA>X *************** *** 1914,1927 **** <td> <tr> - <td><a href="#wxLuaDebuggerEvent">wxLuaDebuggerEvent</a> - <td bgcolor=FFAAAA> - <td align="center" bgcolor=AAFFAA>X - <td> - <tr> - <td><a href="#wxLuaDebuggerServer">wxLuaDebuggerServer</a> - <td bgcolor=FFAAAA> - <td align="center" bgcolor=AAFFAA>X - <td> - <tr> <td><a href="#wxLuaGridTableBase">wxLuaGridTableBase</a> <td bgcolor=FFAAAA> --- 1919,1922 ---- *************** *** 1949,1957 **** <td> <tr> - <td><a href="#wxLuaState">wxLuaState</a> - <td bgcolor=FFAAAA> - <td align="center" bgcolor=AAFFAA>X - <td> - <tr> <td><a href="#wxLuaTreeItemData">wxLuaTreeItemData</a> <td bgcolor=FFAAAA> --- 1944,1947 ---- *************** *** 3457,3462 **** <a href="#wxLocaleInfo">wxLocaleInfo</a><br> <a href="#wxLocaleInitFlags">wxLocaleInitFlags</a><br> - <a href="#wxLuaMethod_Type">wxLuaMethod_Type</a><br> - <a href="#wxLuaObject_Type">wxLuaObject_Type</a><br> <a href="#wxMediaCtrlPlayerControls">wxMediaCtrlPlayerControls</a><br> <a href="#wxMediaState">wxMediaState</a><br> --- 3447,3450 ---- *************** *** 6127,6130 **** --- 6115,6119 ---- static <a href="#wxString">wxString</a> GetPathSeparators(<a href="#wxPathFormat">wxPathFormat</a> format = wxPATH_NATIVE)<br> static <a href="#wxString">wxString</a> GetPathTerminators(<a href="#wxPathFormat">wxPathFormat</a> format = wxPATH_NATIVE)<br> + <a href="#wxString">wxString</a> GetPathWithSep(<a href="#wxPathFormat">wxPathFormat</a> format = wxPATH_NATIVE ) const<br> <a href="#wxString">wxString</a> GetShortPath() const<br> <br> *************** *** 6173,6176 **** --- 6162,6166 ---- void PrependDir(const <a href="#wxString">wxString</a>& dir)<br> void RemoveDir(int pos)<br> + void RemoveLastDir()<br> bool Rmdir()<br> static bool Rmdir(const <a href="#wxString">wxString</a>& dir)<br> *************** *** 7266,7274 **** <br> <font color=#009900>// ---------------------------------------------------------------------------</font><br> ! <font color=#009900>// wxClipboardLocker</font><br> <br> ! <font color=#009900>// Since the Lua garbage collector runs whenever necessary this class doesn't</font><br> ! <font color=#009900>// serve its purpose of closing the clipboard when it goes out of scope as it</font><br> ! <font color=#009900>// does in C++.</font><br> <br> <font color=#009900>// ---------------------------------------------------------------------------</font><br> --- 7256,7268 ---- <br> <font color=#009900>// ---------------------------------------------------------------------------</font><br> ! <font color=#009900>// <a href="#wxClipboardLocker">wxClipboardLocker</a></font><br> <br> ! <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <i>%noclassinfo</i> <i>%encapsulate</i> <a name="wxClipboardLocker">wxClipboardLocker</a></font></b> ! <blockquote> ! <font color=#009900>// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough</font><br> ! <a href="#wxClipboardLocker">wxClipboardLocker</a>(<a href="#wxClipboard">wxClipboard</a> *clipboard = NULL)<br> ! <br> ! <i>%operator</i> bool operator!() const<br> ! </blockquote><font color=#DD0000><font color=#DD0000><i>%endclass</i></font></font><br> <br> <font color=#009900>// ---------------------------------------------------------------------------</font><br> *************** *** 8479,8482 **** --- 8473,8477 ---- virtual bool CanRedo()<br> virtual bool CanUndo()<br> + virtual void ChangeValue(const <a href="#wxString">wxString</a>& value)<br> virtual void Clear()<br> virtual void Copy()<br> *************** *** 11036,11040 **** <font color=#009900>// <a href="#wxPaintEvent">wxPaintEvent</a> -</font><br> <font color=#009900>//</font><br> ! <font color=#009900>// Note: You must ALWAYS create a <a href="#wxPaintDC">wxPaintDC</a> for the window abd delete() when</font><br> <font color=#009900>// done to have the exposed area marked as painted, otherwise you'll continue</font><br> <font color=#009900>// to get endless paint events.</font><br> --- 11031,11035 ---- <font color=#009900>// <a href="#wxPaintEvent">wxPaintEvent</a> -</font><br> <font color=#009900>//</font><br> ! <font color=#009900>// Note: You must ALWAYS create a <a href="#wxPaintDC">wxPaintDC</a> for the window and delete() when</font><br> <font color=#009900>// done to have the exposed area marked as painted, otherwise you'll continue</font><br> <font color=#009900>// to get endless paint events.</font><br> *************** *** 14252,14256 **** <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaArtProvider">wxLuaArtProvider</a>, <a href="#wxArtProvider">wxArtProvider</a></font></b> <blockquote> ! <font color=#BB0055> <font color=#009900>// <i>%override</i> - the C++ function takes the <a href="#wxLuaState">wxLuaState</a> as the first param</font></font><br> <a href="#wxLuaArtProvider">wxLuaArtProvider</a>()<br> <br> --- 14247,14251 ---- <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaArtProvider">wxLuaArtProvider</a>, <a href="#wxArtProvider">wxArtProvider</a></font></b> <blockquote> ! <font color=#BB0055> <font color=#009900>// <i>%override</i> - the C++ function takes the wxLuaState as the first param</font></font><br> <a href="#wxLuaArtProvider">wxLuaArtProvider</a>()<br> <br> *************** *** 14821,14824 **** --- 14816,14828 ---- <font color=#009900>// void SetName(const <a href="#wxString">wxString</a>& text) const - deprecated</font><br> <i>%win</i> void SetTextColour(const <a href="#wxColour">wxColour</a>& colour) const<br> + <br> + <i>%if</i> <i>%wxchkver_2_8</i><br> + void SetItemLabel(const <a href="#wxString">wxString</a>& str)<br> + <a href="#wxString">wxString</a> GetItemLabel() const<br> + <a href="#wxString">wxString</a> GetItemLabelText() const <br> + <br> + static <a href="#wxString">wxString</a> GetLabelText(const <a href="#wxString">wxString</a>& label)<br> + <i>%endif</i><br> + <br> </blockquote><font color=#DD0000><font color=#DD0000><i>%endclass</i></font></font><br> <br> *************** *** 15417,15421 **** <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaPrintout">wxLuaPrintout</a>, <a href="#wxPrintout">wxPrintout</a></font></b> <blockquote> ! <font color=#BB0055> <font color=#009900>// <i>%override</i> - the C++ function takes the <a href="#wxLuaState">wxLuaState</a> as the first param</font></font><br> <a href="#wxLuaPrintout">wxLuaPrintout</a>(const <a href="#wxString">wxString</a>& title = "Printout", <a href="#wxLuaObject">wxLuaObject</a> *pObject = NULL)<br> <br> --- 15421,15425 ---- <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaPrintout">wxLuaPrintout</a>, <a href="#wxPrintout">wxPrintout</a></font></b> <blockquote> ! <font color=#BB0055> <font color=#009900>// <i>%override</i> - the C++ function takes the wxLuaState as the first param</font></font><br> <a href="#wxLuaPrintout">wxLuaPrintout</a>(const <a href="#wxString">wxString</a>& title = "Printout", <a href="#wxLuaObject">wxLuaObject</a> *pObject = NULL)<br> <br> *************** *** 18292,18295 **** --- 18296,18302 ---- void IncRef()<br> void DecRef()<br> + <br> + int GetRef() const <font color=#009900>// wxLua added function to help track if it needs to be refed</font><br> + <br> virtual void SetParameters(const <a href="#wxString">wxString</a>& params)<br> </blockquote><font color=#DD0000><font color=#DD0000><i>%endclass</i></font></font><br> *************** *** 18588,18592 **** <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaGridTableBase">wxLuaGridTableBase</a>, <a href="#wxGridTableBase">wxGridTableBase</a></font></b> <blockquote> ! <font color=#BB0055> <font color=#009900>// <i>%override</i> - the C++ function takes the <a href="#wxLuaState">wxLuaState</a> as the first param</font></font><br> <a href="#wxLuaGridTableBase">wxLuaGridTableBase</a>()<br> <br> --- 18595,18599 ---- <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaGridTableBase">wxLuaGridTableBase</a>, <a href="#wxGridTableBase">wxGridTableBase</a></font></b> <blockquote> ! <font color=#BB0055> <font color=#009900>// <i>%override</i> - the C++ function takes the wxLuaState as the first param</font></font><br> <a href="#wxLuaGridTableBase">wxLuaGridTableBase</a>()<br> <br> *************** *** 24864,24867 **** --- 24871,24889 ---- <br> <font color=#009900>// ---------------------------------------------------------------------------</font><br> + <font color=#009900>// Force the Lua garbage collector to act or ignore object *DANGEROUS*</font><br> + <font color=#009900>//</font><br> + <font color=#009900>// These are *only* meant for very special cases and should NOT be used unless</font><br> + <font color=#009900>// you have an initmate knowledge about the object and how it will be treated</font><br> + <font color=#009900>// by wxWidgets, wxLua, and Lua.</font><br> + <br> + <font color=#009900>// Add the userdata object to the list of objects that will be deleted when</font><br> + <font color=#009900>// it does out of scope and the Lua garbage collector runs.</font><br> + <font color=#009900>// <i>%function</i> bool gcobject(void* object)</font><br> + <br> + <font color=#009900>// Remove the userdata object from the list of objects that will be deleted when</font><br> + <font color=#009900>// it does out of scope and the Lua garbage collector runs.</font><br> + <font color=#AA0000><i>%function</i> bool ungcobject(void* object)</font><br> + <br> + <font color=#009900>// ---------------------------------------------------------------------------</font><br> <font color=#009900>// Type information about the bindings or current userdata</font><br> <br> *************** *** 25021,25025 **** <br> <font color=#009900>// ---------------------------------------------------------------------------</font><br> ! <font color=#009900>// <a href="#wxLuaState">wxLuaState</a></font><br> <br> <i>%include</i> "wxlua/include/wxlstate.h"<br> --- 25043,25047 ---- <br> <font color=#009900>// ---------------------------------------------------------------------------</font><br> ! <font color=#009900>// wxLuaState</font><br> <br> <i>%include</i> "wxlua/include/wxlstate.h"<br> *************** *** 25028,25033 **** <blockquote> <font color=#888888>/*<br> ! <a href="#wxLuaState">wxLuaState</a>(bool create = false)<br> ! <a href="#wxLuaState">wxLuaState</a>(<a href="#wxEvtHandler">wxEvtHandler</a> *handler, wxWindowID id = wxID_ANY)<br> <br> bool Ok() const<br> --- 25050,25055 ---- <blockquote> <font color=#888888>/*<br> ! wxLuaState(bool create = false)<br> ! wxLuaState(<a href="#wxEvtHandler">wxEvtHandler</a> *handler, wxWindowID id = wxID_ANY)<br> <br> bool Ok() const<br> *************** *** 25064,25068 **** <blockquote> <font color=#BB0055> <font color=#009900>// <i>%override</i> <a href="#wxLuaObject">wxLuaObject</a>(any value type)</font></font><br> ! <font color=#009900>// C++ Func: <a href="#wxLuaObject">wxLuaObject</a>(const <a href="#wxLuaState">wxLuaState</a>& wxlState, int stack_idx = 1)</font><br> <font color=#009900>// Wrap the single value passed in with a <a href="#wxLuaObject">wxLuaObject</a></font><br> <a href="#wxLuaObject">wxLuaObject</a>()<br> --- 25086,25090 ---- <blockquote> <font color=#BB0055> <font color=#009900>// <i>%override</i> <a href="#wxLuaObject">wxLuaObject</a>(any value type)</font></font><br> ! <font color=#009900>// C++ Func: <a href="#wxLuaObject">wxLuaObject</a>(const wxLuaState& wxlState, int stack_idx = 1)</font><br> <font color=#009900>// Wrap the single value passed in with a <a href="#wxLuaObject">wxLuaObject</a></font><br> <a href="#wxLuaObject">wxLuaObject</a>()<br> *************** *** 25120,25124 **** <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaDebuggerServer">wxLuaDebuggerServer</a>, <a href="#wxEvtHandler">wxEvtHandler</a></font></b> <blockquote> ! <a href="#wxLuaDebuggerServer">wxLuaDebuggerServer</a>(int portNumber)<br> <br> bool StartServer()<br> --- 25142,25146 ---- <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaDebuggerServer">wxLuaDebuggerServer</a>, <a href="#wxEvtHandler">wxEvtHandler</a></font></b> <blockquote> ! wxLuaDebuggerServer(int portNumber)<br> <br> bool StartServer()<br> *************** *** 25129,25133 **** bool RemoveBreakPoint(const <a href="#wxString">wxString</a> &fileName, int lineNumber)<br> bool ClearAllBreakPoints()<br> ! bool Run(const <a href="#wxString">wxString</a> &file, const <a href="#wxString">wxString</a> &fileName)<br> bool Step()<br> bool StepOver()<br> --- 25151,25155 ---- bool RemoveBreakPoint(const <a href="#wxString">wxString</a> &fileName, int lineNumber)<br> bool ClearAllBreakPoints()<br> ! bool Run(const <a href="#wxString">wxString</a> &fileName, const <a href="#wxString">wxString</a> &buffer)<br> bool Step()<br> bool StepOver()<br> *************** *** 25154,25158 **** <br> <font color=#009900>// ---------------------------------------------------------------------------</font><br> ! <font color=#009900>// <a href="#wxLuaDebuggerEvent">wxLuaDebuggerEvent</a></font><br> <br> <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaDebuggerEvent">wxLuaDebuggerEvent</a>, <a href="#wxEvent">wxEvent</a></font></b> --- 25176,25180 ---- <br> <font color=#009900>// ---------------------------------------------------------------------------</font><br> ! <font color=#009900>// wxLuaDebuggerEvent</font><br> <br> <b><font size=+1 color=#DD0000><i>%class</i> <i>%delete</i> <a name="wxLuaDebuggerEvent">wxLuaDebuggerEvent</a>, <a href="#wxEvent">wxEvent</a></font></b> Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** wxlua.html 24 Jan 2008 04:53:47 -0000 1.37 --- wxlua.html 21 Oct 2008 04:23:18 -0000 1.38 *************** *** 3,7 **** <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 --- 3,8 ---- <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 *************** *** 16,20 **** running standalone wxLua ! scripts (wxLuaFreeze), a Lua module to load using <i>require("wx")</i> when using the standard Lua executable, and a library for --- 17,22 ---- running standalone wxLua ! scripts (wxLuaFreeze), a Lua module to load using <i>require("wx")</i> ! when using the standard Lua executable, and a library for *************** *** 28,32 **** fast, dynamic, and easy to learn. Lua contains a limited number of data types, ! mainly numbers, strings, functions, tables, and userdata. Perhaps the most powerful feature of the Lua language is that the tables can be used as either --- 30,35 ---- fast, dynamic, and easy to learn. Lua contains a limited number of data types, ! mainly numbers, strings, functions, tables, and userdata. ! Perhaps the most powerful feature of the Lua language is that the tables can be used as either *************** *** 719,729 **** arr" you must provide a wxArrayInt userdata since the C++ function will most likely modify the wxArrayInt that's passed to it. ! <br><br><b>Location of the wxWidgets objects declared in a C++ header files in the <i>wx</i> Lua ! table</b><ul> <li><b>#define ! NUMBER_DEFINE VALUE</b> </li><ul> ! ! <li>All #defined numerical values are available as <i>wx.NUMBER_DEFINE</i></li> --- 722,734 ---- arr" you must provide a wxArrayInt userdata since the C++ function will most likely modify the wxArrayInt that's passed to it. ! <br> ! <br> ! <b>Location of the wxWidgets objects declared in a C++ header files in the <i>wx</i> Lua ! table</b> ! <ul> <li><b>#define ! NUMBER_DEFINE VALUE</b> </li> ! <ul> <li>All #defined numerical values are available as <i>wx.NUMBER_DEFINE</i></li> *************** *** 734,741 **** tag<br> </li> ! ! </ul><li><b>[int, ! double, etc] NUMBER_VARIABLE;</b></li><ul> ! <li>All global numerical variables are available as <i>wx.NUMBER_VARIABLE</i></li> --- 739,746 ---- tag<br> </li> ! </ul> ! <li><b>[int, ! double, etc] NUMBER_VARIABLE;</b></li> ! <ul> <li>All global numerical variables are available as <i>wx.NUMBER_VARIABLE</i></li> *************** *** 745,752 **** in the bindings using the <i>%define</i> tag</li> ! ! </ul><li><b>enum ENUM_NAMESPACE [or ! CLASSNAME::ENUM_NAMESPACE] { ENUM_NAME }</b></li><ul> ! <li>All global enums, named or not, are available as <i>wx.ENUM_NAME</i></li> <ul> --- 750,757 ---- in the bindings using the <i>%define</i> tag</li> ! </ul> ! <li><b>enum ENUM_NAMESPACE [or ! CLASSNAME::ENUM_NAMESPACE] { ENUM_NAME }</b></li> ! <ul> <li>All global enums, named or not, are available as <i>wx.ENUM_NAME</i></li> <ul> *************** *** 768,775 **** the <i>%enum</i> tag</li> ! ! </ul><li><b>#define ! STRING_DEFINE wxT("String Value")</b></li><ul> ! <li>All #defined string values are available as <i>wx.STRING_DEFINE</i></li> --- 773,780 ---- the <i>%enum</i> tag</li> ! </ul> ! <li><b>#define ! STRING_DEFINE wxT("String Value")</b></li> ! <ul> <li>All #defined string values are available as <i>wx.STRING_DEFINE</i></li> *************** *** 779,786 **** <li>Declared in the bindings using the <i>%define_string</i> tag</li> ! ! </ul><li><b>const wxChar* ! STRING_VARIABLE;</b></li><ul> ! <li>All global string variables are available as <i>wx.STRING_VARIABLE</i></li> --- 784,791 ---- <li>Declared in the bindings using the <i>%define_string</i> tag</li> ! </ul> ! <li><b>const wxChar* ! STRING_VARIABLE;</b></li> ! <ul> <li>All global string variables are available as <i>wx.STRING_VARIABLE</i></li> *************** *** 789,796 **** bindings using the <i>%define_string</i> tag</li> ! ! </ul><li><b>wxEVT_XXX ! for wxEvtHandler::Connect()</b></li><ul> ! <li>All <i>wxEVT_XXX</i> wxEventTypes (an integer) are --- 794,801 ---- bindings using the <i>%define_string</i> tag</li> ! </ul> ! <li><b>wxEVT_XXX ! for wxEvtHandler::Connect()</b></li> ! <ul> <li>All <i>wxEVT_XXX</i> wxEventTypes (an integer) are *************** *** 849,856 **** bindings using the <i>%define_event</i> tag</li> ! ! </ul><li><b>Objects ! of classes or structs OBJECT_NAME</b></li><ul> ! <li>All global objects that are classes or structs are --- 854,861 ---- bindings using the <i>%define_event</i> tag</li> ! </ul> ! <li><b>Objects ! of classes or structs OBJECT_NAME</b></li> ! <ul> <li>All global objects that are classes or structs are *************** *** 864,871 **** <li>Declared in the bindings using the <i>%define_object</i> tag</li> ! ! </ul><li><b>Pointers to ! classes or structs POINTER_NAME</b></li><ul> ! <li>All global pointers that are classes or structs are --- 869,876 ---- <li>Declared in the bindings using the <i>%define_object</i> tag</li> ! </ul> ! <li><b>Pointers to ! classes or structs POINTER_NAME</b></li> ! <ul> <li>All global pointers that are classes or structs are *************** *** 879,888 **** <li>Declared in the bindings using the <i>%define_object</i> tag</li> ! ! </ul><li><b>Global<i> </i>C style functions ! VAR_TYPE FUNCTION_NAME(int a, const wxString& str)</b></li><ul> ! <li>All global C style functions are available as <i>wx.FUNCTION_NAME(1, "Hello")</i></li> --- 884,893 ---- <li>Declared in the bindings using the <i>%define_object</i> tag</li> ! </ul> ! <li><b>Global<i> </i>C style functions ! VAR_TYPE FUNCTION_NAME(int a, const wxString& str)</b></li> ! <ul> <li>All global C style functions are available as <i>wx.FUNCTION_NAME(1, "Hello")</i></li> *************** *** 895,907 **** <li>Declared in the bindings using the <i>%function</i> tag</li> ! ! </ul><li><b>C++ Classes ! CLASS_NAME</b></li><ul> <li>All C++ classes are available as <i>wx.CLASS_NAME</i>, however in order to use one you must call one of the constructors first ! or get the class as a return value from another function call.</li><ul> ! ! <li>Example : <i>"pt = wx.wxPoint(1, 2); pt2 = wx.wxPoint(pt)"</i>.</li> --- 900,912 ---- <li>Declared in the bindings using the <i>%function</i> tag</li> ! </ul> ! <li><b>C++ Classes ! CLASS_NAME</b></li> ! <ul> <li>All C++ classes are available as <i>wx.CLASS_NAME</i>, however in order to use one you must call one of the constructors first ! or get the class as a return value from another function call.</li> ! <ul> <li>Example : <i>"pt = wx.wxPoint(1, 2); pt2 = wx.wxPoint(pt)"</i>.</li> *************** *** 923,931 **** constructor function itself you can use <i>wx.CLASS_NAME.new(...)</i> which is the constructor exposed as a Cfunction.</li> ! ! </ul><li>The C++ class objects are pushed into Lua as a userdata wrapping a void* ! pointer to the C++ object.</li><ul> ! <li>A special metatable is set on the userdata with these entries :</li> --- 928,936 ---- constructor function itself you can use <i>wx.CLASS_NAME.new(...)</i> which is the constructor exposed as a Cfunction.</li> ! </ul> ! <li>The C++ class objects are pushed into Lua as a userdata wrapping a void* ! pointer to the C++ object.</li> ! <ul> <li>A special metatable is set on the userdata with these entries :</li> *************** *** 948,959 **** used so wxLua can delete the C++ object if appropriate. </li> </ul> ! ! </ul><li>Declared in the bindings using the <i>%class</i> ! tag</li><li><span style="font-weight: bold;">Deleting class userdata</span> can be done using the wxLua added class ! member function delete().</li><ul> ! ! <li>All classes that have the %delete binding tag will be eventually garbage collected --- 953,964 ---- used so wxLua can delete the C++ object if appropriate. </li> </ul> ! </ul> ! <li>Declared in the bindings using the <i>%class</i> ! tag</li> ! <li><span style="font-weight: bold;">Deleting class userdata</span> can be done using the wxLua added class ! member function delete().</li> ! <ul> <li>All classes that have the %delete binding tag will be eventually garbage collected *************** *** 972,976 **** <li>This is really a MS Windows problem, in Win95 based systems the number that ! you could create was severely limited, but even in NT systems (XP, Vista) you will have problems if you've created hundreds of them. One visible sign that something is wrong is when controls, like menus, stop redrawing --- 977,982 ---- <li>This is really a MS Windows problem, in Win95 based systems the number that ! you could create was severely limited, but even in NT systems (XP, ! Vista) you will have problems if you've created hundreds of them. One visible sign that something is wrong is when controls, like menus, stop redrawing *************** *** 1004,1008 **** in Lua, but this may cause pauses in your program's execution. It is a good idea to collect all the garbage at the end of your initialization ! function to at least start out with a clean slate since program startup time is usually not a concern.</li> </ul> --- 1010,1015 ---- in Lua, but this may cause pauses in your program's execution. It is a good idea to collect all the garbage at the end of your initialization ! function to at least start out with a clean slate since ! program startup time is usually not a concern.</li> </ul> *************** *** 1011,1015 **** <ul> <li style="font-weight: bold;">Must delete : ! wxDC, wxPaintDC, and ALL classed derived from wxDC</li> <li><span style="font-weight: bold;">Must delete if > 50 : --- 1018,1022 ---- <ul> <li style="font-weight: bold;">Must delete : ! wxDC, wxPaintDC, and ALL classed derived from wxDC</li> <li><span style="font-weight: bold;">Must delete if > 50 : *************** *** 1036,1049 **** </ul> <li>How to tell how ! many userdata objects you currently have?</li><ul><li>Print the output of <b><i>wxlua.GetGCUserdataInfo(true)</i></b> to show what objects will be garbage collected when their reference count goes to 0 and the Lua garbage collector runs.</li><li>Print the output of <i><b>wxlua.GetTrackedObjectInfo(true)</b></i> to get class objects that wxLua has pushed into Lua that may or may not be garbage collected.</li></ul> <ul> - <li>Call ! the function <b><i>wxlua.LuaStackDialog()</i></b> when you run your program and examine the items in the Lua LUA_REGISTRYINDEX table. ! Expand "wxLua objects pushed" and "wxLua gc objects to delete" tables.<br></li> </ul> ! ! </ul><li><b>Member functions</b> of the class are called using the colon ':' convention and NOT the period --- 1043,1065 ---- </ul> <li>How to tell how ! many userdata objects you currently have?</li> ! <ul> ! <li>Print the output of <b><i>wxlua.GetGCUserdataInfo(true)</i></b> ! to show what objects will be garbage collected when their reference ! count goes to 0 and the Lua garbage collector runs.</li> ! <li>Print the output of <i><b>wxlua.GetTrackedObjectInfo(true)</b></i> ! to get class objects that wxLua has pushed into Lua that may or may not ! be garbage collected.</li> ! </ul> <ul> <li>Call ! the function <b><i>wxlua.LuaStackDialog()</i></b> ! when you run your program and examine the items in the Lua LUA_REGISTRYINDEX table. ! Expand "wxLua objects pushed" and "wxLua gc objects to delete" tables.<br> ! </li> </ul> ! </ul> ! <li><b>Member functions</b> of the class are called using the colon ':' convention and NOT the period *************** *** 1058,1063 **** and <span style="font-weight: bold;">static</span> functions, please see the sections below about why they only use the ! '.' convention.</li><ul> ! <li>Example : <i>"size = wx.wxSize(1, 2); size:SetWidth(10); size.SetHeight(size, 11); --- 1074,1079 ---- and <span style="font-weight: bold;">static</span> functions, please see the sections below about why they only use the ! '.' convention.</li> ! <ul> <li>Example : <i>"size = wx.wxSize(1, 2); size:SetWidth(10); size.SetHeight(size, 11); *************** *** 1070,1079 **** original function. This is only done for special cases that would be awkward, if not impossible, to wrap otherwise.</li> ! ! </ul><li><b>Property functions</b> allow you to read and/or write values to a class using the '.' convention and ! a shortened name.</li><ul> ! <li>These are generated on the fly when the function --- 1086,1095 ---- original function. This is only done for special cases that would be awkward, if not impossible, to wrap otherwise.</li> ! </ul> ! <li><b>Property functions</b> allow you to read and/or write values to a class using the '.' convention and ! a shortened name.</li> ! <ul> <li>These are generated on the fly when the function *************** *** 1094,1099 **** a function using "()", but rather like accessing a table member, without the "()".</li> - - <li>Example : <i>"rect --- 1110,1113 ---- *************** *** 1144,1156 **** necessary? Confusing? Useful? I'd stick with the Get/Set functions. - JL</li> ! ! </ul><li><b>Member variables </b>allow you ! to read and/or write to member variables of a class.</li><ul> ! <li>Declared in the interface files using the <i>%member</i> or <i>%member_func</i> tag.</li> - - <li>Example : In the interface file <i>gdi.i</i> --- 1158,1168 ---- necessary? Confusing? Useful? I'd stick with the Get/Set functions. - JL</li> ! </ul> ! <li><b>Member variables </b>allow you ! to read and/or write to member variables of a class.</li> ! <ul> <li>Declared in the interface files using the <i>%member</i> or <i>%member_func</i> tag.</li> <li>Example : In the interface file <i>gdi.i</i> *************** *** 1179,1188 **** variable is constant (const) the variable is read-only and you cannot set it's value.</li> ! ! </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 (a userdata).</li><ul> ! <li>Example : <i>f = --- 1191,1200 ---- variable is constant (const) the variable is read-only and you cannot set it's value.</li> ! </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 (a userdata).</li> ! <ul> <li>Example : <i>f = *************** *** 1198,1216 **** made to work reliably when you don't want or need the self pushed onto the stack. </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 ! C++ operators in Lua. </li><ul> ! <li>Lua has a limited set of operators, see the Lua --- 1210,1228 ---- made to work reliably when you don't want or need the self pushed onto the stack. </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 ! C++ operators in Lua. </li> ! <ul> <li>Lua has a limited set of operators, see the Lua *************** *** 1235,1240 **** using the <i>%operator</i> tag.</li> - - <li><br> </li> --- 1247,1250 ---- *************** *** 1252,1261 **** </li> <li>">=" = "op_ge"</li> - <li></li> - <li>"|" = "op_or"<br> - </li> - <li>"&" - = "op_and"<br> - </li> <li>"||" = "op_lor" note: "lor" --- 1262,1265 ---- *************** *** 1268,1275 **** "op_land"<br> </li> ! <li>"!" = "op_not"<br> </li> ! <li>"^" = "op_xor"<br> </li> <li></li> <li>"++" --- 1272,1293 ---- "op_land"<br> </li> ! <li>"!" = "op_not"</li> ! <li></li> ! <li>"|" = "op_or"<br> </li> ! <li>"&" ! = "op_and"<br> </li> + <li>"^" = "op_xor"</li> + <li>"<<" = "op_lshift"</li> + <li>">>" = "op_rshift"</li> + <li></li> + <li>"|=" + = "op_ior"</li> + <li>"&=" = "op_iand"</li> + <li>"^=" + = "op_ixor"</li> + <li>"<<=" = "op_ilshift"</li> + <li>">>=" = "op_irshift"</li> <li></li> <li>"++" *************** *** 1280,1286 **** <li>"- (unary)" = "op_neg"</li> <li></li> - - <li>"=" = op_set</li> <li>"+" = "op_add"<br> --- 1298,1303 ---- <li>"- (unary)" = "op_neg"</li> + <li>"~ (unary)" = "op_comp"</li> <li></li> <li>"=" = op_set</li> <li>"+" = "op_add"<br> *************** *** 1293,1296 **** --- 1310,1314 ---- <li>"/" = "op_div"</li> + <li>"%" = "op_mod"</li> <li></li> <li>"+=" = *************** *** 1304,1318 **** </li> <li>"/=" = ! "op_idiv"<br> ! </li> ! <li>"%=" = "op_imod"<br> ! </li> ! <li>"&=" = "op_iand"<br> ! </li> ! <li>"|=" ! = "op_ior"<br> ! </li> ! <li>"^=" ! = "op_ixor"</li> <li>Example : <i>"pt = wx.wxPoint(1,2); pt = pt + --- 1322,1328 ---- </li> <li>"/=" = ! "op_idiv"</li> ! <li>"%=" = "op_imod"</li> ! <li></li> <li>Example : <i>"pt = wx.wxPoint(1,2); pt = pt + *************** *** 1339,1345 **** test if pt2 has changed, it hasn't, and the test to see if they're still equal and as expected, they're not.</li> ! ! </ul><li style="font-weight: bold;">Virtual functions</li><ul> ! <li>You cannot --- 1349,1355 ---- test if pt2 has changed, it hasn't, and the test to see if they're still equal and as expected, they're not.</li> ! </ul> ! <li style="font-weight: bold;">Virtual functions</li> ! <ul> <li>You cannot *************** *** 1368,1375 **** already been added is that there is a price to pay in terms of binding size and speed.</li> ! ! </ul><li><span style="font-weight: bold;">Overriding ! member functions</span> with Lua functions</li><ul> ! <li>You may override class member functions for a wxLua userdata and still be --- 1378,1385 ---- already been added is that there is a price to pay in terms of binding size and speed.</li> ! </ul> ! <li><span style="font-weight: bold;">Overriding ! member functions</span> with Lua functions</li> ! <ul> <li>You may override class member functions for a wxLua userdata and still be *************** *** 1390,1396 **** since otherwise you'll get recursion. </li> ! ! </ul><li><b>Extending ! classes</b> </li><ul> <li>You may add your --- 1400,1407 ---- since otherwise you'll get recursion. </li> ! </ul> ! <li><b>Extending ! classes</b> </li> ! <ul> <li>You may add your *************** *** 1399,1411 **** if you would like to keep functions that act on a particular class with it rather than having global functions that take that class as a ! parameter.</li><li>Example : <i>"r = wx.wxRect(1,2,3,4); r.PrintXY = function(self) print(self:GetX(), self:GetY()) end; r:PrintXY()"</i> adds the function PrintXY() to the wxRect instance r. The userdata, class instance, r is passed to the Lua function as the parameter "self" which is pushed onto ! the stack when the PrintXY() function is called with the ":" notation.</li><li>Note that the above example is the same as <i>"</i><i>r = wx.wxRect(1,2,3,4); </i><i>function wxRect_PrintXY(r) ! print(r:GetX(), r:GetY()) end; wxRect_PrintXY(r)"</i>.</li><li>You may also create the Lua function beforehand and then assign it to the rect object. <i>"function --- 1410,1425 ---- if you would like to keep functions that act on a particular class with it rather than having global functions that take that class as a ! parameter.</li> ! <li>Example : <i>"r = wx.wxRect(1,2,3,4); r.PrintXY = function(self) print(self:GetX(), self:GetY()) end; r:PrintXY()"</i> adds the function PrintXY() to the wxRect instance r. The userdata, class instance, r is passed to the Lua function as the parameter "self" which is pushed onto ! the stack when the PrintXY() function is called with the ":" notation.</li> ! <li>Note that the above example is the same as <i>"</i><i>r = wx.wxRect(1,2,3,4); </i><i>function wxRect_PrintXY(r) ! print(r:GetX(), r:GetY()) end; wxRect_PrintXY(r)"</i>.</li> ! <li>You may also create the Lua function beforehand and then assign it to the rect object. <i>"function *************** *** 1414,1422 **** You can see that using this idea you can write a Lua function that creates a new wxRect, sets your extra functions ! for it, and returns it for use.</li><ul> ! ! ! ! <ul> </ul> --- 1428,1433 ---- You can see that using this idea you can write a Lua function that creates a new wxRect, sets your extra functions ! for it, and returns it for use.</li> ! <ul> <ul> </ul> *************** *** 1473,1479 **** button to run it.</li> <li>Use ! wxLua as a Lua module (using the function require), run <span style="font-weight: bold; font-style: italic;">$lua.exe sample.wx.lua</span></li> <ul> ! <li>In order to use wxLua as a module the Lua code must have <i>require("wx")</i> to load the wxLua bindings in the beginning and <i>wx.wxGetApp():MainLoop()</i> at the end to start the wxWidgets event loop.</li><li>You may need to adjust the <i>package.cpath</i> variable to have it point to the correct location of the wx.so or wx.dll shared library for require("wx") to load.</li> </ul> </ul> --- 1484,1495 ---- button to run it.</li> <li>Use ! wxLua as a Lua module (using the function require), run <span style="font-weight: bold; font-style: italic;">$lua.exe sample.wx.lua</span></li> <ul> ! <li>In order to use wxLua as a module the Lua code must have <i>require("wx")</i> ! to load the wxLua bindings in the beginning and <i>wx.wxGetApp():MainLoop()</i> ! at the end to start the wxWidgets event loop.</li> ! <li>You may need to adjust the <i>package.cpath</i> ! variable to have it point to the correct location of the wx.so or ! wx.dll shared library for require("wx") to load.</li> </ul> </ul> *************** *** 1487,1491 **** <li>Lets you explore the C++ binding structs from within Lua ! using a wxListCtrl. This program shows the raw data that is used to push the bindings into Lua when a wxLuaState is created.</li> <li>Take --- 1503,1508 ---- <li>Lets you explore the C++ binding structs from within Lua ! using a wxListCtrl. This program shows the raw data that is ! used to push the bindings into Lua when a wxLuaState is created.</li> <li>Take *************** *** 1907,1911 **** <li>You might ! as well include paths to both unfix 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> --- 1924,1929 ---- <li>You might ! as well include paths to both unfix 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> *************** *** 1961,1966 **** throw out the whole library when linking unless you explicitly use something in it. Replace the XXX with the name of the library you want ! installed, see modules/wxbind/include/wxbinddefs.h for a list of them.</li><li>You should preferably use the macros in modules/wxbind/include/wxbinddefs.h to make it easy to install a standard set of ! them or all of them. They do some simple checks to determine if the binding will be available based on the wxWidgets wxUSE_XXX directives.</li> <li>Compilation of this module generates a number of --- 1979,1988 ---- throw out the whole library when linking unless you explicitly use something in it. Replace the XXX with the name of the library you want ! installed, see modules/wxbind/include/wxbinddefs.h for a list of them.</li> ! <li>You should preferably use the macros in ! modules/wxbind/include/wxbinddefs.h to make it easy to install a ! standard set of ! them or all of them. They do some simple checks to determine if the ! binding will be available based on the wxWidgets wxUSE_XXX directives.</li> <li>Compilation of this module generates a number of *************** *** 2065,2069 **** The wxLuaState contains all of the Lua 'C' functions, such as lua_gettop(lua_State* L), but as member functions named lua_GetTop() ! which use the internal lua_State and check for it's validity before use. The functions are capitalized to make them easier to find in an editor. If you want the greatest performance just use wxLuaState::GetLuaState() and directly manipulate the --- 2087,2092 ---- The wxLuaState contains all of the Lua 'C' functions, such as lua_gettop(lua_State* L), but as member functions named lua_GetTop() ! which use the internal lua_State and check for it's validity before ! use. The functions are capitalized to make them easier to find in an editor. If you want the greatest performance just use wxLuaState::GetLuaState() and directly manipulate the *************** *** 2086,2090 **** setting up the lua_State.</li> <ol> - <li>The wxObject::m_refData is created as a new wxLuaStateRefData(). This ref --- 2109,2112 ---- *************** *** 2123,2132 **** <ul> </ul> - <ul> <li>Each ! binding that is loaded are derived wxLuaBinding classes whose member data variables point to structs in each binding. A ! single static instance of each binding class are installed into a wxList when the wxLuaBinding_XXX_init() functions --- 2145,2154 ---- <ul> </ul> <ul> <li>Each ! binding that is loaded are derived wxLuaBinding classes whose member data variables point to structs in each binding. A ! single static instance of each binding class are ! installed into a wxList when the wxLuaBinding_XXX_init() functions *************** *** 2172,2176 **** considerable amount of the total time of a function call.<br> <br> ! <pre>// ----------------------------------------------------------------------------<br>// Special keys used by wxLua in the LUA_REGISTRYINDEX table.<br>//<br>// Note: We do not push a human readable string for these because Lua always<br>// makes a copy and hashes the string, this takes a considerable amount of<br>// time when benchmarked using valgrind.<br>// ----------------------------------------------------------------------------<br><br>// Light userdata used as keys in the Lua LUA_REGISTRYINDEX table for wxLua.<br>// Note that even though these keys have values, they're not used, just the memory address.<br><br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table indexed<br>// on the wxLua types where each item is a userdata metatable for a C++ class.<br>// Note: The wxLua types WXLUA_TXXX that correspond to the Lua LUA_TXXX types<br>// are not stored in this table since they do not use our metatables.<br>// The keys in this table are all > 1. They values are either tables or 0<br>// if the wxLuaBinding containing the wxLua type was not registered.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_types_key][wxLua type number] = { metatable for a C++ class }<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_types_key;<br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table<br>// with references to Lua objects we want to keep a handle to. The object could be<br>// anything, a table, function, number, string, userdata...<br>// LUA_REGISTRYINDEX[&wxlua_lreg_refs_key][ref number] = Lua object<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_refs_key;<br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table<br>// with references to objects the wxLuaDebugData wants to keep a handle to by<br>// storing their value for lookup. It is used only for the wxLuaDebugData.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][ref number] = Lua object<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_debug_refs_key;<br>// The key that in the LUA_REGISTRYINDEX table that is a lookup table of string<br>// C++ classname keys and lightuserdata pointers to the associated wxLuaBindClass struct.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][wxLuaBindClass.name] = lightuserdata(&wxLuaBindClass)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_classes_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table<br>// of Lua objects/functions assigned to wxLua userdata programatically in Lua.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_derivedmethods_key][lightuserdata(obj_ptr)] =<br>// {["derived func/value name"] = wxLuaObject(Lua function/value), ...}<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_derivedmethods_key;<br>// The key in the LUA_REGISTRYINDEX table who's value is a lightuserdata<br>// of the wxLuaState for this lua_State.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluastate_key] = lightuserdata(&wxLuaState)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastate_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of lightuserdata<br>// wxLuaBindings and the ref to the Lua table they were installed into.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluabindings_key] = {lightuserdata(&wxLuaBinding) = wxlua_lreg_refs_key ref#, ...}<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluabindings_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// objects that we've pushed into Lua using wxluaT_pushuserdatatype().<br>// Note: A single object like a wxWindow may be pushed with multiple wxLua types.<br>// e.g. wxWindow* w = wx.wxWindow() retrieve the window later from wxObject* wxEvent:GetEventObject()<br>// LUA_REGISTRYINDEX[&wxlua_lreg_weakobjects_key][lightuserdata(obj_ptr)] =<br>// { wxLua type1 = weak fulluserdata, wxLua type2 = weak fulluserdata... }<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_weakobjects_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// objects to delete that were added using wxluaO_addgcobject().<br>// Note that non wxObject classes use wxLUA_DECLARE_ENCAPSULATION so<br>// the key is the object pointer and the value is the wxObject encapsulation.<br>// Both the key and the value are the same if not encapsulated.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_gcobjects_key][lightuserdata(obj_ptr)] =<br>// lightuserdata(wxObject derived class)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_gcobjects_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// wxLuaEventCallbacks that we've created.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_evtcallbacks_key][lightuserdata(&wxLuaEventCallback)] =<br>// lightuserdata(&wxEvtHandler)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_evtcallbacks_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of wxWindow keys and<br>// wxLuaWinDestroyCallback values that we've created.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_windestroycallbacks_key][lightuserdata(&wxWindow)] =<br>// lightuserdata(wxLuaWinDestroyCallback)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_windestroycallbacks_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// top level wxWindows that we've created and need to destroy when closed.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_topwindows_key][lightuserdata(&wxWindow)] = 1<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_topwindows_key;<br>// The key in the LUA_REGISTRYINDEX table that has a boolean value<br>// of whether the Lua code has prepended a '_' to function name to indicate<br>// that they want the base class function called.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_callbaseclassfunc_key] = true/false<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_callbaseclassfunc_key;<br>// The key in the LUA_REGISTRYINDEX table that has a wxEventType (integer) value<br>// of the current wxEvent is that is being run or wxEVT_NULL if not in an event.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxeventtype_key] = wxEventType (wxEVT_NULL)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxeventtype_key;<br>// The key in the LUA_REGISTRYINDEX table that has a wxLuaStateData class<br>// lightuserdata value for the wxLuaState.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluastatedata_key] = lightuserdata(&wxLuaStateData)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastatedata_key;<br>// The key in the LUA_REGISTRYINDEX table that is a weak keyed table of<br>// the tables wxLua pushed into the registry with their keys as values.<br>// This is used by the wxLuaDebugData to know if the table is one of the wxLua<br>// registry tables for better wxLuaStackDialog performance.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_regtable_key][weak {wxlua_lreg_XXX_key table}] =<br>// lightuserdata(&wxlua_lreg_XXX_key)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_regtable_key;<br><br>// Light userdata used as keys in the metatables created for the class userdata objects.<br>// Note that even though these keys have values, they're not used, just the memory address.<br><br>// wxLua userdata metatable structure:<br>// {<br>// lightuserdata(&wxlua_metatable_type_key) = wxLua type number in wxlua_lreg_types_key table<br>// lightuserdata(&wxlua_metatable_wxluabindclass_key) = lightuserdata(&wxLuaBindClass)<br>// __gc = function(wxlua_wxLuaBindClass__gc)<br>// __index = function(wxlua_wxLuaBindClass__index)<br>// __newindex = function(wxlua_wxLuaBindClass__newindex)<br>// __tostring = function(wxlua_wxLuaBindClass__tostring)<br>// }<br><br>// The key of a metatable used for wxLua userdata that is the wxLua type number in the<br>// wxlua_lreg_types_key table this metatable is for.<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_metatable_type_key;<br>// The key of a metatable used for wxLua userdata that stores a lightuserdata<br>// of the wxLuaBindClass struct for this class.<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_metatable_wxluabindclass_key;<br><br></pre> <h3><a name="Functions_to_Create_a_wxLuaState"></a>Functions to --- 2194,2198 ---- considerable amount of the total time of a function call.<br> <br> ! <pre>// ----------------------------------------------------------------------------<br>// Special keys used by wxLua in the LUA_REGISTRYINDEX table.<br>//<br>// Note: We do not push a human readable string for these because Lua always<br>// makes a copy and hashes the string, this takes a considerable amount of<br>// time when benchmarked using valgrind.<br>// ----------------------------------------------------------------------------<br><br>// Light userdata used as keys in the Lua LUA_REGISTRYINDEX table for wxLua.<br>// Note that even though these keys have values, they're not used, just the memory address.<br><br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table indexed<br>// on the wxLua types where each item is a userdata metatable for a C++ class.<br>// Note: The wxLua types WXLUA_TXXX that correspond to the Lua LUA_TXXX types<br>// are not stored in this table since they do not use our metatables.<br>// The keys in this table are all > 1. They values are either tables or 0<br>// if the wxLuaBinding containing the wxLua type was not registered.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_types_key][wxLua type number] = { metatable for a C++ class }<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_types_key;<br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table<br>// with references to Lua objects we want to keep a handle to. The object could be<br>// anything, a table, function, number, string, userdata...<br>// LUA_REGISTRYINDEX[&wxlua_lreg_refs_key][ref number] = Lua object<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_refs_key;<br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table<br>// with references to objects the wxLuaDebugData wants to keep a handle to by<br>// storing their value for lookup. It is used only for the wxLuaDebugData.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][ref number] = Lua object<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_debug_refs_key;<br>// The key that in the LUA_REGISTRYINDEX table that is a lookup table of string<br>// C++ classname keys and lightuserdata pointers to the associated wxLuaBindClass struct.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][wxLuaBindClass.name] = lightuserdata(&wxLuaBindClass)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_classes_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table<br>// of Lua objects/functions assigned to wxLua userdata programatically in Lua.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_derivedmethods_key][lightuserdata(obj_ptr)] =<br>// {["derived func/value name"] = wxLuaObject(Lua function/value), ...}<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_derivedmethods_key;<br>// The key in the LUA_REGISTRYINDEX table who's value is a lightuserdata<br>// of the wxLuaState for this lua_State.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluastate_key] = lightuserdata(&wxLuaState)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastate_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of lightuserdata<br>// wxLuaBindings and the ref to the Lua table they were installed into.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluabindings_key] = {lightuserdata(&wxLuaBinding) = wxlua_lreg_refs_key ref#, ...}<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluabindings_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// objects that we've pushed into Lua using wxluaT_pushuserdatatype().<br>// Note: A single object like a wxWindow may be pushed with multiple wxLua types.<br>// e.g. wxWindow* w = wx.wxWindow() retrieve the window later from wxObject* wxEvent:GetEventObject()<br>// LUA_REGISTRYINDEX[&wxlua_lreg_weakobjects_key][lightuserdata(obj_ptr)] =<br>// { wxLua type1 = weak fulluserdata, wxLua type2 = weak fulluserdata... }<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_weakobjects_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// objects to delete that were added using wxluaO_addgcobject().<br>// Note that non wxObject classes use wxLUA_DECLARE_ENCAPSULATION so<br>// the key is the object pointer and the value is the wxObject encapsulation.<br>// Both the key and the value are the same if not encapsulated.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_gcobjects_key][lightuserdata(obj_ptr)] =<br>// lightuserdata(wxObject derived class)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_gcobjects_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// wxLuaEventCallbacks that we've created.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_evtcallbacks_key][lightuserdata(&wxLuaEventCallback)] =<br>// lightuserdata(&wxEvtHandler)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_evtcallbacks_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of wxWindow keys and<br>// wxLuaWinDestroyCallback values that we've created.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_windestroycallbacks_key][lightuserdata(&wxWindow)] =<br>// lightuserdata(wxLuaWinDestroyCallback)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_windestroycallbacks_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// top level wxWindows that we've created and need to destroy when closed.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_topwindows_key][lightuserdata(&wxWindow)] = 1<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_topwindows_key;<br>// The key in the LUA_REGISTRYINDEX table that has a boolean value<br>// of whether the Lua code has prepended a '_' to function name to indicate<br>// that they want the base class function called.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_callbaseclassfunc_key] = true/false<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_callbaseclassfunc_key;<br>// The key in the LUA_REGISTRYINDEX table that has a wxEventType (integer) value<br>// of the current wxEvent is that is being run or wxEVT_NULL if not in an event.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxeventtype_key] = wxEventType (wxEVT_NULL)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxeventtype_key;<br>// The key in the LUA_REGISTRYINDEX table that has a wxLuaStateData class<br>// lightuserdata value for the wxLuaState.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluastatedata_key] = lightuserdata(&wxLuaStateData)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastatedata_key;<br>// The key in the LUA_REGISTRYINDEX table that is a weak keyed table of<br>// the tables wxLua pushed into the registry with their keys as values.<br>// This is used by the wxLuaDebugData to know if the table is one of the wxLua<br>// registry tables for better wxLuaStackDialog performance.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_regtable_key][weak {wxlua_lreg_XXX_key table}] =<br>// lightuserdata(&wxlua_lreg_XXX_key)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_regtable_key;<br><br>// Light userdata used as keys in the metatables created for the class userdata objects.<br>// Note that even though these keys have values, they're not used, just the memory address.<br><br>// wxLua userdata metatable structure:<br>// {<br>// lightuserdata(&wxlua_metatable_type_key) = wxLua type number in wxlua_lreg_types_key table<br>// lightuserdata(&wxlua_metatable_wxluabindclass_key) = lightuserdata(&wxLuaBindClass)<br>// __gc = function(wxlua_wxLuaBindClass__gc)<br>// __index = function(wxlua_wxLuaBindClass__index)<br>// __newindex = function(wxlua_wxLuaBindClass__newindex)<br>// __tostring = function(wxlua_wxLuaBindClass__tostring)<br>// }<br><br>// The key of a metatable used for wxLua userdata that is the wxLua type number in the<br>// wxlua_lreg_types_key table this metatable is for.<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_metatable_type_key;<br>// The key of a metatable used for wxLua userdata that stores a lightuserdata<br>// of the wxLuaBindClass struct for this class.<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_metatable_wxluabindclass_key;<br><br></pre> <h3><a name="Functions_to_Create_a_wxLuaState"></a>Functions to *************** *** 2194,2205 **** get and handle the wxLuaEvents, see also Get/SetEventHandler().</li> </ul> ! <li>wxLuaState(lua_State* L, wxLuaState_Type type = wxLUASTATE_GETSTATE)</li> <ul> ! <li>type = wxLUASTATE_GETSTATE means that the lua_State must already have been created using a wxLuaState and so this new wxLuaState will merely attach to the corresponding ref data.</li> <li>type = wxLUASTATE_SETSTATE means that this new lua_State ! that you have created will have the wxLua bindings pushed into it if wxLUASTATE_OPENBINDINGS is set and then be ready for running wxLua programs. The wxLuaState will not close the lua_State, but will remove itself from Lua and do cleanup when --- 2216,2230 ---- get and handle the wxLuaEvents, see also Get/SetEventHandler().</li> </ul> ! <li>wxLuaState(lua_State* L, wxLuaState_Type type = ! wxLUASTATE_GETSTATE)</li> <ul> ! <li>type = wxLUASTATE_GETSTATE means that the ! lua_State must already have been created using a wxLuaState and so this new wxLuaState will merely attach to the corresponding ref data.</li> <li>type = wxLUASTATE_SETSTATE means that this new lua_State ! that you have created will have the wxLua bindings pushed into it if ! wxLUASTATE_OPENBINDINGS is set and then be ready for running wxLua programs. The wxLuaState will not close the lua_State, but will remove itself from Lua and do cleanup when Index: binding.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/binding.html,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** binding.html 10 Jan 2008 23:06:24 -0000 1.27 --- binding.html 21 Oct 2008 04:23:18 -0000 1.28 *************** *** 670,691 **** = "op_ne"</li> <li>"<" = "op_lt"</li> <li>">" = "op_gt"</li> <li>"<=" = "op_le"</li> <li>">=" ! = "op_ge"</li> ! </ul><ul> <li>"|" = "op_or"</li> <li>"&" ! = "op_and"</li> <li>"||" = "op_lor" note: "lor" stands for logical (boolean) or, ! same for "land."</li> <li>"&&" = "op_land"</li> ! <li>"!" = "op_not"</li> <li>"^" = "op_xor"</li> ! </ul><ul> <li>"++" = "op_inc"</li> <li>"--" ! = "op_dec"</li> <li>"- (unary)" = "op_neg"</li> </ul><ul> <li>"=" = op_set</li> <li>"+" = "op_add"</li> <li>"-" = "op_sub"<br> </li> <li>"*" ! = "op_mul"</li> <li>"/" = "op_div"</li> </ul><ul> <li>"+=" = "op_iadd" note: ixxx stands for "inplace" as it modifies the original object.</li> <li>"-=" = "op_is... [truncated message content] |