Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15038/wxLua/bindings/wxwidgets
Modified Files:
menutool.i override.hpp
Log Message:
add ability to use wxItemKind in wxCreateMenu override
fix wxConfig:ReadInt to use long not double
lots of cleanup in editor.wx.lua, fix autocompletion, update keywords to 5.1, formatting
Index: menutool.i
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/menutool.i,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** menutool.i 1 May 2006 19:36:30 -0000 1.8
--- menutool.i 15 May 2006 21:55:35 -0000 1.9
***************
*** 28,32 ****
%class wxMenu, wxEvtHandler
wxMenu(const wxString& title = "", long style = 0)
! // %override wxMenu* wxCreateMenu({{wx.wxID_NEW, "&New\tCtrl-N", "Creates an empty document"}, {}, {item 2}}, const wxString& title, long style) - empty tables are separators
%constructor wxCreateMenu(int luatable, const wxString& title = "", long style = 0)
--- 28,32 ----
%class wxMenu, wxEvtHandler
wxMenu(const wxString& title = "", long style = 0)
! // %override wxMenu* wxCreateMenu({{wx.wxID_NEW, "&New\tCtrl-N", "New doc", [wx.wxITEM_NORMAL]}, {}, {item 2}}, const wxString& title = "", long style = "") - empty tables are separators
%constructor wxCreateMenu(int luatable, const wxString& title = "", long style = 0)
Index: override.hpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** override.hpp 13 May 2006 17:20:51 -0000 1.37
--- override.hpp 15 May 2006 21:55:35 -0000 1.38
***************
*** 488,492 ****
{
wxLuaState wxlState(L);
! double returns;
// get number of arguments
int argCount = lua_gettop(L);
--- 488,492 ----
{
wxLuaState wxlState(L);
! long returns = 0;
// get number of arguments
int argCount = lua_gettop(L);
***************
*** 513,517 ****
{
wxLuaState wxlState(L);
! double returns;
// get number of arguments
int argCount = lua_gettop(L);
--- 513,517 ----
{
wxLuaState wxlState(L);
! double returns = 0;
// get number of arguments
int argCount = lua_gettop(L);
***************
*** 3168,3171 ****
--- 3168,3172 ----
wxString helpText;
wxString menuText;
+ wxItemKind kind = wxITEM_NORMAL;
int iValue = (int)lua_tonumber(L, -1);
***************
*** 3183,3187 ****
lua_pop(L, 1);
! returns->Append(iValue, menuText, helpText);
}
}
--- 3184,3194 ----
lua_pop(L, 1);
! lua_pushnumber(L, 4);
! lua_gettable(L, -2);
! if (lua_isnumber(L, -1))
! kind = (wxItemKind)wxlState.GetEnumerationType(-1);
! lua_pop(L, 1);
!
! returns->Append(iValue, menuText, helpText, kind);
}
}
|