luaforwindows/files/docs/wxlua/doxygen/html/wxlbind_8h_source.html

719 lines
101 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>wxLua: /mnt/share/devel/lua/wxLua/modules/wxlua/include/wxlbind.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="dir_15d5a205ad383328522db6a6be296af1.html">modules</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_b59b58daa92d206701e75411b2cef894.html">wxlua</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_a9b43b959fc4efc3ae9ddc99e98c5750.html">include</a>
</div>
</div>
<div class="contents">
<h1>wxlbind.h</h1><a href="wxlbind_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/////////////////////////////////////////////////////////////////////////////</span>
<a name="l00002"></a>00002 <span class="comment"></span><span class="comment">// Name: wxlbind.h</span>
<a name="l00003"></a>00003 <span class="comment">// Purpose: wxLuaBinding</span>
<a name="l00004"></a>00004 <span class="comment">// Author: Ray Gilbert, John Labenski, J Winwood</span>
<a name="l00005"></a>00005 <span class="comment">// Created: 14/11/2001</span>
<a name="l00006"></a>00006 <span class="comment">// Copyright: Ray Gilbert</span>
<a name="l00007"></a>00007 <span class="comment">// Licence: wxWidgets licence</span><span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment">/////////////////////////////////////////////////////////////////////////////</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef _WXLBIND_H_</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define _WXLBIND_H_</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="wxldefs_8h.html">wxlua/include/wxldefs.h</a>&quot;</span>
<a name="l00014"></a>00014
<a name="l00015"></a>00015 <span class="preprocessor">#ifdef GetObject</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor"> #undef GetObject // MSVC defines this</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span>
<a name="l00019"></a><a class="code" href="wxlbind_8h.html#a110bc49590824fc371178b1e2ad05854">00019</a> <span class="keyword">class </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="classwxLuaBinding.html">wxLuaBinding</a>;
<a name="l00020"></a><a class="code" href="wxlbind_8h.html#a8188d59ff332c460188de0b2af848ef2">00020</a> <span class="keyword">class </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="classwxLuaState.html">wxLuaState</a>;
<a name="l00021"></a><a class="code" href="wxlbind_8h.html#a51e611bc73650e52d8fe07250ab3d42d">00021</a> <span class="keyword">struct </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>;
<a name="l00022"></a>00022
<a name="l00023"></a>00023 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00024"></a>00024 <span class="comment">// wxLua binding defines, enums, and structs</span>
<a name="l00025"></a>00025 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">// The inbuilt wxLua types (WXLUA_TXXX) corresponding to Lua types (LUA_TXXX)</span>
<a name="l00028"></a>00028 <span class="comment">// are shifted to be positive values.</span>
<a name="l00029"></a>00029 <span class="comment">// The Binding wxLua types are positive integers generated automatically when</span>
<a name="l00030"></a>00030 <span class="comment">// wxLua is initialized and start at WXLUA_T_MAX+1.</span>
<a name="l00031"></a>00031 <span class="comment">// *Use the function bool wxlua_iswxuserdatatype(wxl_type) if you want to</span>
<a name="l00032"></a>00032 <span class="comment">// differentiate between the two.</span>
<a name="l00033"></a>00033 <span class="comment">//</span>
<a name="l00034"></a>00034 <span class="comment">// Note that WXLUA_TUNKNOWN is used as an initialiser for class types</span>
<a name="l00035"></a>00035 <span class="comment">// and is used as an end marker for the wxLuaArgType array that</span>
<a name="l00036"></a>00036 <span class="comment">// represents function prototype argument types in the wxLuaBindCFunc struct</span>
<a name="l00037"></a>00037 <span class="comment">// and it must always be 0.</span>
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="comment">// wxLua types for Lua types</span>
<a name="l00040"></a><a class="code" href="wxlbind_8h.html#aeb150b964405f526ef77087288f403b2">00040</a> <span class="preprocessor">#define WXLUA_TUNKNOWN 0 // unset and invalid, not a LUA_TXXX</span>
<a name="l00041"></a><a class="code" href="wxlbind_8h.html#ab1ffe83879cd856390708161cbc49e8d">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TNONE 1 // LUA_TNONE -1</span>
<a name="l00042"></a><a class="code" href="wxlbind_8h.html#a1ab3b990ed46ff3d8986e5b0fb7ab2fb">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TNIL 2 // LUA_TNIL 0</span>
<a name="l00043"></a><a class="code" href="wxlbind_8h.html#a458b772ab1522825ff3199d8fba34df7">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TBOOLEAN 3 // LUA_TBOOLEAN 1</span>
<a name="l00044"></a><a class="code" href="wxlbind_8h.html#af997ec3f0137737b21fa6eb91aca9529">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TLIGHTUSERDATA 4 // LUA_TLIGHTUSERDATA 2</span>
<a name="l00045"></a><a class="code" href="wxlbind_8h.html#ab722ed662e4f3b7f2624d9a71f5c5817">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TNUMBER 5 // LUA_TNUMBER 3</span>
<a name="l00046"></a><a class="code" href="wxlbind_8h.html#a2e521227720c7b42b9fe076b1e944405">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TSTRING 6 // LUA_TSTRING 4</span>
<a name="l00047"></a><a class="code" href="wxlbind_8h.html#ab80aed8ef4eafc8ab9479e39597330ff">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TTABLE 7 // LUA_TTABLE 5</span>
<a name="l00048"></a><a class="code" href="wxlbind_8h.html#ad1ad6ff2d60457dfb1251faede683dd7">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TFUNCTION 8 // LUA_TFUNCTION 6</span>
<a name="l00049"></a><a class="code" href="wxlbind_8h.html#af70988ad845289f3b60451dce70d9622">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TUSERDATA 9 // LUA_TUSERDATA 7</span>
<a name="l00050"></a><a class="code" href="wxlbind_8h.html#af26c97cbb42bdb22bc85a245bd93c6a4">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TTHREAD 10 // LUA_TTHREAD 8</span>
<a name="l00051"></a><a class="code" href="wxlbind_8h.html#a58050f86cf4136d7b81371ac367313c0">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TINTEGER 11 // LUA_TNUMBER but integer only, not a LUA_TXXX</span>
<a name="l00052"></a><a class="code" href="wxlbind_8h.html#a53115f4dba53cf577b8fd547b9ac874c">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_TCFUNCTION 12 // LUA_TFUNCTION &amp; lua_iscfunction(), not a LUA_TXXX</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00054"></a><a class="code" href="wxlbind_8h.html#a5c88c9256d02ad58bc27ea8744c35597">00054</a> <span class="preprocessor">#define WXLUA_T_MAX 12 // Max of the Lua WXLUA_TXXX values</span>
<a name="l00055"></a><a class="code" href="wxlbind_8h.html#acd4a1eb4890d911baf74fbb70da133ea">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_T_MIN 0 // Min of the Lua WXLUA_TXXX values</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a><a class="code" href="wxlbind_8h.html#aabdfd967ae93eab0c0e15363480a47d4">00057</a> <span class="preprocessor">#define WXLUATYPE_NULL 13 // C++ NULL, is full wxLua type with metatable</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span>
<a name="l00059"></a>00059 <span class="comment">// Check that the Lua LUA_TXXX types are what they used to be</span>
<a name="l00060"></a>00060 <span class="preprocessor">#if (LUA_TNONE != -1) || (LUA_TNIL != 0) || (LUA_TBOOLEAN != 1) || (LUA_TLIGHTUSERDATA != 2) || \</span>
<a name="l00061"></a>00061 <span class="preprocessor"> (LUA_TNUMBER != 3) || (LUA_TSTRING != 4) || (LUA_TTABLE != 5) || (LUA_TFUNCTION != 6) || \</span>
<a name="l00062"></a>00062 <span class="preprocessor"> (LUA_TUSERDATA != 7) || (LUA_TTHREAD != 8)</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor"># error &quot;Lua has changed it&#39;s LUA_TXXX defines.&quot;</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span>
<a name="l00066"></a>00066 <span class="comment">// Is this wxLua type one of the basic Lua types</span>
<a name="l00067"></a><a class="code" href="wxlbind_8h.html#a430d2b2f92cfef1455bd99483e58d877">00067</a> <span class="preprocessor">#define WXLUAT_IS_LUAT(wxl_type) (((wxl_type) &gt;= WXLUA_T_MIN) &amp;&amp; ((wxl_type) &lt;= WXLUA_T_MAX))</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>
<a name="l00069"></a>00069 <span class="comment">// Blindly convert the lua_type to the wxlua_type. Note: WXLUA_TXXX = LUA_TXXX + 2</span>
<a name="l00070"></a>00070 <span class="comment">// *** See wxlua_luatowxluatype() for a better function ***</span>
<a name="l00071"></a><a class="code" href="wxlbind_8h.html#a2496c732bc6da513613cf04042df77df">00071</a> <span class="preprocessor">#define LUAT_TO_WXLUAT(luatype) ((luatype) + 2)</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span>
<a name="l00073"></a>00073 <span class="comment">// Returns true if the wxLua type is for a wxLua binding type and not a</span>
<a name="l00074"></a>00074 <span class="comment">// generic WXLUA_TXXX type. This means that there might be a metatable for</span>
<a name="l00075"></a>00075 <span class="comment">// this type in the wxlua_lreg_types_key of the LUA_REGISTRYINDEX table.</span>
<a name="l00076"></a><a class="code" href="wxlbind_8h.html#ab26c2ec570e70f2f2b3ed9fa82afe24a">00076</a> <span class="preprocessor">#define wxlua_iswxuserdatatype(wxl_type) ((wxl_type) &gt; WXLUA_T_MAX)</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span>
<a name="l00078"></a>00078 <span class="comment">// Variables used in the wxLuaArgType member of the wxLuaBindCFunc for</span>
<a name="l00079"></a>00079 <span class="comment">// Lua types. The binding generator uses these and generates new ones for</span>
<a name="l00080"></a>00080 <span class="comment">// classes and structs as specified in the bindings.</span>
<a name="l00081"></a>00081 <span class="keyword">extern</span> <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#af5f263fe0cee2a78592733f73302fae1">wxluatype_TNONE</a>;
<a name="l00082"></a>00082 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#af0a3e5a0826b83f55975eacc7c80b8ca">wxluatype_TNIL</a>;
<a name="l00083"></a>00083 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#af7c54f1e394057d09b7b271636653753">wxluatype_TBOOLEAN</a>;
<a name="l00084"></a>00084 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#aa158468a14a90d8a6737ca543640ac14">wxluatype_TLIGHTUSERDATA</a>;
<a name="l00085"></a>00085 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#a81fefe100b8c874aed225be14c2e9417">wxluatype_TNUMBER</a>;
<a name="l00086"></a>00086 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#ae60ba1eadfdbaf4619e81584e91e4bf9">wxluatype_TSTRING</a>;
<a name="l00087"></a>00087 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#aca7f4ac5f81a3a709b9ff59e6a7fe4f2">wxluatype_TTABLE</a>;
<a name="l00088"></a>00088 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#a3f41bf1821df901b75de9a611e3359ff">wxluatype_TFUNCTION</a>;
<a name="l00089"></a>00089 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#aec66ef9de5ef7604a15cdefa946862e2">wxluatype_TUSERDATA</a>;
<a name="l00090"></a>00090 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#a812d9d9119aafb925e733145bf882083">wxluatype_TTHREAD</a>;
<a name="l00091"></a>00091 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#ad182e2a1f29a3bfaf24f1347255bbab3">wxluatype_TINTEGER</a>;
<a name="l00092"></a>00092 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#a340c49e631b9d2b6a0790094c72b5583">wxluatype_TCFUNCTION</a>;
<a name="l00093"></a>00093
<a name="l00094"></a>00094 <span class="comment">// The NULL wxLua type is not part of the bindings, but is installed</span>
<a name="l00095"></a>00095 <span class="comment">// by the wxLuaState since it may be used by various bindings and does not</span>
<a name="l00096"></a>00096 <span class="comment">// rely on wxWidgets.</span>
<a name="l00097"></a>00097 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>) <a class="code" href="wxlbind_8cpp.html#ada2f84390e66116604bfa8d5102c7305">wxluatype_NULL</a>; <span class="comment">// wxLua type for NULL pointer</span>
<a name="l00098"></a>00098 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>) <a class="code" href="wxlbind_8cpp.html#a4aa9b7bff8761a6fb183f52ad9d35fdf">wxLuaBindClass_NULL</a>; <span class="comment">// for NULL pointer</span>
<a name="l00099"></a>00099
<a name="l00100"></a>00100 <span class="comment">// Copies of wxLua types that are used very often.</span>
<a name="l00101"></a>00101 <span class="comment">// Note that we do not use the original since we may not be linked</span>
<a name="l00102"></a>00102 <span class="comment">// to the binding library that defines them.</span>
<a name="l00103"></a>00103 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>*) <a class="code" href="wxlbind_8cpp.html#aea95a7e5610e8d338700175ede7e8b28">p_wxluatype_wxEvent</a>; <span class="comment">// wxLua type for wxEvents</span>
<a name="l00104"></a>00104 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>*) <a class="code" href="wxlbind_8cpp.html#a39c4487f5ea5ac7d668d2f6db931970e">p_wxluatype_wxWindow</a>; <span class="comment">// wxLua type for wxWindows</span>
<a name="l00105"></a>00105 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>*) <a class="code" href="wxlbind_8cpp.html#a4d788db68e87954d09dd58ea30df0cd3">p_wxluatype_wxString</a>; <span class="comment">// wxLua type for wxStrings</span>
<a name="l00106"></a>00106 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>*) <a class="code" href="wxlbind_8cpp.html#a37763c7807d701968783c17c455750e6">p_wxluatype_wxArrayString</a>; <span class="comment">// wxLua type for wxArrayString</span>
<a name="l00107"></a>00107 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>*) <a class="code" href="wxlbind_8cpp.html#a7e0bab1cb372c8c3e28edff2f7318c11">p_wxluatype_wxSortedArrayString</a>; <span class="comment">// wxLua type for wxSortedArrayString</span>
<a name="l00108"></a>00108 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<span class="keywordtype">int</span>*) <a class="code" href="wxlbind_8cpp.html#a61aa9300e2dc84511689a6254869b90a">p_wxluatype_wxArrayInt</a>; <span class="comment">// wxLua type for wxArrayInt</span>
<a name="l00109"></a>00109
<a name="l00110"></a>00110 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00111"></a>00111 <span class="comment">// wxLuaArgType a pointer to a declared wxLua type, see wxLuaBindCFunc::argtypes</span>
<a name="l00112"></a>00112 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00113"></a>00113
<a name="l00114"></a><a class="code" href="wxlbind_8h.html#a6628a536d11950b5d99cc6ba3a2e648d">00114</a> typedef <span class="keywordtype">int</span>* <a class="code" href="wxlbind_8h.html#a6628a536d11950b5d99cc6ba3a2e648d">wxLuaArgType</a>; <span class="comment">// address of wxLua class type (a pointer to it)</span>
<a name="l00115"></a>00115 extern <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(wxLuaArgType) <a class="code" href="wxlbind_8cpp.html#a58f9a9bbfe42fe5e81fee9f0457979eb">g_wxluaargtypeArray_None</a>[1]; <span class="comment">// = {0}</span>
<a name="l00116"></a>00116
<a name="l00117"></a>00117 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00118"></a>00118 <span class="comment">// wxLuaMethod_Type: Values for the wxLuaBindMethod::method_type and wxLuaBindCFunc::method_type</span>
<a name="l00119"></a>00119 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00120"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94f">00120</a> enum <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94f">wxLuaMethod_Type</a>
<a name="l00121"></a>00121 {
<a name="l00122"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa17851433f53b5c36f8832826c632a620">00122</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa17851433f53b5c36f8832826c632a620">WXLUAMETHOD_CONSTRUCTOR</a> = 0x0001, <span class="comment">// constructor</span>
<a name="l00123"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa60723ea1159aae6845b01c660afd54f2">00123</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa60723ea1159aae6845b01c660afd54f2">WXLUAMETHOD_METHOD</a> = 0x0002, <span class="comment">// class member function</span>
<a name="l00124"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa9d1e4fafb81ea95073b95c8e92153fbf">00124</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa9d1e4fafb81ea95073b95c8e92153fbf">WXLUAMETHOD_CFUNCTION</a> = 0x0004, <span class="comment">// global C function (not part of a class)</span>
<a name="l00125"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa6fae1df03c5887c4848e5bc5e2998257">00125</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa6fae1df03c5887c4848e5bc5e2998257">WXLUAMETHOD_GETPROP</a> = 0x0008, <span class="comment">// Get %property funcName, read</span>
<a name="l00126"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa868d721a899ba8061183e08bc84c0d64">00126</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa868d721a899ba8061183e08bc84c0d64">WXLUAMETHOD_SETPROP</a> = 0x0010, <span class="comment">// Set %property funcName, write</span>
<a name="l00127"></a>00127
<a name="l00128"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fad2e593a9652e9ce570c780473db925a1">00128</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fad2e593a9652e9ce570c780473db925a1">WXLUAMETHOD_STATIC</a> = 0x1000, <span class="comment">// Class member function is static</span>
<a name="l00129"></a>00129
<a name="l00130"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa7deeba1a24d1b937c7fc5284facb0e13">00130</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa7deeba1a24d1b937c7fc5284facb0e13">WXLUAMETHOD_DELETE</a> = 0x2000, <span class="comment">// This is the delete function that wxLua has generated</span>
<a name="l00131"></a>00131 <span class="comment">// to delete this class and is not part of the</span>
<a name="l00132"></a>00132 <span class="comment">// original class.</span>
<a name="l00133"></a>00133
<a name="l00134"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa0bef5132d9b05df61295f4b84ebc5017">00134</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa0bef5132d9b05df61295f4b84ebc5017">WXLUAMETHOD_ENCAPSULATE</a> = 0x4000, <span class="comment">// This class is not derived from a wxObject</span>
<a name="l00135"></a>00135
<a name="l00136"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fabd62afc95956323115cdd15848ae6f94">00136</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fabd62afc95956323115cdd15848ae6f94">WXLUAMETHOD_CHECKED_OVERLOAD</a> = 0x10000, <span class="comment">// Class method has been checked to see if it is</span>
<a name="l00137"></a>00137 <span class="comment">// overloaded function from the base class by</span>
<a name="l00138"></a>00138 <span class="comment">// wxLuaBinding::InitAllBindings().</span>
<a name="l00139"></a>00139 <span class="comment">// wxLuaBindMethod::basemethod is !NULL</span>
<a name="l00140"></a>00140 <span class="comment">// if an overloaded function was found.</span>
<a name="l00141"></a>00141
<a name="l00142"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa9dbba989648af34b28cf6a050a41ac46">00142</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa9dbba989648af34b28cf6a050a41ac46">WXLUAMETHOD_SEARCH_MASK</a> = 0xFFFF, <span class="comment">// Helper for wxLuaBinding::GetClassMethod(), ignore WXLUAMETHOD_CHECKED_OVERLOAD</span>
<a name="l00143"></a><a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa89f98b585bf6ff387d17a22c04d61990">00143</a> <a class="code" href="wxlbind_8h.html#aac6bce8c6fcf2445af7ac139f73ba94fa89f98b585bf6ff387d17a22c04d61990">WXLUAMETHOD_SORT_MASK</a> = 0xFFFF, <span class="comment">// Helper for wxLuaBinding::InitAllBindings(), ignore WXLUAMETHOD_CHECKED_OVERLOAD</span>
<a name="l00144"></a>00144 };
<a name="l00145"></a>00145
<a name="l00146"></a>00146 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00147"></a>00147 <span class="comment">// wxLuaBindCFunc - Defines a single function for wxLua</span>
<a name="l00148"></a>00148 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00149"></a>00149
<a name="l00150"></a><a class="code" href="structwxLuaBindCFunc.html">00150</a> <span class="keyword">struct </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="structwxLuaBindCFunc.html">wxLuaBindCFunc</a>
<a name="l00151"></a>00151 {
<a name="l00152"></a><a class="code" href="structwxLuaBindCFunc.html#a6184d5deed3363ec14f67ecf5f63c84f">00152</a> lua_CFunction lua_cfunc; <span class="comment">// C function that implements the method or property</span>
<a name="l00153"></a><a class="code" href="structwxLuaBindCFunc.html#a9eba97dea3c4725b06234b62c5fd379a">00153</a> <span class="keywordtype">int</span> method_type; <span class="comment">// enum wxLuaMethod_Type flags for this function</span>
<a name="l00154"></a><a class="code" href="structwxLuaBindCFunc.html#ab76dacd34dc14e51d580d353aad17017">00154</a> <span class="keywordtype">int</span> minargs; <span class="comment">// Min number of required args</span>
<a name="l00155"></a><a class="code" href="structwxLuaBindCFunc.html#a763cb668b2e1e6f13eafe1e922612c82">00155</a> <span class="keywordtype">int</span> maxargs; <span class="comment">// Max number of args allowed</span>
<a name="l00156"></a><a class="code" href="structwxLuaBindCFunc.html#aefe2c60616304f09c47eade1163a4b27">00156</a> <a class="code" href="wxlbind_8h.html#a6628a536d11950b5d99cc6ba3a2e648d">wxLuaArgType</a>* argtypes; <span class="comment">// Array of wxLua types representing each argument, NULL terminated.</span>
<a name="l00157"></a>00157 };
<a name="l00158"></a>00158
<a name="l00159"></a>00159 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00160"></a>00160 <span class="comment">// wxLuaBindMethod - Defines a method or property (a function) for wxLua</span>
<a name="l00161"></a>00161 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00162"></a>00162
<a name="l00163"></a><a class="code" href="structwxLuaBindMethod.html">00163</a> <span class="keyword">struct </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>
<a name="l00164"></a>00164 {
<a name="l00165"></a><a class="code" href="structwxLuaBindMethod.html#afef5590cd8bd8a9906b658ddcadb674c">00165</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* name; <span class="comment">// Name of the method or property</span>
<a name="l00166"></a><a class="code" href="structwxLuaBindMethod.html#afe5a6ea650d981459de29640b339835e">00166</a> <span class="keywordtype">int</span> method_type; <span class="comment">// enum wxLuaMethod_Type flags for this method.</span>
<a name="l00167"></a>00167 <span class="comment">// Note that each func has own type, this is ored values of them.</span>
<a name="l00168"></a><a class="code" href="structwxLuaBindMethod.html#abcc43fb837b299e7fc088fb787ad3aca">00168</a> <a class="code" href="structwxLuaBindCFunc.html">wxLuaBindCFunc</a>* wxluacfuncs; <span class="comment">// Array of C functions for this method</span>
<a name="l00169"></a><a class="code" href="structwxLuaBindMethod.html#a36285f0c5431ed28e8951b26706ee3c5">00169</a> <span class="keywordtype">int</span> wxluacfuncs_n; <span class="comment">// Number of C functions (overloaded &gt; 1) for this method</span>
<a name="l00170"></a><a class="code" href="structwxLuaBindMethod.html#a61bd0c007d8c7064a473d19eac6dd2a6">00170</a> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* basemethod; <span class="comment">// Overloaded method from the base class, else NULL.</span>
<a name="l00171"></a>00171 <span class="comment">// See comments for WXLUAMETHOD_CHECKED_OVERLOAD</span>
<a name="l00172"></a>00172 };
<a name="l00173"></a>00173
<a name="l00174"></a>00174 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00175"></a>00175 <span class="comment">// wxLuaBindNumber - Defines a numeric value for wxLua</span>
<a name="l00176"></a>00176 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00177"></a>00177
<a name="l00178"></a><a class="code" href="structwxLuaBindNumber.html">00178</a> <span class="keyword">struct </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="structwxLuaBindNumber.html">wxLuaBindNumber</a>
<a name="l00179"></a>00179 {
<a name="l00180"></a><a class="code" href="structwxLuaBindNumber.html#a99f555b1db61778967760d74f182bbca">00180</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* name; <span class="comment">// name</span>
<a name="l00181"></a><a class="code" href="structwxLuaBindNumber.html#af3e98c3a4a775777f28a28f53ca5d9e9">00181</a> <span class="keywordtype">double</span> value; <span class="comment">// numeric value</span>
<a name="l00182"></a>00182 };
<a name="l00183"></a>00183
<a name="l00184"></a>00184 <span class="keyword">extern</span> <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<a class="code" href="structwxLuaBindNumber.html">wxLuaBindNumber</a>) <a class="code" href="wxlbind_8cpp.html#aeedafe804443572a91f5aae7920d104c">g_wxluanumberArray_None</a>[1]; <span class="comment">// = {{0,0}}</span>
<a name="l00185"></a>00185
<a name="l00186"></a>00186 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00187"></a>00187 <span class="comment">// wxLuaBindString - Defines a wxWidgets wxChar* string for wxLua</span>
<a name="l00188"></a>00188 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00189"></a>00189
<a name="l00190"></a><a class="code" href="structwxLuaBindString.html">00190</a> struct <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="structwxLuaBindString.html">wxLuaBindString</a>
<a name="l00191"></a>00191 {
<a name="l00192"></a><a class="code" href="structwxLuaBindString.html#a99b1e689b230a97ccbe89eaaa168c490">00192</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* name; <span class="comment">// name</span>
<a name="l00193"></a><a class="code" href="structwxLuaBindString.html#abb201cc7ef30158a3e1fe3445d338464">00193</a> <span class="keyword">const</span> wxChar* value; <span class="comment">// string value</span>
<a name="l00194"></a>00194 };
<a name="l00195"></a>00195
<a name="l00196"></a>00196 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00197"></a>00197 <span class="comment">// wxLuaBindEvent - Defines a wxWidgets wxEventType for wxLua</span>
<a name="l00198"></a>00198 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00199"></a>00199
<a name="l00200"></a><a class="code" href="structwxLuaBindEvent.html">00200</a> <span class="keyword">struct </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="structwxLuaBindEvent.html">wxLuaBindEvent</a>
<a name="l00201"></a>00201 {
<a name="l00202"></a><a class="code" href="structwxLuaBindEvent.html#a6de864ceccf61c077d89fe8abe1288ee">00202</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* name; <span class="comment">// Name of the wxEventType, e.g. &quot;wxEVT_COMMAND_MENU_SELECTED&quot;</span>
<a name="l00203"></a><a class="code" href="structwxLuaBindEvent.html#aa7b7fa6270db43ac848ae37a98ea82d3">00203</a> <span class="keyword">const</span> wxEventType* eventType; <span class="comment">// wxWidgets event type, e.g. &amp;wxEVT_COMMAND_MENU_SELECTED</span>
<a name="l00204"></a><a class="code" href="structwxLuaBindEvent.html#a608a7a408284016c0e42c3c1715b82c2">00204</a> <span class="keywordtype">int</span>* wxluatype; <span class="comment">// wxLua class type that wxWidgets uses for this wxEventType,</span>
<a name="l00205"></a>00205 <span class="comment">// e.g. &amp;wxluatype_wxCommandEvent</span>
<a name="l00206"></a>00206 };
<a name="l00207"></a>00207
<a name="l00208"></a>00208 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00209"></a>00209 <span class="comment">// wxLuaBindEvent - Defines an object or pointer for wxLua</span>
<a name="l00210"></a>00210 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00211"></a>00211
<a name="l00212"></a><a class="code" href="structwxLuaBindObject.html">00212</a> <span class="keyword">struct </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="structwxLuaBindObject.html">wxLuaBindObject</a>
<a name="l00213"></a>00213 {
<a name="l00214"></a><a class="code" href="structwxLuaBindObject.html#a7284930268fb6a2f6024a21cbead5c9a">00214</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* name; <span class="comment">// Name of the object or pointer</span>
<a name="l00215"></a><a class="code" href="structwxLuaBindObject.html#ab9ff5d11002b79d2bbd43218f7b9d6d4">00215</a> <span class="keywordtype">int</span>* wxluatype; <span class="comment">// wxLua class type of the object or pointer.</span>
<a name="l00216"></a><a class="code" href="structwxLuaBindObject.html#a1baa2f3f1bb77fc3565f5c12bec50235">00216</a> <span class="keyword">const</span> <span class="keywordtype">void</span>* objPtr; <span class="comment">// Pointer to the object, e.g. &amp;wxDefaultPosition</span>
<a name="l00217"></a><a class="code" href="structwxLuaBindObject.html#a5cf6abaad26fd1a06589a39caf4e44b5">00217</a> <span class="keyword">const</span> <span class="keywordtype">void</span>** pObjPtr; <span class="comment">// Pointer to the object pointer, e.g. (const void **)&amp;wxThePenList</span>
<a name="l00218"></a>00218 };
<a name="l00219"></a>00219
<a name="l00220"></a>00220 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00221"></a>00221 <span class="comment">// wxLuaBindClass - Defines a C++ class or struct for wxLua</span>
<a name="l00222"></a>00222 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00223"></a>00223
<a name="l00224"></a><a class="code" href="structwxLuaBindClass.html">00224</a> <span class="keyword">struct </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>
<a name="l00225"></a>00225 {
<a name="l00226"></a><a class="code" href="structwxLuaBindClass.html#af89cbb87774c38c593f7ed87a68fffcb">00226</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* name; <span class="comment">// Name of the class or struct</span>
<a name="l00227"></a><a class="code" href="structwxLuaBindClass.html#a313c0c5eeb60ca717bae7d286dc41d28">00227</a> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* wxluamethods; <span class="comment">// Pointer to methods for this class</span>
<a name="l00228"></a><a class="code" href="structwxLuaBindClass.html#a5eac6feca088451706f0fde55dd73393">00228</a> <span class="keywordtype">int</span> wxluamethods_n; <span class="comment">// Number of methods</span>
<a name="l00229"></a><a class="code" href="structwxLuaBindClass.html#a248c5858774504530f3873f27421410c">00229</a> wxClassInfo* classInfo; <span class="comment">// Pointer to the wxClassInfo associated with this class or NULL.</span>
<a name="l00230"></a><a class="code" href="structwxLuaBindClass.html#a487a56c7a763a21041272c4b053e6c99">00230</a> <span class="keywordtype">int</span>* wxluatype; <span class="comment">// wxLua class type for userdata</span>
<a name="l00231"></a><a class="code" href="structwxLuaBindClass.html#a22728b03f43176679679849fdb48f55e">00231</a> <span class="keyword">const</span> <span class="keywordtype">char</span>** baseclassNames; <span class="comment">// Names of base classes, or NULL if no base classes.</span>
<a name="l00232"></a>00232 <span class="comment">// This is a NULL terminated array of strings.</span>
<a name="l00233"></a><a class="code" href="structwxLuaBindClass.html#ad6e5609d26483c65f37a6968275d7a0d">00233</a> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>** baseBindClasses;<span class="comment">// Pointers to the base classes or NULL for no base classes.</span>
<a name="l00234"></a>00234 <span class="comment">// This member is set after all the bindings are</span>
<a name="l00235"></a>00235 <span class="comment">// registered since the base class may be from</span>
<a name="l00236"></a>00236 <span class="comment">// a different module and so it can&#39;t be set at compile time.</span>
<a name="l00237"></a>00237 <span class="comment">// This array is one shorter than the baseclassNames array</span>
<a name="l00238"></a>00238 <span class="comment">// and you should use it rather than this to check the length</span>
<a name="l00239"></a>00239 <span class="comment">// since any one of these may be NULL if the</span>
<a name="l00240"></a>00240 <span class="comment">// library or module with the base class is not loaded.</span>
<a name="l00241"></a>00241
<a name="l00242"></a><a class="code" href="structwxLuaBindClass.html#a62e18d1022d4369511cbf0584990cca4">00242</a> <a class="code" href="structwxLuaBindNumber.html">wxLuaBindNumber</a>* enums; <span class="comment">// Class member enums or NULL if none</span>
<a name="l00243"></a><a class="code" href="structwxLuaBindClass.html#aadcfb36d6f271ada8864f1d88a0ca5fc">00243</a> <span class="keywordtype">int</span> enums_n; <span class="comment">// number of enums</span>
<a name="l00244"></a>00244 };
<a name="l00245"></a>00245
<a name="l00246"></a>00246 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00247"></a>00247 <span class="comment">// C functions for the metatable for wxLua userdata installed by the wxLuaBinding</span>
<a name="l00248"></a>00248 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00249"></a>00249
<a name="l00250"></a>00250 <span class="comment">// Generic delete function for userdata binding objects</span>
<a name="l00251"></a>00251 <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <span class="keywordtype">int</span> LUACALL <a class="code" href="wxlbind_8h.html#a6b29e46e8605c326133bbf713643a2cf">wxlua_userdata_delete</a>(lua_State *L);
<a name="l00252"></a>00252
<a name="l00253"></a>00253 <span class="comment">// memory deallocation function for created wxLuaBindClass defined objects, Lua&#39;s __gc metatable index</span>
<a name="l00254"></a>00254 <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <span class="keywordtype">int</span> LUACALL <a class="code" href="wxlbind_8h.html#afaa936338003a8c855b37aca0e2371b3">wxlua_wxLuaBindClass__gc</a>(lua_State *L);
<a name="l00255"></a>00255 <span class="comment">// Lua &#39;set table&#39; function for created wxLuaBindClass defined objects, Lua&#39;s __newindex metatable index</span>
<a name="l00256"></a>00256 <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <span class="keywordtype">int</span> LUACALL <a class="code" href="wxlbind_8h.html#a95e9940883230f3fb35390c89de03200">wxlua_wxLuaBindClass__newindex</a>(lua_State *L);
<a name="l00257"></a>00257 <span class="comment">// Lua &#39;get table&#39; function for created wxLuaBindClass defined objects, Lua&#39;s __index metatable index</span>
<a name="l00258"></a>00258 <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <span class="keywordtype">int</span> LUACALL <a class="code" href="wxlbind_8h.html#afee853d06607bbf64e889fbb248b7b72">wxlua_wxLuaBindClass__index</a>(lua_State *L);
<a name="l00259"></a>00259 <span class="comment">// Lua &#39;tostring&#39; function for created wxLuaBindClass defined objects, Lua&#39;s __tostring metatable index</span>
<a name="l00260"></a>00260 <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <span class="keywordtype">int</span> LUACALL <a class="code" href="wxlbind_8h.html#a8443ccec54d9e1ef4b4a6c3e15ba6282">wxlua_wxLuaBindClass__tostring</a>(lua_State *L);
<a name="l00261"></a>00261
<a name="l00262"></a>00262 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00263"></a>00263 <span class="comment">// Overloaded binding function call helper functions.</span>
<a name="l00264"></a>00264 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00265"></a>00265
<a name="l00266"></a>00266 <span class="comment">// Redirect a Lua function call to 1 wxLuaBindCFunc from a list of overloaded functions.</span>
<a name="l00267"></a>00267 <span class="comment">// The 1st upvalue must be a wxLuaBindMethod.</span>
<a name="l00268"></a>00268 <span class="keywordtype">int</span> LUACALL <a class="code" href="wxlbind_8h.html#ae8b8fad8188c49f55361c6686266c570">wxlua_callOverloadedFunction</a>(lua_State* L);
<a name="l00269"></a>00269 <span class="comment">// Redirect a Lua function call to 1 wxLuaBindCFunc from a list of overloaded functions</span>
<a name="l00270"></a>00270 <span class="comment">// declared in the wxLuaBindMethod.</span>
<a name="l00271"></a>00271 <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <span class="keywordtype">int</span> LUACALL <a class="code" href="wxlbind_8h.html#ae8b8fad8188c49f55361c6686266c570">wxlua_callOverloadedFunction</a>(lua_State* L, <span class="keyword">struct</span> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* wxlMethod);
<a name="l00272"></a>00272 <span class="comment">// Get a human readable string of the Lua args (items on the stack) for a function call</span>
<a name="l00273"></a>00273 <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> wxString <a class="code" href="wxlbind_8h.html#a15f78fa970b76c7963c3e11f90d988ca">wxlua_getLuaArgsMsg</a>(lua_State* L, <span class="keywordtype">int</span> start_stack_idx, <span class="keywordtype">int</span> end_stack_idx);
<a name="l00274"></a>00274 <span class="comment">// Get a human readable wxString of the wxLuaArgType arrays for the functions in the method</span>
<a name="l00275"></a>00275 <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> wxString <a class="code" href="wxlbind_8h.html#a0cf1f6600d0f80e2135c6788a4afc39f">wxlua_getBindMethodArgsMsg</a>(lua_State* L, <span class="keyword">struct</span> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* wxlMethod);
<a name="l00276"></a>00276
<a name="l00277"></a>00277 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00278"></a>00278 <span class="comment">// wxLuaObject - Wraps a reference to a Lua object reference inside a</span>
<a name="l00279"></a>00279 <span class="comment">// wxObject-derived class so that a Lua object can be used for userdata.</span>
<a name="l00280"></a>00280 <span class="comment">// Also with a simple extension by a proxy member value it can be used</span>
<a name="l00281"></a>00281 <span class="comment">// to provide pointers to the wxValidator classes.</span>
<a name="l00282"></a>00282 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00283"></a>00283
<a name="l00284"></a><a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084df">00284</a> <span class="keyword">enum</span> <a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084df">wxLuaObject_Type</a>
<a name="l00285"></a>00285 {
<a name="l00286"></a><a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfa8f955b2e461c9e96f95d73f0aaec859b">00286</a> <a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfa8f955b2e461c9e96f95d73f0aaec859b">wxLUAOBJECT_NONE</a> = 0, <span class="comment">// nothing is allocated</span>
<a name="l00287"></a><a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfadb667a5361aa792e6b837550027b9cb3">00287</a> <a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfadb667a5361aa792e6b837550027b9cb3">wxLUAOBJECT_BOOL</a> = 1, <span class="comment">// bool allocated</span>
<a name="l00288"></a><a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfa54f1c3e616d8452eb4ea92a9f0e68381">00288</a> <a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfa54f1c3e616d8452eb4ea92a9f0e68381">wxLUAOBJECT_INT</a> = 2, <span class="comment">// int allocated</span>
<a name="l00289"></a><a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfac1db50f4f3602c7ce03b673abe8b7a5b">00289</a> <a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfac1db50f4f3602c7ce03b673abe8b7a5b">wxLUAOBJECT_STRING</a> = 4, <span class="comment">// wxString allocated</span>
<a name="l00290"></a><a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfa4215ed6a9b518a32ca425c67f02e4c89">00290</a> <a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084dfa4215ed6a9b518a32ca425c67f02e4c89">wxLUAOBJECT_ARRAYINT</a> = 8 <span class="comment">// wxArrayInt allocated</span>
<a name="l00291"></a>00291 };
<a name="l00292"></a>00292
<a name="l00293"></a><a class="code" href="classwxLuaObject.html">00293</a> <span class="keyword">class </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="classwxLuaObject.html">wxLuaObject</a> : <span class="keyword">public</span> wxObject, wxClientData
<a name="l00294"></a>00294 {
<a name="l00295"></a>00295 <span class="keyword">public</span>:
<a name="l00296"></a>00296 <span class="comment">// Wrap the item at the lua_State&#39;s stack index and create a reference to it</span>
<a name="l00297"></a>00297 <span class="comment">// in the wxlua_lreg_refs_key registy table</span>
<a name="l00298"></a>00298 <a class="code" href="classwxLuaObject.html">wxLuaObject</a>(<span class="keyword">const</span> <a class="code" href="classwxLuaState.html">wxLuaState</a>&amp; wxlState, <span class="keywordtype">int</span> stack_idx);
<a name="l00299"></a>00299
<a name="l00300"></a>00300 <span class="keyword">virtual</span> ~<a class="code" href="classwxLuaObject.html">wxLuaObject</a>();
<a name="l00301"></a>00301
<a name="l00302"></a>00302 <span class="comment">// Get the value of the reference object and push it onto the stack.</span>
<a name="l00303"></a>00303 <span class="comment">// (or a proxy if the object has been aliased for a wxValidator class.)</span>
<a name="l00304"></a>00304 <span class="comment">// returns true if the object is valid and has a reference, returns false</span>
<a name="l00305"></a>00305 <span class="comment">// on failure and nothing is pushed on the stack.</span>
<a name="l00306"></a>00306 <span class="keywordtype">bool</span> GetObject();
<a name="l00307"></a>00307 <span class="comment">// Remove any existing reference and allocate another.</span>
<a name="l00308"></a>00308 <span class="comment">// You cannot call this after calling GetXXXPtr(), but only if this wraps a</span>
<a name="l00309"></a>00309 <span class="comment">// stack item.</span>
<a name="l00310"></a>00310 <span class="keywordtype">void</span> SetObject(<span class="keywordtype">int</span> stack_idx);
<a name="l00311"></a>00311
<a name="l00312"></a>00312 <span class="comment">// The following methods are used by the wxValidator interface</span>
<a name="l00313"></a>00313 <span class="comment">// Call GetObject() so that it&#39;s on the stack then try to get the value of</span>
<a name="l00314"></a>00314 <span class="comment">// the object as the specified type and set the member variable equal to it</span>
<a name="l00315"></a>00315 <span class="comment">// and return a pointer to member variable to a function that wants</span>
<a name="l00316"></a>00316 <span class="comment">// a pointer to read/write from/to.</span>
<a name="l00317"></a>00317 <span class="comment">// You may only call only one of these per instance of a wxLuaObject class.</span>
<a name="l00318"></a>00318 <span class="keywordtype">bool</span> *GetBoolPtr();
<a name="l00319"></a>00319 <span class="keywordtype">int</span> *GetIntPtr();
<a name="l00320"></a>00320 wxString *GetStringPtr();
<a name="l00321"></a>00321 wxArrayInt *GetArrayPtr();
<a name="l00322"></a>00322
<a name="l00323"></a>00323 <span class="comment">// Return a flag value that indicated whether the</span>
<a name="l00324"></a>00324 <span class="comment">// object is being used by a wxValidator class (else wxLUAOBJECT_NONE).</span>
<a name="l00325"></a><a class="code" href="classwxLuaObject.html#a35ecfa00460d9d72cf09c88f2a723363">00325</a> <a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084df">wxLuaObject_Type</a> <a class="code" href="classwxLuaObject.html#a35ecfa00460d9d72cf09c88f2a723363">GetAllocationFlag</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_alloc_flag; }
<a name="l00326"></a>00326
<a name="l00327"></a>00327 <a class="code" href="classwxLuaState.html">wxLuaState</a> GetwxLuaState() <span class="keyword">const</span>;
<a name="l00328"></a>00328
<a name="l00329"></a>00329 <span class="keyword">protected</span>:
<a name="l00330"></a><a class="code" href="classwxLuaObject.html#a355594c657ebe65dc62c7195a4c87004">00330</a> <a class="code" href="classwxLuaState.html">wxLuaState</a>* m_wxlState; <span class="comment">// a pointer due to #include recursion.</span>
<a name="l00331"></a><a class="code" href="classwxLuaObject.html#ad87ca9b958d11a4104c3b99ae8f40f24">00331</a> <span class="keywordtype">int</span> m_reference; <span class="comment">// reference in wxlua_lreg_refs_key registry table</span>
<a name="l00332"></a>00332
<a name="l00333"></a><a class="code" href="classwxLuaObject.html#a064c813719cee2323935b0a5e5b9a79e">00333</a> <a class="code" href="wxlbind_8h.html#a2053b3aabbe621ca574012e7d61084df">wxLuaObject_Type</a> m_alloc_flag; <span class="comment">// type of object for wxValidator interface</span>
<a name="l00334"></a>00334
<a name="l00335"></a>00335 <span class="keyword">union </span><span class="comment">// object stored for wxValidator interface</span>
<a name="l00336"></a>00336 {
<a name="l00337"></a><a class="code" href="classwxLuaObject.html#abf7637c571f1d23141b68e7af49008ef">00337</a> <span class="keywordtype">bool</span> m_bool;
<a name="l00338"></a><a class="code" href="classwxLuaObject.html#a1e9cdce919b0bf09c80d13a75fd2f570">00338</a> <span class="keywordtype">int</span> m_int;
<a name="l00339"></a><a class="code" href="classwxLuaObject.html#ac6ac832aa0cd2ffd10688b7c434edd65">00339</a> wxString* m_string;
<a name="l00340"></a><a class="code" href="classwxLuaObject.html#a77d115bfe6e815d2c32a0ced02caa80d">00340</a> wxArrayInt* m_arrayInt;
<a name="l00341"></a>00341 };
<a name="l00342"></a>00342
<a name="l00343"></a>00343 <span class="keyword">private</span>:
<a name="l00344"></a>00344 DECLARE_ABSTRACT_CLASS(<a class="code" href="classwxLuaObject.html">wxLuaObject</a>)
<a name="l00345"></a>00345 };
<a name="l00346"></a>00346
<a name="l00347"></a>00347 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00348"></a>00348 <span class="comment">// wxLUA_DECLARE_ENCAPSULATION and wxLUA_IMPLEMENT_ENCAPSULATION</span>
<a name="l00349"></a>00349 <span class="comment">// Declare the macros used to define and implement classes that</span>
<a name="l00350"></a>00350 <span class="comment">// wrap non-wxObject derived pointers used by wxLua in the bindings.</span>
<a name="l00351"></a>00351 <span class="comment">//</span>
<a name="l00352"></a>00352 <span class="comment">// IMPEXPSYMBOL : similiar to WXDLLIMPEXP_WXBIND, you cannot leave this</span>
<a name="l00353"></a>00353 <span class="comment">// parameter empty, but you may use WXLUA_NO_DLLIMPEXP and</span>
<a name="l00354"></a>00354 <span class="comment">// WXLUA_NO_DLLIMPEXP_DATA(x) if you don&#39;t want DLL export symbols.</span>
<a name="l00355"></a>00355 <span class="comment">// className : name of the class to encapsulate (may be NameSpace::MyClass)</span>
<a name="l00356"></a>00356 <span class="comment">// objName : name to use in naming the encapsulation class (NameSpace_MyClass)</span>
<a name="l00357"></a>00357 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00358"></a>00358
<a name="l00359"></a><a class="code" href="wxlbind_8h.html#a2084a1c10b2fa693279fb90542978c91">00359</a> <span class="preprocessor">#define WXLUA_NO_DLLIMPEXP // use if you don&#39;t want to export class</span>
<a name="l00360"></a><a class="code" href="wxlbind_8h.html#a94f05e15ce3d40f184cfcf1d56d53ebd">00360</a> <span class="preprocessor"></span><span class="preprocessor">#define WXLUA_NO_DLLIMPEXP_DATA(x) x // use if you don&#39;t want to export data</span>
<a name="l00361"></a>00361 <span class="preprocessor"></span>
<a name="l00362"></a><a class="code" href="wxlbind_8h.html#a4e4a53c8da9a2a771fea7f2e89e1e9a2">00362</a> <span class="preprocessor">#define wxLUA_DECLARE_ENCAPSULATION(IMPEXPSYMBOL, className, objName) \</span>
<a name="l00363"></a>00363 <span class="preprocessor">class IMPEXPSYMBOL wxLua_wxObject_##objName : public wxObject \</span>
<a name="l00364"></a>00364 <span class="preprocessor">{ \</span>
<a name="l00365"></a>00365 <span class="preprocessor">public: \</span>
<a name="l00366"></a>00366 <span class="preprocessor"> wxLua_wxObject_##objName(className *p_##objName) : m_p##objName(p_##objName) {} \</span>
<a name="l00367"></a>00367 <span class="preprocessor"> virtual ~wxLua_wxObject_##objName(); \</span>
<a name="l00368"></a>00368 <span class="preprocessor"> className *m_p##objName; \</span>
<a name="l00369"></a>00369 <span class="preprocessor"> DECLARE_ABSTRACT_CLASS(wxLua_wxObject_##objName) \</span>
<a name="l00370"></a>00370 <span class="preprocessor">};</span>
<a name="l00371"></a>00371 <span class="preprocessor"></span>
<a name="l00372"></a>00372 <span class="comment">// we may not have fully defined the class/object in header so delete it in src.</span>
<a name="l00373"></a><a class="code" href="wxlbind_8h.html#a0640877dddd82285e137bfab073cb029">00373</a> <span class="preprocessor">#define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \</span>
<a name="l00374"></a>00374 <span class="preprocessor">IMPLEMENT_ABSTRACT_CLASS(wxLua_wxObject_##objName, wxObject) \</span>
<a name="l00375"></a>00375 <span class="preprocessor">wxLua_wxObject_##objName::~wxLua_wxObject_##objName() \</span>
<a name="l00376"></a>00376 <span class="preprocessor">{ \</span>
<a name="l00377"></a>00377 <span class="preprocessor"> delete m_p##objName; \</span>
<a name="l00378"></a>00378 <span class="preprocessor">}</span>
<a name="l00379"></a>00379 <span class="preprocessor"></span>
<a name="l00380"></a><a class="code" href="wxlbind_8h.html#aac1b8701e9a0fee34b5c2ddd94c271a7">00380</a> <span class="preprocessor">#define wxGridCellWorkerDummyFriend wxGridCellWorkerDummyFriend; \</span>
<a name="l00381"></a>00381 <span class="preprocessor"> public: \</span>
<a name="l00382"></a>00382 <span class="preprocessor"> size_t GetRef() const { return m_nRef; }</span>
<a name="l00383"></a>00383 <span class="preprocessor"></span>
<a name="l00384"></a><a class="code" href="wxlbind_8h.html#a612cb813f873a42bce578e23dc5b956c">00384</a> <span class="preprocessor">#define wxGridCellAttrDummyFriend wxGridCellAttrDummyFriend; \</span>
<a name="l00385"></a>00385 <span class="preprocessor"> public: \</span>
<a name="l00386"></a>00386 <span class="preprocessor"> size_t GetRef() const { return m_nRef; }</span>
<a name="l00387"></a>00387 <span class="preprocessor"></span>
<a name="l00388"></a>00388 <span class="preprocessor">#include &quot;wx/grid.h&quot;</span>
<a name="l00389"></a>00389
<a name="l00390"></a>00390 <span class="comment">// The wxGridWorker classes have protected destructors, use DecRef().</span>
<a name="l00391"></a><a class="code" href="wxlbind_8h.html#a6b98a823b0e07eb22f9f20cbb1a9c6d3">00391</a> <span class="preprocessor">#define wxLUA_IMPLEMENT_wxGridCellWorker_ENCAPSULATION(className, objName) \</span>
<a name="l00392"></a>00392 <span class="preprocessor">IMPLEMENT_ABSTRACT_CLASS(wxLua_wxObject_##objName, wxObject) \</span>
<a name="l00393"></a>00393 <span class="preprocessor">wxLua_wxObject_##objName::~wxLua_wxObject_##objName() \</span>
<a name="l00394"></a>00394 <span class="preprocessor">{ \</span>
<a name="l00395"></a>00395 <span class="preprocessor"> m_p##objName-&gt;DecRef(); \</span>
<a name="l00396"></a>00396 <span class="preprocessor">}</span>
<a name="l00397"></a>00397 <span class="preprocessor"></span>
<a name="l00398"></a>00398 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00399"></a>00399 <span class="comment">// wxLuaSmartStringArray - Wraps a &quot;new&quot; array of wxStrings with an automatic</span>
<a name="l00400"></a>00400 <span class="comment">// destructor that deletes them to make binding easier.</span>
<a name="l00401"></a>00401 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00402"></a><a class="code" href="classwxLuaSmartStringArray.html">00402</a> <span class="keyword">class </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="classwxLuaSmartStringArray.html">wxLuaSmartStringArray</a>
<a name="l00403"></a>00403 {
<a name="l00404"></a>00404 <span class="keyword">public</span>:
<a name="l00405"></a><a class="code" href="classwxLuaSmartStringArray.html#a4b9554bfed3d0836d50d2716e3566e1b">00405</a> <a class="code" href="classwxLuaSmartStringArray.html#a4b9554bfed3d0836d50d2716e3566e1b">wxLuaSmartStringArray</a>(wxString *strArr = NULL) : m_strArr(strArr) { }
<a name="l00406"></a><a class="code" href="classwxLuaSmartStringArray.html#a211213e3d53dd5ef8a09d31ce3f013a2">00406</a> <a class="code" href="classwxLuaSmartStringArray.html#a211213e3d53dd5ef8a09d31ce3f013a2">~wxLuaSmartStringArray</a>() { <span class="keyword">delete</span>[] m_strArr; }
<a name="l00407"></a>00407
<a name="l00408"></a><a class="code" href="classwxLuaSmartStringArray.html#a9722b89a89d535eeb755d45b84df3771">00408</a> <span class="keywordtype">void</span> operator = (wxString *strArr) { m_strArr = strArr; }
<a name="l00409"></a><a class="code" href="classwxLuaSmartStringArray.html#a4cd8b7769791e11cb00f302dde2c8e0a">00409</a> <a class="code" href="classwxLuaSmartStringArray.html#a4cd8b7769791e11cb00f302dde2c8e0a">operator const wxString *</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_strArr; }
<a name="l00410"></a>00410
<a name="l00411"></a>00411 <span class="keyword">private</span>:
<a name="l00412"></a><a class="code" href="classwxLuaSmartStringArray.html#af55fc7d29557dfb02ae804c4051ad448">00412</a> wxString *m_strArr;
<a name="l00413"></a>00413 };
<a name="l00414"></a>00414
<a name="l00415"></a>00415 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00416"></a>00416 <span class="comment">// wxLuaSmartIntArray - Wraps a &quot;new&quot; array of ints with an automatic</span>
<a name="l00417"></a>00417 <span class="comment">// destructor that deletes them to make binding easier.</span>
<a name="l00418"></a>00418 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00419"></a><a class="code" href="classwxLuaSmartIntArray.html">00419</a> <span class="keyword">class </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="classwxLuaSmartIntArray.html">wxLuaSmartIntArray</a>
<a name="l00420"></a>00420 {
<a name="l00421"></a>00421 <span class="keyword">public</span>:
<a name="l00422"></a><a class="code" href="classwxLuaSmartIntArray.html#abfe66f3f064ba75690c639ee1e028826">00422</a> <a class="code" href="classwxLuaSmartIntArray.html#abfe66f3f064ba75690c639ee1e028826">wxLuaSmartIntArray</a>(<span class="keywordtype">int</span>* intArr = NULL) : m_intArr(intArr) { }
<a name="l00423"></a><a class="code" href="classwxLuaSmartIntArray.html#add1c9ed981ed84e085fe531946e08d6b">00423</a> <a class="code" href="classwxLuaSmartIntArray.html#add1c9ed981ed84e085fe531946e08d6b">~wxLuaSmartIntArray</a>() { <span class="keyword">delete</span>[] m_intArr; }
<a name="l00424"></a>00424
<a name="l00425"></a><a class="code" href="classwxLuaSmartIntArray.html#af09fbc555b142714304ebfbdae4fb57b">00425</a> <span class="keywordtype">void</span> operator = (<span class="keywordtype">int</span> *intArr) { m_intArr = intArr; }
<a name="l00426"></a><a class="code" href="classwxLuaSmartIntArray.html#abf67c7c89dc883db1f2806487936feb7">00426</a> <a class="code" href="classwxLuaSmartIntArray.html#abf67c7c89dc883db1f2806487936feb7">operator int *</a>() { <span class="keywordflow">return</span> m_intArr; } <span class="comment">// Note: not const for wxGLCanvas</span>
<a name="l00427"></a>00427
<a name="l00428"></a>00428 <span class="keyword">private</span>:
<a name="l00429"></a><a class="code" href="classwxLuaSmartIntArray.html#a5d8f8fea30fbbb4d96765e249ae903ce">00429</a> <span class="keywordtype">int</span> *m_intArr;
<a name="l00430"></a>00430 };
<a name="l00431"></a>00431
<a name="l00432"></a>00432 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00433"></a>00433 <span class="comment">// wxLuaSmartwxArrayString - Wraps a &quot;new&quot; wxArrayString with an automatic</span>
<a name="l00434"></a>00434 <span class="comment">// destructor that deletes them to make binding easier.</span>
<a name="l00435"></a>00435 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00436"></a>00436
<a name="l00437"></a><a class="code" href="classwxLuaSmartwxArrayString.html">00437</a> <span class="keyword">class </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="classwxLuaSmartwxArrayString.html">wxLuaSmartwxArrayString</a> : <span class="keyword">public</span> wxObject
<a name="l00438"></a>00438 {
<a name="l00439"></a>00439 <span class="keyword">public</span>:
<a name="l00440"></a><a class="code" href="classwxLuaSmartwxArrayString.html#ab5dcf6ee0df0bca0b5ab202a3900d163">00440</a> <a class="code" href="classwxLuaSmartwxArrayString.html#ab5dcf6ee0df0bca0b5ab202a3900d163">wxLuaSmartwxArrayString</a>(<span class="keyword">const</span> <a class="code" href="classwxLuaSmartwxArrayString.html">wxLuaSmartwxArrayString</a>&amp; arr) { Ref(arr); }
<a name="l00441"></a>00441 <a class="code" href="classwxLuaSmartwxArrayString.html">wxLuaSmartwxArrayString</a>(wxArrayString *arr, <span class="keywordtype">bool</span> del);
<a name="l00442"></a>00442
<a name="l00443"></a>00443 wxArrayString* GetArray() <span class="keyword">const</span>;
<a name="l00444"></a>00444
<a name="l00445"></a><a class="code" href="classwxLuaSmartwxArrayString.html#a7eb0c74284e8a89c6bbeb26ca17a3d11">00445</a> <a class="code" href="classwxLuaSmartwxArrayString.html#a7eb0c74284e8a89c6bbeb26ca17a3d11">operator const wxArrayString *</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> GetArray(); }
<a name="l00446"></a><a class="code" href="classwxLuaSmartwxArrayString.html#abd572b5ba4d1ba612e9fcf484d4e41f5">00446</a> <a class="code" href="classwxLuaSmartwxArrayString.html#abd572b5ba4d1ba612e9fcf484d4e41f5">operator const wxArrayString &amp;</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *GetArray(); }
<a name="l00447"></a><a class="code" href="classwxLuaSmartwxArrayString.html#ac5f40313e32f9676f8136e3f13ce449b">00447</a> operator wxArrayString &amp;() { <span class="keywordflow">return</span> *GetArray(); }
<a name="l00448"></a>00448
<a name="l00449"></a>00449 <span class="comment">// You may have to cast the wxLuaSmartwxArrayString with (wxArrayString&amp;)</span>
<a name="l00450"></a>00450 <span class="comment">// e.g. wxLuaSmartwxArrayString arr; ((wxArrayString&amp;)arr).Add(wxT(&quot;hello&quot;));</span>
<a name="l00451"></a><a class="code" href="classwxLuaSmartwxArrayString.html#acd5028bb4bb9f42daf2f06d570cf6a24">00451</a> <a class="code" href="classwxLuaSmartwxArrayString.html">wxLuaSmartwxArrayString</a>&amp; operator = (<span class="keyword">const</span> <a class="code" href="classwxLuaSmartwxArrayString.html">wxLuaSmartwxArrayString</a>&amp; arr)
<a name="l00452"></a>00452 {
<a name="l00453"></a>00453 Ref(arr);
<a name="l00454"></a>00454 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00455"></a>00455 }
<a name="l00456"></a><a class="code" href="classwxLuaSmartwxArrayString.html#a3188c0c066d34ee718e112fff7024fde">00456</a> <a class="code" href="classwxLuaSmartwxArrayString.html">wxLuaSmartwxArrayString</a>&amp; operator = (<span class="keyword">const</span> wxArrayString&amp; arr)
<a name="l00457"></a>00457 {
<a name="l00458"></a>00458 *GetArray() = arr;
<a name="l00459"></a>00459 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00460"></a>00460 }
<a name="l00461"></a>00461 };
<a name="l00462"></a>00462
<a name="l00463"></a>00463 <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="wxldefs_8h.html#acafd4cb79bea822563bac70e088c38ca">WXDLLIMPEXP_DATA_WXLUA</a>(<a class="code" href="classwxLuaSmartwxArrayString.html">wxLuaSmartwxArrayString</a>) <a class="code" href="wxlbind_8cpp.html#a4baa5ce581fadd929eb289c7fbd24f60">wxLuaNullSmartwxArrayString</a>;
<a name="l00464"></a>00464
<a name="l00465"></a>00465 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00466"></a>00466 <span class="comment">// wxLuaSmartwxSortedArrayString - Wraps a &quot;new&quot; wxSortedArrayString with an automatic</span>
<a name="l00467"></a>00467 <span class="comment">// destructor that deletes them to make binding easier.</span>
<a name="l00468"></a>00468 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00469"></a>00469
<a name="l00470"></a><a class="code" href="classwxLuaSmartwxSortedArrayString.html">00470</a> class <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="classwxLuaSmartwxSortedArrayString.html">wxLuaSmartwxSortedArrayString</a> : public wxObject
<a name="l00471"></a>00471 {
<a name="l00472"></a>00472 <span class="keyword">public</span>:
<a name="l00473"></a><a class="code" href="classwxLuaSmartwxSortedArrayString.html#a185c4cabc2fda60ab6476aa4e5d53230">00473</a> <a class="code" href="classwxLuaSmartwxSortedArrayString.html#a185c4cabc2fda60ab6476aa4e5d53230">wxLuaSmartwxSortedArrayString</a>(<span class="keyword">const</span> <a class="code" href="classwxLuaSmartwxArrayString.html">wxLuaSmartwxArrayString</a>&amp; arr) { Ref(arr); }
<a name="l00474"></a>00474 <a class="code" href="classwxLuaSmartwxSortedArrayString.html">wxLuaSmartwxSortedArrayString</a>(wxSortedArrayString *arr, <span class="keywordtype">bool</span> del);
<a name="l00475"></a>00475
<a name="l00476"></a>00476 wxSortedArrayString* GetArray() <span class="keyword">const</span>;
<a name="l00477"></a>00477
<a name="l00478"></a><a class="code" href="classwxLuaSmartwxSortedArrayString.html#ae84facdfb04c184faa308ad606ff7d6c">00478</a> <a class="code" href="classwxLuaSmartwxSortedArrayString.html#ae84facdfb04c184faa308ad606ff7d6c">operator const wxSortedArrayString *</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> GetArray(); }
<a name="l00479"></a><a class="code" href="classwxLuaSmartwxSortedArrayString.html#a3872caf024cf0fac4e58bce724a74cdc">00479</a> <a class="code" href="classwxLuaSmartwxSortedArrayString.html#a3872caf024cf0fac4e58bce724a74cdc">operator const wxSortedArrayString &amp;</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *GetArray(); }
<a name="l00480"></a><a class="code" href="classwxLuaSmartwxSortedArrayString.html#a0f6732ae12fc6f621b6044ab8d8c7236">00480</a> operator wxSortedArrayString &amp;() { <span class="keywordflow">return</span> *GetArray(); }
<a name="l00481"></a>00481
<a name="l00482"></a>00482 <span class="comment">// You may have to cast the wxLuaSmartwxSortedArrayString with (wxSortedArrayString&amp;)</span>
<a name="l00483"></a>00483 <span class="comment">// e.g. wxLuaSmartwxSortedArrayString arr; ((wxSortedArrayString&amp;)arr).Add(wxT(&quot;hello&quot;));</span>
<a name="l00484"></a><a class="code" href="classwxLuaSmartwxSortedArrayString.html#a44d13cfcad983f24c215730c9638c0db">00484</a> <a class="code" href="classwxLuaSmartwxSortedArrayString.html">wxLuaSmartwxSortedArrayString</a>&amp; operator = (<span class="keyword">const</span> <a class="code" href="classwxLuaSmartwxSortedArrayString.html">wxLuaSmartwxSortedArrayString</a>&amp; arr)
<a name="l00485"></a>00485 {
<a name="l00486"></a>00486 Ref(arr);
<a name="l00487"></a>00487 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00488"></a>00488 }
<a name="l00489"></a>00489 };
<a name="l00490"></a>00490
<a name="l00491"></a>00491 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00492"></a>00492 <span class="comment">// wxLuaSmartwxArrayInt - Wraps a &quot;new&quot; wxArrayInt with an automatic</span>
<a name="l00493"></a>00493 <span class="comment">// destructor to delete them to make binding easier</span>
<a name="l00494"></a>00494 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00495"></a>00495
<a name="l00496"></a><a class="code" href="classwxLuaSmartwxArrayInt.html">00496</a> <span class="keyword">class </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="classwxLuaSmartwxArrayInt.html">wxLuaSmartwxArrayInt</a> : <span class="keyword">public</span> wxObject
<a name="l00497"></a>00497 {
<a name="l00498"></a>00498 <span class="keyword">public</span>:
<a name="l00499"></a><a class="code" href="classwxLuaSmartwxArrayInt.html#aa80205c1cea030ecc798916c3c277b8c">00499</a> <a class="code" href="classwxLuaSmartwxArrayInt.html#aa80205c1cea030ecc798916c3c277b8c">wxLuaSmartwxArrayInt</a>(<span class="keyword">const</span> <a class="code" href="classwxLuaSmartwxArrayInt.html">wxLuaSmartwxArrayInt</a>&amp; arr) { Ref(arr); }
<a name="l00500"></a>00500 <a class="code" href="classwxLuaSmartwxArrayInt.html">wxLuaSmartwxArrayInt</a>(wxArrayInt *arr = NULL, <span class="keywordtype">bool</span> del = <span class="keyword">true</span>);
<a name="l00501"></a>00501
<a name="l00502"></a>00502 wxArrayInt* GetArray() <span class="keyword">const</span>;
<a name="l00503"></a>00503
<a name="l00504"></a><a class="code" href="classwxLuaSmartwxArrayInt.html#a31c65004cba6893d6b5b8a1327d5a3e4">00504</a> <a class="code" href="classwxLuaSmartwxArrayInt.html#a31c65004cba6893d6b5b8a1327d5a3e4">operator const wxArrayInt *</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> GetArray(); }
<a name="l00505"></a><a class="code" href="classwxLuaSmartwxArrayInt.html#a972bf7778a23afd9d57f4249030d0b72">00505</a> <a class="code" href="classwxLuaSmartwxArrayInt.html#a972bf7778a23afd9d57f4249030d0b72">operator const wxArrayInt &amp;</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *GetArray(); }
<a name="l00506"></a><a class="code" href="classwxLuaSmartwxArrayInt.html#ad9695b8b10a52a6381cbc6cf21106157">00506</a> operator wxArrayInt &amp;() { <span class="keywordflow">return</span> *GetArray(); }
<a name="l00507"></a>00507
<a name="l00508"></a>00508 <span class="comment">// You may have to cast the wxLuaSmartwxArrayInt with (wxArrayInt&amp;)</span>
<a name="l00509"></a>00509 <span class="comment">// e.g. wxLuaSmartwxArrayInt arr; ((wxArrayInt&amp;)arr).Add(5);</span>
<a name="l00510"></a><a class="code" href="classwxLuaSmartwxArrayInt.html#ab97f0af2a70da5c4b63027d36ed9965b">00510</a> <a class="code" href="classwxLuaSmartwxArrayInt.html">wxLuaSmartwxArrayInt</a>&amp; operator = (<span class="keyword">const</span> <a class="code" href="classwxLuaSmartwxArrayInt.html">wxLuaSmartwxArrayInt</a>&amp; arr)
<a name="l00511"></a>00511 {
<a name="l00512"></a>00512 Ref(arr);
<a name="l00513"></a>00513 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00514"></a>00514 }
<a name="l00515"></a>00515 };
<a name="l00516"></a>00516
<a name="l00517"></a>00517 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00518"></a>00518 <span class="comment">// wxLuaBinding - binds classes, functions, objects, and event callbacks to</span>
<a name="l00519"></a>00519 <span class="comment">// the wxLuaState.</span>
<a name="l00520"></a>00520 <span class="comment">// ----------------------------------------------------------------------------</span>
<a name="l00521"></a>00521
<a name="l00522"></a>00522 <span class="comment">// list of wxLua Bindings</span>
<a name="l00523"></a>00523 <a class="code" href="wxlbind_8h.html#aff49d18baa607694283ce5ab902a174d">WX_DECLARE_USER_EXPORTED_LIST</a>(<a class="code" href="classwxLuaBinding.html">wxLuaBinding</a>, wxLuaBindingList, <a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a>);
<a name="l00524"></a>00524
<a name="l00525"></a><a class="code" href="classwxLuaBinding.html">00525</a> <span class="keyword">class </span><a class="code" href="wxldefs_8h.html#ad8b07fc8dd8f30300e284b64f734b026">WXDLLIMPEXP_WXLUA</a> <a class="code" href="classwxLuaBinding.html">wxLuaBinding</a> : <span class="keyword">public</span> wxObject
<a name="l00526"></a>00526 {
<a name="l00527"></a>00527 <span class="keyword">public</span>:
<a name="l00528"></a>00528 <a class="code" href="wxlbind_8h.html#a110bc49590824fc371178b1e2ad05854">wxLuaBinding</a>();
<a name="l00529"></a><a class="code" href="classwxLuaBinding.html#a7b83c300164ae3ed13a14f9303a25bf9">00529</a> <span class="keyword">virtual</span> <a class="code" href="classwxLuaBinding.html#a7b83c300164ae3ed13a14f9303a25bf9">~wxLuaBinding</a>() {}
<a name="l00530"></a>00530
<a name="l00531"></a>00531 <span class="comment">// Binds C Functions/Defines/Object/Events to a Lua table with binding&#39;s namespace.</span>
<a name="l00532"></a>00532 <span class="comment">// The Lua table that the bindings were installed into is left on the top</span>
<a name="l00533"></a>00533 <span class="comment">// of the stack and you must pop it when done.</span>
<a name="l00534"></a>00534 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> RegisterBinding(<span class="keyword">const</span> <a class="code" href="classwxLuaState.html">wxLuaState</a>&amp; wxlState);
<a name="l00535"></a>00535
<a name="l00536"></a>00536 <span class="comment">// Create the metatable for the class and install it into the Lua registry.</span>
<a name="l00537"></a>00537 <span class="keyword">static</span> <span class="keywordtype">bool</span> InstallClassMetatable(lua_State* L, <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* wxlClass);
<a name="l00538"></a>00538 <span class="comment">// Install a single wxLuaBindClass struct into the table at the top</span>
<a name="l00539"></a>00539 <span class="comment">// of the stack.</span>
<a name="l00540"></a>00540 <span class="keyword">static</span> <span class="keywordtype">bool</span> InstallClass(lua_State* L, <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* wxlClass);
<a name="l00541"></a>00541
<a name="l00542"></a>00542 <span class="comment">// -----------------------------------------------------------------------</span>
<a name="l00543"></a>00543
<a name="l00544"></a>00544 <span class="comment">// Get/Set the binding name, a unique name of the binding.</span>
<a name="l00545"></a>00545 <span class="comment">// By default it is the &quot;hook_cpp_namespace&quot; used in the binding</span>
<a name="l00546"></a>00546 <span class="comment">// generator which needs to be a unique name.</span>
<a name="l00547"></a><a class="code" href="classwxLuaBinding.html#a9878ed9507384f5820f102218c3f82f6">00547</a> wxString <a class="code" href="classwxLuaBinding.html#a9878ed9507384f5820f102218c3f82f6">GetBindingName</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_bindingName; }
<a name="l00548"></a><a class="code" href="classwxLuaBinding.html#ab07fd69f8867fb17df4d674a1f0f5697">00548</a> <span class="keywordtype">void</span> <a class="code" href="classwxLuaBinding.html#ab07fd69f8867fb17df4d674a1f0f5697">SetBindingName</a>(<span class="keyword">const</span> wxString&amp; name) { m_bindingName = name; }
<a name="l00549"></a>00549
<a name="l00550"></a>00550 <span class="comment">// Get/Set the namespace table in Lua that this binding will be installed to</span>
<a name="l00551"></a><a class="code" href="classwxLuaBinding.html#a511674a9760efa5e05eb6fcaf5c5a969">00551</a> wxString <a class="code" href="classwxLuaBinding.html#a511674a9760efa5e05eb6fcaf5c5a969">GetLuaNamespace</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_nameSpace; }
<a name="l00552"></a><a class="code" href="classwxLuaBinding.html#a0f472094b5ea705d3e409cb2c0b995be">00552</a> <span class="keywordtype">void</span> <a class="code" href="classwxLuaBinding.html#a0f472094b5ea705d3e409cb2c0b995be">SetLuaNamespace</a>(<span class="keyword">const</span> wxString&amp; nameSpace) { m_nameSpace = nameSpace; }
<a name="l00553"></a>00553
<a name="l00554"></a><a class="code" href="classwxLuaBinding.html#a49392182119d61caaf1fe96b0fd51851">00554</a> <span class="keywordtype">size_t</span> <a class="code" href="classwxLuaBinding.html#a49392182119d61caaf1fe96b0fd51851">GetClassCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_classCount; }
<a name="l00555"></a><a class="code" href="classwxLuaBinding.html#a32bc027323b845ac37b1f383b1525401">00555</a> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* <a class="code" href="classwxLuaBinding.html#a32bc027323b845ac37b1f383b1525401">GetClassArray</a>() { <span class="keywordflow">return</span> m_classArray; }
<a name="l00556"></a>00556
<a name="l00557"></a><a class="code" href="classwxLuaBinding.html#afb7e85e000dde60b5a16a6de540993da">00557</a> <span class="keywordtype">size_t</span> <a class="code" href="classwxLuaBinding.html#afb7e85e000dde60b5a16a6de540993da">GetNumberCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_numberCount; }
<a name="l00558"></a><a class="code" href="classwxLuaBinding.html#a4bebc3dbbf311a2c8b1634902a6e377c">00558</a> <a class="code" href="structwxLuaBindNumber.html">wxLuaBindNumber</a>* <a class="code" href="classwxLuaBinding.html#a4bebc3dbbf311a2c8b1634902a6e377c">GetNumberArray</a>() { <span class="keywordflow">return</span> m_numberArray; }
<a name="l00559"></a>00559
<a name="l00560"></a><a class="code" href="classwxLuaBinding.html#a87e9b7ceb377d08404270a42a0d96d56">00560</a> <span class="keywordtype">size_t</span> <a class="code" href="classwxLuaBinding.html#a87e9b7ceb377d08404270a42a0d96d56">GetStringCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_stringCount; }
<a name="l00561"></a><a class="code" href="classwxLuaBinding.html#a08d50ed8a7e6721c78b2e147837f8204">00561</a> <a class="code" href="structwxLuaBindString.html">wxLuaBindString</a>* <a class="code" href="classwxLuaBinding.html#a08d50ed8a7e6721c78b2e147837f8204">GetStringArray</a>() { <span class="keywordflow">return</span> m_stringArray; }
<a name="l00562"></a>00562
<a name="l00563"></a><a class="code" href="classwxLuaBinding.html#aebf69fdec1ca7bb8e5a8ede00dda3573">00563</a> <span class="keywordtype">size_t</span> <a class="code" href="classwxLuaBinding.html#aebf69fdec1ca7bb8e5a8ede00dda3573">GetEventCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_eventCount; }
<a name="l00564"></a><a class="code" href="classwxLuaBinding.html#a3a8df1feff93df27ba03225be8b7c18a">00564</a> <a class="code" href="structwxLuaBindEvent.html">wxLuaBindEvent</a>* <a class="code" href="classwxLuaBinding.html#a3a8df1feff93df27ba03225be8b7c18a">GetEventArray</a>() { <span class="keywordflow">return</span> m_eventArray; }
<a name="l00565"></a>00565
<a name="l00566"></a><a class="code" href="classwxLuaBinding.html#ac8eaa8a981c9679fda6573430e9eb629">00566</a> <span class="keywordtype">size_t</span> <a class="code" href="classwxLuaBinding.html#ac8eaa8a981c9679fda6573430e9eb629">GetObjectCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_objectCount; }
<a name="l00567"></a><a class="code" href="classwxLuaBinding.html#a75ca53395ed53cdb1e60d35a3b6198a8">00567</a> <a class="code" href="structwxLuaBindObject.html">wxLuaBindObject</a>* <a class="code" href="classwxLuaBinding.html#a75ca53395ed53cdb1e60d35a3b6198a8">GetObjectArray</a>() { <span class="keywordflow">return</span> m_objectArray; }
<a name="l00568"></a>00568
<a name="l00569"></a><a class="code" href="classwxLuaBinding.html#ad36e156e405608f2a78b356cb00006c4">00569</a> <span class="keywordtype">size_t</span> <a class="code" href="classwxLuaBinding.html#ad36e156e405608f2a78b356cb00006c4">GetFunctionCount</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_functionCount; }
<a name="l00570"></a><a class="code" href="classwxLuaBinding.html#acbdedc8269da3564a988771f190932ef">00570</a> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* <a class="code" href="classwxLuaBinding.html#acbdedc8269da3564a988771f190932ef">GetFunctionArray</a>() { <span class="keywordflow">return</span> m_functionArray; }
<a name="l00571"></a>00571
<a name="l00572"></a>00572 <span class="comment">// Is this wxLua type defined in this binding?</span>
<a name="l00573"></a><a class="code" href="classwxLuaBinding.html#a867bcf08c7895b73f469401c430af914">00573</a> <span class="keywordtype">bool</span> <a class="code" href="classwxLuaBinding.html#a867bcf08c7895b73f469401c430af914">HaswxLuaType</a>(<span class="keywordtype">int</span> wxl_type)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (wxl_type &gt;= m_first_wxluatype) &amp;&amp; (wxl_type &lt;= m_last_wxluatype); }
<a name="l00574"></a>00574
<a name="l00575"></a>00575 <span class="comment">// -----------------------------------------------------------------------</span>
<a name="l00576"></a>00576 <span class="comment">// These functions only look through the binding data of this wxLuaBinding</span>
<a name="l00577"></a>00577
<a name="l00578"></a>00578 <span class="comment">// Find the wxLuaBindEvent with the wxEventType, returns NULL if not found.</span>
<a name="l00579"></a>00579 <span class="keyword">const</span> <a class="code" href="structwxLuaBindEvent.html">wxLuaBindEvent</a>* GetBindEvent(wxEventType eventType) <span class="keyword">const</span>;
<a name="l00580"></a>00580 <span class="comment">// Look up the wxEventType name as a string, from the wxEventType number</span>
<a name="l00581"></a>00581 <span class="comment">// in the wxLuaBindEvent* struct list of this binding.</span>
<a name="l00582"></a>00582 wxString GetEventTypeName(wxEventType eventType) <span class="keyword">const</span>;
<a name="l00583"></a>00583 <span class="comment">// Get the wxLuaBindClass that has this wxLua type, or NULL if none</span>
<a name="l00584"></a>00584 <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* GetBindClass(<span class="keywordtype">int</span> wxl_type) <span class="keyword">const</span>;
<a name="l00585"></a>00585 <span class="comment">// Get the wxLuaBindClass that has this name, or NULL if none</span>
<a name="l00586"></a>00586 <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* GetBindClass(<span class="keyword">const</span> <span class="keywordtype">char</span>* className) <span class="keyword">const</span>;
<a name="l00587"></a>00587 <span class="comment">// Get the first wxLuaBindClass that has this wxLuaBindMethod</span>
<a name="l00588"></a>00588 <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* GetBindClass(<span class="keyword">const</span> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* wxlMethod) <span class="keyword">const</span>;
<a name="l00589"></a>00589 <span class="comment">// Get the first wxLuaBindClass that has this wxLuaBindCFunc</span>
<a name="l00590"></a>00590 <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* GetBindClass(<span class="keyword">const</span> <a class="code" href="structwxLuaBindCFunc.html">wxLuaBindCFunc</a>* wxlCFunc) <span class="keyword">const</span>;
<a name="l00591"></a>00591
<a name="l00592"></a>00592 <span class="comment">// -----------------------------------------------------------------------</span>
<a name="l00593"></a>00593 <span class="comment">// These functions search through the static wxLuaBinding::GetBindingList()</span>
<a name="l00594"></a>00594 <span class="comment">// for the items.</span>
<a name="l00595"></a>00595
<a name="l00596"></a>00596 <span class="comment">// Get the installed wxLuaBinding with the given</span>
<a name="l00597"></a>00597 <span class="comment">// wxLuaBinding::GetBindingName() or NULL for no match.</span>
<a name="l00598"></a>00598 <span class="keyword">static</span> <a class="code" href="classwxLuaBinding.html">wxLuaBinding</a>* GetLuaBinding(<span class="keyword">const</span> wxString&amp; bindingName);
<a name="l00599"></a>00599
<a name="l00600"></a>00600 <span class="comment">// Get wxLuaBindClass for given wxLua type using wxLuaBindClass::wxluatype,</span>
<a name="l00601"></a>00601 <span class="comment">// returns NULL on failure.</span>
<a name="l00602"></a>00602 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* FindBindClass(<span class="keywordtype">int</span> wxl_type);
<a name="l00603"></a>00603 <span class="comment">// Get wxLuaBindClass that has this class name using wxLuaBindClass::name,</span>
<a name="l00604"></a>00604 <span class="comment">// returns NULL on failure.</span>
<a name="l00605"></a>00605 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* FindBindClass(<span class="keyword">const</span> <span class="keywordtype">char</span>* className);
<a name="l00606"></a>00606 <span class="comment">// Get the first wxLuaBindClass that has this particular wxLuaBindMethod</span>
<a name="l00607"></a>00607 <span class="comment">// returns NULL on failure.</span>
<a name="l00608"></a>00608 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* FindBindClass(<span class="keyword">const</span> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* wxlMethod);
<a name="l00609"></a>00609 <span class="comment">// Get the first wxLuaBindClass that has this particular wxLuaBindCFunc in its methods</span>
<a name="l00610"></a>00610 <span class="comment">// returns NULL on failure.</span>
<a name="l00611"></a>00611 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* FindBindClass(<span class="keyword">const</span> <a class="code" href="structwxLuaBindCFunc.html">wxLuaBindCFunc</a>* wxlCFunc);
<a name="l00612"></a>00612
<a name="l00613"></a>00613 <span class="comment">// Get wxLuaBindEvent for given wxEventType (wxEvent::GetEventType()) by finding</span>
<a name="l00614"></a>00614 <span class="comment">// the matching wxLuaBindEvent::eventType.</span>
<a name="l00615"></a>00615 <span class="comment">// returns NULL on failure.</span>
<a name="l00616"></a>00616 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="structwxLuaBindEvent.html">wxLuaBindEvent</a>* FindBindEvent(wxEventType eventType);
<a name="l00617"></a>00617
<a name="l00618"></a>00618 <span class="comment">// Get the wxLuaBinding that has this wxLuaBindMethod in its wxLuaBinding::GetFunctionArray().</span>
<a name="l00619"></a>00619 <span class="comment">// returns NULL on failure.</span>
<a name="l00620"></a>00620 <span class="keyword">static</span> <a class="code" href="classwxLuaBinding.html">wxLuaBinding</a>* FindMethodBinding(<span class="keyword">const</span> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* wxlMethod);
<a name="l00621"></a>00621
<a name="l00622"></a>00622 <span class="comment">// -----------------------------------------------------------------------</span>
<a name="l00623"></a>00623 <span class="comment">// These functions search through the input struct</span>
<a name="l00624"></a>00624
<a name="l00625"></a>00625 <span class="comment">// Lookup a wxLuaBindMethod function or property called methodName in the wxLuaBindClass</span>
<a name="l00626"></a>00626 <span class="comment">// that is also of the wxLuaMethod_Type method_type. The method_type may be</span>
<a name="l00627"></a>00627 <span class="comment">// ored values and the first match found is returned or NULL if not found.</span>
<a name="l00628"></a>00628 <span class="comment">// If the wxLuaBindMethod cannot be found on the current class recurse through base classes</span>
<a name="l00629"></a>00629 <span class="comment">// if search_baseclasses.</span>
<a name="l00630"></a>00630 <span class="keyword">static</span> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* GetClassMethod(<span class="keyword">const</span> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a> *wxlClass, <span class="keyword">const</span> <span class="keywordtype">char</span> *methodName,
<a name="l00631"></a>00631 <span class="keywordtype">int</span> method_type, <span class="keywordtype">bool</span> search_baseclasses);
<a name="l00632"></a>00632
<a name="l00633"></a>00633 <span class="comment">// -----------------------------------------------------------------------</span>
<a name="l00634"></a>00634
<a name="l00635"></a>00635 <span class="comment">// Get all the bindings that were initialized using the generated binding</span>
<a name="l00636"></a>00636 <span class="comment">// function wxLuaBinding_[binding name]_init().</span>
<a name="l00637"></a>00637 <span class="comment">// You can adjust the list *only* if you do not have any wxLuaStates</span>
<a name="l00638"></a>00638 <span class="comment">// created, otherwise the wxLua types will be out of sync.</span>
<a name="l00639"></a><a class="code" href="classwxLuaBinding.html#a8a87ea1c329629e69266ea82196e681c">00639</a> <span class="keyword">static</span> wxLuaBindingList* <a class="code" href="classwxLuaBinding.html#a8a87ea1c329629e69266ea82196e681c">GetBindingList</a>() { <span class="keywordflow">return</span> &amp;sm_bindingList; }
<a name="l00640"></a>00640
<a name="l00641"></a>00641 <span class="comment">// -----------------------------------------------------------------------</span>
<a name="l00642"></a>00642
<a name="l00643"></a>00643 <span class="comment">// Initialize all of the bindings by iterating the GetBindingList() and</span>
<a name="l00644"></a>00644 <span class="comment">// setting the base classes and base class functions. This function</span>
<a name="l00645"></a>00645 <span class="comment">// is automatically run by the wxLuaState and should not need to be called.</span>
<a name="l00646"></a>00646 <span class="keyword">static</span> <span class="keywordtype">void</span> InitAllBindings(<span class="keywordtype">bool</span> force_update = <span class="keyword">false</span>);
<a name="l00647"></a>00647
<a name="l00648"></a>00648 <span class="keyword">protected</span>:
<a name="l00649"></a>00649 <span class="keywordtype">void</span> InitBinding(); <span class="comment">// must called after subclassed version is created</span>
<a name="l00650"></a>00650 <span class="comment">// to sort the bindings appropriately</span>
<a name="l00651"></a>00651
<a name="l00652"></a>00652 <span class="comment">// Register the classes, defines, strings, events, objects, and functions</span>
<a name="l00653"></a>00653 <span class="comment">// stored in the binding arrays. The Lua table to install them into</span>
<a name="l00654"></a>00654 <span class="comment">// must be at the top of the stack.</span>
<a name="l00655"></a>00655 <span class="keyword">virtual</span> <span class="keywordtype">void</span> DoRegisterBinding(<span class="keyword">const</span> <a class="code" href="classwxLuaState.html">wxLuaState</a>&amp; wxlState) <span class="keyword">const</span>;
<a name="l00656"></a>00656
<a name="l00657"></a>00657 <span class="comment">// binding objects</span>
<a name="l00658"></a><a class="code" href="classwxLuaBinding.html#ab668185325d94999b07fae44ef497016">00658</a> <span class="keywordtype">size_t</span> m_classCount;
<a name="l00659"></a><a class="code" href="classwxLuaBinding.html#ad49fa01f3b44889af3f0cfabe9ee4fe8">00659</a> <a class="code" href="structwxLuaBindClass.html">wxLuaBindClass</a>* m_classArray;
<a name="l00660"></a><a class="code" href="classwxLuaBinding.html#ad448b65743bf6bdf27b31346a176c166">00660</a> <span class="keywordtype">size_t</span> m_numberCount;
<a name="l00661"></a><a class="code" href="classwxLuaBinding.html#a2d7dd4ea59cac79f5ce9d6c3784dfe5c">00661</a> <a class="code" href="structwxLuaBindNumber.html">wxLuaBindNumber</a>* m_numberArray;
<a name="l00662"></a><a class="code" href="classwxLuaBinding.html#a1861c30baba1384af84f0889af12cbec">00662</a> <span class="keywordtype">size_t</span> m_stringCount;
<a name="l00663"></a><a class="code" href="classwxLuaBinding.html#a2628550ef0a15f71b338b8d3f1bf25d8">00663</a> <a class="code" href="structwxLuaBindString.html">wxLuaBindString</a>* m_stringArray;
<a name="l00664"></a><a class="code" href="classwxLuaBinding.html#a74ce8ec75efc3422cc56558c72382960">00664</a> <span class="keywordtype">size_t</span> m_eventCount;
<a name="l00665"></a><a class="code" href="classwxLuaBinding.html#ac80f0d9d548d389a5b02ad9a3e8806a7">00665</a> <a class="code" href="structwxLuaBindEvent.html">wxLuaBindEvent</a>* m_eventArray;
<a name="l00666"></a><a class="code" href="classwxLuaBinding.html#afc25c25aea5ef7dcade8234546fac380">00666</a> <span class="keywordtype">size_t</span> m_objectCount;
<a name="l00667"></a><a class="code" href="classwxLuaBinding.html#ac640cacc363dce505f374fe687d4e820">00667</a> <a class="code" href="structwxLuaBindObject.html">wxLuaBindObject</a>* m_objectArray;
<a name="l00668"></a><a class="code" href="classwxLuaBinding.html#ad960470e2a9637edac97252945e7000c">00668</a> <span class="keywordtype">size_t</span> m_functionCount;
<a name="l00669"></a><a class="code" href="classwxLuaBinding.html#a49d474bd3256c48346932671d2d311d1">00669</a> <a class="code" href="structwxLuaBindMethod.html">wxLuaBindMethod</a>* m_functionArray;
<a name="l00670"></a>00670
<a name="l00671"></a><a class="code" href="classwxLuaBinding.html#a46d26af4c2d4583317346bc2c5a0fa1f">00671</a> wxString m_bindingName; <span class="comment">// A unique name of the binding</span>
<a name="l00672"></a><a class="code" href="classwxLuaBinding.html#abf0157571f52ff7741e09880fce8f78d">00672</a> wxString m_nameSpace; <span class="comment">// Lua table namespace e.g. &quot;wx&quot;</span>
<a name="l00673"></a><a class="code" href="classwxLuaBinding.html#aeb539e1acc75ea37c2fe40618256eb6d">00673</a> <span class="keywordtype">int</span> m_first_wxluatype; <span class="comment">// The first wxLua type allocated for a class</span>
<a name="l00674"></a><a class="code" href="classwxLuaBinding.html#a951d6dc060ad4efa3957752b01bc0d49">00674</a> <span class="keywordtype">int</span> m_last_wxluatype; <span class="comment">// The last wxLua type of registered classes</span>
<a name="l00675"></a>00675
<a name="l00676"></a><a class="code" href="classwxLuaBinding.html#a37817aea87de56a4f10cb8749051cada">00676</a> <span class="keyword">static</span> wxLuaBindingList sm_bindingList;
<a name="l00677"></a><a class="code" href="classwxLuaBinding.html#a624499a2732caa7d1b14dab0f0998891">00677</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> sm_bindingList_initialized;
<a name="l00678"></a><a class="code" href="classwxLuaBinding.html#ac2305a8cfb14b5d1caf5c83114dcffdd">00678</a> <span class="keyword">static</span> <span class="keywordtype">int</span> sm_wxluatype_max;
<a name="l00679"></a>00679
<a name="l00680"></a>00680 DECLARE_ABSTRACT_CLASS(<a class="code" href="classwxLuaBinding.html">wxLuaBinding</a>)
<a name="l00681"></a>00681 };
<a name="l00682"></a>00682
<a name="l00683"></a>00683 <span class="preprocessor">#endif // _WXLBIND_H_</span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 13 10:30:39 2010 for wxLua by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>