You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: John L. <jr...@us...> - 2006-05-06 19:54:34
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2189/wxLua/bindings/wxstc Modified Files: wxstc_datatypes.lua Log Message: added wxBookCtrlBase and use it as a base for wxNotebook, wxListbook, and wxChoicebook Index: wxstc_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_datatypes.lua,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxstc_datatypes.lua 3 May 2006 22:52:17 -0000 1.18 --- wxstc_datatypes.lua 6 May 2006 19:54:31 -0000 1.19 *************** *** 267,270 **** --- 267,284 ---- Name = "wxBitmapType", }, + wxBookCtrlBase = { + BaseClass = "wxControl", + Condition = "wxLUA_USE_wxNotebook", + DefType = "class", + Intrinsic = false, + Name = "wxBookCtrlBase", + }, + wxBookCtrlBaseEvent = { + BaseClass = "wxNotifyEvent", + Condition = "wxLUA_USE_wxNotebook", + DefType = "class", + Intrinsic = false, + Name = "wxBookCtrlBaseEvent", + }, wxBorder = { Condition = "wxCHECK_VERSION(2,3,0)", *************** *** 390,393 **** --- 404,421 ---- Name = "wxChoice", }, + wxChoicebook = { + BaseClass = "wxBookCtrlBase", + Condition = "wxLUA_USE_wxNotebook && wxLUA_USE_wxChoice", + DefType = "class", + Intrinsic = false, + Name = "wxChoicebook", + }, + wxChoicebookEvent = { + BaseClass = "wxBookCtrlBaseEvent", + Condition = "wxLUA_USE_wxNotebook && wxLUA_USE_wxChoice", + DefType = "class", + Intrinsic = false, + Name = "wxChoicebookEvent", + }, wxClassInfo = { BaseClass = "wxObject", *************** *** 1570,1573 **** --- 1598,1622 ---- Name = "wxListItemAttr", }, + wxListView = { + BaseClass = "wxListCtrl", + Condition = "wxLUA_USE_wxListCtrl", + DefType = "class", + Intrinsic = false, + Name = "wxListView", + }, + wxListbook = { + BaseClass = "wxBookCtrlBase", + Condition = "wxLUA_USE_wxNotebook && wxLUA_USE_wxListCtrl", + DefType = "class", + Intrinsic = false, + Name = "wxListbook", + }, + wxListbookEvent = { + BaseClass = "wxBookCtrlBaseEvent", + Condition = "wxLUA_USE_wxNotebook && wxLUA_USE_wxListCtrl", + DefType = "class", + Intrinsic = false, + Name = "wxListbookEvent", + }, wxLog = { Condition = "(wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxApp)", *************** *** 1769,1773 **** }, wxNotebook = { ! BaseClass = "wxControl", Condition = "wxLUA_USE_wxNotebook", DefType = "class", --- 1818,1822 ---- }, wxNotebook = { ! BaseClass = "wxBookCtrlBase", Condition = "wxLUA_USE_wxNotebook", DefType = "class", *************** *** 1776,1780 **** }, wxNotebookEvent = { ! BaseClass = "wxNotifyEvent", Condition = "wxLUA_USE_wxNotebook", DefType = "class", --- 1825,1829 ---- }, wxNotebookEvent = { ! BaseClass = "wxBookCtrlBaseEvent", Condition = "wxLUA_USE_wxNotebook", DefType = "class", *************** *** 1807,1810 **** --- 1856,1864 ---- Name = "wxObjectRefData", }, + wxOrientation = { + DefType = "enum", + Intrinsic = true, + Name = "wxOrientation", + }, wxOutCode = { Condition = "wxLUA_USE_Geometry", |
From: John L. <jr...@us...> - 2006-05-06 16:58:34
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13749/wxLua/modules/wxbind/src Modified Files: mdi.cpp wx_bind.cpp Log Message: update mdi.i to wxWidgets 2.6.3 Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** wx_bind.cpp 5 May 2006 22:02:44 -0000 1.33 --- wx_bind.cpp 6 May 2006 16:58:30 -0000 1.34 *************** *** 554,558 **** { "wxBACKINGSTORE", wxBACKINGSTORE }, { "wxBACKWARD", wxBACKWARD }, - { "wxBOTH", wxBOTH }, { "wxBOTTOM", wxBOTTOM }, { "wxCANCEL", wxCANCEL }, --- 554,557 ---- *************** *** 571,575 **** { "wxGTK", wxGTK }, { "wxHELP", wxHELP }, - { "wxHORIZONTAL", wxHORIZONTAL }, { "wxHSCROLL", wxHSCROLL }, { "wxICON_ASTERISK", wxICON_ASTERISK }, --- 570,573 ---- *************** *** 617,621 **** { "wxTRANSPARENT_WINDOW", wxTRANSPARENT_WINDOW }, { "wxUNKNOWN_PLATFORM", wxUNKNOWN_PLATFORM }, - { "wxVERTICAL", wxVERTICAL }, { "wxVSCROLL", wxVSCROLL }, { "wxWANTS_CHARS", wxWANTS_CHARS }, --- 615,618 ---- *************** *** 1646,1649 **** --- 1643,1647 ---- { "wxBITMAP_TYPE_XPM", wxBITMAP_TYPE_XPM }, { "wxBITMAP_TYPE_XPM_DATA", wxBITMAP_TYPE_XPM_DATA }, + { "wxBOTH", wxBOTH }, { "wxBOTTOM", wxBOTTOM }, { "wxCOSE_X", wxCOSE_X }, *************** *** 1665,1668 **** --- 1663,1667 ---- { "wxGTK_OS2", wxGTK_OS2 }, { "wxGTK_WIN32", wxGTK_WIN32 }, + { "wxHORIZONTAL", wxHORIZONTAL }, { "wxIDLE_PROCESS_ALL", wxIDLE_PROCESS_ALL }, { "wxIDLE_PROCESS_SPECIFIED", wxIDLE_PROCESS_SPECIFIED }, *************** *** 1730,1733 **** --- 1729,1733 ---- { "wxUPDATE_UI_PROCESS_SPECIFIED", wxUPDATE_UI_PROCESS_SPECIFIED }, { "wxUPDATE_UI_RECURSE", wxUPDATE_UI_RECURSE }, + { "wxVERTICAL", wxVERTICAL }, { "wxWEST", wxWEST }, { "wxWIN32S", wxWIN32S }, Index: mdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/mdi.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mdi.cpp 2 May 2006 05:25:02 -0000 1.13 --- mdi.cpp 6 May 2006 16:58:30 -0000 1.14 *************** *** 309,320 **** } ! // void Tile() static int LUACALL wxLua_wxMDIParentFrame_Tile(lua_State *L) { wxLuaState wxlState(L); // get this wxMDIParentFrame * self = (wxMDIParentFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxMDIParentFrame); // call Tile ! self->Tile(); return 0; --- 309,324 ---- } ! // void Tile(wxOrientation orient = wxHORIZONTAL) static int LUACALL wxLua_wxMDIParentFrame_Tile(lua_State *L) { wxLuaState wxlState(L); + // get number of arguments + int argCount = lua_gettop(L); + // wxOrientation orient = wxHORIZONTAL + wxOrientation orient = (argCount >= 2 ? (wxOrientation)wxlState.GetEnumerationType(2) : wxHORIZONTAL); // get this wxMDIParentFrame * self = (wxMDIParentFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxMDIParentFrame); // call Tile ! self->Tile(orient); return 0; *************** *** 358,368 **** { LuaMethod, "GetClientSize", wxLua_wxMDIParentFrame_GetClientSize, 2, 2, { &s_wxluaarg_LightUserData, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "GetActiveChild", wxLua_wxMDIParentFrame_GetActiveChild, 0, 0, { 0 } }, - { LuaGetProp, "ActiveChild", wxLua_wxMDIParentFrame_GetActiveChild, 0, 0, {0} }, { LuaMethod, "GetClientWindow", wxLua_wxMDIParentFrame_GetClientWindow, 0, 0, { 0 } }, - { LuaGetProp, "ClientWindow", wxLua_wxMDIParentFrame_GetClientWindow, 0, 0, {0} }, { LuaMethod, "GetToolBar", wxLua_wxMDIParentFrame_GetToolBar, 0, 0, { 0 } }, { LuaGetProp, "ToolBar", wxLua_wxMDIParentFrame_GetToolBar, 0, 0, {0} }, { LuaSetProp, "ToolBar", wxLua_wxMDIParentFrame_SetToolBar, 1, 1, {0} }, - { LuaMethod, "Tile", wxLua_wxMDIParentFrame_Tile, 0, 0, { 0 } }, { LuaDelete, "wxMDIParentFrame", wxLua_wxMDIParentFrame_destructor, 0, 0, {0} }, }; --- 362,372 ---- { LuaMethod, "GetClientSize", wxLua_wxMDIParentFrame_GetClientSize, 2, 2, { &s_wxluaarg_LightUserData, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "GetActiveChild", wxLua_wxMDIParentFrame_GetActiveChild, 0, 0, { 0 } }, { LuaMethod, "GetClientWindow", wxLua_wxMDIParentFrame_GetClientWindow, 0, 0, { 0 } }, { LuaMethod, "GetToolBar", wxLua_wxMDIParentFrame_GetToolBar, 0, 0, { 0 } }, + { LuaMethod, "Tile", wxLua_wxMDIParentFrame_Tile, 1, 0, { &s_wxluaarg_Enumeration, 0 } }, + { LuaGetProp, "ActiveChild", wxLua_wxMDIParentFrame_GetActiveChild, 0, 0, {0} }, + { LuaGetProp, "ClientWindow", wxLua_wxMDIParentFrame_GetClientWindow, 0, 0, {0} }, { LuaGetProp, "ToolBar", wxLua_wxMDIParentFrame_GetToolBar, 0, 0, {0} }, { LuaSetProp, "ToolBar", wxLua_wxMDIParentFrame_SetToolBar, 1, 1, {0} }, { LuaDelete, "wxMDIParentFrame", wxLua_wxMDIParentFrame_destructor, 0, 0, {0} }, }; *************** *** 747,751 **** #if (wxCHECK_VERSION(2,6,0)) && (wxLUA_USE_MDI) ! // %wxchkver26 size_t GetHistoryFilesCount() const; static int LUACALL wxLua_wxDocManager_GetHistoryFilesCount(lua_State *L) { --- 751,755 ---- #if (wxCHECK_VERSION(2,6,0)) && (wxLUA_USE_MDI) ! // %wxchkver26 size_t GetHistoryFilesCount() const static int LUACALL wxLua_wxDocManager_GetHistoryFilesCount(lua_State *L) { *************** *** 813,817 **** } ! // wxFileHistory * OnCreateFileHistory() static int LUACALL wxLua_wxDocManager_OnCreateFileHistory(lua_State *L) { --- 817,821 ---- } ! // wxFileHistory* OnCreateFileHistory() static int LUACALL wxLua_wxDocManager_OnCreateFileHistory(lua_State *L) { *************** *** 849,852 **** --- 853,873 ---- } + // %override wxLua_wxDocManager_GetTemplates + // wxList& GetTemplates() + static int LUACALL wxLua_wxDocManager_GetTemplates(lua_State *L) + { + wxLuaState wxlState(L); + wxList *returns; + // get this + wxDocManager *self = (wxDocManager *)wxlState.GetUserDataType(1, s_wxluatag_wxDocManager); + // call GetDocuments + wxList &docs = self->GetTemplates(); + returns = new wxList(docs); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxList, returns); + // return the number of parameters + return 1; + } + #endif *************** *** 961,964 **** --- 982,1004 ---- } + // bool CloseDocuments(bool force = true) + static int LUACALL wxLua_wxDocManager_CloseDocuments(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // bool force = true + bool force = (argCount >= 2 ? wxlState.GetBooleanType(2) : true); + // get this + wxDocManager * self = (wxDocManager *)wxlState.GetUserDataType(1, s_wxluatag_wxDocManager); + // call CloseDocuments + returns = self->CloseDocuments(force); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + // wxDocument* CreateDocument(const wxString& path, long flags) static int LUACALL wxLua_wxDocManager_CreateDocument(lua_State *L) *************** *** 1117,1121 **** } ! // bool MakeDefaultName(wxString& buf) // FIXME needs override to return string static int LUACALL wxLua_wxDocManager_MakeDefaultName(lua_State *L) { --- 1157,1162 ---- } ! // %override wxLua_wxDocManager_MakeDefaultName ! // bool MakeDefaultName(wxString& buf) static int LUACALL wxLua_wxDocManager_MakeDefaultName(lua_State *L) { *************** *** 1130,1135 **** // push the result flag lua_pushboolean(L, returns); ! return 1; } --- 1171,1177 ---- // push the result flag lua_pushboolean(L, returns); + lua_pushstring(L, wx2lua(buf)); ! return 2; } *************** *** 1148,1151 **** --- 1190,1207 ---- } + // void OnFileCloseAll(wxCommandEvent& event) + static int LUACALL wxLua_wxDocManager_OnFileCloseAll(lua_State *L) + { + wxLuaState wxlState(L); + // wxCommandEvent event + wxCommandEvent * event = (wxCommandEvent *)wxlState.GetUserDataType(2, s_wxluatag_wxCommandEvent); + // get this + wxDocManager * self = (wxDocManager *)wxlState.GetUserDataType(1, s_wxluatag_wxDocManager); + // call OnFileCloseAll + self->OnFileCloseAll(*event); + + return 0; + } + // void OnFileNew(wxCommandEvent &event) static int LUACALL wxLua_wxDocManager_OnFileNew(lua_State *L) *************** *** 1176,1179 **** --- 1232,1249 ---- } + // void OnFileRevert(wxCommandEvent& event) + static int LUACALL wxLua_wxDocManager_OnFileRevert(lua_State *L) + { + wxLuaState wxlState(L); + // wxCommandEvent event + wxCommandEvent * event = (wxCommandEvent *)wxlState.GetUserDataType(2, s_wxluatag_wxCommandEvent); + // get this + wxDocManager * self = (wxDocManager *)wxlState.GetUserDataType(1, s_wxluatag_wxDocManager); + // call OnFileRevert + self->OnFileRevert(*event); + + return 0; + } + // void OnFileSave(wxCommandEvent &event) static int LUACALL wxLua_wxDocManager_OnFileSave(lua_State *L) *************** *** 1292,1295 **** --- 1362,1366 ---- #if (wxLUA_USE_MDI) && (wxLUA_USE_wxList) { LuaMethod, "GetDocuments", wxLua_wxDocManager_GetDocuments, 0, 0, { 0 } }, + { LuaMethod, "GetTemplates", wxLua_wxDocManager_GetTemplates, 0, 0, { 0 } }, #endif *************** *** 1305,1308 **** --- 1376,1380 ---- { LuaMethod, "AddFileToHistory", wxLua_wxDocManager_AddFileToHistory, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "AssociateTemplate", wxLua_wxDocManager_AssociateTemplate, 1, 1, { &s_wxluatag_wxDocTemplate, 0 } }, + { LuaMethod, "CloseDocuments", wxLua_wxDocManager_CloseDocuments, 1, 0, { &s_wxluaarg_Boolean, 0 } }, { LuaMethod, "CreateDocument", wxLua_wxDocManager_CreateDocument, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, { LuaMethod, "CreateView", wxLua_wxDocManager_CreateView, 2, 2, { &s_wxluatag_wxDocument, &s_wxluaarg_Number, 0 } }, *************** *** 1317,1329 **** { LuaMethod, "MakeDefaultName", wxLua_wxDocManager_MakeDefaultName, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "OnFileClose", wxLua_wxDocManager_OnFileClose, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "OnFileNew", wxLua_wxDocManager_OnFileNew, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "OnFileOpen", wxLua_wxDocManager_OnFileOpen, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "OnFileSave", wxLua_wxDocManager_OnFileSave, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "OnFileSaveAs", wxLua_wxDocManager_OnFileSaveAs, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "RemoveDocument", wxLua_wxDocManager_RemoveDocument, 1, 1, { &s_wxluatag_wxDocument, 0 } }, { LuaMethod, "SetLastDirectory", wxLua_wxDocManager_SetLastDirectory, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "LastDirectory", wxLua_wxDocManager_GetLastDirectory, 0, 0, {0} }, { LuaSetProp, "LastDirectory", wxLua_wxDocManager_SetLastDirectory, 1, 1, {0} }, - { LuaMethod, "SetMaxDocsOpen", wxLua_wxDocManager_SetMaxDocsOpen, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "MaxDocsOpen", wxLua_wxDocManager_GetMaxDocsOpen, 0, 0, {0} }, { LuaSetProp, "MaxDocsOpen", wxLua_wxDocManager_SetMaxDocsOpen, 1, 1, {0} }, --- 1389,1403 ---- { LuaMethod, "MakeDefaultName", wxLua_wxDocManager_MakeDefaultName, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "OnFileClose", wxLua_wxDocManager_OnFileClose, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, + { LuaMethod, "OnFileCloseAll", wxLua_wxDocManager_OnFileCloseAll, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "OnFileNew", wxLua_wxDocManager_OnFileNew, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "OnFileOpen", wxLua_wxDocManager_OnFileOpen, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, + { LuaMethod, "OnFileRevert", wxLua_wxDocManager_OnFileRevert, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "OnFileSave", wxLua_wxDocManager_OnFileSave, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "OnFileSaveAs", wxLua_wxDocManager_OnFileSaveAs, 1, 1, { &s_wxluatag_wxCommandEvent, 0 } }, { LuaMethod, "RemoveDocument", wxLua_wxDocManager_RemoveDocument, 1, 1, { &s_wxluatag_wxDocument, 0 } }, { LuaMethod, "SetLastDirectory", wxLua_wxDocManager_SetLastDirectory, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SetMaxDocsOpen", wxLua_wxDocManager_SetMaxDocsOpen, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "LastDirectory", wxLua_wxDocManager_GetLastDirectory, 0, 0, {0} }, { LuaSetProp, "LastDirectory", wxLua_wxDocManager_SetLastDirectory, 1, 1, {0} }, { LuaGetProp, "MaxDocsOpen", wxLua_wxDocManager_GetMaxDocsOpen, 0, 0, {0} }, { LuaSetProp, "MaxDocsOpen", wxLua_wxDocManager_SetMaxDocsOpen, 1, 1, {0} }, *************** *** 1620,1623 **** --- 1694,1720 ---- } + // bool InitDocument(wxDocument* doc, const wxString& path, long flags = 0) + static int LUACALL wxLua_wxDocTemplate_InitDocument(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // long flags = 0 + long flags = (argCount >= 4 ? (long)wxlState.GetNumberType(4) : 0); + // const wxString path + const wxString path = lua2wx(wxlState.GetStringType(3)); + // wxDocument doc + wxDocument * doc = (wxDocument *)wxlState.GetUserDataType(2, s_wxluatag_wxDocument); + // get this + wxDocTemplate * self = (wxDocTemplate *)wxlState.GetUserDataType(1, s_wxluatag_wxDocTemplate); + // call InitDocument + returns = self->InitDocument(doc, path, flags); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + // bool IsVisible() static int LUACALL wxLua_wxDocTemplate_IsVisible(lua_State *L) *************** *** 1745,1765 **** { LuaMethod, "GetFlags", wxLua_wxDocTemplate_GetFlags, 0, 0, { 0 } }, { LuaMethod, "GetViewName", wxLua_wxDocTemplate_GetViewName, 0, 0, { 0 } }, { LuaMethod, "IsVisible", wxLua_wxDocTemplate_IsVisible, 0, 0, { 0 } }, { LuaMethod, "SetDefaultExtension", wxLua_wxDocTemplate_SetDefaultExtension, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "DefaultExtension", wxLua_wxDocTemplate_GetDefaultExtension, 0, 0, {0} }, { LuaSetProp, "DefaultExtension", wxLua_wxDocTemplate_SetDefaultExtension, 1, 1, {0} }, - { LuaMethod, "SetDescription", wxLua_wxDocTemplate_SetDescription, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "Description", wxLua_wxDocTemplate_GetDescription, 0, 0, {0} }, { LuaSetProp, "Description", wxLua_wxDocTemplate_SetDescription, 1, 1, {0} }, - { LuaMethod, "SetDirectory", wxLua_wxDocTemplate_SetDirectory, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "Directory", wxLua_wxDocTemplate_GetDirectory, 0, 0, {0} }, { LuaSetProp, "Directory", wxLua_wxDocTemplate_SetDirectory, 1, 1, {0} }, - { LuaMethod, "SetDocumentManager", wxLua_wxDocTemplate_SetDocumentManager, 1, 1, { &s_wxluatag_wxDocManager, 0 } }, { LuaGetProp, "DocumentManager", wxLua_wxDocTemplate_GetDocumentManager, 0, 0, {0} }, { LuaSetProp, "DocumentManager", wxLua_wxDocTemplate_SetDocumentManager, 1, 1, {0} }, - { LuaMethod, "SetFileFilter", wxLua_wxDocTemplate_SetFileFilter, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "FileFilter", wxLua_wxDocTemplate_GetFileFilter, 0, 0, {0} }, { LuaSetProp, "FileFilter", wxLua_wxDocTemplate_SetFileFilter, 1, 1, {0} }, - { LuaMethod, "SetFlags", wxLua_wxDocTemplate_SetFlags, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "Flags", wxLua_wxDocTemplate_GetFlags, 0, 0, {0} }, { LuaSetProp, "Flags", wxLua_wxDocTemplate_SetFlags, 1, 1, {0} }, --- 1842,1863 ---- { LuaMethod, "GetFlags", wxLua_wxDocTemplate_GetFlags, 0, 0, { 0 } }, { LuaMethod, "GetViewName", wxLua_wxDocTemplate_GetViewName, 0, 0, { 0 } }, + { LuaMethod, "InitDocument", wxLua_wxDocTemplate_InitDocument, 3, 2, { &s_wxluatag_wxDocument, &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, { LuaMethod, "IsVisible", wxLua_wxDocTemplate_IsVisible, 0, 0, { 0 } }, { LuaMethod, "SetDefaultExtension", wxLua_wxDocTemplate_SetDefaultExtension, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SetDescription", wxLua_wxDocTemplate_SetDescription, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SetDirectory", wxLua_wxDocTemplate_SetDirectory, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SetDocumentManager", wxLua_wxDocTemplate_SetDocumentManager, 1, 1, { &s_wxluatag_wxDocManager, 0 } }, + { LuaMethod, "SetFileFilter", wxLua_wxDocTemplate_SetFileFilter, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SetFlags", wxLua_wxDocTemplate_SetFlags, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "DefaultExtension", wxLua_wxDocTemplate_GetDefaultExtension, 0, 0, {0} }, { LuaSetProp, "DefaultExtension", wxLua_wxDocTemplate_SetDefaultExtension, 1, 1, {0} }, { LuaGetProp, "Description", wxLua_wxDocTemplate_GetDescription, 0, 0, {0} }, { LuaSetProp, "Description", wxLua_wxDocTemplate_SetDescription, 1, 1, {0} }, { LuaGetProp, "Directory", wxLua_wxDocTemplate_GetDirectory, 0, 0, {0} }, { LuaSetProp, "Directory", wxLua_wxDocTemplate_SetDirectory, 1, 1, {0} }, { LuaGetProp, "DocumentManager", wxLua_wxDocTemplate_GetDocumentManager, 0, 0, {0} }, { LuaSetProp, "DocumentManager", wxLua_wxDocTemplate_SetDocumentManager, 1, 1, {0} }, { LuaGetProp, "FileFilter", wxLua_wxDocTemplate_GetFileFilter, 0, 0, {0} }, { LuaSetProp, "FileFilter", wxLua_wxDocTemplate_SetFileFilter, 1, 1, {0} }, { LuaGetProp, "Flags", wxLua_wxDocTemplate_GetFlags, 0, 0, {0} }, { LuaSetProp, "Flags", wxLua_wxDocTemplate_SetFlags, 1, 1, {0} }, *************** *** 2025,2028 **** --- 2123,2127 ---- } + // %override wxLua_wxDocument_GetPrintableName // virtual void GetPrintableName(wxString& name) const static int LUACALL wxLua_wxDocument_GetPrintableName(lua_State *L) *************** *** 2035,2040 **** // call GetPrintableName self->GetPrintableName(name); ! return 0; } --- 2134,2140 ---- // call GetPrintableName self->GetPrintableName(name); + lua_pushstring(L, wx2lua(name)); ! return 1; } *************** *** 2353,2365 **** { LuaMethod, "SaveAs", wxLua_wxDocument_SaveAs, 0, 0, { 0 } }, { LuaMethod, "SetDocumentName", wxLua_wxDocument_SetDocumentName, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "DocumentName", wxLua_wxDocument_GetDocumentName, 0, 0, {0} }, { LuaSetProp, "DocumentName", wxLua_wxDocument_SetDocumentName, 1, 1, {0} }, - { LuaMethod, "SetDocumentTemplate", wxLua_wxDocument_SetDocumentTemplate, 1, 1, { &s_wxluatag_wxDocTemplate, 0 } }, { LuaGetProp, "DocumentTemplate", wxLua_wxDocument_GetDocumentTemplate, 0, 0, {0} }, { LuaSetProp, "DocumentTemplate", wxLua_wxDocument_SetDocumentTemplate, 1, 1, {0} }, - { LuaMethod, "SetFilename", wxLua_wxDocument_SetFilename, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Boolean, 0 } }, { LuaGetProp, "Filename", wxLua_wxDocument_GetFilename, 0, 0, {0} }, { LuaSetProp, "Filename", wxLua_wxDocument_SetFilename, 1, 1, {0} }, - { LuaMethod, "SetTitle", wxLua_wxDocument_SetTitle, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "Title", wxLua_wxDocument_GetTitle, 0, 0, {0} }, { LuaSetProp, "Title", wxLua_wxDocument_SetTitle, 1, 1, {0} }, --- 2453,2465 ---- { LuaMethod, "SaveAs", wxLua_wxDocument_SaveAs, 0, 0, { 0 } }, { LuaMethod, "SetDocumentName", wxLua_wxDocument_SetDocumentName, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SetDocumentTemplate", wxLua_wxDocument_SetDocumentTemplate, 1, 1, { &s_wxluatag_wxDocTemplate, 0 } }, + { LuaMethod, "SetFilename", wxLua_wxDocument_SetFilename, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Boolean, 0 } }, + { LuaMethod, "SetTitle", wxLua_wxDocument_SetTitle, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "DocumentName", wxLua_wxDocument_GetDocumentName, 0, 0, {0} }, { LuaSetProp, "DocumentName", wxLua_wxDocument_SetDocumentName, 1, 1, {0} }, { LuaGetProp, "DocumentTemplate", wxLua_wxDocument_GetDocumentTemplate, 0, 0, {0} }, { LuaSetProp, "DocumentTemplate", wxLua_wxDocument_SetDocumentTemplate, 1, 1, {0} }, { LuaGetProp, "Filename", wxLua_wxDocument_GetFilename, 0, 0, {0} }, { LuaSetProp, "Filename", wxLua_wxDocument_SetFilename, 1, 1, {0} }, { LuaGetProp, "Title", wxLua_wxDocument_GetTitle, 0, 0, {0} }, { LuaSetProp, "Title", wxLua_wxDocument_SetTitle, 1, 1, {0} }, *************** *** 2662,2670 **** { LuaMethod, "OnCreate", wxLua_wxView_OnCreate, 2, 2, { &s_wxluatag_wxDocument, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetDocument", wxLua_wxView_SetDocument, 1, 1, { &s_wxluatag_wxDocument, 0 } }, { LuaGetProp, "Document", wxLua_wxView_GetDocument, 0, 0, {0} }, { LuaSetProp, "Document", wxLua_wxView_SetDocument, 1, 1, {0} }, { LuaGetProp, "Frame", wxLua_wxView_GetFrame, 0, 0, {0} }, { LuaSetProp, "Frame", wxLua_wxView_SetFrame, 1, 1, {0} }, - { LuaMethod, "SetViewName", wxLua_wxView_SetViewName, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "ViewName", wxLua_wxView_GetViewName, 0, 0, {0} }, { LuaSetProp, "ViewName", wxLua_wxView_SetViewName, 1, 1, {0} }, --- 2762,2770 ---- { LuaMethod, "OnCreate", wxLua_wxView_OnCreate, 2, 2, { &s_wxluatag_wxDocument, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetDocument", wxLua_wxView_SetDocument, 1, 1, { &s_wxluatag_wxDocument, 0 } }, + { LuaMethod, "SetViewName", wxLua_wxView_SetViewName, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "Document", wxLua_wxView_GetDocument, 0, 0, {0} }, { LuaSetProp, "Document", wxLua_wxView_SetDocument, 1, 1, {0} }, { LuaGetProp, "Frame", wxLua_wxView_GetFrame, 0, 0, {0} }, { LuaSetProp, "Frame", wxLua_wxView_SetFrame, 1, 1, {0} }, { LuaGetProp, "ViewName", wxLua_wxView_GetViewName, 0, 0, {0} }, { LuaSetProp, "ViewName", wxLua_wxView_SetViewName, 1, 1, {0} }, *************** *** 2742,2759 **** #if (wxLUA_USE_wxMenu) && (wxLUA_USE_wxCommandProcessor) - // void SetEditMenu(wxMenu *menu) - static int LUACALL wxLua_wxCommandProcessor_SetEditMenu(lua_State *L) - { - wxLuaState wxlState(L); - // wxMenu menu - wxMenu * menu = (wxMenu *)wxlState.GetUserDataType(2, s_wxluatag_wxMenu); - // get this - wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); - // call SetEditMenu - self->SetEditMenu(menu); - - return 0; - } - // wxMenu *GetEditMenu() const static int LUACALL wxLua_wxCommandProcessor_GetEditMenu(lua_State *L) --- 2842,2845 ---- *************** *** 2771,2774 **** --- 2857,2874 ---- } + // void SetEditMenu(wxMenu *menu) + static int LUACALL wxLua_wxCommandProcessor_SetEditMenu(lua_State *L) + { + wxLuaState wxlState(L); + // wxMenu menu + wxMenu * menu = (wxMenu *)wxlState.GetUserDataType(2, s_wxluatag_wxMenu); + // get this + wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); + // call SetEditMenu + self->SetEditMenu(menu); + + return 0; + } + #endif *************** *** 2793,2811 **** } ! // virtual bool Submit(wxCommand *command, bool storeIt = true) ! static int LUACALL wxLua_wxCommandProcessor_Submit(lua_State *L) { wxLuaState wxlState(L); bool returns; - // get number of arguments - int argCount = lua_gettop(L); - // bool storeIt = true - bool storeIt = (argCount >= 3 ? wxlState.GetBooleanType(3) : true); - // wxCommand command - wxCommand * command = (wxCommand *)wxlState.GetUserDataType(2, s_wxluatag_wxCommand); // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call Submit ! returns = self->Submit(command, storeIt); // push the result flag lua_pushboolean(L, returns); --- 2893,2905 ---- } ! // virtual bool CanRedo() const ! static int LUACALL wxLua_wxCommandProcessor_CanRedo(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call CanRedo ! returns = self->CanRedo(); // push the result flag lua_pushboolean(L, returns); *************** *** 2814,2819 **** } ! // virtual bool Undo() ! static int LUACALL wxLua_wxCommandProcessor_Undo(lua_State *L) { wxLuaState wxlState(L); --- 2908,2913 ---- } ! // virtual bool CanUndo() const ! static int LUACALL wxLua_wxCommandProcessor_CanUndo(lua_State *L) { wxLuaState wxlState(L); *************** *** 2821,2826 **** // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call Undo ! returns = self->Undo(); // push the result flag lua_pushboolean(L, returns); --- 2915,2920 ---- // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call CanUndo ! returns = self->CanUndo(); // push the result flag lua_pushboolean(L, returns); *************** *** 2844,2849 **** } ! // virtual bool CanUndo() const ! static int LUACALL wxLua_wxCommandProcessor_CanUndo(lua_State *L) { wxLuaState wxlState(L); --- 2938,2943 ---- } ! // virtual bool Undo() ! static int LUACALL wxLua_wxCommandProcessor_Undo(lua_State *L) { wxLuaState wxlState(L); *************** *** 2851,2856 **** // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call CanUndo ! returns = self->CanUndo(); // push the result flag lua_pushboolean(L, returns); --- 2945,2950 ---- // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call Undo ! returns = self->Undo(); // push the result flag lua_pushboolean(L, returns); *************** *** 2859,2873 **** } ! // virtual bool CanRedo() const ! static int LUACALL wxLua_wxCommandProcessor_CanRedo(lua_State *L) { wxLuaState wxlState(L); - bool returns; // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call CanRedo ! returns = self->CanRedo(); ! // push the result flag ! lua_pushboolean(L, returns); return 1; --- 2953,3039 ---- } ! // virtual void ClearCommands() ! static int LUACALL wxLua_wxCommandProcessor_ClearCommands(lua_State *L) { wxLuaState wxlState(L); // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call ClearCommands ! self->ClearCommands(); ! ! return 0; ! } ! ! // int GetMaxCommands() const ! static int LUACALL wxLua_wxCommandProcessor_GetMaxCommands(lua_State *L) ! { ! wxLuaState wxlState(L); ! int returns; ! // get this ! wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call GetMaxCommands ! returns = self->GetMaxCommands(); ! // push the result number ! lua_pushnumber(L, returns); ! ! return 1; ! } ! ! // wxString GetRedoAccelerator() const ! static int LUACALL wxLua_wxCommandProcessor_GetRedoAccelerator(lua_State *L) ! { ! wxLuaState wxlState(L); ! wxString returns; ! // get this ! wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call GetRedoAccelerator ! returns = self->GetRedoAccelerator(); ! // push the result string ! lua_pushstring(L, wx2lua(returns) ); ! ! return 1; ! } ! ! // wxString GetRedoMenuLabel() const ! static int LUACALL wxLua_wxCommandProcessor_GetRedoMenuLabel(lua_State *L) ! { ! wxLuaState wxlState(L); ! wxString returns; ! // get this ! wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call GetRedoMenuLabel ! returns = self->GetRedoMenuLabel(); ! // push the result string ! lua_pushstring(L, wx2lua(returns) ); ! ! return 1; ! } ! ! // wxString GetUndoAccelerator() const ! static int LUACALL wxLua_wxCommandProcessor_GetUndoAccelerator(lua_State *L) ! { ! wxLuaState wxlState(L); ! wxString returns; ! // get this ! wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call GetUndoAccelerator ! returns = self->GetUndoAccelerator(); ! // push the result string ! lua_pushstring(L, wx2lua(returns) ); ! ! return 1; ! } ! ! // wxString GetUndoMenuLabel() const ! static int LUACALL wxLua_wxCommandProcessor_GetUndoMenuLabel(lua_State *L) ! { ! wxLuaState wxlState(L); ! wxString returns; ! // get this ! wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call GetUndoMenuLabel ! returns = self->GetUndoMenuLabel(); ! // push the result string ! lua_pushstring(L, wx2lua(returns) ); return 1; *************** *** 2886,2889 **** --- 3052,3082 ---- } + // virtual bool IsDirty() + static int LUACALL wxLua_wxCommandProcessor_IsDirty(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); + // call IsDirty + returns = self->IsDirty(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // virtual void MarkAsSaved() + static int LUACALL wxLua_wxCommandProcessor_MarkAsSaved(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); + // call MarkAsSaved + self->MarkAsSaved(); + + return 0; + } + // virtual void SetMenuStrings() static int LUACALL wxLua_wxCommandProcessor_SetMenuStrings(lua_State *L) *************** *** 2898,2928 **** } ! // int GetMaxCommands() const ! static int LUACALL wxLua_wxCommandProcessor_GetMaxCommands(lua_State *L) { wxLuaState wxlState(L); ! int returns; // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call GetMaxCommands ! returns = self->GetMaxCommands(); ! // push the result number ! lua_pushnumber(L, returns); ! return 1; } ! // virtual void ClearCommands() ! static int LUACALL wxLua_wxCommandProcessor_ClearCommands(lua_State *L) { wxLuaState wxlState(L); // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call ClearCommands ! self->ClearCommands(); return 0; } static int LUACALL wxLua_wxCommandProcessor_destructor(lua_State *) { --- 3091,3143 ---- } ! // void SetRedoAccelerator(const wxString& accel) ! static int LUACALL wxLua_wxCommandProcessor_SetRedoAccelerator(lua_State *L) { wxLuaState wxlState(L); ! // const wxString accel ! const wxString accel = lua2wx(wxlState.GetStringType(2)); // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call SetRedoAccelerator ! self->SetRedoAccelerator(accel); ! return 0; } ! // void SetUndoAccelerator(const wxString& accel) ! static int LUACALL wxLua_wxCommandProcessor_SetUndoAccelerator(lua_State *L) { wxLuaState wxlState(L); + // const wxString accel + const wxString accel = lua2wx(wxlState.GetStringType(2)); // get this wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); ! // call SetUndoAccelerator ! self->SetUndoAccelerator(accel); return 0; } + // virtual bool Submit(wxCommand *command, bool storeIt = true) + static int LUACALL wxLua_wxCommandProcessor_Submit(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // bool storeIt = true + bool storeIt = (argCount >= 3 ? wxlState.GetBooleanType(3) : true); + // wxCommand command + wxCommand * command = (wxCommand *)wxlState.GetUserDataType(2, s_wxluatag_wxCommand); + // get this + wxCommandProcessor * self = (wxCommandProcessor *)wxlState.GetUserDataType(1, s_wxluatag_wxCommandProcessor); + // call Submit + returns = self->Submit(command, storeIt); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + static int LUACALL wxLua_wxCommandProcessor_destructor(lua_State *) { *************** *** 2949,2966 **** #if (wxLUA_USE_wxMenu) && (wxLUA_USE_wxCommandProcessor) - { LuaMethod, "SetEditMenu", wxLua_wxCommandProcessor_SetEditMenu, 1, 1, { &s_wxluatag_wxMenu, 0 } }, { LuaMethod, "GetEditMenu", wxLua_wxCommandProcessor_GetEditMenu, 0, 0, { 0 } }, #endif { LuaConstructor, "wxCommandProcessor", wxLua_wxCommandProcessor_constructor, 1, 0, { &s_wxluaarg_Number, 0 } }, - { LuaMethod, "Submit", wxLua_wxCommandProcessor_Submit, 2, 1, { &s_wxluatag_wxCommand, &s_wxluaarg_Boolean, 0 } }, - { LuaMethod, "Undo", wxLua_wxCommandProcessor_Undo, 0, 0, { 0 } }, - { LuaMethod, "Redo", wxLua_wxCommandProcessor_Redo, 0, 0, { 0 } }, - { LuaMethod, "CanUndo", wxLua_wxCommandProcessor_CanUndo, 0, 0, { 0 } }, { LuaMethod, "CanRedo", wxLua_wxCommandProcessor_CanRedo, 0, 0, { 0 } }, { LuaMethod, "Initialize", wxLua_wxCommandProcessor_Initialize, 0, 0, { 0 } }, { LuaMethod, "SetMenuStrings", wxLua_wxCommandProcessor_SetMenuStrings, 0, 0, { 0 } }, ! { LuaMethod, "GetMaxCommands", wxLua_wxCommandProcessor_GetMaxCommands, 0, 0, { 0 } }, ! { LuaMethod, "ClearCommands", wxLua_wxCommandProcessor_ClearCommands, 0, 0, { 0 } }, { LuaDelete, "wxCommandProcessor", wxLua_wxCommandProcessor_destructor, 0, 0, {0} }, }; --- 3164,3189 ---- #if (wxLUA_USE_wxMenu) && (wxLUA_USE_wxCommandProcessor) { LuaMethod, "GetEditMenu", wxLua_wxCommandProcessor_GetEditMenu, 0, 0, { 0 } }, + { LuaMethod, "SetEditMenu", wxLua_wxCommandProcessor_SetEditMenu, 1, 1, { &s_wxluatag_wxMenu, 0 } }, #endif { LuaConstructor, "wxCommandProcessor", wxLua_wxCommandProcessor_constructor, 1, 0, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "CanRedo", wxLua_wxCommandProcessor_CanRedo, 0, 0, { 0 } }, + { LuaMethod, "CanUndo", wxLua_wxCommandProcessor_CanUndo, 0, 0, { 0 } }, + { LuaMethod, "Redo", wxLua_wxCommandProcessor_Redo, 0, 0, { 0 } }, + { LuaMethod, "Undo", wxLua_wxCommandProcessor_Undo, 0, 0, { 0 } }, + { LuaMethod, "ClearCommands", wxLua_wxCommandProcessor_ClearCommands, 0, 0, { 0 } }, + { LuaMethod, "GetMaxCommands", wxLua_wxCommandProcessor_GetMaxCommands, 0, 0, { 0 } }, + { LuaMethod, "GetRedoAccelerator", wxLua_wxCommandProcessor_GetRedoAccelerator, 0, 0, { 0 } }, + { LuaMethod, "GetRedoMenuLabel", wxLua_wxCommandProcessor_GetRedoMenuLabel, 0, 0, { 0 } }, + { LuaMethod, "GetUndoAccelerator", wxLua_wxCommandProcessor_GetUndoAccelerator, 0, 0, { 0 } }, + { LuaMethod, "GetUndoMenuLabel", wxLua_wxCommandProcessor_GetUndoMenuLabel, 0, 0, { 0 } }, { LuaMethod, "Initialize", wxLua_wxCommandProcessor_Initialize, 0, 0, { 0 } }, + { LuaMethod, "IsDirty", wxLua_wxCommandProcessor_IsDirty, 0, 0, { 0 } }, + { LuaMethod, "MarkAsSaved", wxLua_wxCommandProcessor_MarkAsSaved, 0, 0, { 0 } }, { LuaMethod, "SetMenuStrings", wxLua_wxCommandProcessor_SetMenuStrings, 0, 0, { 0 } }, ! { LuaMethod, "SetRedoAccelerator", wxLua_wxCommandProcessor_SetRedoAccelerator, 1, 1, { &s_wxluaarg_String, 0 } }, ! { LuaMethod, "SetUndoAccelerator", wxLua_wxCommandProcessor_SetUndoAccelerator, 1, 1, { &s_wxluaarg_String, 0 } }, ! { LuaMethod, "Submit", wxLua_wxCommandProcessor_Submit, 2, 1, { &s_wxluatag_wxCommand, &s_wxluaarg_Boolean, 0 } }, { LuaDelete, "wxCommandProcessor", wxLua_wxCommandProcessor_destructor, 0, 0, {0} }, }; *************** *** 3073,3095 **** - #if (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxFileHistory) - // %wxchkver22&!%wxchkver23 int GetNoHistoryFiles() const - static int LUACALL wxLua_wxFileHistory_GetNoHistoryFiles(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // get this - wxFileHistory * self = (wxFileHistory *)wxlState.GetUserDataType(1, s_wxluatag_wxFileHistory); - // call GetNoHistoryFiles - returns = self->GetNoHistoryFiles(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - - #endif - - #if (wxLUA_USE_wxConfig) && (wxLUA_USE_wxFileHistory) // void Load(wxConfigBase& config) --- 3296,3299 ---- *************** *** 3169,3173 **** #endif ! // wxFileHistory(int maxFiles = 9) static int LUACALL wxLua_wxFileHistory_constructor(lua_State *L) { --- 3373,3377 ---- #endif ! // wxFileHistory(int maxFiles = 9, wxWindowID idBase = wxID_FILE1) static int LUACALL wxLua_wxFileHistory_constructor(lua_State *L) { *************** *** 3176,3183 **** // get number of arguments int argCount = lua_gettop(L); // int maxFiles = 9 int maxFiles = (argCount >= 1 ? (int)wxlState.GetNumberType(1) : 9); // call constructor ! returns = new wxFileHistory(maxFiles); // add to tracked window list if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) --- 3380,3389 ---- // get number of arguments int argCount = lua_gettop(L); + // wxWindowID idBase = wxID_FILE1 + wxWindowID idBase = (argCount >= 2 ? (wxWindowID)wxlState.GetNumberType(2) : wxID_FILE1); // int maxFiles = 9 int maxFiles = (argCount >= 1 ? (int)wxlState.GetNumberType(1) : 9); // call constructor ! returns = new wxFileHistory(maxFiles, idBase); // add to tracked window list if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) *************** *** 3247,3250 **** --- 3453,3485 ---- } + // size_t GetCount() const + static int LUACALL wxLua_wxFileHistory_GetCount(lua_State *L) + { + wxLuaState wxlState(L); + size_t returns; + // get this + wxFileHistory * self = (wxFileHistory *)wxlState.GetUserDataType(1, s_wxluatag_wxFileHistory); + // call GetCount + returns = self->GetCount(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // void RemoveFileFromHistory(size_t i) + static int LUACALL wxLua_wxFileHistory_RemoveFileFromHistory(lua_State *L) + { + wxLuaState wxlState(L); + // size_t i + size_t i = (size_t)wxlState.GetNumberType(2); + // get this + wxFileHistory * self = (wxFileHistory *)wxlState.GetUserDataType(1, s_wxluatag_wxFileHistory); + // call RemoveFileFromHistory + self->RemoveFileFromHistory(i); + + return 0; + } + static int LUACALL wxLua_wxFileHistory_destructor(lua_State *) { *************** *** 3259,3267 **** static WXLUAMETHOD s_wxFileHistory_methods[] = { - #if (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxFileHistory) - { LuaMethod, "GetNoHistoryFiles", wxLua_wxFileHistory_GetNoHistoryFiles, 0, 0, { 0 } }, - #endif - - #if (wxLUA_USE_wxConfig) && (wxLUA_USE_wxFileHistory) { LuaMethod, "Load", wxLua_wxFileHistory_Load, 1, 1, { &s_wxluatag_wxConfigBase, 0 } }, --- 3494,3497 ---- *************** *** 3276,3284 **** #endif ! { LuaConstructor, "wxFileHistory", wxLua_wxFileHistory_constructor, 1, 0, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "AddFileToHistory", wxLua_wxFileHistory_AddFileToHistory, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "AddFilesToMenu", wxLua_wxFileHistory_AddFilesToMenu, 0, 0, { 0 } }, { LuaMethod, "GetHistoryFile", wxLua_wxFileHistory_GetHistoryFile, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "GetMaxFiles", wxLua_wxFileHistory_GetMaxFiles, 0, 0, { 0 } }, { LuaDelete, "wxFileHistory", wxLua_wxFileHistory_destructor, 0, 0, {0} }, }; --- 3506,3516 ---- #endif ! { LuaConstructor, "wxFileHistory", wxLua_wxFileHistory_constructor, 2, 0, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "AddFileToHistory", wxLua_wxFileHistory_AddFileToHistory, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "AddFilesToMenu", wxLua_wxFileHistory_AddFilesToMenu, 0, 0, { 0 } }, { LuaMethod, "GetHistoryFile", wxLua_wxFileHistory_GetHistoryFile, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "GetMaxFiles", wxLua_wxFileHistory_GetMaxFiles, 0, 0, { 0 } }, + { LuaMethod, "GetCount", wxLua_wxFileHistory_GetCount, 0, 0, { 0 } }, + { LuaMethod, "RemoveFileFromHistory", wxLua_wxFileHistory_RemoveFileFromHistory, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaDelete, "wxFileHistory", wxLua_wxFileHistory_destructor, 0, 0, {0} }, }; |
From: John L. <jr...@us...> - 2006-05-06 16:58:33
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13749/wxLua/bindings/wxwidgets Modified Files: defsutil.i grid.i mdi.i override.hpp wx_datatypes.lua Log Message: update mdi.i to wxWidgets 2.6.3 Index: defsutil.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/defsutil.i,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** defsutil.i 1 May 2006 19:36:30 -0000 1.19 --- defsutil.i 6 May 2006 16:58:29 -0000 1.20 *************** *** 447,451 **** %define wxBACKINGSTORE %define wxBACKWARD - %define wxBOTH %define wxBOTTOM %define wxCANCEL --- 447,450 ---- *************** *** 465,469 **** %define wxGTK %define wxHELP - %define wxHORIZONTAL %define wxINVERT %define wxMORE --- 464,467 ---- *************** *** 491,495 **** %define wxUNKNOWN_PLATFORM //%define wxUSER_COLOURS deprecated use wxNO_3D - %define wxVERTICAL %define wxWINDOWS %define wxWS_EX_VALIDATE_RECURSIVELY --- 489,492 ---- *************** *** 499,502 **** --- 496,505 ---- %define wxYES_NO + %enum wxOrientation + wxHORIZONTAL + wxVERTICAL + wxBOTH + %endenum + %enum wxDirection wxLEFT Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wx_datatypes.lua 2 May 2006 05:25:01 -0000 1.22 --- wx_datatypes.lua 6 May 2006 16:58:30 -0000 1.23 *************** *** 1807,1810 **** --- 1807,1815 ---- Name = "wxObjectRefData", }, + wxOrientation = { + DefType = "enum", + Intrinsic = true, + Name = "wxOrientation", + }, wxOutCode = { Condition = "wxLUA_USE_Geometry", Index: mdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/mdi.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mdi.i 5 Mar 2006 00:54:21 -0000 1.6 --- mdi.i 6 May 2006 16:58:29 -0000 1.7 *************** *** 5,8 **** --- 5,9 ---- // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. // Licence: wxWidgets licence + // wxWidgets: Updated to 2.6.3 ///////////////////////////////////////////////////////////////////////////// *************** *** 23,26 **** --- 24,28 ---- %constructor wxMDIParentFrameDefault() wxMDIParentFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = "wxMDIParentFrame") + void ActivateNext() void ActivatePrevious() *************** *** 28,43 **** void Cascade() bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = "wxMDIParentFrame") virtual void GetClientSize(int* width, int* height) const wxMDIChildFrame* GetActiveChild() const - %property=ActiveChild, read wxMDIClientWindow* GetClientWindow() const - %property=ClientWindow, read virtual wxWindow* GetToolBar() const %win wxMenu* GetWindowMenu() const virtual void SetToolBar(wxToolBar* toolbar) - %property=ToolBar, read, write %win void SetWindowMenu(wxMenu* menu) %win %property=WindowMenu, read, write - void Tile() %endclass --- 30,47 ---- void Cascade() bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = "wxMDIParentFrame") + // %override [int width, int height] wxMDIParentFrame::GetClientSize() const virtual void GetClientSize(int* width, int* height) const wxMDIChildFrame* GetActiveChild() const wxMDIClientWindow* GetClientWindow() const virtual wxWindow* GetToolBar() const %win wxMenu* GetWindowMenu() const virtual void SetToolBar(wxToolBar* toolbar) %win void SetWindowMenu(wxMenu* menu) + void Tile(wxOrientation orient = wxHORIZONTAL) + + %property=ActiveChild, read + %property=ClientWindow, read + %property=ToolBar, read, write %win %property=WindowMenu, read, write %endclass *************** *** 48,51 **** --- 52,56 ---- %constructor wxMDIChildFrameDefault() wxMDIChildFrame(wxMDIParentFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxMDIChildFrame") + void Activate() bool Create(wxMDIParentFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxMDIChildFrame") *************** *** 61,68 **** --- 66,75 ---- %class wxDocChildFrame, wxFrame wxDocChildFrame(wxDocument* doc, wxView* view, wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocChildFrame") + wxDocument* GetDocument() const wxView* GetView() const void SetDocument(wxDocument *doc) void SetView(wxView *view) + %property=View, read, write %endclass *************** *** 71,79 **** // wxDocManager %class wxDocManager, wxEvtHandler - %define wxDEFAULT_DOCMAN_FLAGS - %define wxDOC_NEW - %define wxDOC_SILENT wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true) %wxchkver25 void ActivateView(wxView* view, bool activate) %wxchkver22&!%wxchkver25 void ActivateView(wxView* view, bool activate, bool deleting) --- 78,88 ---- // wxDocManager + %define wxDEFAULT_DOCMAN_FLAGS + %define wxDOC_NEW + %define wxDOC_SILENT + %class wxDocManager, wxEvtHandler wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true) + %wxchkver25 void ActivateView(wxView* view, bool activate) %wxchkver22&!%wxchkver25 void ActivateView(wxView* view, bool activate, bool deleting) *************** *** 81,84 **** --- 90,94 ---- void AddFileToHistory(const wxString& filename) void AssociateTemplate(wxDocTemplate *temp) + bool CloseDocuments(bool force = true) wxDocument* CreateDocument(const wxString& path, long flags) wxView* CreateView(wxDocument*doc, long flags) *************** *** 93,96 **** --- 103,107 ---- wxDocument * GetCurrentDocument() wxView * GetCurrentView() + // %overide wxList& wxDocManager::GetDocuments() - returns a copied list wxList& GetDocuments() wxFileHistory * GetFileHistory() *************** *** 98,108 **** int GetMaxDocsOpen() !%wxchkver26 int GetNoHistoryFiles() ! %wxchkver26 size_t GetHistoryFilesCount() const; bool Initialize() ! bool MakeDefaultName(wxString& buf) // FIXME needs override to return string ! wxFileHistory * OnCreateFileHistory() void OnFileClose(wxCommandEvent &event) void OnFileNew(wxCommandEvent &event) void OnFileOpen(wxCommandEvent &event) void OnFileSave(wxCommandEvent &event) void OnFileSaveAs(wxCommandEvent &event) --- 109,124 ---- int GetMaxDocsOpen() !%wxchkver26 int GetNoHistoryFiles() ! %wxchkver26 size_t GetHistoryFilesCount() const ! // %overide wxList& wxDocManager::GetTemplates() - returns a copied list ! wxList& GetTemplates() bool Initialize() ! // %override [bool, string buf] wxDocManager::MakeDefaultName(wxString& buf) ! bool MakeDefaultName(wxString& buf) ! wxFileHistory* OnCreateFileHistory() void OnFileClose(wxCommandEvent &event) + void OnFileCloseAll(wxCommandEvent& event) void OnFileNew(wxCommandEvent &event) void OnFileOpen(wxCommandEvent &event) + void OnFileRevert(wxCommandEvent& event) void OnFileSave(wxCommandEvent &event) void OnFileSaveAs(wxCommandEvent &event) *************** *** 113,118 **** //wxDocTemplate * SelectViewType(wxDocTemplate **templates, int noTemplates, bool sort = false) void SetLastDirectory(const wxString& dir) - %property=LastDirectory, read, write void SetMaxDocsOpen(int n) %property=MaxDocsOpen, read, write %endclass --- 129,135 ---- //wxDocTemplate * SelectViewType(wxDocTemplate **templates, int noTemplates, bool sort = false) void SetLastDirectory(const wxString& dir) void SetMaxDocsOpen(int n) + + %property=LastDirectory, read, write %property=MaxDocsOpen, read, write %endclass *************** *** 122,131 **** //%class wxDocMDIChildFrame, wxMDIChildFrame ! //wxDocMDIChildFrame(wxDocument* doc, wxView* view, wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIChildFrame") ! //wxDocument* GetDocument() const ! //wxView* GetView() const ! //void OnActivate(wxActivateEvent event) ! //void OnCloseWindow(wxCloseEvent& event) ! //void SetView(wxView *view) //%endclass --- 139,150 ---- //%class wxDocMDIChildFrame, wxMDIChildFrame ! // wxDocMDIChildFrame(wxDocument* doc, wxView* view, wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIChildFrame") ! // ! // wxDocument* GetDocument() const ! // wxView* GetView() const ! // void OnActivate(wxActivateEvent event) ! // void OnCloseWindow(wxCloseEvent& event) ! // void SetDocument(wxDocument *doc) ! // void SetView(wxView *view) //%endclass *************** *** 134,139 **** //%class wxDocMDIParentFrame, wxMDIParentFrame ! //wxDocMDIParentFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIParentFrame") ! //void OnCloseWindow(wxCloseEvent& event) //%endclass --- 153,159 ---- //%class wxDocMDIParentFrame, wxMDIParentFrame ! // wxDocMDIParentFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIParentFrame") ! // ! // void OnCloseWindow(wxCloseEvent& event) //%endclass *************** *** 143,146 **** --- 163,167 ---- %class wxDocParentFrame, wxFrame wxDocParentFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocParentFrame") + //void OnCloseWindow(wxCloseEvent& event) %endclass *************** *** 149,157 **** // wxDocTemplate %class wxDocTemplate, wxObject wxDocTemplate(wxDocManager* manager, const wxString& descr, const wxString& filter, const wxString& dir, const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName, wxClassInfo* docClassInfo = NULL, wxClassInfo* viewClassInfo = NULL, long flags = wxDEFAULT_TEMPLATE_FLAGS) ! %define wxTEMPLATE_VISIBLE ! %define wxTEMPLATE_INVISIBLE ! %define wxDEFAULT_TEMPLATE_FLAGS wxDocument * CreateDocument(const wxString& path, long flags = 0) wxView * CreateView(wxDocument *doc, long flags = 0) --- 170,180 ---- // wxDocTemplate + %define wxTEMPLATE_VISIBLE + %define wxTEMPLATE_INVISIBLE + %define wxDEFAULT_TEMPLATE_FLAGS + %class wxDocTemplate, wxObject wxDocTemplate(wxDocManager* manager, const wxString& descr, const wxString& filter, const wxString& dir, const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName, wxClassInfo* docClassInfo = NULL, wxClassInfo* viewClassInfo = NULL, long flags = wxDEFAULT_TEMPLATE_FLAGS) ! wxDocument * CreateDocument(const wxString& path, long flags = 0) wxView * CreateView(wxDocument *doc, long flags = 0) *************** *** 164,179 **** long GetFlags() wxString GetViewName() bool IsVisible() void SetDefaultExtension(const wxString& ext) - %property=DefaultExtension, read, write void SetDescription(const wxString& descr) - %property=Description, read, write void SetDirectory(const wxString& dir) - %property=Directory, read, write void SetDocumentManager(wxDocManager *manager) - %property=DocumentManager, read, write void SetFileFilter(const wxString& filter) - %property=FileFilter, read, write void SetFlags(long flags) %property=Flags, read, write %endclass --- 187,204 ---- long GetFlags() wxString GetViewName() + bool InitDocument(wxDocument* doc, const wxString& path, long flags = 0) bool IsVisible() void SetDefaultExtension(const wxString& ext) void SetDescription(const wxString& descr) void SetDirectory(const wxString& dir) void SetDocumentManager(wxDocManager *manager) void SetFileFilter(const wxString& filter) void SetFlags(long flags) + + %property=DefaultExtension, read, write + %property=Description, read, write + %property=Directory, read, write + %property=DocumentManager, read, write + %property=FileFilter, read, write %property=Flags, read, write %endclass *************** *** 184,187 **** --- 209,213 ---- %class wxDocument, wxEvtHandler wxDocument() + virtual bool AddView(wxView *view) virtual bool Close() *************** *** 194,197 **** --- 220,224 ---- wxString GetFilename() const wxView * GetFirstView() const + // %override [string name] wxDocument::GetPrintableName(wxString& name) const virtual void GetPrintableName(wxString& name) const wxString GetTitle() const *************** *** 216,227 **** virtual void SetCommandProcessor(wxCommandProcessor *processor) void SetDocumentName(const wxString& name) - %property=DocumentName, read, write void SetDocumentTemplate(wxDocTemplate* templ) - %property=DocumentTemplate, read, write void SetFilename(const wxString& filename, bool notifyViews = false) - %property=Filename, read, write void SetTitle(const wxString& title) - %property=Title, read, write void UpdateAllViews(wxView* sender = NULL, wxObject* hint = NULL) %endclass --- 243,255 ---- virtual void SetCommandProcessor(wxCommandProcessor *processor) void SetDocumentName(const wxString& name) void SetDocumentTemplate(wxDocTemplate* templ) void SetFilename(const wxString& filename, bool notifyViews = false) void SetTitle(const wxString& title) void UpdateAllViews(wxView* sender = NULL, wxObject* hint = NULL) + + %property=DocumentName, read, write + %property=DocumentTemplate, read, write + %property=Filename, read, write + %property=Title, read, write %endclass *************** *** 230,233 **** --- 258,263 ---- %class wxView, wxEvtHandler + //wxView() + virtual void Activate(bool activate) virtual bool Close(bool deleteWindow = true) *************** *** 239,250 **** virtual void OnChangeFilename() virtual bool OnClose(bool deleteWindow) virtual bool OnCreate(wxDocument* doc, long flags) virtual wxPrintout* OnCreatePrintout() virtual void OnUpdate(wxView* sender, wxObject* hint) void SetDocument(wxDocument* doc) - %property=Document, read, write void SetFrame(wxFrame* frame) - %property=Frame, read, write void SetViewName(const wxString& name) %property=ViewName, read, write %endclass --- 269,283 ---- virtual void OnChangeFilename() virtual bool OnClose(bool deleteWindow) + //virtual void OnClosingDoocument() virtual bool OnCreate(wxDocument* doc, long flags) virtual wxPrintout* OnCreatePrintout() + //virtual void OnDraw(wxDC& dc) virtual void OnUpdate(wxView* sender, wxObject* hint) void SetDocument(wxDocument* doc) void SetFrame(wxFrame* frame) void SetViewName(const wxString& name) + + %property=Document, read, write + %property=Frame, read, write %property=ViewName, read, write %endclass *************** *** 261,278 **** %class wxCommandProcessor, wxObject wxCommandProcessor(int maxCommands = -1) ! virtual bool Submit(wxCommand *command, bool storeIt = true) ! %wxchkver23 virtual void Store(wxCommand *command) ! virtual bool Undo() ! virtual bool Redo() ! virtual bool CanUndo() const virtual bool CanRedo() const virtual void Initialize() ! virtual void SetMenuStrings() void SetEditMenu(wxMenu *menu) ! wxMenu *GetEditMenu() const ! wxList& GetCommands() const %wxchkver23 wxCommand *GetCurrentCommand() const ! int GetMaxCommands() const ! virtual void ClearCommands() %endclass --- 294,321 ---- %class wxCommandProcessor, wxObject wxCommandProcessor(int maxCommands = -1) ! virtual bool CanRedo() const + virtual bool CanUndo() const + virtual bool Redo() + virtual bool Undo() + virtual void ClearCommands() + wxList& GetCommands() const + int GetMaxCommands() const + wxMenu *GetEditMenu() const + wxString GetRedoAccelerator() const + wxString GetRedoMenuLabel() const + wxString GetUndoAccelerator() const + wxString GetUndoMenuLabel() const virtual void Initialize() ! virtual bool IsDirty() ! virtual void MarkAsSaved() void SetEditMenu(wxMenu *menu) ! virtual void SetMenuStrings() ! void SetRedoAccelerator(const wxString& accel) ! void SetUndoAccelerator(const wxString& accel) ! virtual bool Submit(wxCommand *command, bool storeIt = true) ! %wxchkver23 virtual void Store(wxCommand *command) %wxchkver23 wxCommand *GetCurrentCommand() const ! %endclass *************** *** 282,285 **** --- 325,329 ---- %class wxCommand, wxObject //wxCommand(bool canUndo = false, const wxString& name = "") + bool CanUndo() bool Do() *************** *** 298,302 **** %class wxFileHistory, wxObject ! wxFileHistory(int maxFiles = 9) void AddFileToHistory(const wxString& filename) void AddFilesToMenu() --- 342,347 ---- %class wxFileHistory, wxObject ! wxFileHistory(int maxFiles = 9, wxWindowID idBase = wxID_FILE1) ! void AddFileToHistory(const wxString& filename) void AddFilesToMenu() *************** *** 304,309 **** wxString GetHistoryFile(int index) const int GetMaxFiles() const ! %wxchkver22&!%wxchkver23 int GetNoHistoryFiles() const void Load(wxConfigBase& config) void RemoveMenu(wxMenu* menu) void Save(wxConfigBase& config) --- 349,355 ---- wxString GetHistoryFile(int index) const int GetMaxFiles() const ! size_t GetCount() const void Load(wxConfigBase& config) + void RemoveFileFromHistory(size_t i) void RemoveMenu(wxMenu* menu) void Save(wxConfigBase& config) Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** override.hpp 5 May 2006 22:02:44 -0000 1.35 --- override.hpp 6 May 2006 16:58:30 -0000 1.36 *************** *** 3015,3019 **** %end ! %override wxLua_wxDocManager_GetDocuments // wxList& GetDocuments() --- 3015,3019 ---- %end ! // FIXME - do we really need to copy the wxList here? %override wxLua_wxDocManager_GetDocuments // wxList& GetDocuments() *************** *** 3034,3037 **** --- 3034,3093 ---- %end + // FIXME - do we really need to copy the wxList here? + %override wxLua_wxDocManager_GetTemplates + // wxList& GetTemplates() + static int LUACALL wxLua_wxDocManager_GetTemplates(lua_State *L) + { + wxLuaState wxlState(L); + wxList *returns; + // get this + wxDocManager *self = (wxDocManager *)wxlState.GetUserDataType(1, s_wxluatag_wxDocManager); + // call GetDocuments + wxList &docs = self->GetTemplates(); + returns = new wxList(docs); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxList, returns); + // return the number of parameters + return 1; + } + %end + + %override wxLua_wxDocManager_MakeDefaultName + // bool MakeDefaultName(wxString& buf) + static int LUACALL wxLua_wxDocManager_MakeDefaultName(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // wxString buf + wxString buf = lua2wx(wxlState.GetStringType(2)); + // get this + wxDocManager * self = (wxDocManager *)wxlState.GetUserDataType(1, s_wxluatag_wxDocManager); + // call MakeDefaultName + returns = self->MakeDefaultName(buf); + // push the result flag + lua_pushboolean(L, returns); + lua_pushstring(L, wx2lua(buf)); + + return 2; + } + %end + + %override wxLua_wxDocument_GetPrintableName + // virtual void GetPrintableName(wxString& name) const + static int LUACALL wxLua_wxDocument_GetPrintableName(lua_State *L) + { + wxLuaState wxlState(L); + // wxString name + wxString name = lua2wx(wxlState.GetStringType(2)); + // get this + wxDocument * self = (wxDocument *)wxlState.GetUserDataType(1, s_wxluatag_wxDocument); + // call GetPrintableName + self->GetPrintableName(name); + lua_pushstring(L, wx2lua(name)); + + return 1; + } + %end + %override wxLua_wxDocument_GetViews // wxList& GetViews() const Index: grid.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/grid.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** grid.i 2 May 2006 05:25:01 -0000 1.6 --- grid.i 6 May 2006 16:58:29 -0000 1.7 *************** *** 237,245 **** bool HasEditor() const wxColour GetTextColour() const - %property=TextColour, read, write wxColour GetBackgroundColour() const - %property=BackgroundColour, read, write wxFont GetFont() const - %property=Font, read, write void GetAlignment(int *horz, int *vert) const wxGridCellRenderer *GetRenderer(wxGrid* grid, int row, int col) const --- 237,242 ---- *************** *** 250,253 **** --- 247,254 ---- %wxchkver23 bool HasReadWriteMode() const %wxchkver23 void MergeWith(wxGridCellAttr *mergefrom) + + %property=BackgroundColour, read, write + %property=Font, read, write + %property=TextColour, read, write %endclass *************** *** 257,260 **** --- 258,262 ---- %class %noclassinfo wxGridCellAttrProvider wxGridCellAttrProvider() + %wxchkver23 wxGridCellAttr *GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind) const void SetAttr(wxGridCellAttr *attr, int row, int col) |
From: John L. <jr...@us...> - 2006-05-05 22:02:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20108/wxLua/modules/wxbind/src Modified Files: html.cpp wx_bind.cpp Log Message: update html.i to 2.6.3 Index: html.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/html.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** html.cpp 2 May 2006 05:25:02 -0000 1.13 --- html.cpp 5 May 2006 22:02:44 -0000 1.14 *************** *** 164,167 **** --- 164,182 ---- } + // wxHtmlCell* GetFirstChild() + static int LUACALL wxLua_wxHtmlCell_GetFirstChild(lua_State *L) + { + wxLuaState wxlState(L); + wxHtmlCell *returns; + // get this + wxHtmlCell * self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); + // call GetFirstChild + returns = self->GetFirstChild(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); + + return 1; + } + // int GetHeight() const static int LUACALL wxLua_wxHtmlCell_GetHeight(lua_State *L) *************** *** 367,394 **** { LuaConstructor, "wxHtmlCell", wxLua_wxHtmlCell_constructor, 0, 0, { 0 } }, ! { LuaMethod, "AdjustPagebreak", wxLua_wxHtmlCell_AdjustPagebreak, 1, 1, { &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "Find", wxLua_wxHtmlCell_Find, 2, 1, { &s_wxluaarg_Number, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "GetDescent", wxLua_wxHtmlCell_GetDescent, 0, 0, { 0 } }, ! { LuaGetProp, "Descent", wxLua_wxHtmlCell_GetDescent, 0, 0, {0} }, { LuaMethod, "GetHeight", wxLua_wxHtmlCell_GetHeight, 0, 0, { 0 } }, - { LuaGetProp, "Height", wxLua_wxHtmlCell_GetHeight, 0, 0, {0} }, { LuaMethod, "GetLink", wxLua_wxHtmlCell_GetLink, 2, 0, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "GetNext", wxLua_wxHtmlCell_GetNext, 0, 0, { 0 } }, { LuaMethod, "GetParent", wxLua_wxHtmlCell_GetParent, 0, 0, { 0 } }, { LuaMethod, "GetPosX", wxLua_wxHtmlCell_GetPosX, 0, 0, { 0 } }, - { LuaGetProp, "PosX", wxLua_wxHtmlCell_GetPosX, 0, 0, {0} }, { LuaMethod, "GetPosY", wxLua_wxHtmlCell_GetPosY, 0, 0, { 0 } }, - { LuaGetProp, "PosY", wxLua_wxHtmlCell_GetPosY, 0, 0, {0} }, { LuaMethod, "GetWidth", wxLua_wxHtmlCell_GetWidth, 0, 0, { 0 } }, - { LuaGetProp, "Width", wxLua_wxHtmlCell_GetWidth, 0, 0, {0} }, { LuaMethod, "Layout", wxLua_wxHtmlCell_Layout, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetLink", wxLua_wxHtmlCell_SetLink, 1, 1, { &s_wxluatag_wxHtmlLinkInfo, 0 } }, { LuaMethod, "SetNext", wxLua_wxHtmlCell_SetNext, 1, 1, { &s_wxluatag_wxHtmlCell, 0 } }, { LuaGetProp, "Next", wxLua_wxHtmlCell_GetNext, 0, 0, {0} }, { LuaSetProp, "Next", wxLua_wxHtmlCell_SetNext, 1, 1, {0} }, - { LuaMethod, "SetParent", wxLua_wxHtmlCell_SetParent, 1, 1, { &s_wxluatag_wxHtmlContainerCell, 0 } }, { LuaGetProp, "Parent", wxLua_wxHtmlCell_GetParent, 0, 0, {0} }, { LuaSetProp, "Parent", wxLua_wxHtmlCell_SetParent, 1, 1, {0} }, ! { LuaMethod, "SetPos", wxLua_wxHtmlCell_SetPos, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaDelete, "wxHtmlCell", wxLua_wxHtmlCell_destructor, 0, 0, {0} }, }; --- 382,410 ---- { LuaConstructor, "wxHtmlCell", wxLua_wxHtmlCell_constructor, 0, 0, { 0 } }, ! { LuaMethod, "AdjustPagebreak", wxLua_wxHtmlCell_AdjustPagebreak, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "Find", wxLua_wxHtmlCell_Find, 2, 1, { &s_wxluaarg_Number, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "GetDescent", wxLua_wxHtmlCell_GetDescent, 0, 0, { 0 } }, ! { LuaMethod, "GetFirstChild", wxLua_wxHtmlCell_GetFirstChild, 0, 0, { 0 } }, { LuaMethod, "GetHeight", wxLua_wxHtmlCell_GetHeight, 0, 0, { 0 } }, { LuaMethod, "GetLink", wxLua_wxHtmlCell_GetLink, 2, 0, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "GetNext", wxLua_wxHtmlCell_GetNext, 0, 0, { 0 } }, { LuaMethod, "GetParent", wxLua_wxHtmlCell_GetParent, 0, 0, { 0 } }, { LuaMethod, "GetPosX", wxLua_wxHtmlCell_GetPosX, 0, 0, { 0 } }, { LuaMethod, "GetPosY", wxLua_wxHtmlCell_GetPosY, 0, 0, { 0 } }, { LuaMethod, "GetWidth", wxLua_wxHtmlCell_GetWidth, 0, 0, { 0 } }, { LuaMethod, "Layout", wxLua_wxHtmlCell_Layout, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetLink", wxLua_wxHtmlCell_SetLink, 1, 1, { &s_wxluatag_wxHtmlLinkInfo, 0 } }, { LuaMethod, "SetNext", wxLua_wxHtmlCell_SetNext, 1, 1, { &s_wxluatag_wxHtmlCell, 0 } }, + { LuaMethod, "SetParent", wxLua_wxHtmlCell_SetParent, 1, 1, { &s_wxluatag_wxHtmlContainerCell, 0 } }, + { LuaMethod, "SetPos", wxLua_wxHtmlCell_SetPos, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, + { LuaGetProp, "Descent", wxLua_wxHtmlCell_GetDescent, 0, 0, {0} }, + { LuaGetProp, "Height", wxLua_wxHtmlCell_GetHeight, 0, 0, {0} }, { LuaGetProp, "Next", wxLua_wxHtmlCell_GetNext, 0, 0, {0} }, { LuaSetProp, "Next", wxLua_wxHtmlCell_SetNext, 1, 1, {0} }, { LuaGetProp, "Parent", wxLua_wxHtmlCell_GetParent, 0, 0, {0} }, { LuaSetProp, "Parent", wxLua_wxHtmlCell_SetParent, 1, 1, {0} }, ! { LuaGetProp, "PosX", wxLua_wxHtmlCell_GetPosX, 0, 0, {0} }, ! { LuaGetProp, "PosY", wxLua_wxHtmlCell_GetPosY, 0, 0, {0} }, ! { LuaGetProp, "Width", wxLua_wxHtmlCell_GetWidth, 0, 0, {0} }, { LuaDelete, "wxHtmlCell", wxLua_wxHtmlCell_destructor, 0, 0, {0} }, }; *************** *** 459,463 **** int s_wxluatag_wxHtmlLinkInfo = -1; ! // wxHtmlLinkInfo(const wxString& href, const wxString& target = wxEmptyString) static int LUACALL wxLua_wxHtmlLinkInfo_constructor(lua_State *L) { --- 475,479 ---- int s_wxluatag_wxHtmlLinkInfo = -1; ! // wxHtmlLinkInfo(const wxString& href, const wxString& target = "") static int LUACALL wxLua_wxHtmlLinkInfo_constructor(lua_State *L) { *************** *** 466,470 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString target = wxEmptyString const wxString target = (argCount >= 2 ? lua2wx(wxlState.GetStringType(2)) : wxString(wxEmptyString)); // const wxString href --- 482,486 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxString target = "" const wxString target = (argCount >= 2 ? lua2wx(wxlState.GetStringType(2)) : wxString(wxEmptyString)); // const wxString href *************** *** 551,560 **** { LuaConstructor, "wxHtmlLinkInfo", wxLua_wxHtmlLinkInfo_constructor, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, { LuaMethod, "GetEvent", wxLua_wxHtmlLinkInfo_GetEvent, 0, 0, { 0 } }, - { LuaGetProp, "Event", wxLua_wxHtmlLinkInfo_GetEvent, 0, 0, {0} }, { LuaMethod, "GetHtmlCell", wxLua_wxHtmlLinkInfo_GetHtmlCell, 0, 0, { 0 } }, - { LuaGetProp, "HtmlCell", wxLua_wxHtmlLinkInfo_GetHtmlCell, 0, 0, {0} }, { LuaMethod, "GetHref", wxLua_wxHtmlLinkInfo_GetHref, 0, 0, { 0 } }, - { LuaGetProp, "Href", wxLua_wxHtmlLinkInfo_GetHref, 0, 0, {0} }, { LuaMethod, "GetTarget", wxLua_wxHtmlLinkInfo_GetTarget, 0, 0, { 0 } }, { LuaGetProp, "Target", wxLua_wxHtmlLinkInfo_GetTarget, 0, 0, {0} }, { LuaDelete, "wxHtmlLinkInfo", wxLua_wxHtmlLinkInfo_destructor, 0, 0, {0} }, --- 567,576 ---- { LuaConstructor, "wxHtmlLinkInfo", wxLua_wxHtmlLinkInfo_constructor, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, { LuaMethod, "GetEvent", wxLua_wxHtmlLinkInfo_GetEvent, 0, 0, { 0 } }, { LuaMethod, "GetHtmlCell", wxLua_wxHtmlLinkInfo_GetHtmlCell, 0, 0, { 0 } }, { LuaMethod, "GetHref", wxLua_wxHtmlLinkInfo_GetHref, 0, 0, { 0 } }, { LuaMethod, "GetTarget", wxLua_wxHtmlLinkInfo_GetTarget, 0, 0, { 0 } }, + { LuaGetProp, "Event", wxLua_wxHtmlLinkInfo_GetEvent, 0, 0, {0} }, + { LuaGetProp, "Href", wxLua_wxHtmlLinkInfo_GetHref, 0, 0, {0} }, + { LuaGetProp, "HtmlCell", wxLua_wxHtmlLinkInfo_GetHtmlCell, 0, 0, {0} }, { LuaGetProp, "Target", wxLua_wxHtmlLinkInfo_GetTarget, 0, 0, {0} }, { LuaDelete, "wxHtmlLinkInfo", wxLua_wxHtmlLinkInfo_destructor, 0, 0, {0} }, *************** *** 576,580 **** ! #if ((wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxHTML)) && (wxLUA_USE_wxColourPenBrush) // %override wxLua_wxHtmlTag_GetParamAsColour // %alias GetParamAsColor bool GetParamAsColour(const wxString& par, wxColour *clr) const --- 592,596 ---- ! #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) // %override wxLua_wxHtmlTag_GetParamAsColour // %alias GetParamAsColor bool GetParamAsColour(const wxString& par, wxColour *clr) const *************** *** 600,628 **** #endif - - #if (wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxHTML) - // %override wxLua_wxHtmlTag_GetParamAsInt - // bool GetParamAsInt(const wxString& par, int *value) const - static int LUACALL wxLua_wxHtmlTag_GetParamAsInt(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - int value; - // const wxString& par - wxString par = lua2wx(wxlState.GetStringType(2)); - // get this - wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); - // call GetParamAsInt - returns = self->GetParamAsInt(par, &value); - // push the result number - lua_pushboolean(L, returns); - // - lua_pushnumber(L, value); - // return the number of parameters - return 2; - } - - #endif - // const wxString GetAllParams() const static int LUACALL wxLua_wxHtmlTag_GetAllParams(lua_State *L) --- 616,619 ---- *************** *** 721,724 **** --- 712,736 ---- } + // %override wxLua_wxHtmlTag_GetParamAsInt + // bool GetParamAsInt(const wxString& par, int *value) const + static int LUACALL wxLua_wxHtmlTag_GetParamAsInt(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + int value; + // const wxString& par + wxString par = lua2wx(wxlState.GetStringType(2)); + // get this + wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); + // call GetParamAsInt + returns = self->GetParamAsInt(par, &value); + // push the result number + lua_pushboolean(L, returns); + // + lua_pushnumber(L, value); + // return the number of parameters + return 2; + } + // bool HasEnding() const static int LUACALL wxLua_wxHtmlTag_HasEnding(lua_State *L) *************** *** 765,789 **** static WXLUAMETHOD s_wxHtmlTag_methods[] = { ! #if ((wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxHTML)) && (wxLUA_USE_wxColourPenBrush) { LuaMethod, "GetParamAsColour", wxLua_wxHtmlTag_GetParamAsColour, 2, 2, { &s_wxluaarg_String, &s_wxluatag_wxColour, 0 } }, #endif - - #if (wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxHTML) - { LuaMethod, "GetParamAsInt", wxLua_wxHtmlTag_GetParamAsInt, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, - #endif - { LuaMethod, "GetAllParams", wxLua_wxHtmlTag_GetAllParams, 0, 0, { 0 } }, { LuaMethod, "GetBeginPos", wxLua_wxHtmlTag_GetBeginPos, 0, 0, { 0 } }, - { LuaGetProp, "BeginPos", wxLua_wxHtmlTag_GetBeginPos, 0, 0, {0} }, { LuaMethod, "GetEndPos1", wxLua_wxHtmlTag_GetEndPos1, 0, 0, { 0 } }, - { LuaGetProp, "EndPos1", wxLua_wxHtmlTag_GetEndPos1, 0, 0, {0} }, { LuaMethod, "GetEndPos2", wxLua_wxHtmlTag_GetEndPos2, 0, 0, { 0 } }, - { LuaGetProp, "EndPos2", wxLua_wxHtmlTag_GetEndPos2, 0, 0, {0} }, { LuaMethod, "GetName", wxLua_wxHtmlTag_GetName, 0, 0, { 0 } }, - { LuaGetProp, "Name", wxLua_wxHtmlTag_GetName, 0, 0, {0} }, { LuaMethod, "GetParam", wxLua_wxHtmlTag_GetParam, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Boolean, 0 } }, { LuaMethod, "HasEnding", wxLua_wxHtmlTag_HasEnding, 0, 0, { 0 } }, { LuaMethod, "HasParam", wxLua_wxHtmlTag_HasParam, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaDelete, "wxHtmlTag", wxLua_wxHtmlTag_destructor, 0, 0, {0} }, }; --- 777,797 ---- static WXLUAMETHOD s_wxHtmlTag_methods[] = { ! #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) { LuaMethod, "GetParamAsColour", wxLua_wxHtmlTag_GetParamAsColour, 2, 2, { &s_wxluaarg_String, &s_wxluatag_wxColour, 0 } }, #endif { LuaMethod, "GetAllParams", wxLua_wxHtmlTag_GetAllParams, 0, 0, { 0 } }, { LuaMethod, "GetBeginPos", wxLua_wxHtmlTag_GetBeginPos, 0, 0, { 0 } }, { LuaMethod, "GetEndPos1", wxLua_wxHtmlTag_GetEndPos1, 0, 0, { 0 } }, { LuaMethod, "GetEndPos2", wxLua_wxHtmlTag_GetEndPos2, 0, 0, { 0 } }, { LuaMethod, "GetName", wxLua_wxHtmlTag_GetName, 0, 0, { 0 } }, { LuaMethod, "GetParam", wxLua_wxHtmlTag_GetParam, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Boolean, 0 } }, + { LuaMethod, "GetParamAsInt", wxLua_wxHtmlTag_GetParamAsInt, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "HasEnding", wxLua_wxHtmlTag_HasEnding, 0, 0, { 0 } }, { LuaMethod, "HasParam", wxLua_wxHtmlTag_HasParam, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaGetProp, "BeginPos", wxLua_wxHtmlTag_GetBeginPos, 0, 0, {0} }, + { LuaGetProp, "EndPos1", wxLua_wxHtmlTag_GetEndPos1, 0, 0, {0} }, + { LuaGetProp, "EndPos2", wxLua_wxHtmlTag_GetEndPos2, 0, 0, {0} }, + { LuaGetProp, "Name", wxLua_wxHtmlTag_GetName, 0, 0, {0} }, { LuaDelete, "wxHtmlTag", wxLua_wxHtmlTag_destructor, 0, 0, {0} }, }; *************** *** 804,808 **** --- 812,853 ---- + #if ((wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML)) && (wxLUA_USE_wxHTML) + // %wxchkver22&!%wxchkver25 wxHtmlCell* GetFirstCell() + static int LUACALL wxLua_wxHtmlContainerCell_GetFirstCell(lua_State *L) + { + wxLuaState wxlState(L); + wxHtmlCell *returns; + // get this + wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); + // call GetFirstCell + returns = self->GetFirstCell(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); + + return 1; + } + + #endif + + #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) + // wxColour GetBackgroundColour() + static int LUACALL wxLua_wxHtmlContainerCell_GetBackgroundColour(lua_State *L) + { + wxLuaState wxlState(L); + wxColour *returns; + // get this + wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); + // call GetBackgroundColour + // allocate a new object using the copy constructor + returns = new wxColour(self->GetBackgroundColour()); + // add the new object to the tracked memory list + wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxColour, returns); + + return 1; + } + // void SetBackgroundColour(const wxColour& clr) static int LUACALL wxLua_wxHtmlContainerCell_SetBackgroundColour(lua_State *L) *************** *** 838,860 **** - #if (wxLUA_USE_wxHTML) && ((wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxHTML)) - // %wxchkver22&!%wxchkver25|%wxcompat24 wxHtmlCell* GetFirstCell() - static int LUACALL wxLua_wxHtmlContainerCell_GetFirstCell(lua_State *L) - { - wxLuaState wxlState(L); - wxHtmlCell *returns; - // get this - wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); - // call GetFirstCell - returns = self->GetFirstCell(); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); - - return 1; - } - - #endif - - #if (wxLUA_USE_wxHTML) && ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML)) // %wxchkver25 wxHtmlCell* GetFirstChild() --- 883,886 ---- *************** *** 982,1009 **** } ! // void SetAlignHor(int align) static int LUACALL wxLua_wxHtmlContainerCell_SetAlignHor(lua_State *L) { wxLuaState wxlState(L); ! // int align ! int align = (int)wxlState.GetNumberType(2); // get this wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); // call SetAlignHor ! self->SetAlignHor(align); return 0; } ! // void SetAlignVer(int align) static int LUACALL wxLua_wxHtmlContainerCell_SetAlignVer(lua_State *L) { wxLuaState wxlState(L); ! // int align ! int align = (int)wxlState.GetNumberType(2); // get this wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); // call SetAlignVer ! self->SetAlignVer(align); return 0; --- 1008,1035 ---- } ! // void SetAlignHor(int al) static int LUACALL wxLua_wxHtmlContainerCell_SetAlignHor(lua_State *L) { wxLuaState wxlState(L); ! // int al ! int al = (int)wxlState.GetNumberType(2); // get this wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); // call SetAlignHor ! self->SetAlignHor(al); return 0; } ! // void SetAlignVer(int al) static int LUACALL wxLua_wxHtmlContainerCell_SetAlignVer(lua_State *L) { wxLuaState wxlState(L); ! // int al ! int al = (int)wxlState.GetNumberType(2); // get this wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); // call SetAlignVer ! self->SetAlignVer(al); return 0; *************** *** 1094,1106 **** static WXLUAMETHOD s_wxHtmlContainerCell_methods[] = { ! #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) ! { LuaMethod, "SetBackgroundColour", wxLua_wxHtmlContainerCell_SetBackgroundColour, 1, 1, { &s_wxluatag_wxColour, 0 } }, ! { LuaMethod, "SetBorder", wxLua_wxHtmlContainerCell_SetBorder, 2, 2, { &s_wxluatag_wxColour, &s_wxluatag_wxColour, 0 } }, #endif ! #if (wxLUA_USE_wxHTML) && ((wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxHTML)) ! { LuaMethod, "GetFirstCell", wxLua_wxHtmlContainerCell_GetFirstCell, 0, 0, { 0 } }, ! { LuaGetProp, "FirstCell", wxLua_wxHtmlContainerCell_GetFirstCell, 0, 0, {0} }, #endif --- 1120,1133 ---- static WXLUAMETHOD s_wxHtmlContainerCell_methods[] = { ! #if ((wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML)) && (wxLUA_USE_wxHTML) ! { LuaMethod, "GetFirstCell", wxLua_wxHtmlContainerCell_GetFirstCell, 0, 0, { 0 } }, ! { LuaGetProp, "FirstCell", wxLua_wxHtmlContainerCell_GetFirstCell, 0, 0, {0} }, #endif ! #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) ! { LuaMethod, "GetBackgroundColour", wxLua_wxHtmlContainerCell_GetBackgroundColour, 0, 0, { 0 } }, ! { LuaMethod, "SetBackgroundColour", wxLua_wxHtmlContainerCell_SetBackgroundColour, 1, 1, { &s_wxluatag_wxColour, 0 } }, ! { LuaMethod, "SetBorder", wxLua_wxHtmlContainerCell_SetBorder, 2, 2, { &s_wxluatag_wxColour, &s_wxluatag_wxColour, 0 } }, #endif *************** *** 1118,1130 **** { LuaMethod, "SetAlign", wxLua_wxHtmlContainerCell_SetAlign, 1, 1, { &s_wxluatag_wxHtmlTag, 0 } }, { LuaMethod, "SetAlignHor", wxLua_wxHtmlContainerCell_SetAlignHor, 1, 1, { &s_wxluaarg_Number, 0 } }, - { LuaGetProp, "AlignHor", wxLua_wxHtmlContainerCell_GetAlignHor, 0, 0, {0} }, - { LuaSetProp, "AlignHor", wxLua_wxHtmlContainerCell_SetAlignHor, 1, 1, {0} }, { LuaMethod, "SetAlignVer", wxLua_wxHtmlContainerCell_SetAlignVer, 1, 1, { &s_wxluaarg_Number, 0 } }, - { LuaGetProp, "AlignVer", wxLua_wxHtmlContainerCell_GetAlignVer, 0, 0, {0} }, - { LuaSetProp, "AlignVer", wxLua_wxHtmlContainerCell_SetAlignVer, 1, 1, {0} }, { LuaMethod, "SetIndent", wxLua_wxHtmlContainerCell_SetIndent, 3, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetMinHeight", wxLua_wxHtmlContainerCell_SetMinHeight, 2, 1, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetWidthFloat", wxLua_wxHtmlContainerCell_SetWidthFloat, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetWidthFloatFromTag", wxLua_wxHtmlContainerCell_SetWidthFloatFromTag, 2, 1, { &s_wxluatag_wxHtmlTag, &s_wxluaarg_Number, 0 } }, { LuaDelete, "wxHtmlContainerCell", wxLua_wxHtmlContainerCell_destructor, 0, 0, {0} }, }; --- 1145,1157 ---- { LuaMethod, "SetAlign", wxLua_wxHtmlContainerCell_SetAlign, 1, 1, { &s_wxluatag_wxHtmlTag, 0 } }, { LuaMethod, "SetAlignHor", wxLua_wxHtmlContainerCell_SetAlignHor, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetAlignVer", wxLua_wxHtmlContainerCell_SetAlignVer, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetIndent", wxLua_wxHtmlContainerCell_SetIndent, 3, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetMinHeight", wxLua_wxHtmlContainerCell_SetMinHeight, 2, 1, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetWidthFloat", wxLua_wxHtmlContainerCell_SetWidthFloat, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetWidthFloatFromTag", wxLua_wxHtmlContainerCell_SetWidthFloatFromTag, 2, 1, { &s_wxluatag_wxHtmlTag, &s_wxluaarg_Number, 0 } }, + { LuaGetProp, "AlignHor", wxLua_wxHtmlContainerCell_GetAlignHor, 0, 0, {0} }, + { LuaSetProp, "AlignHor", wxLua_wxHtmlContainerCell_SetAlignHor, 1, 1, {0} }, + { LuaGetProp, "AlignVer", wxLua_wxHtmlContainerCell_GetAlignVer, 0, 0, {0} }, + { LuaSetProp, "AlignVer", wxLua_wxHtmlContainerCell_SetAlignVer, 1, 1, {0} }, { LuaDelete, "wxHtmlContainerCell", wxLua_wxHtmlContainerCell_destructor, 0, 0, {0} }, }; *************** *** 1278,1281 **** --- 1305,1329 ---- + #if (wxLUA_USE_wxFileName) && (wxLUA_USE_wxHTML) + // virtual bool LoadFile(const wxFileName& filename) + static int LUACALL wxLua_wxHtmlWindow_LoadFile(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxFileName filename + const wxFileName * filename = (const wxFileName *)wxlState.GetUserDataType(2, s_wxluatag_wxFileName); + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call LoadFile + returns = self->LoadFile(*filename); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif + + #if (wxLUA_USE_wxFrame) && (wxLUA_USE_wxHTML) // wxFrame* GetRelatedFrame() const *************** *** 1314,1318 **** #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxHTML) ! // wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "htmlWindow") static int LUACALL wxLua_wxHtmlWindow_constructor(lua_State *L) { --- 1362,1366 ---- #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxHTML) ! // wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "wxHtmlWindow") static int LUACALL wxLua_wxHtmlWindow_constructor(lua_State *L) { *************** *** 1321,1326 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString name = "htmlWindow" ! const wxString name = (argCount >= 6 ? lua2wx(wxlState.GetStringType(6)) : wxString(wxT("htmlWindow"))); // long style = wxHW_SCROLLBAR_AUTO long style = (argCount >= 5 ? (long)wxlState.GetNumberType(5) : wxHW_SCROLLBAR_AUTO); --- 1369,1374 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxString name = "wxHtmlWindow" ! const wxString name = (argCount >= 6 ? lua2wx(wxlState.GetStringType(6)) : wxString(wxT("wxHtmlWindow"))); // long style = wxHW_SCROLLBAR_AUTO long style = (argCount >= 5 ? (long)wxlState.GetNumberType(5) : wxHW_SCROLLBAR_AUTO); *************** *** 1344,1347 **** --- 1392,1423 ---- } + // void SelectLine(const wxPoint& pos) + static int LUACALL wxLua_wxHtmlWindow_SelectLine(lua_State *L) + { + wxLuaState wxlState(L); + // const wxPoint pos + const wxPoint * pos = (const wxPoint *)wxlState.GetUserDataType(2, s_wxluatag_wxPoint); + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call SelectLine + self->SelectLine(*pos); + + return 0; + } + + // void SelectWord(const wxPoint& pos) + static int LUACALL wxLua_wxHtmlWindow_SelectWord(lua_State *L) + { + wxLuaState wxlState(L); + // const wxPoint pos + const wxPoint * pos = (const wxPoint *)wxlState.GetUserDataType(2, s_wxluatag_wxPoint); + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call SelectWord + self->SelectWord(*pos); + + return 0; + } + #endif *************** *** 1423,1426 **** --- 1499,1529 ---- } + // void SelectAll() + static int LUACALL wxLua_wxHtmlWindow_SelectAll(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call SelectAll + self->SelectAll(); + + return 0; + } + + // wxString SelectionToText() + static int LUACALL wxLua_wxHtmlWindow_SelectionToText(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call SelectionToText + returns = self->SelectionToText(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + // void SetBorders(int b) static int LUACALL wxLua_wxHtmlWindow_SetBorders(lua_State *L) *************** *** 1524,1527 **** --- 1627,1645 ---- } + // wxString ToText() + static int LUACALL wxLua_wxHtmlWindow_ToText(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call ToText + returns = self->ToText(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + static int LUACALL wxLua_wxHtmlWindow_destructor(lua_State *) { *************** *** 1552,1559 **** #if (wxLUA_USE_wxFrame) && (wxLUA_USE_wxHTML) { LuaMethod, "GetRelatedFrame", wxLua_wxHtmlWindow_GetRelatedFrame, 0, 0, { 0 } }, - { LuaGetProp, "RelatedFrame", wxLua_wxHtmlWindow_GetRelatedFrame, 0, 0, {0} }, { LuaMethod, "SetRelatedFrame", wxLua_wxHtmlWindow_SetRelatedFrame, 2, 2, { &s_wxluatag_wxFrame, &s_wxluaarg_String, 0 } }, #endif --- 1670,1682 ---- + #if (wxLUA_USE_wxFileName) && (wxLUA_USE_wxHTML) + { LuaMethod, "LoadFile", wxLua_wxHtmlWindow_LoadFile, 1, 1, { &s_wxluatag_wxFileName, 0 } }, + #endif + + #if (wxLUA_USE_wxFrame) && (wxLUA_USE_wxHTML) { LuaMethod, "GetRelatedFrame", wxLua_wxHtmlWindow_GetRelatedFrame, 0, 0, { 0 } }, { LuaMethod, "SetRelatedFrame", wxLua_wxHtmlWindow_SetRelatedFrame, 2, 2, { &s_wxluatag_wxFrame, &s_wxluaarg_String, 0 } }, + { LuaGetProp, "RelatedFrame", wxLua_wxHtmlWindow_GetRelatedFrame, 0, 0, {0} }, #endif *************** *** 1561,1579 **** #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxHTML) { LuaConstructor, "wxHtmlWindow", wxLua_wxHtmlWindow_constructor, 6, 1, { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, 0 } }, #endif { LuaMethod, "GetInternalRepresentation", wxLua_wxHtmlWindow_GetInternalRepresentation, 0, 0, { 0 } }, - { LuaGetProp, "InternalRepresentation", wxLua_wxHtmlWindow_GetInternalRepresentation, 0, 0, {0} }, { LuaMethod, "GetOpenedAnchor", wxLua_wxHtmlWindow_GetOpenedAnchor, 0, 0, { 0 } }, - { LuaGetProp, "OpenedAnchor", wxLua_wxHtmlWindow_GetOpenedAnchor, 0, 0, {0} }, { LuaMethod, "GetOpenedPage", wxLua_wxHtmlWindow_GetOpenedPage, 0, 0, { 0 } }, - { LuaGetProp, "OpenedPage", wxLua_wxHtmlWindow_GetOpenedPage, 0, 0, {0} }, { LuaMethod, "GetOpenedPageTitle", wxLua_wxHtmlWindow_GetOpenedPageTitle, 0, 0, { 0 } }, - { LuaGetProp, "OpenedPageTitle", wxLua_wxHtmlWindow_GetOpenedPageTitle, 0, 0, {0} }, { LuaMethod, "LoadPage", wxLua_wxHtmlWindow_LoadPage, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "SetBorders", wxLua_wxHtmlWindow_SetBorders, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetFonts", wxLua_wxHtmlWindow_SetFonts, 3, 3, { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "SetPage", wxLua_wxHtmlWindow_SetPage, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "SetRelatedStatusBar", wxLua_wxHtmlWindow_SetRelatedStatusBar, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaDelete, "wxHtmlWindow", wxLua_wxHtmlWindow_destructor, 0, 0, {0} }, }; --- 1684,1707 ---- #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxHTML) { LuaConstructor, "wxHtmlWindow", wxLua_wxHtmlWindow_constructor, 6, 1, { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, 0 } }, + { LuaMethod, "SelectLine", wxLua_wxHtmlWindow_SelectLine, 1, 1, { &s_wxluatag_wxPoint, 0 } }, + { LuaMethod, "SelectWord", wxLua_wxHtmlWindow_SelectWord, 1, 1, { &s_wxluatag_wxPoint, 0 } }, #endif { LuaMethod, "GetInternalRepresentation", wxLua_wxHtmlWindow_GetInternalRepresentation, 0, 0, { 0 } }, { LuaMethod, "GetOpenedAnchor", wxLua_wxHtmlWindow_GetOpenedAnchor, 0, 0, { 0 } }, { LuaMethod, "GetOpenedPage", wxLua_wxHtmlWindow_GetOpenedPage, 0, 0, { 0 } }, { LuaMethod, "GetOpenedPageTitle", wxLua_wxHtmlWindow_GetOpenedPageTitle, 0, 0, { 0 } }, { LuaMethod, "LoadPage", wxLua_wxHtmlWindow_LoadPage, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SelectAll", wxLua_wxHtmlWindow_SelectAll, 0, 0, { 0 } }, + { LuaMethod, "SelectionToText", wxLua_wxHtmlWindow_SelectionToText, 0, 0, { 0 } }, { LuaMethod, "SetBorders", wxLua_wxHtmlWindow_SetBorders, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetFonts", wxLua_wxHtmlWindow_SetFonts, 3, 3, { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "SetPage", wxLua_wxHtmlWindow_SetPage, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "SetRelatedStatusBar", wxLua_wxHtmlWindow_SetRelatedStatusBar, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "ToText", wxLua_wxHtmlWindow_ToText, 0, 0, { 0 } }, + { LuaGetProp, "InternalRepresentation", wxLua_wxHtmlWindow_GetInternalRepresentation, 0, 0, {0} }, + { LuaGetProp, "OpenedAnchor", wxLua_wxHtmlWindow_GetOpenedAnchor, 0, 0, {0} }, + { LuaGetProp, "OpenedPage", wxLua_wxHtmlWindow_GetOpenedPage, 0, 0, {0} }, + { LuaGetProp, "OpenedPageTitle", wxLua_wxHtmlWindow_GetOpenedPageTitle, 0, 0, {0} }, { LuaDelete, "wxHtmlWindow", wxLua_wxHtmlWindow_destructor, 0, 0, {0} }, }; *************** *** 2231,2237 **** { LuaMethod, "GetLinkColor", wxLua_wxHtmlWinParser_GetLinkColor, 0, 0, { 0 } }, { LuaMethod, "SetActualColor", wxLua_wxHtmlWinParser_SetActualColor, 1, 1, { &s_wxluatag_wxColour, 0 } }, { LuaGetProp, "ActualColor", wxLua_wxHtmlWinParser_GetActualColor, 0, 0, {0} }, { LuaSetProp, "ActualColor", wxLua_wxHtmlWinParser_SetActualColor, 1, 1, {0} }, - { LuaMethod, "SetLinkColor", wxLua_wxHtmlWinParser_SetLinkColor, 1, 1, { &s_wxluatag_wxColour, 0 } }, { LuaGetProp, "LinkColor", wxLua_wxHtmlWinParser_GetLinkColor, 0, 0, {0} }, { LuaSetProp, "LinkColor", wxLua_wxHtmlWinParser_SetLinkColor, 1, 1, {0} }, --- 2359,2365 ---- { LuaMethod, "GetLinkColor", wxLua_wxHtmlWinParser_GetLinkColor, 0, 0, { 0 } }, { LuaMethod, "SetActualColor", wxLua_wxHtmlWinParser_SetActualColor, 1, 1, { &s_wxluatag_wxColour, 0 } }, + { LuaMethod, "SetLinkColor", wxLua_wxHtmlWinParser_SetLinkColor, 1, 1, { &s_wxluatag_wxColour, 0 } }, { LuaGetProp, "ActualColor", wxLua_wxHtmlWinParser_GetActualColor, 0, 0, {0} }, { LuaSetProp, "ActualColor", wxLua_wxHtmlWinParser_SetActualColor, 1, 1, {0} }, { LuaGetProp, "LinkColor", wxLua_wxHtmlWinParser_GetLinkColor, 0, 0, {0} }, { LuaSetProp, "LinkColor", wxLua_wxHtmlWinParser_SetLinkColor, 1, 1, {0} }, *************** *** 2265,2296 **** { LuaMethod, "GetLink", wxLua_wxHtmlWinParser_GetLink, 0, 0, { 0 } }, { LuaMethod, "GetWindow", wxLua_wxHtmlWinParser_GetWindow, 0, 0, { 0 } }, - { LuaGetProp, "Window", wxLua_wxHtmlWinParser_GetWindow, 0, 0, {0} }, { LuaMethod, "OpenContainer", wxLua_wxHtmlWinParser_OpenContainer, 0, 0, { 0 } }, { LuaMethod, "SetAlign", wxLua_wxHtmlWinParser_SetAlign, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "Align", wxLua_wxHtmlWinParser_GetAlign, 0, 0, {0} }, { LuaSetProp, "Align", wxLua_wxHtmlWinParser_SetAlign, 1, 1, {0} }, - { LuaMethod, "SetContainer", wxLua_wxHtmlWinParser_SetContainer, 1, 1, { &s_wxluatag_wxHtmlContainerCell, 0 } }, { LuaGetProp, "Container", wxLua_wxHtmlWinParser_GetContainer, 0, 0, {0} }, { LuaSetProp, "Container", wxLua_wxHtmlWinParser_SetContainer, 1, 1, {0} }, - { LuaMethod, "SetFontBold", wxLua_wxHtmlWinParser_SetFontBold, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontBold", wxLua_wxHtmlWinParser_GetFontBold, 0, 0, {0} }, { LuaSetProp, "FontBold", wxLua_wxHtmlWinParser_SetFontBold, 1, 1, {0} }, - { LuaMethod, "SetFontFace", wxLua_wxHtmlWinParser_SetFontFace, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "FontFace", wxLua_wxHtmlWinParser_GetFontFace, 0, 0, {0} }, { LuaSetProp, "FontFace", wxLua_wxHtmlWinParser_SetFontFace, 1, 1, {0} }, - { LuaMethod, "SetFontFixed", wxLua_wxHtmlWinParser_SetFontFixed, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontFixed", wxLua_wxHtmlWinParser_GetFontFixed, 0, 0, {0} }, { LuaSetProp, "FontFixed", wxLua_wxHtmlWinParser_SetFontFixed, 1, 1, {0} }, - { LuaMethod, "SetFontItalic", wxLua_wxHtmlWinParser_SetFontItalic, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontItalic", wxLua_wxHtmlWinParser_GetFontItalic, 0, 0, {0} }, { LuaSetProp, "FontItalic", wxLua_wxHtmlWinParser_SetFontItalic, 1, 1, {0} }, - { LuaMethod, "SetFontSize", wxLua_wxHtmlWinParser_SetFontSize, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontSize", wxLua_wxHtmlWinParser_GetFontSize, 0, 0, {0} }, { LuaSetProp, "FontSize", wxLua_wxHtmlWinParser_SetFontSize, 1, 1, {0} }, - { LuaMethod, "SetFontUnderlined", wxLua_wxHtmlWinParser_SetFontUnderlined, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontUnderlined", wxLua_wxHtmlWinParser_GetFontUnderlined, 0, 0, {0} }, { LuaSetProp, "FontUnderlined", wxLua_wxHtmlWinParser_SetFontUnderlined, 1, 1, {0} }, - { LuaMethod, "SetFonts", wxLua_wxHtmlWinParser_SetFonts, 3, 3, { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, - { LuaMethod, "SetLink", wxLua_wxHtmlWinParser_SetLink, 1, 1, { &s_wxluatag_wxHtmlLinkInfo, 0 } }, { LuaGetProp, "Link", wxLua_wxHtmlWinParser_GetLink, 0, 0, {0} }, { LuaSetProp, "Link", wxLua_wxHtmlWinParser_SetLink, 1, 1, {0} }, --- 2393,2424 ---- { LuaMethod, "GetLink", wxLua_wxHtmlWinParser_GetLink, 0, 0, { 0 } }, { LuaMethod, "GetWindow", wxLua_wxHtmlWinParser_GetWindow, 0, 0, { 0 } }, { LuaMethod, "OpenContainer", wxLua_wxHtmlWinParser_OpenContainer, 0, 0, { 0 } }, { LuaMethod, "SetAlign", wxLua_wxHtmlWinParser_SetAlign, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetContainer", wxLua_wxHtmlWinParser_SetContainer, 1, 1, { &s_wxluatag_wxHtmlContainerCell, 0 } }, + { LuaMethod, "SetFontBold", wxLua_wxHtmlWinParser_SetFontBold, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFontFace", wxLua_wxHtmlWinParser_SetFontFace, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SetFontFixed", wxLua_wxHtmlWinParser_SetFontFixed, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFontItalic", wxLua_wxHtmlWinParser_SetFontItalic, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFontSize", wxLua_wxHtmlWinParser_SetFontSize, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFontUnderlined", wxLua_wxHtmlWinParser_SetFontUnderlined, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFonts", wxLua_wxHtmlWinParser_SetFonts, 3, 3, { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, + { LuaMethod, "SetLink", wxLua_wxHtmlWinParser_SetLink, 1, 1, { &s_wxluatag_wxHtmlLinkInfo, 0 } }, + { LuaGetProp, "Window", wxLua_wxHtmlWinParser_GetWindow, 0, 0, {0} }, { LuaGetProp, "Align", wxLua_wxHtmlWinParser_GetAlign, 0, 0, {0} }, { LuaSetProp, "Align", wxLua_wxHtmlWinParser_SetAlign, 1, 1, {0} }, { LuaGetProp, "Container", wxLua_wxHtmlWinParser_GetContainer, 0, 0, {0} }, { LuaSetProp, "Container", wxLua_wxHtmlWinParser_SetContainer, 1, 1, {0} }, { LuaGetProp, "FontBold", wxLua_wxHtmlWinParser_GetFontBold, 0, 0, {0} }, { LuaSetProp, "FontBold", wxLua_wxHtmlWinParser_SetFontBold, 1, 1, {0} }, { LuaGetProp, "FontFace", wxLua_wxHtmlWinParser_GetFontFace, 0, 0, {0} }, { LuaSetProp, "FontFace", wxLua_wxHtmlWinParser_SetFontFace, 1, 1, {0} }, { LuaGetProp, "FontFixed", wxLua_wxHtmlWinParser_GetFontFixed, 0, 0, {0} }, { LuaSetProp, "FontFixed", wxLua_wxHtmlWinParser_SetFontFixed, 1, 1, {0} }, { LuaGetProp, "FontItalic", wxLua_wxHtmlWinParser_GetFontItalic, 0, 0, {0} }, { LuaSetProp, "FontItalic", wxLua_wxHtmlWinParser_SetFontItalic, 1, 1, {0} }, { LuaGetProp, "FontSize", wxLua_wxHtmlWinParser_GetFontSize, 0, 0, {0} }, { LuaSetProp, "FontSize", wxLua_wxHtmlWinParser_SetFontSize, 1, 1, {0} }, { LuaGetProp, "FontUnderlined", wxLua_wxHtmlWinParser_GetFontUnderlined, 0, 0, {0} }, { LuaSetProp, "FontUnderlined", wxLua_wxHtmlWinParser_SetFontUnderlined, 1, 1, {0} }, { LuaGetProp, "Link", wxLua_wxHtmlWinParser_GetLink, 0, 0, {0} }, { LuaSetProp, "Link", wxLua_wxHtmlWinParser_SetLink, 1, 1, {0} }, *************** *** 2365,2369 **** } ! // void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true) static int LUACALL wxLua_wxHtmlDCRenderer_SetHtmlText(lua_State *L) { --- 2493,2497 ---- } ! // void SetHtmlText(const wxString& html, const wxString& basepath = "", bool isdir = true) static int LUACALL wxLua_wxHtmlDCRenderer_SetHtmlText(lua_State *L) { *************** *** 2373,2377 **** // bool isdir = true bool isdir = (argCount >= 4 ? wxlState.GetBooleanType(4) : true); ! // const wxString basepath = wxEmptyString const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString html --- 2501,2505 ---- // bool isdir = true bool isdir = (argCount >= 4 ? wxlState.GetBooleanType(4) : true); ! // const wxString basepath = "" const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString html *************** *** 2577,2581 **** } ! // bool PreviewText(const wxString& htmltext, const wxString& basepath = wxEmptyString) static int LUACALL wxLua_wxHtmlEasyPrinting_PreviewText(lua_State *L) { --- 2705,2709 ---- } ! // bool PreviewText(const wxString& htmltext, const wxString& basepath = "") static int LUACALL wxLua_wxHtmlEasyPrinting_PreviewText(lua_State *L) { *************** *** 2584,2588 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString basepath = wxEmptyString const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString htmltext --- 2712,2716 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxString basepath = "" const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString htmltext *************** *** 2615,2619 **** } ! // bool PrintText(const wxString& htmltext, const wxString& basepath = wxEmptyString) static int LUACALL wxLua_wxHtmlEasyPrinting_PrintText(lua_State *L) { --- 2743,2747 ---- } ! // bool PrintText(const wxString& htmltext, const wxString& basepath = "") static int LUACALL wxLua_wxHtmlEasyPrinting_PrintText(lua_State *L) { *************** *** 2622,2626 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString basepath = wxEmptyString const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString htmltext --- 2750,2754 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxString basepath = "" const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString htmltext *************** *** 2648,2651 **** --- 2776,2815 ---- } + // void SetHeader(const wxString& header, int pg = wxPAGE_ALL) + static int LUACALL wxLua_wxHtmlEasyPrinting_SetHeader(lua_State *L) + { + wxLuaState wxlState(L); + // get number of arguments + int argCount = lua_gettop(L); + // int pg = wxPAGE_ALL + int pg = (argCount >= 3 ? (int)wxlState.GetNumberType(3) : wxPAGE_ALL); + // const wxString header + const wxString header = lua2wx(wxlState.GetStringType(2)); + // get this + wxHtmlEasyPrinting * self = (wxHtmlEasyPrinting *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlEasyPrinting); + // call SetHeader + self->SetHeader(header, pg); + + return 0; + } + + // void SetFooter(const wxString& footer, int pg = wxPAGE_ALL) + static int LUACALL wxLua_wxHtmlEasyPrinting_SetFooter(lua_State *L) + { + wxLuaState wxlState(L); + // get number of arguments + int argCount = lua_gettop(L); + // int pg = wxPAGE_ALL + int pg = (argCount >= 3 ? (int)wxlState.GetNumberType(3) : wxPAGE_ALL); + // const wxString footer + const wxString footer = lua2wx(wxlState.GetStringType(2)); + // get this + wxHtmlEasyPrinting * self = (wxHtmlEasyPrinting *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlEasyPrinting); + // call SetFooter + self->SetFooter(footer, pg); + + return 0; + } + static int LUACALL wxLua_wxHtmlEasyPrinting_destructor(lua_State *L) { *************** *** 2692,2697 **** #if (wxLUA_USE_wxPrint) && (wxLUA_USE_wxHTML) { LuaMethod, "GetPrintData", wxLua_wxHtmlEasyPrinting_GetPrintData, 0, 0, { 0 } }, - { LuaGetProp, "PrintData", wxLua_wxHtmlEasyPrinting_GetPrintData, 0, 0, {0} }, { LuaMethod, "GetPageSetupData", wxLua_wxHtmlEasyPrinting_GetPageSetupData, 0, 0, { 0 } }, { LuaGetProp, "PageSetupData", wxLua_wxHtmlEasyPrinting_GetPageSetupData, 0, 0, {0} }, #endif --- 2856,2861 ---- #if (wxLUA_USE_wxPrint) && (wxLUA_USE_wxHTML) { LuaMethod, "GetPrintData", wxLua_wxHtmlEasyPrinting_GetPrintData, 0, 0, { 0 } }, { LuaMethod, "GetPageSetupData", wxLua_wxHtmlEasyPrinting_GetPageSetupData, 0, 0, { 0 } }, + { LuaGetProp, "PrintData", wxLua_wxHtmlEasyPrinting_GetPrintData, 0, 0, {0} }, { LuaGetProp, "PageSetupData", wxLua_wxHtmlEasyPrinting_GetPageSetupData, 0, 0, {0} }, #endif *************** *** 2702,2705 **** --- 2866,2871 ---- { LuaMethod, "PrintText", wxLua_wxHtmlEasyPrinting_PrintText, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, { LuaMethod, "PageSetup", wxLua_wxHtmlEasyPrinting_PageSetup, 0, 0, { 0 } }, + { LuaMethod, "SetHeader", wxLua_wxHtmlEasyPrinting_SetHeader, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFooter", wxLua_wxHtmlEasyPrinting_SetFooter, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, { LuaDelete, "wxHtmlEasyPrinting", wxLua_wxHtmlEasyPrinting_destructor, 0, 0, {0} }, { LuaMethod, "Delete", wxLua_wxHtmlEasyPrinting_Delete, 0, 0, {0} }, *************** *** 2787,2791 **** } ! // void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true) static int LUACALL wxLua_wxHtmlPrintout_SetHtmlText(lua_State *L) { --- 2953,2957 ---- } ! // void SetHtmlText(const wxString& html, const wxString& basepath = "", bool isdir = true) static int LUACALL wxLua_wxHtmlPrintout_SetHtmlText(lua_State *L) { *************** *** 2795,2799 **** // bool isdir = true bool isdir = (argCount >= 4 ? wxlState.GetBooleanType(4) : true); ! // const wxString basepath = wxEmptyString const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString html --- 2961,2965 ---- // bool isdir = true bool isdir = (argCount >= 4 ? wxlState.GetBooleanType(4) : true); ! // const wxString basepath = "" const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString html Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wx_bind.cpp 4 May 2006 05:07:03 -0000 1.32 --- wx_bind.cpp 5 May 2006 22:02:44 -0000 1.33 *************** *** 995,998 **** --- 995,1001 ---- { "wxHTML_ALIGN_RIGHT", wxHTML_ALIGN_RIGHT }, { "wxHTML_ALIGN_TOP", wxHTML_ALIGN_TOP }, + { "wxHTML_COND_ISANCHOR", wxHTML_COND_ISANCHOR }, + { "wxHTML_COND_ISIMAGEMAP", wxHTML_COND_ISIMAGEMAP }, + { "wxHTML_COND_USER", wxHTML_COND_USER }, { "wxHTML_INDENT_ALL", wxHTML_INDENT_ALL }, { "wxHTML_INDENT_BOTTOM", wxHTML_INDENT_BOTTOM }, |
From: John L. <jr...@us...> - 2006-05-05 22:02:49
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20108/wxLua/bindings/wxwidgets Modified Files: html.i override.hpp Log Message: update html.i to 2.6.3 Index: html.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/html.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** html.i 1 May 2006 19:36:30 -0000 1.6 --- html.i 5 May 2006 22:02:44 -0000 1.7 *************** *** 15,29 **** %include "wx/html/htmlcell.h" %class wxHtmlCell wxHtmlCell() ! virtual bool AdjustPagebreak(int * pagebreak) ! // these two have changed in wxWin 2.5 ! //virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) ! //virtual void DrawInvisible(wxDC& dc, int x, int y) virtual const wxHtmlCell* Find(int condition, void *param = 0) int GetDescent() const ! %property=Descent, read int GetHeight() const - %property=Height, read %wxchkver23 virtual wxString GetId() const virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const --- 15,34 ---- %include "wx/html/htmlcell.h" + %define wxHTML_COND_ISANCHOR + %define wxHTML_COND_ISIMAGEMAP + %define wxHTML_COND_USER + %class wxHtmlCell wxHtmlCell() ! ! // %override [bool, int pagebreak] wxHtmlCell::AdjustPagebreak(int pagebreak) ! virtual bool AdjustPagebreak(int pagebreak) // (int* pagebreak) ! //virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info) ! //virtual void DrawInvisible(wxDC& dc, int x, int y, wxHtmlRenderingInfo& info) ! // %override wxHtmlCell* Find(int condition, [none, string, or int]) virtual const wxHtmlCell* Find(int condition, void *param = 0) int GetDescent() const ! wxHtmlCell* GetFirstChild() int GetHeight() const %wxchkver23 virtual wxString GetId() const virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const *************** *** 31,49 **** wxHtmlContainerCell* GetParent() const int GetPosX() const - %property=PosX, read int GetPosY() const - %property=PosY, read int GetWidth() const - %property=Width, read virtual void Layout(int w) ! //virtual void OnMouseClick(wxWindow* parent, intx, int y, const wxMouseEvent& event) %wxchkver23 void SetId(const wxString& id) - %wxchkver23 %property=Id, read, write void SetLink(const wxHtmlLinkInfo& link) void SetNext(wxHtmlCell *cell) - %property=Next, read, write void SetParent(wxHtmlContainerCell *p) - %property=Parent, read, write void SetPos(int x, int y) %endclass --- 36,57 ---- wxHtmlContainerCell* GetParent() const int GetPosX() const int GetPosY() const int GetWidth() const virtual void Layout(int w) ! //virtual void OnMouseClick(wxWindow* parent, int x, int y, const wxMouseEvent& event) %wxchkver23 void SetId(const wxString& id) void SetLink(const wxHtmlLinkInfo& link) void SetNext(wxHtmlCell *cell) void SetParent(wxHtmlContainerCell *p) void SetPos(int x, int y) + + %property=Descent, read + %property=Height, read + %wxchkver23 %property=Id, read, write + %property=Next, read, write + %property=Parent, read, write + %property=PosX, read + %property=PosY, read + %property=Width, read %endclass *************** *** 61,72 **** %class %noclassinfo wxHtmlLinkInfo ! wxHtmlLinkInfo(const wxString& href, const wxString& target = wxEmptyString) const wxMouseEvent * GetEvent() - %property=Event, read const wxHtmlCell * GetHtmlCell() - %property=HtmlCell, read wxString GetHref() - %property=Href, read wxString GetTarget() %property=Target, read %endclass --- 69,82 ---- %class %noclassinfo wxHtmlLinkInfo ! wxHtmlLinkInfo(const wxString& href, const wxString& target = "") ! const wxMouseEvent * GetEvent() const wxHtmlCell * GetHtmlCell() wxString GetHref() wxString GetTarget() + + %property=Event, read + %property=Href, read + %property=HtmlCell, read %property=Target, read %endclass *************** *** 79,98 **** %class wxHtmlTag //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache) const wxString GetAllParams() const int GetBeginPos() const - %property=BeginPos, read int GetEndPos1() const - %property=EndPos1, read int GetEndPos2() const - %property=EndPos2, read wxString GetName() const - %property=Name, read wxString GetParam(const wxString& par, bool with_commas = false) const bool HasEnding() const bool HasParam(const wxString& par) const //bool IsEnding() const //wxString ScanParam(const wxString& par, const wxString &format, void *value) const ! %wxchkver23 bool GetParamAsColour(const wxString& par, wxColour *clr) const ! %wxchkver23 bool GetParamAsInt(const wxString& par, int *value) const %endclass --- 89,112 ---- %class wxHtmlTag //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache) + const wxString GetAllParams() const int GetBeginPos() const int GetEndPos1() const int GetEndPos2() const wxString GetName() const wxString GetParam(const wxString& par, bool with_commas = false) const + // %override [bool, wxColour] wxHtmlTag::GetParamAsColour(const wxString& par) const + bool GetParamAsColour(const wxString& par, wxColour *clr) const + // %override [bool, int value] wxHtmlTag::GetParamAsInt(const wxString& par) const + bool GetParamAsInt(const wxString& par, int *value) const bool HasEnding() const bool HasParam(const wxString& par) const //bool IsEnding() const //wxString ScanParam(const wxString& par, const wxString &format, void *value) const ! ! %property=BeginPos, read ! %property=EndPos1, read ! %property=EndPos2, read ! %property=Name, read %endclass *************** *** 121,137 **** %class %noclassinfo wxHtmlContainerCell, wxHtmlCell wxHtmlContainerCell(wxHtmlContainerCell *parent) int GetAlignHor() const int GetAlignVer() const ! %wxchkver25 wxHtmlCell* GetFirstChild() ! %wxchkver22&!%wxchkver25|%wxcompat24 wxHtmlCell* GetFirstCell() ! %wxchkver22&!%wxchkver25|%wxcompat24 %property=FirstCell, read int GetIndent(int ind) const int GetIndentUnits(int ind) const void InsertCell(wxHtmlCell *cell) void SetAlign(const wxHtmlTag& tag) ! void SetAlignHor(int align) ! %property=AlignHor, read, write ! void SetAlignVer(int align) ! %property=AlignVer, read, write void SetBackgroundColour(const wxColour& clr) void SetBorder(const wxColour& clr1, const wxColour& clr2) --- 135,148 ---- %class %noclassinfo wxHtmlContainerCell, wxHtmlCell wxHtmlContainerCell(wxHtmlContainerCell *parent) + int GetAlignHor() const int GetAlignVer() const ! wxColour GetBackgroundColour() int GetIndent(int ind) const int GetIndentUnits(int ind) const void InsertCell(wxHtmlCell *cell) void SetAlign(const wxHtmlTag& tag) ! void SetAlignHor(int al) ! void SetAlignVer(int al) void SetBackgroundColour(const wxColour& clr) void SetBorder(const wxColour& clr1, const wxColour& clr2) *************** *** 140,143 **** --- 151,161 ---- void SetWidthFloat(int w, int units) %rename SetWidthFloatFromTag void SetWidthFloat(const wxHtmlTag& tag, double pixel_scale = 1.0) + + %wxchkver25 wxHtmlCell* GetFirstChild() + %wxchkver22&!%wxchkver25 wxHtmlCell* GetFirstCell() + + %property=AlignHor, read, write + %property=AlignVer, read, write + %wxchkver22&!%wxchkver25 %property=FirstCell, read %endclass *************** *** 151,167 **** %class wxHtmlWindow, wxScrolledWindow ! wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "htmlWindow") //static void AddFilter(wxHtmlFilter *filter) %wxchkver23 bool AppendToPage(const wxString& source) wxHtmlContainerCell* GetInternalRepresentation() const - %property=InternalRepresentation, read wxString GetOpenedAnchor() - %property=OpenedAnchor, read wxString GetOpenedPage() - %property=OpenedPage, read wxString GetOpenedPageTitle() - %property=OpenedPageTitle, read wxFrame* GetRelatedFrame() const - %property=RelatedFrame, read %wxchkver23 bool HistoryBack() %wxchkver23 bool HistoryCanBack() --- 169,181 ---- %class wxHtmlWindow, wxScrolledWindow ! wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "wxHtmlWindow") ! //static void AddFilter(wxHtmlFilter *filter) %wxchkver23 bool AppendToPage(const wxString& source) wxHtmlContainerCell* GetInternalRepresentation() const wxString GetOpenedAnchor() wxString GetOpenedPage() wxString GetOpenedPageTitle() wxFrame* GetRelatedFrame() const %wxchkver23 bool HistoryBack() %wxchkver23 bool HistoryCanBack() *************** *** 169,180 **** --- 183,208 ---- %wxchkver23 void HistoryClear() %wxchkver23 bool HistoryForward() + virtual bool LoadFile(const wxFileName& filename) bool LoadPage(const wxString& location) void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString) + void SelectAll() + wxString SelectionToText() + void SelectLine(const wxPoint& pos) + void SelectWord(const wxPoint& pos) void SetBorders(int b) + // %override void SetFonts(wxString normal_face, wxString fixed_face, {lua int table}) void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) bool SetPage(const wxString& source) void SetRelatedFrame(wxFrame* frame, const wxString& format) void SetRelatedStatusBar(int bar) + wxString ToText() void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString) + + %property=InternalRepresentation, read + %property=OpenedAnchor, read + %property=OpenedPage, read + %property=OpenedPageTitle, read + %property=RelatedFrame, read + %endclass *************** *** 182,195 **** // wxHtmlParser %class wxHtmlParser //wxHtmlParser() //void AddTag(const wxHtmlTag& tag) //void AddTagHandler(wxHtmlTagHandler *handler) ! //void AddWord(const wxString &txt) void DoParsing(int begin_pos, int end_pos) %rename DoParsingWhole void DoParsing() virtual void DoneParser() //wxString* GetSource() void InitParser(const wxString& source) %endclass --- 210,237 ---- // wxHtmlParser + //%enum wxHtmlURLType + // wxHTML_URL_PAGE + // wxHTML_URL_IMAGE + // wxHTML_URL_OTHER + //%endenum + %class wxHtmlParser //wxHtmlParser() + //void AddTag(const wxHtmlTag& tag) //void AddTagHandler(wxHtmlTagHandler *handler) ! //void AddWord(const wxString &txt) - not in 2.6? void DoParsing(int begin_pos, int end_pos) %rename DoParsingWhole void DoParsing() virtual void DoneParser() + //virtual wxObject* GetProduct() //wxString* GetSource() void InitParser(const wxString& source) + //virtual wxFSFile* OpenURL(wxHtmlURLType type, const wxString& url) + //wxObject* Parse(const wxString& source) + //void PushTagHandler(wxHtmlTagHandler* handler, wxString tags) + //void PopTagHandler() + //void SetFS(wxFileSystem *fs) + //void StopParsing() %endclass *************** *** 199,202 **** --- 241,245 ---- %class wxHtmlWinParser, wxHtmlParser wxHtmlWinParser(wxHtmlWindow *wnd) + wxHtmlContainerCell* CloseContainer() wxFont* CreateCurrentFont() *************** *** 207,210 **** --- 250,254 ---- wxHtmlContainerCell* GetContainer() const wxDC* GetDC() + //wxEncodingConverter * GetEncodingConverter() const int GetFontBold() const wxString GetFontFace() const *************** *** 213,246 **** int GetFontSize() const int GetFontUnderlined() const const wxHtmlLinkInfo& GetLink() const wxColour GetLinkColor() const wxWindow* GetWindow() - %property=Window, read wxHtmlContainerCell* OpenContainer() void SetActualColor(const wxColour& clr) - %property=ActualColor, read, write void SetAlign(int a) - %property=Align, read, write wxHtmlContainerCell* SetContainer(wxHtmlContainerCell *c) - %property=Container, read, write void SetDC(wxDC *dc, double pixel_scale = 1.0) - %property=DC, read, write void SetFontBold(int x) - %property=FontBold, read, write void SetFontFace(const wxString& face) - %property=FontFace, read, write void SetFontFixed(int x) - %property=FontFixed, read, write void SetFontItalic(int x) - %property=FontItalic, read, write void SetFontSize(int s) - %property=FontSize, read, write void SetFontUnderlined(int x) ! %property=FontUnderlined, read, write void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) void SetLink(const wxHtmlLinkInfo& link) - %property=Link, read, write void SetLinkColor(const wxColour& clr) %property=LinkColor, read, write %endclass --- 257,295 ---- int GetFontSize() const int GetFontUnderlined() const + //wxFontEncoding GetInputEncoding() const const wxHtmlLinkInfo& GetLink() const wxColour GetLinkColor() const + //wxFontEncoding GetOutputEncoding() const wxWindow* GetWindow() wxHtmlContainerCell* OpenContainer() void SetActualColor(const wxColour& clr) void SetAlign(int a) wxHtmlContainerCell* SetContainer(wxHtmlContainerCell *c) void SetDC(wxDC *dc, double pixel_scale = 1.0) void SetFontBold(int x) void SetFontFace(const wxString& face) void SetFontFixed(int x) void SetFontItalic(int x) void SetFontSize(int s) void SetFontUnderlined(int x) ! // %override void SetFonts(wxString normal_face, wxString fixed_face, {lua int table}) void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) void SetLink(const wxHtmlLinkInfo& link) void SetLinkColor(const wxColour& clr) + + %property=Window, read + %property=ActualColor, read, write + %property=Align, read, write + %property=Container, read, write + %property=DC, read, write + %property=FontBold, read, write + %property=FontFace, read, write + %property=FontFixed, read, write + %property=FontItalic, read, write + %property=FontSize, read, write + %property=FontUnderlined, read, write + %property=Link, read, write %property=LinkColor, read, write + %endclass *************** *** 252,260 **** %class %delete %noclassinfo wxHtmlDCRenderer, wxObject wxHtmlDCRenderer() void SetDC(wxDC* dc, double pixel_scale = 1.0) void SetSize(int width, int height) ! void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true) int Render(int x, int y, int from = 0, int dont_render = false) int GetTotalHeight() %property=TotalHeight, read %endclass --- 301,312 ---- %class %delete %noclassinfo wxHtmlDCRenderer, wxObject wxHtmlDCRenderer() + void SetDC(wxDC* dc, double pixel_scale = 1.0) + //void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL) void SetSize(int width, int height) ! void SetHtmlText(const wxString& html, const wxString& basepath = "", bool isdir = true) int Render(int x, int y, int from = 0, int dont_render = false) int GetTotalHeight() + %property=TotalHeight, read %endclass *************** *** 267,279 **** %class %delete %noclassinfo wxHtmlEasyPrinting, wxObject wxHtmlEasyPrinting(const wxString& name = "Printing", wxFrame* parent_frame = NULL) bool PreviewFile(const wxString& htmlfile) ! bool PreviewText(const wxString& htmltext, const wxString& basepath = wxEmptyString) bool PrintFile(const wxString& htmlfile) ! bool PrintText(const wxString& htmltext, const wxString& basepath = wxEmptyString) %wxchkver24&!%wxchkver25 void PrinterSetup() void PageSetup() wxPrintData* GetPrintData() - %property=PrintData, read wxPageSetupDialogData* GetPageSetupData() %property=PageSetupData, read %endclass --- 319,336 ---- %class %delete %noclassinfo wxHtmlEasyPrinting, wxObject wxHtmlEasyPrinting(const wxString& name = "Printing", wxFrame* parent_frame = NULL) + bool PreviewFile(const wxString& htmlfile) ! bool PreviewText(const wxString& htmltext, const wxString& basepath = "") bool PrintFile(const wxString& htmlfile) ! bool PrintText(const wxString& htmltext, const wxString& basepath = "") %wxchkver24&!%wxchkver25 void PrinterSetup() void PageSetup() + //void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL) + void SetHeader(const wxString& header, int pg = wxPAGE_ALL) + void SetFooter(const wxString& footer, int pg = wxPAGE_ALL) wxPrintData* GetPrintData() wxPageSetupDialogData* GetPageSetupData() + + %property=PrintData, read %property=PageSetupData, read %endclass *************** *** 286,293 **** %class %noclassinfo wxHtmlPrintout, wxPrintout wxHtmlPrintout(const wxString& title = "Printout") void SetFooter(const wxString& footer, int pg = wxPAGE_ALL) void SetHeader(const wxString& header, int pg = wxPAGE_ALL) void SetHtmlFile(const wxString& htmlfile) ! void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true) void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2, float spaces = 5) %endclass --- 343,352 ---- %class %noclassinfo wxHtmlPrintout, wxPrintout wxHtmlPrintout(const wxString& title = "Printout") + + //void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL) void SetFooter(const wxString& footer, int pg = wxPAGE_ALL) void SetHeader(const wxString& header, int pg = wxPAGE_ALL) void SetHtmlFile(const wxString& htmlfile) ! void SetHtmlText(const wxString& html, const wxString& basepath = "", bool isdir = true) void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2, float spaces = 5) %endclass Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** override.hpp 2 May 2006 05:25:01 -0000 1.34 --- override.hpp 5 May 2006 22:02:44 -0000 1.35 *************** *** 2582,2588 **** // ---------------------------------------------------------------------------- ! %override wxLua_wxHtmlWindow_SetFonts // void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) ! static int LUACALL wxLua_wxHtmlWindow_SetFonts(lua_State *L) { wxLuaState wxlState(L); --- 2582,2696 ---- // ---------------------------------------------------------------------------- ! %override wxLua_wxHtmlCell_AdjustPagebreak ! // virtual bool AdjustPagebreak(int * pagebreak) ! static int LUACALL wxLua_wxHtmlCell_AdjustPagebreak(lua_State *L) ! { ! wxLuaState wxlState(L); ! bool returns; ! // int * pagebreak ! int pagebreak = (int)wxlState.GetNumberType(2); ! // get this ! wxHtmlCell *self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); ! // call AdjustPagebreak ! returns = self->AdjustPagebreak(&pagebreak); ! // push the result number ! lua_pushboolean(L, returns); ! // ! lua_pushnumber(L, pagebreak); ! // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlCell_Find ! // virtual const wxHtmlCell* Find(int condition, void *param = 0) ! static int LUACALL wxLua_wxHtmlCell_Find(lua_State *L) ! { ! wxLuaState wxlState(L); ! const wxHtmlCell *returns = NULL; ! // int condition ! int condition = (int)wxlState.GetNumberType(2); ! // get this ! wxHtmlCell *self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); ! // call Find ! switch(lua_type(L, 3)) ! { ! case LUA_TNIL: ! returns = self->Find(condition, NULL); ! break; ! ! case LUA_TSTRING: ! { ! wxString param = lua2wx(wxlState.GetStringType(3)); ! returns = self->Find(condition, ¶m); ! } ! break; ! ! case LUA_TNUMBER: ! { ! int param = (int)wxlState.GetNumberType(3); ! returns = self->Find(condition, ¶m); ! } ! break; ! ! default: ! wxlState.terror("wxLua: Expected simple type for parameter 3."); ! break; ! } ! ! // push the result datatype ! wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); ! // return the number of parameters ! return 1; ! } ! %end ! ! %override wxLua_wxHtmlTag_GetParamAsColour ! // %alias GetParamAsColor bool GetParamAsColour(const wxString& par, wxColour *clr) const ! static int LUACALL wxLua_wxHtmlTag_GetParamAsColour(lua_State *L) ! { ! wxLuaState wxlState(L); ! bool returns; ! wxColour *retColour = new wxColour; ! // const wxString& par ! wxString par = lua2wx(wxlState.GetStringType(2)); ! // get this ! wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); ! // call GetParamAsColour ! returns = self->GetParamAsColour(par, retColour); ! // ! // push the result number ! lua_pushboolean(L, returns); ! wxlState.PushUserDataType(s_wxluatag_wxColour, retColour); ! // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlTag_GetParamAsInt ! // bool GetParamAsInt(const wxString& par, int *value) const ! static int LUACALL wxLua_wxHtmlTag_GetParamAsInt(lua_State *L) ! { ! wxLuaState wxlState(L); ! bool returns; ! int value; ! // const wxString& par ! wxString par = lua2wx(wxlState.GetStringType(2)); ! // get this ! wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); ! // call GetParamAsInt ! returns = self->GetParamAsInt(par, &value); ! // push the result number ! lua_pushboolean(L, returns); ! // ! lua_pushnumber(L, value); ! // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlWinParser_SetFonts // void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) ! static int LUACALL wxLua_wxHtmlWinParser_SetFonts(lua_State *L) { wxLuaState wxlState(L); *************** *** 2630,2637 **** wxString normal_face = lua2wx(wxlState.GetStringType(2)); // get this ! wxHtmlWindow *self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); // call SetFonts self->SetFonts(normal_face, fixed_face, sizes); - // return the number of parameters return 0; --- 2738,2744 ---- wxString normal_face = lua2wx(wxlState.GetStringType(2)); // get this ! wxHtmlWinParser *self = (wxHtmlWinParser *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWinParser); // call SetFonts self->SetFonts(normal_face, fixed_face, sizes); // return the number of parameters return 0; *************** *** 2639,2645 **** %end ! %override wxLua_wxHtmlWinParser_SetFonts // void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) ! static int LUACALL wxLua_wxHtmlWinParser_SetFonts(lua_State *L) { wxLuaState wxlState(L); --- 2746,2752 ---- %end ! %override wxLua_wxHtmlWindow_SetFonts // void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) ! static int LUACALL wxLua_wxHtmlWindow_SetFonts(lua_State *L) { wxLuaState wxlState(L); *************** *** 2687,2803 **** wxString normal_face = lua2wx(wxlState.GetStringType(2)); // get this ! wxHtmlWinParser *self = (wxHtmlWinParser *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWinParser); // call SetFonts self->SetFonts(normal_face, fixed_face, sizes); - // return the number of parameters - return 0; - } - %end - - %override wxLua_wxHtmlTag_GetParamAsColour - // %alias GetParamAsColor bool GetParamAsColour(const wxString& par, wxColour *clr) const - static int LUACALL wxLua_wxHtmlTag_GetParamAsColour(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - wxColour *retColour = new wxColour; - // const wxString& par - wxString par = lua2wx(wxlState.GetStringType(2)); - // get this - wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); - // call GetParamAsColour - returns = self->GetParamAsColour(par, retColour); - // - // push the result number - lua_pushboolean(L, returns); - wxlState.PushUserDataType(s_wxluatag_wxColour, retColour); - // return the number of parameters - return 2; - } - %end - %override wxLua_wxHtmlTag_GetParamAsInt - // bool GetParamAsInt(const wxString& par, int *value) const - static int LUACALL wxLua_wxHtmlTag_GetParamAsInt(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - int value; - // const wxString& par - wxString par = lua2wx(wxlState.GetStringType(2)); - // get this - wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); - // call GetParamAsInt - returns = self->GetParamAsInt(par, &value); - // push the result number - lua_pushboolean(L, returns); - // - lua_pushnumber(L, value); // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlCell_AdjustPagebreak ! // virtual bool AdjustPagebreak(int * pagebreak) ! static int LUACALL wxLua_wxHtmlCell_AdjustPagebreak(lua_State *L) ! { ! wxLuaState wxlState(L); ! bool returns; ! // int * pagebreak ! int pagebreak = (int)wxlState.GetNumberType(2); ! // get this ! wxHtmlCell *self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); ! // call AdjustPagebreak ! returns = self->AdjustPagebreak(&pagebreak); ! // push the result number ! lua_pushboolean(L, returns); ! // ! lua_pushnumber(L, pagebreak); ! // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlCell_Find ! // virtual const wxHtmlCell* Find(int condition, void *param = 0) ! static int LUACALL wxLua_wxHtmlCell_Find(lua_State *L) ! { ! wxLuaState wxlState(L); ! const wxHtmlCell *returns = NULL; ! // int condition ! int condition = (int)wxlState.GetNumberType(2); ! // get this ! wxHtmlCell *self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); ! // call Find ! switch(lua_type(L, 3)) ! { ! case LUA_TNIL: ! returns = self->Find(condition, NULL); ! break; ! ! case LUA_TSTRING: ! { ! wxString param = lua2wx(wxlState.GetStringType(3)); ! returns = self->Find(condition, ¶m); ! } ! break; ! ! case LUA_TNUMBER: ! { ! int param = (int)wxlState.GetNumberType(3); ! returns = self->Find(condition, ¶m); ! } ! break; ! ! default: ! wxlState.terror("wxLua: Expected simple type for parameter 3."); ! break; ! } ! ! // push the result datatype ! wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); ! // return the number of parameters ! return 1; } %end --- 2794,2803 ---- wxString normal_face = lua2wx(wxlState.GetStringType(2)); // get this ! wxHtmlWindow *self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); // call SetFonts self->SetFonts(normal_face, fixed_face, sizes); // return the number of parameters ! return 0; } %end |
From: John L. <jr...@us...> - 2006-05-04 05:07:10
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19877/wxLua/samples Modified Files: wxluasudoku.wx.lua Log Message: fix static wxClipboard::Get in clipdrag.i cleanup in interal.cpp add more pages to prefs dialog in wxluasudoku Index: wxluasudoku.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/wxluasudoku.wx.lua,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** wxluasudoku.wx.lua 2 May 2006 05:25:06 -0000 1.41 --- wxluasudoku.wx.lua 4 May 2006 05:07:04 -0000 1.42 *************** *** 23,26 **** --- 23,27 ---- function iff(cond, A, B) if cond then return A else return B end end + -- make the number or bool into a bool or number function makebool(n) if n == 0 then return false else return true end end function makeint(n) if n == false then return 0 else return 1 end end *************** *** 43,47 **** end - -- Set a value in the table or subtable, first making sure that the subtables -- are created first. --- 44,47 ---- *************** *** 99,103 **** -- ============================================================================ ! -- Make a deep copy of a table, including all sub tables function TableCopy(atable) local newtable = {} --- 99,103 ---- -- ============================================================================ ! -- Make a deep copy of a table, including all sub tables, fails on recursive tables function TableCopy(atable) local newtable = {} *************** *** 114,117 **** --- 114,118 ---- -- Merge the two tables together, adding or replacing values in original_table -- with those in new_table, returns a new table and doesn't modify inputs + -- fails on recursive tables function TableMerge(new_table, original_table) local out_table = TableCopy(original_table) *************** *** 143,147 **** sudoku.FILENAME = 7 -- store the filename from Open/Save functions ! sudoku.FLAG_MAX = 7 -- given the upper left cell of block you can iterate through the block using --- 144,149 ---- sudoku.FILENAME = 7 -- store the filename from Open/Save functions ! sudoku.ELIMINATE_FLAG_MIN = 1 -- for iterating the ELIMINATE flags ! sudoku.ELIMINATE_FLAG_MAX = 6 -- given the upper left cell of block you can iterate through the block using *************** *** 760,766 **** function sudoku.FindAllNakedHiddenGroups(find_all, sudokuTable) local flags = TableCopy(sudokuTable.flags) ! if find_all then -- turn all ELIMINATE_XXX on ! for n = 1, sudoku.FLAG_MAX do sudokuTable.flags[n] = true end --- 762,768 ---- function sudoku.FindAllNakedHiddenGroups(find_all, sudokuTable) local flags = TableCopy(sudokuTable.flags) ! if find_all == true then -- turn all ELIMINATE_XXX on ! for n = sudoku.ELIMINATE_FLAG_MIN, sudoku.ELIMINATE_FLAG_MAX do sudokuTable.flags[n] = true end *************** *** 771,775 **** local char0 = string.byte("0") ! if find_all then sudokuTable.flags = TableCopy(flags) -- put the flags back to how they were end --- 773,777 ---- local char0 = string.byte("0") ! if find_all == true then sudokuTable.flags = TableCopy(flags) -- put the flags back to how they were end *************** *** 891,901 **** -- values for the row to exclude these values function sudoku.RemovePossibleGroups(sudokuTable) ! if (sudokuTable.flags[sudoku.ELIMINATE_NAKED_PAIRS] ~= true) and ! (sudokuTable.flags[sudoku.ELIMINATE_HIDDEN_PAIRS] ~= true) and ! (sudokuTable.flags[sudoku.ELIMINATE_NAKED_TRIPLETS] ~= true) and ! (sudokuTable.flags[sudoku.ELIMINATE_HIDDEN_TRIPLETS] ~= true) and ! (sudokuTable.flags[sudoku.ELIMINATE_NAKED_QUADS] ~= true) and ! (sudokuTable.flags[sudoku.ELIMINATE_HIDDEN_QUADS] ~= true) then ! return sudokuTable end --- 893,906 ---- -- values for the row to exclude these values function sudoku.RemovePossibleGroups(sudokuTable) ! -- must have at least one flag set ! local has_elim_flags = false ! for n = sudoku.ELIMINATE_FLAG_MIN, sudoku.ELIMINATE_FLAG_MAX do ! if sudokuTable.flags[n] == true then ! has_elim_flags = true ! break ! end ! end ! if has_elim_flags == false then ! return sudokuTable end *************** *** 1688,1691 **** --- 1693,1697 ---- fontTable.width = 0 if not font_cache then font_cache = {} end + local increment = 4 while (fontTable.size < 1000) and ((fontTable.height < height) and (fontTable.width < width)) do *************** *** 1703,1707 **** end ! fontTable.size = fontTable.size + 1 end --- 1709,1722 ---- end ! if ((fontTable.height > height) or (fontTable.width > width)) then ! if increment > 1 then ! fontTable.height = 0 ! fontTable.width = 0 ! fontTable.size = fontTable.size - increment - 1 -- get next smaller size ! increment = 1 ! end ! end ! ! fontTable.size = fontTable.size + increment end *************** *** 2676,2685 **** -- "cheat" a little by using SolveScan to get easy to find values ! s.flags[sudoku.ELIMINATE_NAKED_PAIRS] = true ! s.flags[sudoku.ELIMINATE_HIDDEN_PAIRS] = true ! s.flags[sudoku.ELIMINATE_NAKED_TRIPLETS] = true ! s.flags[sudoku.ELIMINATE_HIDDEN_TRIPLETS] = true ! s.flags[sudoku.ELIMINATE_NAKED_QUADS] = true ! s.flags[sudoku.ELIMINATE_HIDDEN_QUADS] = true local s, count, changed_cells = sudoku.SolveScan(s) --- 2691,2697 ---- -- "cheat" a little by using SolveScan to get easy to find values ! for n = sudoku.ELIMINATE_FLAG_MIN, sudoku.ELIMINATE_FLAG_MAX do ! s.flags[n] = true ! end local s, count, changed_cells = sudoku.SolveScan(s) *************** *** 2731,2758 **** local sudokuTable = sudokuGUI.GetCurrentGrid() ! sudokuTable.flags[sudoku.ELIMINATE_NAKED_PAIRS] = ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_ELIMINATE_NAKEDPAIRS] ! sudokuTable.flags[sudoku.ELIMINATE_HIDDEN_PAIRS] = ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_ELIMINATE_HIDDENPAIRS] ! sudokuTable.flags[sudoku.ELIMINATE_NAKED_TRIPLETS] = ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_ELIMINATE_NAKEDTRIPLETS] ! sudokuTable.flags[sudoku.ELIMINATE_HIDDEN_TRIPLETS] = ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_ELIMINATE_HIDDENTRIPLETS] ! sudokuTable.flags[sudoku.ELIMINATE_NAKED_QUADS] = ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_ELIMINATE_NAKEDQUADS] ! sudokuTable.flags[sudoku.ELIMINATE_HIDDEN_QUADS] = ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_ELIMINATE_HIDDENQUADS] sudokuGUI.block_refresh = true sudokuTable = sudoku.UpdateTable(sudokuTable) ! if sudokuGUI.menuCheckIDs[sudokuGUI.ID_SHOW_NAKED] or ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_SHOW_HIDDEN] or ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_SHOW_NAKEDPAIRS] or ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_SHOW_HIDDENPAIRS] or ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_SHOW_NAKEDTRIPLETS] or ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_SHOW_HIDDENTRIPLETS] or ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_SHOW_NAKEDQUADS] or ! sudokuGUI.menuCheckIDs[sudokuGUI.ID_SHOW_HIDDENQUADS] then sudokuTable.nakedTable, sudokuTable.hiddenTable = sudoku.FindAllNakedHiddenGroups(true, sudokuTable) end --- 2743,2759 ---- local sudokuTable = sudokuGUI.GetCurrentGrid() ! local has_show_flag = false ! for n = sudoku.ELIMINATE_FLAG_MIN, sudoku.ELIMINATE_FLAG_MAX do ! local id = sudokuGUI.ID_ELIMINATE_NAKEDPAIRS + n - sudoku.ELIMINATE_FLAG_MIN ! sudokuTable.flags[n] = sudokuGUI.menuCheckIDs[id] ! ! local show_id = sudokuGUI.ID_SHOW_NAKEDPAIRS + n - sudoku.ELIMINATE_FLAG_MIN ! if sudokuGUI.menuCheckIDs[show_id] == true then has_show_flag = true end ! end sudokuGUI.block_refresh = true sudokuTable = sudoku.UpdateTable(sudokuTable) ! if has_show_flag == true then sudokuTable.nakedTable, sudokuTable.hiddenTable = sudoku.FindAllNakedHiddenGroups(true, sudokuTable) end *************** *** 2779,2786 **** end ! function sudokuGUI.PreferencesDialog() ! local dialog = wx.wxDialog(sudokuGUI.frame, wx.wxID_ANY, ! "wxLuaSudoku - Preferences") ! local panel = wx.wxPanel(dialog, wx.wxID_ANY) local ID_LISTBOX = 10 --- 2780,2787 ---- end ! sudokuGUI.PreferencesDialogPageUI = {} ! ! function sudokuGUI.PreferencesDialogPageUI.Create(parent) ! local panel = wx.wxPanel(parent, wx.wxID_ANY) local ID_LISTBOX = 10 *************** *** 2843,2856 **** -- Create the dialog ------------------------------------------------------ - local parent = panel local mainSizer = wx.wxBoxSizer( wx.wxVERTICAL ) - local fcStaticBox = wx.wxStaticBox( parent, wx.wxID_ANY, "Fonts and colors" ) - local fcStaticSizer = wx.wxStaticBoxSizer( fcStaticBox, wx.wxVERTICAL ) - local fcFlexSizer = wx.wxFlexGridSizer( 1, 2, 0, 0 ) fcFlexSizer:AddGrowableCol( 0 ) ! local fcListBox = wx.wxListBox( parent, ID_LISTBOX, wx.wxDefaultPosition, wx.wxSize(80,100), listStrings, wx.wxLB_SINGLE ) fcListBox:SetSelection(0) fcFlexSizer:AddWindow( fcListBox, 0, wx.wxGROW+wx.wxALIGN_CENTER_HORIZONTAL+wx.wxALL, 5 ) --- 2844,2854 ---- -- Create the dialog ------------------------------------------------------ local mainSizer = wx.wxBoxSizer( wx.wxVERTICAL ) local fcFlexSizer = wx.wxFlexGridSizer( 1, 2, 0, 0 ) fcFlexSizer:AddGrowableCol( 0 ) + fcFlexSizer:AddGrowableRow( 0 ) ! local fcListBox = wx.wxListBox( panel, ID_LISTBOX, wx.wxDefaultPosition, wx.wxSize(80,100), listStrings, wx.wxLB_SINGLE ) fcListBox:SetSelection(0) fcFlexSizer:AddWindow( fcListBox, 0, wx.wxGROW+wx.wxALIGN_CENTER_HORIZONTAL+wx.wxALL, 5 ) *************** *** 2858,2888 **** local fcBoxSizer = wx.wxBoxSizer( wx.wxVERTICAL ) ! --local fcSampleText = wx.wxStaticText( parent, ID_SAMPLE_TEXT, "Sample Text", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) ! --fcBoxSizer:AddWindow( fcSampleText, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ); ! local sampleWin = wx.wxWindow(parent, ID_SAMPLE_TEXT, wx.wxDefaultPosition, wx.wxSize(80,80)) fcBoxSizer:AddWindow( sampleWin, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ); ! local fontButton = wx.wxButton( parent, ID_FONT_BUTTON, "Choose Font", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) fcBoxSizer:AddWindow( fontButton, 0, wx.wxGROW+wx.wxALIGN_CENTER_VERTICAL+wx.wxALL, 5 ) ! local colourButton = wx.wxButton( parent, ID_COLOUR_BUTTON, "Choose Color", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) fcBoxSizer:AddWindow( colourButton, 0, wx.wxGROW+wx.wxALIGN_CENTER_VERTICAL+wx.wxALL, 5 ) fcFlexSizer:AddSizer( fcBoxSizer, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) - fcStaticSizer:AddSizer( fcFlexSizer, 0, wx.wxGROW+wx.wxALIGN_CENTER_VERTICAL, 5 ) - mainSizer:AddSizer( fcStaticSizer, 0, wx.wxGROW+wx.wxALIGN_CENTER_VERTICAL+wx.wxALL, 5 ) - - local buttonSizer = wx.wxBoxSizer( wx.wxHORIZONTAL ) - - local okButton = wx.wxButton( parent, wx.wxID_OK, "&OK", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) - buttonSizer:AddWindow( okButton, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) - local cancelButton = wx.wxButton( parent, wx.wxID_CANCEL, "&Cancel", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) - buttonSizer:AddWindow( cancelButton, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) - local applyButton = wx.wxButton( parent, wx.wxID_APPLY, "&Apply", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) - buttonSizer:AddWindow( applyButton, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) - - mainSizer:AddSizer( buttonSizer, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) ! parent:SetSizer( mainSizer ) ! mainSizer:SetSizeHints( dialog ) sampleWin:ConnectEvent(wx.wxEVT_PAINT, --- 2856,2871 ---- local fcBoxSizer = wx.wxBoxSizer( wx.wxVERTICAL ) ! local sampleWin = wx.wxWindow(panel, ID_SAMPLE_TEXT, wx.wxDefaultPosition, wx.wxSize(100,100)) fcBoxSizer:AddWindow( sampleWin, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ); ! local fontButton = wx.wxButton( panel, ID_FONT_BUTTON, "Choose Font", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) fcBoxSizer:AddWindow( fontButton, 0, wx.wxGROW+wx.wxALIGN_CENTER_VERTICAL+wx.wxALL, 5 ) ! local colourButton = wx.wxButton( panel, ID_COLOUR_BUTTON, "Choose Color", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) fcBoxSizer:AddWindow( colourButton, 0, wx.wxGROW+wx.wxALIGN_CENTER_VERTICAL+wx.wxALL, 5 ) fcFlexSizer:AddSizer( fcBoxSizer, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) ! mainSizer:AddSizer( fcFlexSizer, 1, wx.wxGROW+wx.wxALIGN_CENTER_VERTICAL, 5 ) ! panel:SetSizer( mainSizer ) sampleWin:ConnectEvent(wx.wxEVT_PAINT, *************** *** 2894,2898 **** local function SetFontSize(size, width, height, font) ! -- alternate way, but it fails for font; that can't scale large enough --local f = wx.wxNullFont:NewSize(wx.wxSize(width, height), font:GetFamily(), font:GetStyle(), font:GetWeight(), font:GetUnderlined(), font:GetFaceName()) --font:SetPointSize(f:GetPointSize()) --- 2877,2881 ---- local function SetFontSize(size, width, height, font) ! -- alternate way, but it fails for fonts that can't scale large enough --local f = wx.wxNullFont:NewSize(wx.wxSize(width, height), font:GetFamily(), font:GetStyle(), font:GetWeight(), font:GetUnderlined(), font:GetFaceName()) --font:SetPointSize(f:GetPointSize()) *************** *** 2978,2995 **** end) ! dialog:ConnectEvent(ID_LISTBOX, wx.wxEVT_COMMAND_LISTBOX_SELECTED, function (event) local sel = event:GetSelection() + 1 ! dialog:FindWindow(ID_FONT_BUTTON):Enable(listBoxValues[sel].font ~= nil) ! dialog:FindWindow(ID_COLOUR_BUTTON):Enable(listBoxValues[sel].colour ~= nil) colourButton:SetForegroundColour(listBoxValues[sel].colour) sampleWin:Refresh(false) end) ! dialog:ConnectEvent(ID_FONT_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 local f = listBoxValues[sel].font ! f = wx.wxGetFontFromUser(dialog, f) if f:Ok() then listBoxValues[sel].font = f --- 2961,2978 ---- end) ! panel:ConnectEvent(ID_LISTBOX, wx.wxEVT_COMMAND_LISTBOX_SELECTED, function (event) local sel = event:GetSelection() + 1 ! panel:FindWindow(ID_FONT_BUTTON):Enable(listBoxValues[sel].font ~= nil) ! panel:FindWindow(ID_COLOUR_BUTTON):Enable(listBoxValues[sel].colour ~= nil) colourButton:SetForegroundColour(listBoxValues[sel].colour) sampleWin:Refresh(false) end) ! panel:ConnectEvent(ID_FONT_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 local f = listBoxValues[sel].font ! f = wx.wxGetFontFromUser(panel, f) if f:Ok() then listBoxValues[sel].font = f *************** *** 2998,3006 **** sampleWin:Refresh(false) end) ! dialog:ConnectEvent(ID_COLOUR_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 local c = listBoxValues[sel].colour ! c = wx.wxGetColourFromUser(dialog, c) if c:Ok() then listBoxValues[sel].colour = c --- 2981,2989 ---- sampleWin:Refresh(false) end) ! panel:ConnectEvent(ID_COLOUR_BUTTON, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local sel = fcListBox:GetSelection() + 1 local c = listBoxValues[sel].colour ! c = wx.wxGetColourFromUser(panel, c) if c:Ok() then listBoxValues[sel].colour = c *************** *** 3010,3014 **** end) ! local function ApplyChanges() sudokuGUI.valueColour = listBoxValues[listBoxIdx.valueColour].colour sudokuGUI.initValueColour = listBoxValues[listBoxIdx.initValueColour].colour --- 2993,2997 ---- end) ! function sudokuGUI.PreferencesDialogPageUI.Apply() sudokuGUI.valueColour = listBoxValues[listBoxIdx.valueColour].colour sudokuGUI.initValueColour = listBoxValues[listBoxIdx.initValueColour].colour *************** *** 3035,3045 **** end dialog:ConnectEvent(wx.wxID_APPLY, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) ! ApplyChanges() end) dialog:ConnectEvent(wx.wxID_OK, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) ! ApplyChanges() event:Skip() end) --- 3018,3229 ---- end + return panel + end + + sudokuGUI.PreferencesDialogPageShow = {} + + function sudokuGUI.PreferencesDialogPageShow.Create(parent) + local panel = wx.wxPanel(parent, wx.wxID_ANY) + + local ID_LISTBOX = 10 + + local listStrings = + { + "All naked groups", + "All hidden groups", + "Naked pairs", + "Naked triplets", + "Naked quads", + "Hidden pairs", + "Hidden triplets", + "Hidden quads" + } + + local listBoxValues = + { + sudokuGUI.ID_SHOW_NAKED, + sudokuGUI.ID_SHOW_HIDDEN, + sudokuGUI.ID_SHOW_NAKEDPAIRS, + sudokuGUI.ID_SHOW_NAKEDTRIPLETS, + sudokuGUI.ID_SHOW_NAKEDQUADS, + sudokuGUI.ID_SHOW_HIDDENPAIRS, + sudokuGUI.ID_SHOW_HIDDENTRIPLETS, + sudokuGUI.ID_SHOW_HIDDENQUADS + } + + -- Create the dialog ------------------------------------------------------ + + local mainSizer = wx.wxBoxSizer( wx.wxVERTICAL ) + local showListBox = wx.wxCheckListBox( panel, ID_LISTBOX, wx.wxDefaultPosition, wx.wxSize(80,100), listStrings, wx.wxLB_SINGLE ) + mainSizer:AddWindow( showListBox, 1, wx.wxGROW+wx.wxALIGN_CENTER_HORIZONTAL+wx.wxALL, 5 ) + panel:SetSizer( mainSizer ) + + for n = 0, showListBox:GetCount()-1 do + showListBox:Check(n, sudokuGUI.menuCheckIDs[listBoxValues[n+1]]) + end + + local function CheckRange(n_start, n_end, check) + for n = n_start, n_end do + showListBox:Check(n, check) + end + end + local function RangeChecked(n_start, n_end) + for n = n_start, n_end do + if not showListBox:IsChecked(n) then return false end + end + return true + end + + panel:ConnectEvent(ID_LISTBOX, wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, + function (event) + local sel = event:GetSelection() + local checked = showListBox:IsChecked(sel) + local id = listBoxValues[sel+1] + if id == sudokuGUI.ID_SHOW_NAKED then + CheckRange(2, 4, checked) + elseif id == sudokuGUI.ID_SHOW_HIDDEN then + CheckRange(5, 7, checked) + else + showListBox:Check(0, RangeChecked(2, 4)) + showListBox:Check(1, RangeChecked(5, 7)) + end + end) + + function sudokuGUI.PreferencesDialogPageShow.Apply() + for n = 0, showListBox:GetCount()-1 do + sudokuGUI.menuCheckIDs[listBoxValues[n+1]] = showListBox:IsChecked(n) + end + sudokuGUI.UpdateTable() + end + + return panel + end + + sudokuGUI.PreferencesDialogPageSolve = {} + + function sudokuGUI.PreferencesDialogPageSolve.Create(parent) + local panel = wx.wxPanel(parent, wx.wxID_ANY) + + local ID_LISTBOX = 10 + + local listStrings = + { + "All naked groups", + "All hidden groups", + "Naked pairs", + "Naked triplets", + "Naked quads", + "Hidden pairs", + "Hidden triplets", + "Hidden quads" + } + + local listBoxValues = + { + sudokuGUI.ID_ELIMINATE_NAKED, + sudokuGUI.ID_ELIMINATE_HIDDEN, + sudokuGUI.ID_ELIMINATE_NAKEDPAIRS, + sudokuGUI.ID_ELIMINATE_NAKEDTRIPLETS, + sudokuGUI.ID_ELIMINATE_NAKEDQUADS, + sudokuGUI.ID_ELIMINATE_HIDDENPAIRS, + sudokuGUI.ID_ELIMINATE_HIDDENTRIPLETS, + sudokuGUI.ID_ELIMINATE_HIDDENQUADS + } + + -- Create the dialog ------------------------------------------------------ + + local mainSizer = wx.wxBoxSizer( wx.wxVERTICAL ) + local showListBox = wx.wxCheckListBox( panel, ID_LISTBOX, wx.wxDefaultPosition, wx.wxSize(80,100), listStrings, wx.wxLB_SINGLE ) + mainSizer:AddWindow( showListBox, 1, wx.wxGROW+wx.wxALIGN_CENTER_HORIZONTAL+wx.wxALL, 5 ) + panel:SetSizer( mainSizer ) + + for n = 0, showListBox:GetCount()-1 do + showListBox:Check(n, sudokuGUI.menuCheckIDs[listBoxValues[n+1]]) + end + + local function CheckRange(n_start, n_end, check) + for n = n_start, n_end do + showListBox:Check(n, check) + end + end + local function RangeChecked(n_start, n_end) + for n = n_start, n_end do + if not showListBox:IsChecked(n) then return false end + end + return true + end + + panel:ConnectEvent(ID_LISTBOX, wx.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, + function (event) + local sel = event:GetSelection() + local checked = showListBox:IsChecked(sel) + local id = listBoxValues[sel+1] + if id == sudokuGUI.ID_ELIMINATE_NAKED then + CheckRange(2, 4, checked) + elseif id == sudokuGUI.ID_ELIMINATE_HIDDEN then + CheckRange(5, 7, checked) + else + showListBox:Check(0, RangeChecked(2, 4)) + showListBox:Check(1, RangeChecked(5, 7)) + end + end) + + function sudokuGUI.PreferencesDialogPageSolve.Apply() + for n = 0, showListBox:GetCount()-1 do + sudokuGUI.menuCheckIDs[listBoxValues[n+1]] = showListBox:IsChecked(n) + end + sudokuGUI.UpdateTable() + end + + return panel + end + + function sudokuGUI.PreferencesDialog() + local dialog = wx.wxDialog(sudokuGUI.frame, wx.wxID_ANY, + "wxLuaSudoku - Preferences", + wx.wxDefaultPosition, wx.wxDefaultSize, + wx.wxDEFAULT_DIALOG_STYLE+wx.wxRESIZE_BORDER) + + local panel = wx.wxPanel(dialog, wx.wxID_ANY) + local notebook = wx.wxNotebook(panel, wx.wxID_ANY) + + local notebookPages = {} + local page1 = sudokuGUI.PreferencesDialogPageUI.Create(notebook) + notebook:AddPage(page1, "Fonts & Colors", true) + notebookPages[1] = sudokuGUI.PreferencesDialogPageUI + + local page2 = sudokuGUI.PreferencesDialogPageShow.Create(notebook) + notebook:AddPage(page2, "Show groups", false) + notebookPages[2] = sudokuGUI.PreferencesDialogPageShow + + local page3 = sudokuGUI.PreferencesDialogPageSolve.Create(notebook) + notebook:AddPage(page3, "Solve groups", false) + notebookPages[3] = sudokuGUI.PreferencesDialogPageSolve + + local mainSizer = wx.wxBoxSizer( wx.wxVERTICAL ) + + local buttonSizer = wx.wxBoxSizer( wx.wxHORIZONTAL ) + local okButton = wx.wxButton( panel, wx.wxID_OK, "&OK", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) + buttonSizer:AddWindow( okButton, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) + local cancelButton = wx.wxButton( panel, wx.wxID_CANCEL, "&Cancel", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) + buttonSizer:AddWindow( cancelButton, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) + local applyButton = wx.wxButton( panel, wx.wxID_APPLY, "&Apply", wx.wxDefaultPosition, wx.wxDefaultSize, 0 ) + buttonSizer:AddWindow( applyButton, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) + + mainSizer:AddWindow( notebook, 1, wx.wxGROW+wx.wxALIGN_CENTER, 0 ) + mainSizer:AddSizer( buttonSizer, 0, wx.wxALIGN_CENTER+wx.wxALL, 5 ) + panel:SetSizer( mainSizer ) + mainSizer:SetSizeHints( dialog ) + + dialog:ConnectEvent(wx.wxID_APPLY, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) ! local sel = notebook:GetSelection() ! notebookPages[sel+1].Apply() end) dialog:ConnectEvent(wx.wxID_OK, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) ! local sel = notebook:GetSelection() ! notebookPages[sel+1].Apply() event:Skip() end) *************** *** 3600,3608 **** } local s = sudoku.CreateTable() s = sudoku.SetValues(values, s) sudokuGUI.sudokuTables_pos = 1 sudokuGUI.sudokuTables[1] = s ! sudokuGUI.sudokuSolnTable = sudokuGUI.SolveBruteForce(sudokuGUI.sudokuTables[1]) sudokuGUI.panel = wx.wxPanel(sudokuGUI.frame, wx.wxID_ANY) --- 3784,3810 ---- } + local solution = + { + 7,1,2, 6,3,8, 9,4,5, + 3,4,9, 5,7,2, 6,1,8, + 8,5,6, 4,9,1, 7,3,2, + + 2,6,8, 9,4,5, 3,7,1, + 5,9,1, 7,8,3, 2,6,4, + 4,3,7, 1,2,6, 5,8,9, + + 9,7,5, 3,1,4, 8,2,6, + 6,2,4, 8,5,7, 1,9,3, + 1,8,3, 2,6,9, 4,5,7 + } + local s = sudoku.CreateTable() s = sudoku.SetValues(values, s) sudokuGUI.sudokuTables_pos = 1 sudokuGUI.sudokuTables[1] = s ! ! sudokuGUI.sudokuSolnTable = sudoku.CreateTable() ! sudoku.SetValues(solution, sudokuGUI.sudokuSolnTable) ! -- sudokuGUI.SolveBruteForce(sudokuGUI.sudokuTables[1]) sudokuGUI.panel = wx.wxPanel(sudokuGUI.frame, wx.wxID_ANY) |
From: John L. <jr...@us...> - 2006-05-04 05:07:09
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19877/wxLua/modules/wxbind/src Modified Files: clipdrag.cpp wx_bind.cpp Log Message: fix static wxClipboard::Get in clipdrag.i cleanup in interal.cpp add more pages to prefs dialog in wxluasudoku Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** wx_bind.cpp 2 May 2006 05:25:04 -0000 1.31 --- wx_bind.cpp 4 May 2006 05:07:03 -0000 1.32 *************** *** 2970,2973 **** --- 2970,2993 ---- + #if (wxLUA_USE_wxClipboard) && ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxClipboard)) + + // %wxchkver25 %static wxClipboard *Get() + static int LUACALL wxLua_wxClipboard_Get(lua_State *L) + { + wxLuaState wxlState(L); + wxClipboard *returns; + // call Get + returns = wxClipboard::Get(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxClipboard, returns); + + return 1; + } + + + + #endif + + #if (wxLUA_USE_wxPointSizeRect) && (wxCHECK_VERSION(2,3,0)) *************** *** 4741,4744 **** --- 4761,4769 ---- + #if (wxLUA_USE_wxClipboard) && ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxClipboard)) + { LuaGlobal, "wxClipboard_Get", wxLua_wxClipboard_Get, 0, 0, { 0 } }, + #endif + + #if (wxLUA_USE_wxPointSizeRect) && (wxCHECK_VERSION(2,3,0)) { LuaGlobal, "wxGetMousePosition", wxLua_function_wxGetMousePosition, 0, 0, { 0 } }, Index: clipdrag.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/clipdrag.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** clipdrag.cpp 2 May 2006 05:25:01 -0000 1.17 --- clipdrag.cpp 4 May 2006 05:07:03 -0000 1.18 *************** *** 40,44 **** #if (wxLUA_USE_wxClipboard) && ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxClipboard)) ! // %wxchkver25 static wxClipboard *Get() static int LUACALL wxLua_wxClipboard_Get(lua_State *L) { --- 40,44 ---- #if (wxLUA_USE_wxClipboard) && ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxClipboard)) ! // %wxchkver25 %static wxClipboard *Get() static int LUACALL wxLua_wxClipboard_Get(lua_State *L) { |
From: John L. <jr...@us...> - 2006-05-04 05:07:07
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19877/wxLua/modules/wxlua/src Modified Files: internal.cpp Log Message: fix static wxClipboard::Get in clipdrag.i cleanup in interal.cpp add more pages to prefs dialog in wxluasudoku Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** internal.cpp 4 May 2006 02:47:34 -0000 1.40 --- internal.cpp 4 May 2006 05:07:04 -0000 1.41 *************** *** 416,420 **** wxString buf = wxString::Format(_("Stack state in %s: in %u out %u\r\n"), message.c_str(), m_top, lua_gettop(m_luaState)); OutputDebugString(buf); ! #elif defined(__WXGTK__) || defined(__WXMAC__) fprintf(stderr, "Stack state in %s: in %u out %u\r\n", (const char *)wx2lua(msg), m_top, lua_gettop(m_luaState)); #endif --- 416,420 ---- wxString buf = wxString::Format(_("Stack state in %s: in %u out %u\r\n"), message.c_str(), m_top, lua_gettop(m_luaState)); OutputDebugString(buf); ! #else //if defined(__WXGTK__) || defined(__WXMAC__) fprintf(stderr, "Stack state in %s: in %u out %u\r\n", (const char *)wx2lua(msg), m_top, lua_gettop(m_luaState)); #endif |
From: John L. <jr...@us...> - 2006-05-04 05:07:06
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19877/wxLua/bindings/wxwidgets Modified Files: clipdrag.i Log Message: fix static wxClipboard::Get in clipdrag.i cleanup in interal.cpp add more pages to prefs dialog in wxluasudoku Index: clipdrag.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/clipdrag.i,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** clipdrag.i 1 May 2006 19:36:30 -0000 1.15 --- clipdrag.i 4 May 2006 05:07:03 -0000 1.16 *************** *** 19,23 **** %class wxClipboard, wxObject !%wxchkver25 %define %pointer wxTheClipboard ! %wxchkver25 static wxClipboard *Get() // wxClipboard() use global clipboard only --- 19,23 ---- %class wxClipboard, wxObject !%wxchkver25 %define %pointer wxTheClipboard ! %wxchkver25 %static wxClipboard *Get() // wxClipboard() use global clipboard only |
From: John L. <jr...@us...> - 2006-05-04 02:47:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28004a/wxLua/modules/wxlua/include Modified Files: internal.h wxlstate.h Log Message: switch to wxHashMap from wxHashTable as wxHashTable has been deprecated since 2.4 Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** wxlstate.h 2 May 2006 22:46:53 -0000 1.44 --- wxlstate.h 4 May 2006 02:47:34 -0000 1.45 *************** *** 47,50 **** --- 47,51 ---- #include "wx/filefn.h" #include "wx/filename.h" + #include "wx/hashmap.h" class WXDLLIMPEXP_WXLUA wxLuaEvent; *************** *** 52,55 **** --- 53,58 ---- class WXDLLIMPEXP_WXLUA wxLuaStateRefData; + WX_DECLARE_STRING_HASH_MAP_WITH_DECL(long, wxLuaStringToLongHashMap, class WXDLLIMPEXP_WXLUA); + // ---------------------------------------------------------------------------- // String functions - convert between Lua (ansi string) and wxString (encoded) *************** *** 57,61 **** // Convert a 8-bit Lua String into wxString ! inline WXDLLIMPEXP_WXLUA wxString lua2wx(const char * luastr) { if (luastr == NULL) --- 60,64 ---- // Convert a 8-bit Lua String into wxString ! inline WXDLLIMPEXP_WXLUA wxString lua2wx(const char* luastr) { if (luastr == NULL) *************** *** 123,140 **** wxEventType m_inEventType; // wxEventType set when in event, else wxEVT_NULL ! wxHashTable* m_pDerivedList; // derived objects. ! wxHashTable* m_pTrackedList; // tracked objects. ! wxList m_eventHandlerList; // event objects for wxLuaCallback ! wxList m_destroyHandlerList; // wxLuaDestroyCallbacks installed ! wxList m_windowList; // all wxWindow objects, wxWidgets will delete these ! // but for an embedded program they must be deleted before ! // shutting down the interpreter, else they dangle ! wxArrayInt m_usedIndexes; // array of the lua tags ! bool m_is_running; // is the lua_State running a script ! bool m_is_closing; // are we currently being closed ! bool m_debug_hook_break; // should the lua_State break for next debug_hook ! wxString m_debug_hook_break_msg; // message when the breaking in the debug_hook unsigned long m_last_debug_hook_time; // last time the debug hook was called --- 126,143 ---- wxEventType m_inEventType; // wxEventType set when in event, else wxEVT_NULL ! wxLongToLongHashMap m_pDerivedList; // derived objects. ! wxLongToLongHashMap m_pTrackedList; // tracked objects. ! wxList m_eventHandlerList; // event objects for wxLuaCallback ! wxList m_destroyHandlerList; // wxLuaDestroyCallbacks installed ! wxList m_windowList; // all wxWindow objects, wxWidgets will delete these ! // but for an embedded program they must be deleted before ! // shutting down the interpreter, else they dangle ! wxArrayInt m_usedIndexes; // array of the lua tags in the registry ! bool m_is_running; // is the lua_State running a script ! bool m_is_closing; // are we currently being closed ! bool m_debug_hook_break; // should the lua_State break for next debug_hook ! wxString m_debug_hook_break_msg; // message when the breaking in the debug_hook unsigned long m_last_debug_hook_time; // last time the debug hook was called *************** *** 180,184 **** // ------------------------------------------------------------------------ ! lua_State *m_lua_State; // the lua_State that "is" lua bool m_lua_State_static; // lua_close the lua_State if !static --- 183,187 ---- // ------------------------------------------------------------------------ ! lua_State* m_lua_State; // the lua_State that "is" lua bool m_lua_State_static; // lua_close the lua_State if !static Index: internal.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/internal.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** internal.h 8 Apr 2006 18:22:34 -0000 1.27 --- internal.h 4 May 2006 02:47:34 -0000 1.28 *************** *** 189,193 **** static void DumpGlobals(lua_State* L); static void DumpTable(lua_State* L, const wxString &tableName); ! static void DumpTable(lua_State* L, int index, const wxString& tablename, wxHashTable& dumpList, int indent); private: --- 189,193 ---- static void DumpGlobals(lua_State* L); static void DumpTable(lua_State* L, const wxString &tableName); ! static void DumpTable(lua_State* L, int index, const wxString& tablename, wxLuaStringToLongHashMap& dumpList, int indent); private: |
From: John L. <jr...@us...> - 2006-05-04 02:47:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28004a/wxLua/modules/wxlua/src Modified Files: internal.cpp wxlbind.cpp wxlstate.cpp Log Message: switch to wxHashMap from wxHashTable as wxHashTable has been deprecated since 2.4 Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** internal.cpp 8 Apr 2006 23:05:39 -0000 1.39 --- internal.cpp 4 May 2006 02:47:34 -0000 1.40 *************** *** 423,438 **** void wxLuaCheckStack::DumpGlobals(lua_State *L) { ! wxHashTable* dumpList = new wxHashTable(wxKEY_INTEGER); lua_pushvalue(L, LUA_GLOBALSINDEX); ! DumpTable(L, lua_gettop(L), wxT("Globals"), *dumpList, 0); lua_pop(L, 1); - - delete dumpList; } void wxLuaCheckStack::DumpTable(lua_State *L, const wxString &name) { ! wxHashTable dumpList(wxKEY_INTEGER); lua_pushstring(L, wx2lua(name)); --- 423,436 ---- void wxLuaCheckStack::DumpGlobals(lua_State *L) { ! wxLuaStringToLongHashMap dumpList; lua_pushvalue(L, LUA_GLOBALSINDEX); ! DumpTable(L, lua_gettop(L), wxT("Globals"), dumpList, 0); lua_pop(L, 1); } void wxLuaCheckStack::DumpTable(lua_State *L, const wxString &name) { ! wxLuaStringToLongHashMap dumpList; lua_pushstring(L, wx2lua(name)); *************** *** 558,562 **** } ! void wxLuaCheckStack::DumpTable(lua_State *L, int index, const wxString& tablename, wxHashTable& dumpList, int indent) { wxString indentStr; --- 556,560 ---- } ! void wxLuaCheckStack::DumpTable(lua_State *L, int index, const wxString& tablename, wxLuaStringToLongHashMap& dumpList, int indent) { wxString indentStr; *************** *** 594,599 **** wxLogMessage(info); ! long key = dumpList.MakeKey(value); ! if (!dumpList.Get(key)) { if (valueType == wxT("Table")) --- 592,596 ---- wxLogMessage(info); ! if (dumpList.find(value) != dumpList.end()) { if (valueType == wxT("Table")) *************** *** 601,605 **** wxString tname = wxString::Format(wxT("%s.%s"), tablename.c_str(), indexValue.c_str()); ! dumpList.Put(key, (wxObject*)true); int tableIndex = lua_gettop(L); --- 598,602 ---- wxString tname = wxString::Format(wxT("%s.%s"), tablename.c_str(), indexValue.c_str()); ! dumpList[value] = 1; int tableIndex = lua_gettop(L); *************** *** 610,614 **** else { ! dumpList.Put(key, (wxObject*)true); } } --- 607,611 ---- else { ! dumpList[value] = 1; } } Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** wxlstate.cpp 3 May 2006 22:52:18 -0000 1.64 --- wxlstate.cpp 4 May 2006 02:47:34 -0000 1.65 *************** *** 78,85 **** // Hook into function calls to luaE_newthread (calls from coroutine.create/wrap) ! // and add the new lua_State as a child sharing it's wxLuaStateVariables void wxLuaState_newthread_handler(lua_State *L, lua_State *L1) { ! // L is the original lua_State, L1 new coroutine thread wxLuaState wxlState_orig(L); wxCHECK_RET(wxlState_orig.Ok(), wxT("Invalid wxLuaState")); --- 78,85 ---- // Hook into function calls to luaE_newthread (calls from coroutine.create/wrap) ! // and add the new lua_State as a child sharing it's wxLuaStateData void wxLuaState_newthread_handler(lua_State *L, lua_State *L1) { ! // L is the original lua_State, L1 is the new coroutine thread wxLuaState wxlState_orig(L); wxCHECK_RET(wxlState_orig.Ok(), wxT("Invalid wxLuaState")); *************** *** 116,120 **** wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); ! for (size_t n = 0; n < wxlState_orig.GetLuaStateRefData()->m_coroutineStates.GetCount(); n++) { if (wxlState_orig.GetLuaStateRefData()->m_coroutineStates[n] == wxlState) --- 116,121 ---- wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); ! size_t n, count = wxlState_orig.GetLuaStateRefData()->m_coroutineStates.GetCount(); ! for (n = 0; n < count; n++) { if (wxlState_orig.GetLuaStateRefData()->m_coroutineStates[n] == wxlState) *************** *** 320,340 **** bool painting = false; ! #if !wxCHECK_VERSION(2, 5, 0) ! wxNode* node; ! #else ! wxHashTable::Node* node; ! #endif ! ! // FIXME - wxGTK crashes if wxYield[IfNeeded] is called within a paint handler? I think ! wxlState.GetLuaStateRefData()->m_wxlStateData->m_pTrackedList->BeginFind(); ! node = wxlState.GetLuaStateRefData()->m_wxlStateData->m_pTrackedList->Next(); ! while (node) { ! if (wxDynamicCast(node->GetData(), wxPaintDC)) { painting = true; break; } - node = wxlState.GetLuaStateRefData()->m_wxlStateData->m_pTrackedList->Next(); } --- 321,334 ---- bool painting = false; ! wxLongToLongHashMap::iterator it; ! wxLongToLongHashMap* hashMap = &wxlState.GetLuaStateRefData()->m_wxlStateData->m_pTrackedList; ! for (it = hashMap->begin(); it != hashMap->end(); ++it) { ! wxObject* obj = (wxObject*)it->second; ! if (obj && wxDynamicCast(obj, wxPaintDC)) { painting = true; break; } } *************** *** 350,354 **** { wxLuaState wxlState(L); ! wxCHECK_MSG(wxlState.Ok(), 1, wxT("Invalid wxLuaState")); if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == wxlState.GetLuaFunctionTag())) --- 344,348 ---- { wxLuaState wxlState(L); ! wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == wxlState.GetLuaFunctionTag())) *************** *** 518,523 **** m_callbase_func = false; m_inEventType = wxEVT_NULL; - m_pDerivedList = new wxHashTable(wxKEY_INTEGER); - m_pTrackedList = new wxHashTable(wxKEY_INTEGER); m_is_running = false; --- 512,515 ---- *************** *** 536,543 **** m_id = wxID_ANY; - // let the list delete these items - m_pDerivedList->DeleteContents(true); - m_pTrackedList->DeleteContents(true); - // don't "own" pointers to wxLuaCallbacks, let wxEventHandler do it m_eventHandlerList.DeleteContents(false); --- 528,531 ---- *************** *** 562,567 **** m_evtHandler = NULL; ! delete m_pDerivedList; ! delete m_pTrackedList; wxLuaBindingList::Node *node = m_bindings.GetFirst(); --- 550,568 ---- m_evtHandler = NULL; ! wxLongToLongHashMap::iterator it; ! ! for (it = m_pDerivedList.begin(); it != m_pDerivedList.end(); ++it) ! { ! wxLuaStringToLongHashMap* obj = (wxLuaStringToLongHashMap*)it->second; ! delete obj; ! } ! m_pDerivedList.clear(); ! ! for (it = m_pTrackedList.begin(); it != m_pTrackedList.end(); ++it) ! { ! wxObject* obj = (wxObject*)it->second; ! delete obj; ! } ! m_pTrackedList.clear(); wxLuaBindingList::Node *node = m_bindings.GetFirst(); *************** *** 1500,1504 **** { wxCHECK_RET(Ok() && pObject, wxT("Invalid wxLuaState or wxObject to track")); ! M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList->Put((long)pObject, pObject); } --- 1501,1505 ---- { wxCHECK_RET(Ok() && pObject, wxT("Invalid wxLuaState or wxObject to track")); ! M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList[(long)pObject] = (long)pObject; } *************** *** 1506,1510 **** { wxCHECK_RET(Ok() && pObject, wxT("Invalid wxLuaState or wxObject to track")); ! M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList->Put(obj_ptr, pObject); } --- 1507,1511 ---- { wxCHECK_RET(Ok() && pObject, wxT("Invalid wxLuaState or wxObject to track")); ! M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList[obj_ptr] = (long)pObject; } *************** *** 1513,1524 **** wxCHECK_MSG(Ok() && pObject, false, wxT("Invalid wxLuaState or object")); ! // we still have to delete item ourselves even if DeleteContents(true) ! wxObject *pDeleteObject = M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList->Delete((long) pObject); ! bool result = pDeleteObject != NULL; ! if (fDelete && (pDeleteObject != NULL)) ! delete pDeleteObject; ! return result; } --- 1514,1531 ---- wxCHECK_MSG(Ok() && pObject, false, wxT("Invalid wxLuaState or object")); ! wxLongToLongHashMap::iterator it = M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList.find((long) pObject); ! if (it != M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList.end()) ! { ! // remove the item from being tracked ! M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList.erase(it); ! wxObject *pDeleteObject = (wxObject*)it->second; ! if (fDelete && (pDeleteObject != NULL)) ! delete pDeleteObject; ! return true; ! } ! ! return false; } *************** *** 2399,2412 **** wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! wxHashTable *pHashTable = (wxHashTable *)GetLuaStateData()->m_pDerivedList->Get((long) pObject); ! ! if (pHashTable != NULL) { ! wxLuaObject *pLuaObject = (wxLuaObject *)pHashTable->Get(lua2wx(method)); ! if ((pLuaObject != NULL) && pLuaObject->GetObject()) { ! wxCHECK_MSG(pLuaObject->GetwxLuaState() == *this, false, wxT("wxLuaState GetDerivedMethod out of sync")); ! return true; } } --- 2406,2427 ---- wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! wxLongToLongHashMap::iterator it = GetLuaStateData()->m_pDerivedList.find((long) pObject); ! if (it != GetLuaStateData()->m_pDerivedList.end()) { ! wxLuaStringToLongHashMap *pHashTable = (wxLuaStringToLongHashMap *)it->second; ! if (pHashTable != NULL) { ! wxLuaStringToLongHashMap::iterator its = pHashTable->find(lua2wx(method)); ! if (its != pHashTable->end()) ! { ! wxLuaObject *pLuaObject = (wxLuaObject *)its->second; ! ! if ((pLuaObject != NULL) && pLuaObject->GetObject()) ! { ! wxCHECK_MSG(pLuaObject->GetwxLuaState() == *this, false, wxT("wxLuaState GetDerivedMethod out of sync")); ! return true; ! } ! } } } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** wxlbind.cpp 17 Apr 2006 22:46:25 -0000 1.31 --- wxlbind.cpp 4 May 2006 02:47:34 -0000 1.32 *************** *** 27,31 **** #include "wx/listimpl.cpp" ! // Binding tags are generated as positive tag id automatically when bound // so we set the inbuilt lua arg tags to negative values // --- 27,31 ---- #include "wx/listimpl.cpp" ! // Binding tags are generated as positive tag id automatically when bound // so we set the inbuilt lua arg tags to negative values // *************** *** 66,75 **** if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == *pClass->class_tag)) { ! wxHashTable *pHashTable = (wxHashTable *) wxlState.GetLuaStateData()-> ! m_pDerivedList->Delete((long)wxlState.ttouserdata(1, true)); ! ! if (pHashTable != NULL) { ! delete pHashTable; } --- 66,78 ---- if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == *pClass->class_tag)) { ! long key = (long)wxlState.ttouserdata(1, true); ! wxLongToLongHashMap::iterator it = wxlState.GetLuaStateData()->m_pDerivedList.find(key); ! if (it != wxlState.GetLuaStateData()->m_pDerivedList.end()) { ! wxLuaStringToLongHashMap *pHashTable = (wxLuaStringToLongHashMap *)it->second; ! wxlState.GetLuaStateData()->m_pDerivedList.erase(it); ! ! if (pHashTable != NULL) ! delete pHashTable; } *************** *** 198,212 **** { void *pObject = wxlState.ttouserdata(1); - bool fCreated = false; - wxHashTable *pHashTable = (wxHashTable *) wxlState.GetLuaStateData()->m_pDerivedList->Get((long) pObject); if (pHashTable == NULL) { ! pHashTable = new wxHashTable(wxKEY_STRING); if (pHashTable != NULL) { ! pHashTable->DeleteContents(true); ! ! wxlState.GetLuaStateData()->m_pDerivedList->Put((long) pObject, pHashTable); fCreated = true; } --- 201,219 ---- { void *pObject = wxlState.ttouserdata(1); + bool fCreated = false; + wxLuaStringToLongHashMap *pHashTable = NULL; + + wxLongToLongHashMap::iterator it = wxlState.GetLuaStateData()->m_pDerivedList.find((long) pObject); + if (it != wxlState.GetLuaStateData()->m_pDerivedList.end()) + { + pHashTable = (wxLuaStringToLongHashMap *)it->second; + } if (pHashTable == NULL) { ! pHashTable = new wxLuaStringToLongHashMap; if (pHashTable != NULL) { ! wxlState.GetLuaStateData()->m_pDerivedList[(long) pObject] = (long)pHashTable; fCreated = true; } *************** *** 218,226 **** if (!fCreated) { ! wxLuaObject *pObject = (wxLuaObject *)pHashTable->Delete(index); ! if (pObject != NULL) ! delete pObject; } ! pHashTable->Put(index, new wxLuaObject(L, 3)); } } --- 225,237 ---- if (!fCreated) { ! wxLuaStringToLongHashMap::iterator it = pHashTable->find(index); ! if (it != pHashTable->end()) ! { ! wxLuaObject *pObject = (wxLuaObject *)it->second; ! if (pObject != NULL) ! delete pObject; ! } } ! (*pHashTable)[index] = (long)new wxLuaObject(L, 3); } } |
From: John L. <jr...@us...> - 2006-05-04 02:47:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28004a/wxLua/modules/wxluadebug/src Modified Files: staktree.cpp Log Message: switch to wxHashMap from wxHashTable as wxHashTable has been deprecated since 2.4 Index: staktree.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/staktree.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** staktree.cpp 11 Apr 2006 04:03:23 -0000 1.21 --- staktree.cpp 4 May 2006 02:47:34 -0000 1.22 *************** *** 380,387 **** windowCount = 0; ! if (wxlState.GetLuaStateData()->m_pDerivedList) ! derivedCount = wxlState.GetLuaStateData()->m_pDerivedList->GetCount(); ! if (wxlState.GetLuaStateData()->m_pTrackedList) ! trackedCount = wxlState.GetLuaStateData()->m_pTrackedList->GetCount(); eventHandlerCount = wxlState.GetLuaStateData()->m_eventHandlerList.GetCount(); --- 380,385 ---- windowCount = 0; ! derivedCount = wxlState.GetLuaStateData()->m_pDerivedList.size(); ! trackedCount = wxlState.GetLuaStateData()->m_pTrackedList.size(); eventHandlerCount = wxlState.GetLuaStateData()->m_eventHandlerList.GetCount(); |
From: John L. <jr...@us...> - 2006-05-03 22:52:21
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27806/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: don't track pushed wxWindows using EVT_DESTROY twice update geometry.i to 2.6.3 fix unary op - to use op_neg and fix binding operators in general update docs for op_neg Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** wxlstate.cpp 2 May 2006 22:46:53 -0000 1.63 --- wxlstate.cpp 3 May 2006 22:52:18 -0000 1.64 *************** *** 1983,2002 **** if (data != NULL) { ! wxWindow *win = NULL; // if the object we are referencing is derived from wxWindow if (IsDerivedClass(iTag, GetwxWindowTag())) // s_wxluatag_wxWindow { ! win = wxDynamicCast(data, wxWindow); if (win != NULL) { // Connect an object to the destroy event. ! wxLuaDestroyCallback *pCallback = new wxLuaDestroyCallback(*this, ! win->GetId(), ! (wxEvtHandler *) win, ! iTag); ! if (pCallback == NULL) { ! terror("wxLua: Out of memory"); } } --- 1983,2022 ---- if (data != NULL) { ! bool handled = false; // if the object we are referencing is derived from wxWindow if (IsDerivedClass(iTag, GetwxWindowTag())) // s_wxluatag_wxWindow { ! wxWindow* win = wxDynamicCast(data, wxWindow); if (win != NULL) { + // check to make sure that we're not trying to attach another destroy callback + bool already_handled = false; + wxNode* node = M_WXLSTATEDATA->m_wxlStateData->m_destroyHandlerList.GetFirst(); + while (node) + { + wxLuaDestroyCallback *pCallback = (wxLuaDestroyCallback *)node->GetData(); + wxCHECK_RET(pCallback, wxT("Invalid wxLuaCallback")); + if (pCallback->GetEvtHandler() == win) + { + already_handled = true; + break; + } + + node = node->GetNext(); + } + // Connect an object to the destroy event. ! if (!already_handled) { ! handled = true; ! wxLuaDestroyCallback *pCallback = new wxLuaDestroyCallback(*this, ! win->GetId(), ! (wxEvtHandler *) win, ! iTag); ! if (pCallback == NULL) ! { ! terror("wxLua: Out of memory"); ! } } } *************** *** 2004,2010 **** // Otherwise handle normally ! if (win == NULL) tpushusertag(data, iTag); - } else --- 2024,2029 ---- // Otherwise handle normally ! if (!handled) tpushusertag(data, iTag); } else |
From: John L. <jr...@us...> - 2006-05-03 22:52:21
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27806/wxLua/modules/wxbind/src Modified Files: controls.cpp file.cpp gdi.cpp geometry.cpp image.cpp Log Message: don't track pushed wxWindows using EVT_DESTROY twice update geometry.i to 2.6.3 fix unary op - to use op_neg and fix binding operators in general update docs for op_neg Index: controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/controls.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** controls.cpp 2 May 2006 05:25:01 -0000 1.20 --- controls.cpp 3 May 2006 22:52:18 -0000 1.21 *************** *** 9503,9510 **** wxTreeItemId * self = (wxTreeItemId *)wxlState.GetUserDataType(1, s_wxluatag_wxTreeItemId); // call op_assign ! // allocate a new object using the copy constructor ! returns = new wxTreeItemId((*self)=(*otherId)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxTreeItemId *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); --- 9503,9508 ---- wxTreeItemId * self = (wxTreeItemId *)wxlState.GetUserDataType(1, s_wxluatag_wxTreeItemId); // call op_assign ! returns = self; ! *returns = ((*self)=(*otherId)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); Index: file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/file.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** file.cpp 2 May 2006 05:25:02 -0000 1.15 --- file.cpp 3 May 2006 22:52:18 -0000 1.16 *************** *** 1372,1379 **** wxFileName * self = (wxFileName *)wxlState.GetUserDataType(1, s_wxluatag_wxFileName); // call op_assign ! // allocate a new object using the copy constructor ! returns = new wxFileName((*self)=(*filename)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxFileName *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxFileName, returns); --- 1372,1377 ---- wxFileName * self = (wxFileName *)wxlState.GetUserDataType(1, s_wxluatag_wxFileName); // call op_assign ! returns = self; ! *returns = ((*self)=(*filename)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxFileName, returns); Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** image.cpp 2 May 2006 05:25:02 -0000 1.13 --- image.cpp 3 May 2006 22:52:18 -0000 1.14 *************** *** 1393,1400 **** wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); // call op_assign ! // allocate a new object using the copy constructor ! returns = new wxImage((*self)=(*image)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 1393,1398 ---- wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); // call op_assign ! returns = self; ! *returns = ((*self)=(*image)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); Index: gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/gdi.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** gdi.cpp 2 May 2006 05:25:02 -0000 1.21 --- gdi.cpp 3 May 2006 22:52:18 -0000 1.22 *************** *** 167,174 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)=(*p)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 167,172 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_assign ! returns = self; ! *returns = ((*self)=(*p)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 261,268 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_add_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)+=(*p)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 259,264 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_add_assign ! returns = self; ! *returns = ((*self)+=(*p)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 281,288 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_sub_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)-=(*p)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 277,282 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_sub_assign ! returns = self; ! *returns = ((*self)-=(*p)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 301,308 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_add_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)+=(*s)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 295,300 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_add_assign ! returns = self; ! *returns = ((*self)+=(*s)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 321,328 **** wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_sub_assign ! // allocate a new object using the copy constructor ! returns = new wxPoint((*self)-=(*s)); ! // add the new object to the tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 313,318 ---- wxPoint * self = (wxPoint *)wxlState.GetUserDataType(1, s_wxluatag_wxPoint); // call op_sub_assign ! returns = self; ! *returns = ((*self)-=(*s)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); Index: geometry.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/geometry.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** geometry.cpp 2 May 2006 05:25:02 -0000 1.12 --- geometry.cpp 3 May 2006 22:52:18 -0000 1.13 *************** *** 32,35 **** --- 32,967 ---- #if wxLUA_USE_Geometry // ------------------------------------------------------------------------------------------------- + // Bind class wxPoint2DInt + // ------------------------------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class + int s_wxluatag_wxPoint2DInt = -1; + + [...1988 lines suppressed...] - static WXLUAMETHOD s_wxPoint2DInt_methods[] = { - { LuaConstructor, "wxPoint2DInt", wxLua_wxPoint2DInt_constructor, 2, 0, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, - { LuaMethod, "GetVectorLength", wxLua_wxPoint2DInt_GetVectorLength, 0, 0, { 0 } }, - { LuaMethod, "GetVectorAngle", wxLua_wxPoint2DInt_GetVectorAngle, 0, 0, { 0 } }, - { LuaMethod, "SetVectorLength", wxLua_wxPoint2DInt_SetVectorLength, 1, 1, { &s_wxluaarg_Number, 0 } }, - { LuaMethod, "SetVectorAngle", wxLua_wxPoint2DInt_SetVectorAngle, 1, 1, { &s_wxluaarg_Number, 0 } }, - { LuaMethod, "GetDistance", wxLua_wxPoint2DInt_GetDistance, 1, 1, { &s_wxluatag_wxPoint2DInt, 0 } }, - { LuaMethod, "GetDistanceSquare", wxLua_wxPoint2DInt_GetDistanceSquare, 1, 1, { &s_wxluatag_wxPoint2DInt, 0 } }, - { LuaMethod, "GetDotProduct", wxLua_wxPoint2DInt_GetDotProduct, 1, 1, { &s_wxluatag_wxPoint2DInt, 0 } }, - { LuaMethod, "GetCrossProduct", wxLua_wxPoint2DInt_GetCrossProduct, 1, 1, { &s_wxluatag_wxPoint2DInt, 0 } }, - { LuaDelete, "wxPoint2DInt", wxLua_wxPoint2DInt_destructor, 0, 0, {0} }, - { LuaMethod, "Delete", wxLua_wxPoint2DInt_Delete, 0, 0, {0} }, - }; - - // Extern accessor to class method map - WXLUAMETHOD* wxPoint2DInt_methods = s_wxPoint2DInt_methods; - int wxPoint2DInt_methodCount = sizeof(s_wxPoint2DInt_methods)/sizeof(s_wxPoint2DInt_methods[0]); - #endif - --- 3037,3038 ---- |
From: John L. <jr...@us...> - 2006-05-03 22:52:21
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27806/wxLua/bindings/wxwidgets Modified Files: geometry.i Log Message: don't track pushed wxWindows using EVT_DESTROY twice update geometry.i to 2.6.3 fix unary op - to use op_neg and fix binding operators in general update docs for op_neg Index: geometry.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/geometry.i,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** geometry.i 26 Apr 2006 22:54:13 -0000 1.4 --- geometry.i 3 May 2006 22:52:17 -0000 1.5 *************** *** 5,8 **** --- 5,9 ---- // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. // Licence: wxWidgets licence + // wxWidgets: Updated to 2.6.3 ///////////////////////////////////////////////////////////////////////////// *************** *** 21,24 **** --- 22,110 ---- /////////////////////////////////////////////////////////////////////////////// + // wxPoint2DInt + + %include "wx/geometry.h" + %class %delete %noclassinfo %encapsulate wxPoint2DInt + //wxPoint2DInt() + %overload wxPoint2DInt( wxInt32 x=0, wxInt32 y=0 ) + %overload %constructor wxPoint2DIntCopy( const wxPoint2DInt &pt ) + %overload %constructor wxPoint2DIntFromPoint( const wxPoint &pt ) + + //void GetFloor( wxInt32 *x , wxInt32 *y ) const + //void GetRounded( wxInt32 *x , wxInt32 *y ) const + wxDouble GetVectorLength() const + wxDouble GetVectorAngle() const + void SetVectorLength( wxDouble length ) + void SetVectorAngle( wxDouble degrees ) + //void SetPolarCoordinates( wxInt32 angle, wxInt32 length ) - no function body in wxWidgets + void Normalize() + wxDouble GetDistance( const wxPoint2DInt &pt ) const + wxDouble GetDistanceSquare( const wxPoint2DInt &pt ) const + wxInt32 GetDotProduct( const wxPoint2DInt &vec ) const + wxInt32 GetCrossProduct( const wxPoint2DInt &vec ) const + + //void WriteTo( wxDataOutputStream &stream ) const + //void ReadFrom( wxDataInputStream &stream ) + + %rename X %member wxInt32 m_x + %rename Y %member wxInt32 m_y + + %operator wxPoint2DInt operator-() + %operator wxPoint2DInt& operator=(const wxPoint2DInt& pt) + %operator wxPoint2DInt& operator+=(const wxPoint2DInt& pt) + %operator wxPoint2DInt& operator-=(const wxPoint2DInt& pt) + %operator wxPoint2DInt& operator*=(const wxPoint2DInt& pt) + //wxPoint2DInt& operator*=(wxDouble n) - no function body in wxWidgets + //wxPoint2DInt& operator*=(wxInt32 n) - no function body in wxWidgets + %operator wxPoint2DInt& operator/=(const wxPoint2DInt& pt) + //wxPoint2DInt& operator/=(wxDouble n) - no function body in wxWidgets + //wxPoint2DInt& operator/=(wxInt32 n) - no function body in wxWidgets + //operator wxPoint() const + %operator bool operator==(const wxPoint2DInt& pt) const + //bool operator!=(const wxPoint2DInt& pt) const + %endclass + + /////////////////////////////////////////////////////////////////////////////// + // wxPoint2DDouble + + %include "wx/geometry.h" + %class %delete %noclassinfo %encapsulate wxPoint2DDouble + //wxPoint2DDouble() + wxPoint2DDouble( wxDouble x=0, wxDouble y=0 ) + %constructor wxPoint2DDoubleCopy( const wxPoint2DDouble &pt ) + %constructor wxPoint2DDoubleFromPointInt( const wxPoint2DInt &pt ) + %constructor wxPoint2DDoubleFromPoint( const wxPoint &pt ) + + //void GetFloor( wxInt32 *x , wxInt32 *y ) const + //void GetRounded( wxInt32 *x , wxInt32 *y ) const + wxDouble GetVectorLength() const + wxDouble GetVectorAngle() const + void SetVectorLength( wxDouble length ) + void SetVectorAngle( wxDouble degrees ) + //void SetPolarCoordinates( wxDouble angle, wxDouble length ) - no function body in wxWidgets + //void Normalize() - no function body in wxWidgets + wxDouble GetDistance( const wxPoint2DDouble &pt ) const + wxDouble GetDistanceSquare( const wxPoint2DDouble &pt ) const + wxDouble GetDotProduct( const wxPoint2DDouble &vec ) const + wxDouble GetCrossProduct( const wxPoint2DDouble &vec ) const + + %rename X %member wxDouble m_x + %rename Y %member wxDouble m_y + + %operator wxPoint2DDouble operator-() + %operator wxPoint2DDouble& operator=(const wxPoint2DDouble& pt) + %operator wxPoint2DDouble& operator+=(const wxPoint2DDouble& pt) + %operator wxPoint2DDouble& operator-=(const wxPoint2DDouble& pt) + %operator wxPoint2DDouble& operator*=(const wxPoint2DDouble& pt) + //wxPoint2DDouble& operator*=(wxDouble n) + //wxPoint2DDouble& operator*=(wxInt32 n) + %operator wxPoint2DDouble& operator/=(const wxPoint2DDouble& pt) + //wxPoint2DDouble& operator/=(wxDouble n) + //wxPoint2DDouble& operator/=(wxInt32 n) + %operator bool operator==(const wxPoint2DDouble& pt) const + //bool operator!=(const wxPoint2DDouble& pt) const + %endclass + + /////////////////////////////////////////////////////////////////////////////// // wxRect2DDouble *************** *** 27,30 **** --- 113,117 ---- //wxRect2DDouble() wxRect2DDouble(wxDouble x=0, wxDouble y=0, wxDouble w=0, wxDouble h=0) + %constructor wxRect2DDoubleCopy(const wxRect2DDouble& rect) wxPoint2DDouble GetPosition() *************** *** 58,63 **** void MoveCentreTo( const wxPoint2DDouble &pt ) wxOutCode GetOutCode( const wxPoint2DDouble &pt ) const ! %rename ContainsPoint bool Contains( const wxPoint2DDouble &pt ) const ! %rename ContainsRect bool Contains( const wxRect2DDouble &rect ) const bool IsEmpty() const bool HaveEqualSize( const wxRect2DDouble &rect ) const --- 145,150 ---- void MoveCentreTo( const wxPoint2DDouble &pt ) wxOutCode GetOutCode( const wxPoint2DDouble &pt ) const ! %overload %rename ContainsPoint bool Contains( const wxPoint2DDouble &pt ) const ! %overload bool Contains( const wxRect2DDouble &rect ) const bool IsEmpty() const bool HaveEqualSize( const wxRect2DDouble &rect ) const *************** *** 72,77 **** bool Intersects( const wxRect2DDouble &rect ) const //static void Union( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest ) ! void Union( const wxRect2DDouble &otherRect ) ! //void Union( const wxPoint2DDouble &pt ) wxRect2DDouble CreateUnion( const wxRect2DDouble &otherRect ) const void Scale( wxDouble f ) --- 159,164 ---- bool Intersects( const wxRect2DDouble &rect ) const //static void Union( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest ) ! %overload void Union( const wxRect2DDouble &otherRect ) ! %overload %rename UnionPoint void Union( const wxPoint2DDouble &pt ) wxRect2DDouble CreateUnion( const wxRect2DDouble &otherRect ) const void Scale( wxDouble f ) *************** *** 79,148 **** %rename X %member wxDouble m_x ! %member wxDouble m_y %rename Width %member wxDouble m_width ! %member wxDouble m_height ! %endclass ! ! /////////////////////////////////////////////////////////////////////////////// ! // wxPoint2DDouble ! ! %include "wx/geometry.h" ! %class %delete %noclassinfo %encapsulate wxPoint2DDouble ! //wxPoint2DDouble() ! wxPoint2DDouble( wxDouble x=0, wxDouble y=0 ) ! //%constructor wxPoint2DDouble( const wxPoint2DDouble &pt ) ! //%constructor wxPoint2DDouble( const wxPoint2DInt &pt ) ! //%constructor wxPoint2DDouble( const wxPoint &pt ) ! //void GetFloor( wxInt32 *x , wxInt32 *y ) const ! //void GetRounded( wxInt32 *x , wxInt32 *y ) const ! wxDouble GetVectorLength() const ! wxDouble GetVectorAngle() const ! void SetVectorLength( wxDouble length ) ! void SetVectorAngle( wxDouble degrees ) ! //void SetPolarCoordinates( wxDouble angle , wxDouble length ) ! //void Normalize() ! wxDouble GetDistance( const wxPoint2DDouble &pt ) const ! wxDouble GetDistanceSquare( const wxPoint2DDouble &pt ) const ! wxDouble GetDotProduct( const wxPoint2DDouble &vec ) const ! wxDouble GetCrossProduct( const wxPoint2DDouble &vec ) const ! //wxPoint2DDouble operator-() ! //wxPoint2DDouble& operator=(const wxPoint2DDouble& pt) ! //wxPoint2DDouble& operator+=(const wxPoint2DDouble& pt) ! //wxPoint2DDouble& operator-=(const wxPoint2DDouble& pt) ! //wxPoint2DDouble& operator*=(const wxPoint2DDouble& pt) ! //wxPoint2DDouble& operator*=(wxDouble n) ! //wxPoint2DDouble& operator*=(wxInt32 n) ! //wxPoint2DDouble& operator/=(const wxPoint2DDouble& pt) ! //wxPoint2DDouble& operator/=(wxDouble n) ! //wxPoint2DDouble& operator/=(wxInt32 n) ! //bool operator==(const wxPoint2DDouble& pt) const ! //bool operator!=(const wxPoint2DDouble& pt) const ! //%member wxDouble m_x ! //%member wxDouble m_y %endclass /////////////////////////////////////////////////////////////////////////////// - // wxTransform2D - - //%include "wx/geometry.h" - //%class %noclassinfo wxTransform2D - // virtual void Transform( wxPoint2DInt* pt )const = 0 - // virtual void Transform( wxRect2DInt* r ) const - // virtual wxPoint2DInt Transform( const wxPoint2DInt &pt ) const - // virtual wxRect2DInt Transform( const wxRect2DInt &r ) const - // virtual void InverseTransform( wxPoint2DInt* pt ) const = 0 - // virtual void InverseTransform( wxRect2DInt* r ) const - // virtual wxPoint2DInt InverseTransform( const wxPoint2DInt &pt ) const - // virtual wxRect2DInt InverseTransform( const wxRect2DInt &r ) const - // void wxTransform2D::Transform( wxRect2DInt* r ) const - // wxPoint2DInt wxTransform2D::Transform( const wxPoint2DInt &pt ) const - // wxRect2DInt wxTransform2D::Transform( const wxRect2DInt &r ) const - // void wxTransform2D::InverseTransform( wxRect2DInt* r ) const - // wxPoint2DInt wxTransform2D::InverseTransform( const wxPoint2DInt &pt ) const - // wxRect2DInt wxTransform2D::InverseTransform( const wxRect2DInt &r ) const - //%endclass - - /////////////////////////////////////////////////////////////////////////////// // wxRect2DInt --- 166,179 ---- %rename X %member wxDouble m_x ! %rename Y %member wxDouble m_y %rename Width %member wxDouble m_width ! %rename Height %member wxDouble m_height ! //wxRect2DDouble& operator = (const wxRect2DDouble& rect) - use copy constructor ! %operator bool operator==(const wxRect2DDouble& rect) ! //bool operator != (const wxRect2DDouble& rect) const %endclass /////////////////////////////////////////////////////////////////////////////// // wxRect2DInt *************** *** 151,158 **** //wxRect2DInt() wxRect2DInt(wxInt32 x=0, wxInt32 y=0, wxInt32 w=0, wxInt32 h=0) %constructor wxRect2DIntFromwxRect( const wxRect& r ) %constructor wxRect2DIntFromPoints(const wxPoint2DInt& topLeft, const wxPoint2DInt& bottomRight) //%constructor wxRect2DInt(const wxPoint2DInt& pos, const wxSize& size) ! %constructor wxRect2DIntFromwxRect2DInt(const wxRect2DInt& rect) wxPoint2DInt GetPosition() wxSize GetSize() --- 182,190 ---- //wxRect2DInt() wxRect2DInt(wxInt32 x=0, wxInt32 y=0, wxInt32 w=0, wxInt32 h=0) + %constructor wxRect2DIntCopy(const wxRect2DInt& rect) %constructor wxRect2DIntFromwxRect( const wxRect& r ) %constructor wxRect2DIntFromPoints(const wxPoint2DInt& topLeft, const wxPoint2DInt& bottomRight) //%constructor wxRect2DInt(const wxPoint2DInt& pos, const wxSize& size) ! wxPoint2DInt GetPosition() wxSize GetSize() *************** *** 185,195 **** void MoveCentreTo( const wxPoint2DInt &pt ) wxOutCode GetOutCode( const wxPoint2DInt &pt ) const ! wxOutCode GetOutcode( const wxPoint2DInt &pt ) const ! %rename ContainsPoint bool Contains( const wxPoint2DInt &pt ) const ! %rename ContainsRect bool Contains( const wxRect2DInt &rect ) const bool IsEmpty() const bool HaveEqualSize( const wxRect2DInt &rect ) const //void Inset( wxInt32 x , wxInt32 y ) ! void Inset( wxInt32 left , wxInt32 top ,wxInt32 right , wxInt32 bottom ) void Offset( const wxPoint2DInt &pt ) void ConstrainTo( const wxRect2DInt &rect ) --- 217,226 ---- void MoveCentreTo( const wxPoint2DInt &pt ) wxOutCode GetOutCode( const wxPoint2DInt &pt ) const ! %overload %rename ContainsPoint bool Contains( const wxPoint2DInt &pt ) const ! %overload bool Contains( const wxRect2DInt &rect ) const bool IsEmpty() const bool HaveEqualSize( const wxRect2DInt &rect ) const //void Inset( wxInt32 x , wxInt32 y ) ! void Inset( wxInt32 left, wxInt32 top, wxInt32 right, wxInt32 bottom ) void Offset( const wxPoint2DInt &pt ) void ConstrainTo( const wxRect2DInt &rect ) *************** *** 200,205 **** bool Intersects( const wxRect2DInt &rect ) const //static void Union( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest ) ! void Union( const wxRect2DInt &otherRect ) ! //void Union( const wxPoint2DInt &pt ) wxRect2DInt CreateUnion( const wxRect2DInt &otherRect ) const void Scale( wxInt32 f ) --- 231,236 ---- bool Intersects( const wxRect2DInt &rect ) const //static void Union( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest ) ! %overload void Union( const wxRect2DInt &otherRect ) ! %overload %rename UnionPoint void Union( const wxPoint2DInt &pt ) wxRect2DInt CreateUnion( const wxRect2DInt &otherRect ) const void Scale( wxInt32 f ) *************** *** 209,261 **** //void ReadFrom( wxDataInputStream &stream ) ! //%member wxInt32 m_x ! //%member wxInt32 m_y ! //%member wxInt32 m_width ! //%member wxInt32 m_height ! //wxRect2DInt& operator = (const wxRect2DInt& rect) ! //bool operator == (const wxRect2DInt& rect) const //bool operator != (const wxRect2DInt& rect) const %endclass /////////////////////////////////////////////////////////////////////////////// ! // wxPoint2DInt ! ! %include "wx/geometry.h" ! %class %delete %noclassinfo %encapsulate wxPoint2DInt ! //wxPoint2DInt() ! %constructor wxPoint2DInt( wxInt32 x=0, wxInt32 y=0 ) ! //%constructor wxPoint2DInt( const wxPoint2DInt &pt ) ! //%constructor wxPoint2DInt( const wxPoint &pt ) ! //void GetFloor( wxInt32 *x , wxInt32 *y ) const ! //void GetRounded( wxInt32 *x , wxInt32 *y ) const ! wxDouble GetVectorLength() const ! wxDouble GetVectorAngle() const ! void SetVectorLength( wxDouble length ) ! void SetVectorAngle( wxDouble degrees ) ! //void SetPolarCoordinates( wxInt32 angle , wxInt32 length ) ! //void Normalize() ! wxDouble GetDistance( const wxPoint2DInt &pt ) const ! wxDouble GetDistanceSquare( const wxPoint2DInt &pt ) const ! wxInt32 GetDotProduct( const wxPoint2DInt &vec ) const ! wxInt32 GetCrossProduct( const wxPoint2DInt &vec ) const ! //void WriteTo( wxDataOutputStream &stream ) const ! //void ReadFrom( wxDataInputStream &stream ) ! //%member wxInt32 m_x ! //%member wxInt32 m_y ! //wxPoint2DInt operator-() ! //wxPoint2DInt& operator=(const wxPoint2DInt& pt) ! //wxPoint2DInt& operator+=(const wxPoint2DInt& pt) ! //wxPoint2DInt& operator-=(const wxPoint2DInt& pt) ! //wxPoint2DInt& operator*=(const wxPoint2DInt& pt) ! //wxPoint2DInt& operator*=(wxDouble n) ! //wxPoint2DInt& operator*=(wxInt32 n) ! //wxPoint2DInt& operator/=(const wxPoint2DInt& pt) ! //wxPoint2DInt& operator/=(wxDouble n) ! //wxPoint2DInt& operator/=(wxInt32 n) ! //operator wxPoint() const ! //bool operator==(const wxPoint2DInt& pt) const ! //bool operator!=(const wxPoint2DInt& pt) const ! %endclass %endif wxLUA_USE_Geometry --- 240,273 ---- //void ReadFrom( wxDataInputStream &stream ) ! %rename X %member wxInt32 m_x ! %rename Y %member wxInt32 m_y ! %rename Width %member wxInt32 m_width ! %rename Height %member wxInt32 m_height ! ! //wxRect2DInt& operator = (const wxRect2DInt& rect) - use copy constructor ! %operator bool operator == (const wxRect2DInt& rect) const //bool operator != (const wxRect2DInt& rect) const %endclass /////////////////////////////////////////////////////////////////////////////// ! // wxTransform2D - an abstract class ! //%include "wx/geometry.h" ! //%class %noclassinfo wxTransform2D ! // virtual void Transform( wxPoint2DInt* pt )const = 0 ! // virtual void Transform( wxRect2DInt* r ) const ! // virtual wxPoint2DInt Transform( const wxPoint2DInt &pt ) const ! // virtual wxRect2DInt Transform( const wxRect2DInt &r ) const ! // virtual void InverseTransform( wxPoint2DInt* pt ) const = 0 ! // virtual void InverseTransform( wxRect2DInt* r ) const ! // virtual wxPoint2DInt InverseTransform( const wxPoint2DInt &pt ) const ! // virtual wxRect2DInt InverseTransform( const wxRect2DInt &r ) const ! // void wxTransform2D::Transform( wxRect2DInt* r ) const ! // wxPoint2DInt wxTransform2D::Transform( const wxPoint2DInt &pt ) const ! // wxRect2DInt wxTransform2D::Transform( const wxRect2DInt &r ) const ! // void wxTransform2D::InverseTransform( wxRect2DInt* r ) const ! // wxPoint2DInt wxTransform2D::InverseTransform( const wxPoint2DInt &pt ) const ! // wxRect2DInt wxTransform2D::InverseTransform( const wxRect2DInt &r ) const ! //%endclass %endif wxLUA_USE_Geometry |
From: John L. <jr...@us...> - 2006-05-03 22:52:21
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27806/wxLua/modules/wxbindstc/src Modified Files: stc.cpp Log Message: don't track pushed wxWindows using EVT_DESTROY twice update geometry.i to 2.6.3 fix unary op - to use op_neg and fix binding operators in general update docs for op_neg Index: stc.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/stc.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** stc.cpp 26 Apr 2006 22:54:15 -0000 1.11 --- stc.cpp 3 May 2006 22:52:18 -0000 1.12 *************** *** 4688,4692 **** - // Overloaded function bindings --- 4688,4691 ---- *************** *** 5835,5839 **** - // Overloaded function bindings --- 5834,5837 ---- |
From: John L. <jr...@us...> - 2006-05-03 22:52:21
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27806/wxLua/bindings Modified Files: genwxbind.lua Log Message: don't track pushed wxWindows using EVT_DESTROY twice update geometry.i to 2.6.3 fix unary op - to use op_neg and fix binding operators in general update docs for op_neg Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** genwxbind.lua 2 May 2006 05:25:01 -0000 1.59 --- genwxbind.lua 3 May 2006 22:52:17 -0000 1.60 *************** *** 219,222 **** --- 219,223 ---- functionAttribs["static"] = true functionAttribs["virtual"] = true + functionAttribs["inline"] = true end *************** *** 967,971 **** operators["+"] = "op_add" ! operators["-"] = "op_sub" operators["*"] = "op_mul" operators["/"] = "op_div" --- 968,972 ---- operators["+"] = "op_add" ! operators["-"] = "op_sub" -- also op_neg if unary - operators["*"] = "op_mul" operators["/"] = "op_div" *************** *** 2142,2146 **** elseif lineState.IsOperator and string.find(tag, "operator", 1, 1) then ! -- eat the rest of the "operator+=" symbols which may be split before ( while lineTags[t+1] and (not string.find(lineTags[t+1], "(", 1, 1)) do tag = tag..lineTags[t+1] --- 2143,2147 ---- elseif lineState.IsOperator and string.find(tag, "operator", 1, 1) then ! -- eat the rest of the "operator+=(...)" symbols which may be split before ( while lineTags[t+1] and (not string.find(lineTags[t+1], "(", 1, 1)) do tag = tag..lineTags[t+1] *************** *** 3328,3331 **** --- 3329,3340 ---- end + -- special case for unary -, convert from op_sub to op_neg if necessary + if member.IsOperator and (table.getn(member.Params) == 0) and (member.Name == "op_sub") then + member.Name = "op_neg" + if member.AltName == "op_sub" then -- maybe they renamed it? + member.AltName = "op_neg" + end + end + funcName = "wxLua_"..MakeVar(parseObject.Name).."_"..MakeVar(member.AltName) if member.IsOverload then *************** *** 3503,3507 **** if member.IsOperator then memberPtr = false ! functor = "(*self)"..member.IsOperator -- static member function? elseif string.find(member.Name, "::") then --- 3512,3520 ---- if member.IsOperator then memberPtr = false ! if paramCount > 0 then ! functor = "(*self)"..member.IsOperator ! else ! functor = member.IsOperator.."(*self)" ! end -- static member function? elseif string.find(member.Name, "::") then *************** *** 3517,3522 **** end -- Add Function Argument List ! if argList ~= "" or member.IsFunction then functor = functor.."("..argList..")" end --- 3530,3537 ---- end + local is_func = iff(not member.IsOperator and member.IsFunction, true, false) + -- Add Function Argument List ! if argList ~= "" or is_func then functor = functor.."("..argList..")" end *************** *** 3533,3537 **** else -- call function, get return value ! if (not intrinsic) and (not memberPtr) then if (comment_cpp_binding_code) then table.insert(codeList, " // allocate a new object using the copy constructor\n") --- 3548,3555 ---- else -- call function, get return value ! if member.IsOperator and origMemberPtr and string.find(origMemberPtr, "&", 1, 1) then ! table.insert(codeList, " returns = self;\n") ! table.insert(codeList, " *returns = ("..functor..");\n") ! elseif (not intrinsic) and (not memberPtr) then if (comment_cpp_binding_code) then table.insert(codeList, " // allocate a new object using the copy constructor\n") *************** *** 4478,4482 **** overloadCount = overloadCount + 1 + table.getn(v) - print(overloadCount, table.getn(v)) end --- 4496,4499 ---- |
From: John L. <jr...@us...> - 2006-05-03 22:52:20
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27806/wxLua/docs Modified Files: binding.html wxlua.html Log Message: don't track pushed wxWindows using EVT_DESTROY twice update geometry.i to 2.6.3 fix unary op - to use op_neg and fix binding operators in general update docs for op_neg Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlua.html 28 Apr 2006 04:12:42 -0000 1.3 --- wxlua.html 3 May 2006 22:52:17 -0000 1.4 *************** *** 758,761 **** --- 758,765 ---- </li> + <li>"- (unary)" = "op_neg"<br> + + </li> + <li>"*" = "op_mul"<br> Index: binding.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/binding.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** binding.html 27 Apr 2006 05:17:21 -0000 1.8 --- binding.html 3 May 2006 22:52:17 -0000 1.9 *************** *** 525,528 **** --- 525,530 ---- "-" = "op_sub"<br> + "- (unary)" = "op_neg"<br> + "*" = "op_mul"<br> |
From: John L. <jr...@us...> - 2006-05-03 22:52:20
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27806/wxLua/bindings/wxstc Modified Files: wxstc_datatypes.lua Log Message: don't track pushed wxWindows using EVT_DESTROY twice update geometry.i to 2.6.3 fix unary op - to use op_neg and fix binding operators in general update docs for op_neg Index: wxstc_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_datatypes.lua,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxstc_datatypes.lua 1 May 2006 22:20:25 -0000 1.17 --- wxstc_datatypes.lua 3 May 2006 22:52:17 -0000 1.18 *************** *** 409,412 **** --- 409,417 ---- Name = "wxClientData", }, + wxClientDataContainer = { + DefType = "class", + Intrinsic = false, + Name = "wxClientDataContainer", + }, wxClipboard = { BaseClass = "wxObject", *************** *** 942,946 **** }, wxFontList = { - BaseClass = "wxList", Condition = "wxLUA_USE_wxFontList", DefType = "class", --- 947,950 ---- *************** *** 1047,1051 **** }, ["wxGridCellAttr::wxAttrKind"] = { ! Condition = "(wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxGrid)", DefType = "enum", Intrinsic = true, --- 1051,1055 ---- }, ["wxGridCellAttr::wxAttrKind"] = { ! Condition = "wxLUA_USE_wxGrid", DefType = "enum", Intrinsic = true, *************** *** 1058,1061 **** --- 1062,1079 ---- Name = "wxGridCellAttrProvider", }, + wxGridCellAutoWrapStringEditor = { + BaseClass = "wxGridCellTextEditor", + Condition = "wxLUA_USE_wxGrid", + DefType = "class", + Intrinsic = false, + Name = "wxGridCellAutoWrapStringEditor", + }, + wxGridCellAutoWrapStringRenderer = { + BaseClass = "wxGridCellStringRenderer", + Condition = "wxLUA_USE_wxGrid", + DefType = "class", + Intrinsic = false, + Name = "wxGridCellAutoWrapStringRenderer", + }, wxGridCellBoolEditor = { BaseClass = "wxGridCellEditor", *************** *** 1072,1075 **** --- 1090,1100 ---- Name = "wxGridCellBoolRenderer", }, + wxGridCellChoiceEditor = { + BaseClass = "wxGridCellEditor", + Condition = "wxLUA_USE_wxGrid", + DefType = "class", + Intrinsic = false, + Name = "wxGridCellChoiceEditor", + }, wxGridCellCoords = { Condition = "wxLUA_USE_wxGrid", *************** *** 1078,1082 **** --- 1103,1115 ---- Name = "wxGridCellCoords", }, + wxGridCellDateTimeRenderer = { + BaseClass = "wxGridCellStringRenderer", + Condition = "wxLUA_USE_wxGrid", + DefType = "class", + Intrinsic = false, + Name = "wxGridCellDateTimeRenderer", + }, wxGridCellEditor = { + BaseClass = "wxGridCellWorker", Condition = "wxLUA_USE_wxGrid", DefType = "class", *************** *** 1084,1087 **** --- 1117,1134 ---- Name = "wxGridCellEditor", }, + wxGridCellEnumEditor = { + BaseClass = "wxGridCellChoiceEditor", + Condition = "wxLUA_USE_wxGrid", + DefType = "class", + Intrinsic = false, + Name = "wxGridCellEnumEditor", + }, + wxGridCellEnumRenderer = { + BaseClass = "wxGridCellStringRenderer", + Condition = "wxLUA_USE_wxGrid", + DefType = "class", + Intrinsic = false, + Name = "wxGridCellEnumRenderer", + }, wxGridCellFloatEditor = { BaseClass = "wxGridCellTextEditor", *************** *** 1113,1116 **** --- 1160,1164 ---- }, wxGridCellRenderer = { + BaseClass = "wxGridCellWorker", Condition = "wxLUA_USE_wxGrid", DefType = "class", *************** *** 1132,1135 **** --- 1180,1190 ---- Name = "wxGridCellTextEditor", }, + wxGridCellWorker = { + BaseClass = "wxClientDataContainer", + Condition = "wxLUA_USE_wxGrid", + DefType = "class", + Intrinsic = false, + Name = "wxGridCellWorker", + }, wxGridEditorCreatedEvent = { BaseClass = "wxCommandEvent", |
From: John L. <jr...@us...> - 2006-05-03 04:45:55
|
Update of /cvsroot/wxlua/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16621/website Modified Files: index.php screenshots.php support.php Log Message: slight updates Index: support.php =================================================================== RCS file: /cvsroot/wxlua/website/support.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** support.php 3 May 2006 04:40:18 -0000 1.6 --- support.php 3 May 2006 04:45:51 -0000 1.7 *************** *** 28,32 **** <p>It depends: <a href="http://www.wxpython.org/">wxPython</a> has a much larger footprint and greater overhead than wxLua, but it does provide more add-ons from the Python standard library.</p> <p>On the other hand, wxLua is as large as the wxWidgets library + ~100K for lua and can be easily interfaced with C++ code making it a powerful extension language (which is exactly the intent of its designers); look at <a href="http://www.lua.org/about.html">this page</a> for more info.</p> ! <p>In conclusion, if you want to write an entire application in a scripting language and you need things supported by Python which are not present out-of-the-box in wxLua, then you should use wxPython. Instead, if you want to write small applications with little overhead or extend your C++ applications, go for wxLua.</p> </div> --- 28,32 ---- <p>It depends: <a href="http://www.wxpython.org/">wxPython</a> has a much larger footprint and greater overhead than wxLua, but it does provide more add-ons from the Python standard library.</p> <p>On the other hand, wxLua is as large as the wxWidgets library + ~100K for lua and can be easily interfaced with C++ code making it a powerful extension language (which is exactly the intent of its designers); look at <a href="http://www.lua.org/about.html">this page</a> for more info.</p> ! <p>In conclusion, if you want to write an entire application in a scripting language and you need things supported by Python which are not present in wxLua out-of-the-box, then you should use wxPython. Instead, if you want to write applications with little overhead or extend your C++ applications, go for wxLua.</p> </div> Index: screenshots.php =================================================================== RCS file: /cvsroot/wxlua/website/screenshots.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** screenshots.php 3 May 2006 04:40:18 -0000 1.10 --- screenshots.php 3 May 2006 04:45:51 -0000 1.11 *************** *** 13,17 **** ?> ! <h1 id="win" class="first">wxLua on Windows</h1> <p>wxLua makes it simple to write applications perfectly integrated in Windows, thanks to the <strong>wxMSW</strong> port of <a href="http://www.wxwidgets.org">wxWidgets</a> toolkit:</p> <div style="text-align: center"> --- 13,17 ---- ?> ! <h1 id="win" class="first">wxLua on MS Windows</h1> <p>wxLua makes it simple to write applications perfectly integrated in Windows, thanks to the <strong>wxMSW</strong> port of <a href="http://www.wxwidgets.org">wxWidgets</a> toolkit:</p> <div style="text-align: center"> Index: index.php =================================================================== RCS file: /cvsroot/wxlua/website/index.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** index.php 3 May 2006 04:40:18 -0000 1.12 --- index.php 3 May 2006 04:45:51 -0000 1.13 *************** *** 24,30 **** <p>Additionally, wxLua can be used in your C++ programs to embed a <em>lua interpreter</em> ! with wxWidgets API bindings. See <a href="docs.php">wxLua documentation</a> for more info.</p> ! <p>Want an example of how easy can it is to write a cross-platform GUI? Here is a simple lua script which creates a wxFrame top level window and a menubar, just add your program to it:</p> <?php include_once("luasample.lua.html"); ?> --- 24,30 ---- <p>Additionally, wxLua can be used in your C++ programs to embed a <em>lua interpreter</em> ! with the wxWidgets API bindings. See the <a href="docs.php">wxLua documentation</a> for more info.</p> ! <p>Want an example of how easy it is to write a cross-platform GUI? Here is a simple lua script which creates a wxFrame top level window and a menubar, just add your program to it:</p> <?php include_once("luasample.lua.html"); ?> |
From: John L. <jr...@us...> - 2006-05-03 04:40:25
|
Update of /cvsroot/wxlua/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12548/website Modified Files: docs.php download.php index.php license.php screenshots.php support.php Log Message: small corrections, typos and such Index: support.php =================================================================== RCS file: /cvsroot/wxlua/website/support.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** support.php 6 Mar 2006 21:31:01 -0000 1.5 --- support.php 3 May 2006 04:40:18 -0000 1.6 *************** *** 11,15 **** is where wxLua developers and users work on and discuss about wxLua; you can <a href="http://sourceforge.net/mailarchive/forum.php?forum_id=45271">browse the archives</a>, <a href="http://sourceforge.net/search/index.php?type_of_search=mlists&group_id=140042&forum_id=45271">search them</a> or just <a href="http://lists.sourceforge.net/lists/listinfo/wxlua-users">subscribe it</a> and ask for help.</p> ! <p>You can also browse it through <a href="http://news.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user">GMane web interface</a> or <a href="http://search.gmane.org/index.php?group=gmane.comp.lib.wxwidgets.wxlua.user">search it (using GMane)</a>. More info about <strong>GMane</strong> services for wxLua mailing list can be found at <a href="http://dir.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user">http://dir.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user</a>.</p> <p><strong>Recent changes</strong> to wxLua's CVS can be viewed at --- 11,16 ---- is where wxLua developers and users work on and discuss about wxLua; you can <a href="http://sourceforge.net/mailarchive/forum.php?forum_id=45271">browse the archives</a>, <a href="http://sourceforge.net/search/index.php?type_of_search=mlists&group_id=140042&forum_id=45271">search them</a> or just <a href="http://lists.sourceforge.net/lists/listinfo/wxlua-users">subscribe it</a> and ask for help.</p> ! <p>You can also browse it through the <a href="http://news.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user">GMane web interface</a> or <a href="http://search.gmane.org/index.php?group=gmane.comp.lib.wxwidgets.wxlua.user">search it (using GMane)</a>. ! More info about <strong>GMane</strong> services for the wxLua mailing list can be found at <a href="http://dir.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user">http://dir.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user</a>.</p> <p><strong>Recent changes</strong> to wxLua's CVS can be viewed at *************** *** 21,29 **** <h2>1. Can I use wxLua as script interpreter embedded in my own applications ?</h2> <p>Yes ! That's explained also in the <a href="index.php">homepage</a>. This is one of the strong points of wxLua: ! it can be a lightweight, fast interpreter to extend your application and let the user customize it...</p> <h2>2. What's best for my needs: wxLua, wxPython, wxSomethingElse ?</h2> ! <p>It depends: <a href="http://www.wxpython.org/">wxPython</a> is much bigger than wxLua: it has a greater overhead but provides also a better support in some fields covered by Python standard library where wxLua instead lacks support.</p> ! <p>On the other hand, wxLua is much more small and can be easily interfaced with C++ code making it a powerful extension language (which is exactly the intent of its designers); look at <a href="http://www.lua.org/about.html">this page</a> for more info.</p> <p>In conclusion, if you want to write an entire application in a scripting language and you need things supported by Python which are not present out-of-the-box in wxLua, then you should use wxPython. Instead, if you want to write small applications with little overhead or extend your C++ applications, go for wxLua.</p> </div> --- 22,31 ---- <h2>1. Can I use wxLua as script interpreter embedded in my own applications ?</h2> <p>Yes ! That's explained also in the <a href="index.php">homepage</a>. This is one of the strong points of wxLua: ! it can be a lightweight, fast interpreter to extend your application and let the user customize it... ! You may create as many wxLua interpreters in a single program as you like.</p> <h2>2. What's best for my needs: wxLua, wxPython, wxSomethingElse ?</h2> ! <p>It depends: <a href="http://www.wxpython.org/">wxPython</a> has a much larger footprint and greater overhead than wxLua, but it does provide more add-ons from the Python standard library.</p> ! <p>On the other hand, wxLua is as large as the wxWidgets library + ~100K for lua and can be easily interfaced with C++ code making it a powerful extension language (which is exactly the intent of its designers); look at <a href="http://www.lua.org/about.html">this page</a> for more info.</p> <p>In conclusion, if you want to write an entire application in a scripting language and you need things supported by Python which are not present out-of-the-box in wxLua, then you should use wxPython. Instead, if you want to write small applications with little overhead or extend your C++ applications, go for wxLua.</p> </div> Index: docs.php =================================================================== RCS file: /cvsroot/wxlua/website/docs.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** docs.php 26 Apr 2006 05:48:50 -0000 1.10 --- docs.php 3 May 2006 04:40:18 -0000 1.11 *************** *** 9,52 **** <h1 id="wxlua" class="first">wxLua documentation</h1> <p>Read the <a href="docs/wxlua.html">wxLua documentation</a> that describes ! programming in lua and wxLua as well as how to use the wxLua library in a C++ program</p> <h1 id="lua">Lua documentation</h1> ! <p>The <a href="http://www.lua.org/docs.html">Lua reference manual</a> at <a href="http://www.lua.org">www.lua.org</a> describes the lua language in detail.</p> <h1 id="wxwidgets">wxWidgets documentation</h1> <p>The <a href="http://www.wxwidgets.org/docs.htm">wxWidgets reference manual</a> on ! <a href="http://www.wxwidgets.org">www.wxwidgets.org</a> is the official reference for the wxWidgets classes that wxLua wraps.</p> <h1 id="doxy">Doxygen-generated docs</h1> ! <p>There is a <a href="http://www.doxygen.org">doxygen</a>-generated documentation for ! the C++ wxLua library at <a href="docs/doxygen/html/index.html">this page</a>...</p> <h1 id="install">Compiling and installing</h1> ! <p>Please read the <a href="docs/install.html">install.html</a> file from the docs directory.</p> ! <h1 id="bindings">Writing and understanding the bindings</h1> <p>Read the <a href="docs/binding.html">binding.html</a> file from the docs directory. Also, take a look at a few of the binding files on <a href="http://cvs.sourceforge.net/viewcvs.py/wxlua/wxLua/bindings/wxwidgets">Sourceforge</a> or from our <a href="http://wxlua.sourceforge.net/wxLua/bindings/wxwidgets/">nightly tarball</a> ! to see how they're constructed and how they're simplified versions of the original C/C++ code.</p> <h1 id="cvs">CVS</h1> ! <p>CVS sources are the definitive documentation :)<br/> ! You can access them at <a href="http://cvs.sourceforge.net/viewcvs.py/wxlua/wxLua">this page</a>.</p> <h1 id="authors">Authors</h1> <p>The wxLua developers team is composed by various developers (listed in chronological order):</p> <ol> ! <li><p><strong>Paul and J Winwood</strong>: the original authors. Now not working actively anymore.</p></li> ! <li><p><strong>Francis Irving</strong>: author of the wxLua standalone application. Now not working actively anymore</p></li> ! <li><p><strong>John Labenski</strong>: author of most of the wxLuaEdit application and wxLua lead developer and maintainer.</p></li> ! <li><p><strong>Ray Gilbert</strong>: worked on the wxLua bindings parser. Now not working actively anymore</p></li> ! <li><p><strong>Klaas Holwerda</strong>: author of wxLuaCan sample and indefatigable source of ideas.</p></li> ! <li><p><strong>Francesco Montorsi</strong>: worked on the bakefile-based build system, on this website and the wxLua packaging.</p></li> ! <li><p><strong>Anders F Björklund</strong>: contributed wxMac screenshots and created wxMac package.</p></li> ! <li><p><strong>Did we forget you?</strong> contact us and we'll add you.</p></li> </ol> <p>Credits also goes to all those tools which lets us to maintain the project: <a href="http://bakefile.sourceforge.net">bakefile</a>, <a href="http://www.doxygen.org">doxygen</a>, <a href="http://www.autopackage.org">autopackage</a> projects and obviously to <a href="http://www.wxwidgets.org">wxWidgets toolkit</a> and to <a href="http://www.sourceforge.net">SourceForge.net</a> for hosting the project.</p> --- 9,53 ---- <h1 id="wxlua" class="first">wxLua documentation</h1> <p>Read the <a href="docs/wxlua.html">wxLua documentation</a> that describes ! programming in lua and wxLua as well as how to use the wxLua library in a C++ program.</p> <h1 id="lua">Lua documentation</h1> ! <p>The <a href="http://www.lua.org/docs.html">Lua reference manual</a> on <a href="http://www.lua.org">www.lua.org</a> describes the lua language in detail.</p> <h1 id="wxwidgets">wxWidgets documentation</h1> <p>The <a href="http://www.wxwidgets.org/docs.htm">wxWidgets reference manual</a> on ! <a href="http://www.wxwidgets.org">www.wxwidgets.org</a> is the best reference for the wxWidgets classes that wxLua wraps.</p> <h1 id="doxy">Doxygen-generated docs</h1> ! <p>There are <a href="http://www.doxygen.org">doxygen</a>-generated documentation for ! the C++ wxLua library on <a href="docs/doxygen/html/index.html">this page</a>.</p> <h1 id="install">Compiling and installing</h1> ! <p>Please read the <a href="docs/install.html">install.html</a> file from wxLua's docs directory.</p> ! <h1 id="bindings">Writing and understanding the binding files</h1> <p>Read the <a href="docs/binding.html">binding.html</a> file from the docs directory. Also, take a look at a few of the binding files on <a href="http://cvs.sourceforge.net/viewcvs.py/wxlua/wxLua/bindings/wxwidgets">Sourceforge</a> or from our <a href="http://wxlua.sourceforge.net/wxLua/bindings/wxwidgets/">nightly tarball</a> ! to see how they're constructed and how they're merely simplified versions of the original C/C++ code.</p> <h1 id="cvs">CVS</h1> ! <p>You can access a web version of them on <a href="http://cvs.sourceforge.net/viewcvs.py/wxlua/wxLua">this page</a>.<br/> ! Note: The Sourceforge ViewCVS has not been updated in months, more up to date sources can be downloaded or ! browsed from the nightly tarball link on the <a href="download.php">download</a> page.</p> <h1 id="authors">Authors</h1> <p>The wxLua developers team is composed by various developers (listed in chronological order):</p> <ol> ! <li><p><strong>Paul and J Winwood</strong>: The original authors. Now not working actively anymore.</p></li> ! <li><p><strong>Francis Irving</strong>: Author of the wxLua standalone application. Now not working actively anymore</p></li> ! <li><p><strong>John Labenski</strong>: Author of most of the wxLuaEdit application and wxLua lead developer and maintainer.</p></li> ! <li><p><strong>Ray Gilbert</strong>: Worked on the wxLua bindings parser. Now not working actively anymore</p></li> ! <li><p><strong>Klaas Holwerda</strong>: Author of wxLuaCan sample and indefatigable source of ideas.</p></li> ! <li><p><strong>Francesco Montorsi</strong>: Worked on the bakefile-based build system, on this website and the wxLua packaging.</p></li> ! <li><p><strong>Anders F Björklund</strong>: Contributed wxMac screenshots and created wxMac package.</p></li> ! <li><p><strong>Did we forget you?</strong> Contact us and we'll add you.</p></li> </ol> <p>Credits also goes to all those tools which lets us to maintain the project: <a href="http://bakefile.sourceforge.net">bakefile</a>, <a href="http://www.doxygen.org">doxygen</a>, <a href="http://www.autopackage.org">autopackage</a> projects and obviously to <a href="http://www.wxwidgets.org">wxWidgets toolkit</a> and to <a href="http://www.sourceforge.net">SourceForge.net</a> for hosting the project.</p> Index: index.php =================================================================== RCS file: /cvsroot/wxlua/website/index.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** index.php 6 Mar 2006 21:31:01 -0000 1.11 --- index.php 3 May 2006 04:40:18 -0000 1.12 *************** *** 15,20 **** <h1 id="whatis" class="first">What is wxLua ?</h1> ! <p>wxLua is a set of bindings to <a href="http://www.wxwidgets.org">wxWidgets</a> for the ! <a href="http://www.lua.org">Lua</a> language. With <strong>wxLua</strong> you can write programs in Lua that use the wxWidgets <a href="http://en.wikipedia.org/wiki/Cross-platform">cross-platform</a> GUI library to develop and deliver your software with the programming ease of an interpreted language like Lua. --- 15,20 ---- <h1 id="whatis" class="first">What is wxLua ?</h1> ! <p>wxLua is a set of bindings to the <a href="http://www.wxwidgets.org">wxWidgets</a> library for the ! <a href="http://www.lua.org">Lua</a> programming language. With <strong>wxLua</strong> you can write programs in Lua that use the wxWidgets <a href="http://en.wikipedia.org/wiki/Cross-platform">cross-platform</a> GUI library to develop and deliver your software with the programming ease of an interpreted language like Lua. *************** *** 26,31 **** with wxWidgets API bindings. See <a href="docs.php">wxLua documentation</a> for more info.</p> ! <p>Want an example of how easy can it be a cross-platform GUI? Here it is a simple lua script which creates a ! wxFrame window:</p> <?php include_once("luasample.lua.html"); ?> <p>Easy, isn't it ? You can see more samples <a href="http://cvs.sourceforge.net/viewcvs.py/wxlua/wxLua/samples/">here</a>.</p> --- 26,31 ---- with wxWidgets API bindings. See <a href="docs.php">wxLua documentation</a> for more info.</p> ! <p>Want an example of how easy can it is to write a cross-platform GUI? Here is a simple lua script which creates a ! wxFrame top level window and a menubar, just add your program to it:</p> <?php include_once("luasample.lua.html"); ?> <p>Easy, isn't it ? You can see more samples <a href="http://cvs.sourceforge.net/viewcvs.py/wxlua/wxLua/samples/">here</a>.</p> Index: screenshots.php =================================================================== RCS file: /cvsroot/wxlua/website/screenshots.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** screenshots.php 8 Mar 2006 23:20:19 -0000 1.9 --- screenshots.php 3 May 2006 04:40:18 -0000 1.10 *************** *** 2,7 **** <?php $pagetitle="screenshots"; ! $anchors_href=array("win", "gtk2"); ! $anchors_text=array("wxLua on Windows", "wxLua on GTK2"); include_once("header.inc.php"); --- 2,7 ---- <?php $pagetitle="screenshots"; ! $anchors_href=array("win", "gtk2", "osx", "other"); ! $anchors_text=array("wxLua on Windows", "wxLua on GTK2", "wxLua on OSX", "wxLua on ?"); include_once("header.inc.php"); *************** *** 36,40 **** </div> ! <h1 id="gtk2">wxLua on Mac OS X</h1> <p>The <a href="http://www.wxwidgets.org">wxWidgets</a> port under Macintosh platforms is called <strong>wxMac</strong> and makes wxLua applications look exactly like native Mac applications:</p> <div style="text-align: center"> --- 36,40 ---- </div> ! <h1 id="osx">wxLua on Mac OS X</h1> <p>The <a href="http://www.wxwidgets.org">wxWidgets</a> port under Macintosh platforms is called <strong>wxMac</strong> and makes wxLua applications look exactly like native Mac applications:</p> <div style="text-align: center"> *************** *** 45,48 **** --- 45,55 ---- ?> </div> + + <h1 id="other">wxLua on ?</h1> + <p>The other ports that <a href="http://www.wxwidgets.org">wxWidgets</a> is available for may also work with wxLua, but we need testers:</p> + <div style="text-align: center"> + <?php + ?> + </div> <?php include_once("footer.inc.php"); ?> \ No newline at end of file Index: license.php =================================================================== RCS file: /cvsroot/wxlua/website/license.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** license.php 19 Feb 2006 15:35:13 -0000 1.1 --- license.php 3 May 2006 04:40:18 -0000 1.2 *************** *** 10,14 **** <h1 id="wxlualicense" class="first">wxLua license</h1> ! <p>wxLua license is the same license under which wxWidgets is released.<br/> A copy of this license, OSI approved, is available also at OSI website: <a href="http://www.opensource.org/licenses/wxwindows.php">http://www.opensource.org/licenses/wxwindows.php</a>...</p> --- 10,14 ---- <h1 id="wxlualicense" class="first">wxLua license</h1> ! <p>wxLua is released with the same license as wxWidgets.<br/> A copy of this license, OSI approved, is available also at OSI website: <a href="http://www.opensource.org/licenses/wxwindows.php">http://www.opensource.org/licenses/wxwindows.php</a>...</p> Index: download.php =================================================================== RCS file: /cvsroot/wxlua/website/download.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** download.php 26 Apr 2006 05:37:36 -0000 1.15 --- download.php 3 May 2006 04:40:18 -0000 1.16 *************** *** 113,120 **** <div class="indented"> <h2 id="snapshot">Nightly snapshot</h2> ! <p>A nightly tarball (tar.gz) source package is created with Unix linefeeds for the sources, but DOS linefeeds for build files:<br> ! This combination seems to work for most people.</p> <ul> ! <li>Browse <a href="http://wxlua.sourceforge.net/download/">wxLua_Snapshot_[DATE].tar.gz</a> source packages</li> </ul> </div> --- 113,120 ---- <div class="indented"> <h2 id="snapshot">Nightly snapshot</h2> ! <p>A nightly tarball (tar.gz) source package is created with Unix linefeeds (LF) for the sources, but DOS linefeeds (CRLF) for the build files for MSWindows compilers.<br> ! This combination seems to work for most people. If not, you can use the programs dos2unix and unix2dos which are available for most systems.</p> <ul> ! <li>Browse <a href="http://wxlua.sourceforge.net/download/">wxLua_Snapshot_YYYY-MM-DD.tar.gz</a> source packages</li> </ul> </div> *************** *** 131,138 **** <br/> ! <p><strong>NOTE</strong>: for bleeding edge versions of wxLua, which work for example with latests wxWidgets CVS, you should ! checkout the wxLua module using <a href="http://sourceforge.net/cvs/?group_id=140042">these instructions</a>.</p> ! <p><strong>NOTE 2</strong>: this page lists only the latest release of wxLua. If you are interested to previous releases visit the wxLua <a href="http://sourceforge.net/project/showfiles.php?group_id=140042">download page at SourceForge</a>.</p> --- 131,138 ---- <br/> ! <p><strong>NOTE</strong>: For bleeding edge versions of wxLua, which work for example with the latest wxWidgets CVS, you should ! checkout the wxLua CVS module using <a href="http://sourceforge.net/cvs/?group_id=140042">these instructions</a>.</p> ! <p><strong>NOTE 2</strong>: This page lists only the latest release of wxLua. If you are interested to previous releases visit the wxLua <a href="http://sourceforge.net/project/showfiles.php?group_id=140042">download page at SourceForge</a>.</p> |
From: John L. <jr...@us...> - 2006-05-02 22:46:57
|
Update of /cvsroot/wxlua/wxLua/modules/lua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23730/wxLua/modules/lua/src Modified Files: lstate.c luathread.h Log Message: rename coroutine tracking functions luaX_ to wxLua_lua_ to make them more obvious slight cleanup otherwise Index: lstate.c =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/lstate.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lstate.c 29 Mar 2006 05:48:11 -0000 1.2 --- lstate.c 2 May 2006 22:46:53 -0000 1.3 *************** *** 143,165 **** /* wxlua - track child threads see wxLuaState */ //#include <luathread.h> ! typedef void (* newthread_handler)(lua_State *L, lua_State *NL); ! typedef void (* freethread_handler)(lua_State *L, lua_State *NL); ! static newthread_handler pNewthread_handler = (newthread_handler) NULL; ! static freethread_handler pFreethread_handler = (freethread_handler) NULL; ! LUA_API newthread_handler luaX_getnewthreadhandler() { return pNewthread_handler; } ! LUA_API void luaX_setnewthreadhandler( newthread_handler handler ) { pNewthread_handler = handler; } ! LUA_API freethread_handler luaX_getfreethreadhandler() { return pFreethread_handler; } ! LUA_API void luaX_setfreethreadhandler( freethread_handler handler ) { pFreethread_handler = handler; } --- 143,165 ---- /* wxlua - track child threads see wxLuaState */ //#include <luathread.h> ! typedef void (* wxlua_newthread_handler)(lua_State *L, lua_State *NL); ! typedef void (* wxlua_freethread_handler)(lua_State *L, lua_State *NL); ! static wxlua_newthread_handler pNewthread_handler = (wxlua_newthread_handler) NULL; ! static wxlua_freethread_handler pFreethread_handler = (wxlua_freethread_handler) NULL; ! LUA_API wxlua_newthread_handler wxLua_lua_getnewthreadhandler() { return pNewthread_handler; } ! LUA_API void wxLua_lua_setnewthreadhandler( wxlua_newthread_handler handler ) { pNewthread_handler = handler; } ! LUA_API wxlua_freethread_handler wxLua_lua_getfreethreadhandler() { return pFreethread_handler; } ! LUA_API void wxLua_lua_setfreethreadhandler( wxlua_freethread_handler handler ) { pFreethread_handler = handler; } Index: luathread.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/src/luathread.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** luathread.h 30 Mar 2006 02:48:40 -0000 1.1 --- luathread.h 2 May 2006 22:46:53 -0000 1.2 *************** *** 2,14 **** #define luathread_h ! typedef void (* newthread_handler)(lua_State *L, lua_State *NL); ! LUA_API void luaX_setnewthreadhandler( newthread_handler handler ); ! LUA_API newthread_handler luaX_getnewthreadhandler(); ! typedef void (* freethread_handler)(lua_State *L, lua_State *NL); ! LUA_API void luaX_setfreethreadhandler( freethread_handler handler ); ! LUA_API freethread_handler luaX_getfreethreadhandler(); #endif --- 2,14 ---- #define luathread_h ! typedef void (* wxlua_newthread_handler)(lua_State *L, lua_State *NL); ! LUA_API void wxLua_lua_setnewthreadhandler( wxlua_newthread_handler handler ); ! LUA_API wxlua_newthread_handler wxLua_lua_getnewthreadhandler(); ! typedef void (* wxlua_freethread_handler)(lua_State *L, lua_State *NL); ! LUA_API void wxLua_lua_setfreethreadhandler( wxlua_freethread_handler handler ); ! LUA_API wxlua_freethread_handler wxLua_lua_getfreethreadhandler(); #endif |
From: John L. <jr...@us...> - 2006-05-02 22:46:57
|
Update of /cvsroot/wxlua/wxLua/modules/lua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23730/wxLua/modules/lua/include Modified Files: luathread.h Log Message: rename coroutine tracking functions luaX_ to wxLua_lua_ to make them more obvious slight cleanup otherwise Index: luathread.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/lua/include/luathread.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** luathread.h 6 Jun 2005 23:06:15 -0000 1.1 --- luathread.h 2 May 2006 22:46:53 -0000 1.2 *************** *** 2,14 **** #define luathread_h ! typedef void (* newthread_handler)(lua_State *L, lua_State *NL); ! LUA_API void luaX_setnewthreadhandler( newthread_handler handler ); ! LUA_API newthread_handler luaX_getnewthreadhandler(); ! typedef void (* freethread_handler)(lua_State *L, lua_State *NL); ! LUA_API void luaX_setfreethreadhandler( freethread_handler handler ); ! LUA_API freethread_handler luaX_getfreethreadhandler(); #endif --- 2,14 ---- #define luathread_h ! typedef void (* wxlua_newthread_handler)(lua_State *L, lua_State *NL); ! LUA_API void wxLua_lua_setnewthreadhandler( wxlua_newthread_handler handler ); ! LUA_API wxlua_newthread_handler wxLua_lua_getnewthreadhandler(); ! typedef void (* wxlua_freethread_handler)(lua_State *L, lua_State *NL); ! LUA_API void wxLua_lua_setfreethreadhandler( wxlua_freethread_handler handler ); ! LUA_API wxlua_freethread_handler wxLua_lua_getfreethreadhandler(); #endif |
From: John L. <jr...@us...> - 2006-05-02 22:46:57
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23730/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: rename coroutine tracking functions luaX_ to wxLua_lua_ to make them more obvious slight cleanup otherwise Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** wxlstate.h 20 Apr 2006 01:10:58 -0000 1.43 --- wxlstate.h 2 May 2006 22:46:53 -0000 1.44 *************** *** 426,430 **** // wxLua lua Registry Table Functions ! // create a reference to the object at index iParam in the Lua index int tinsert(int iParam); // push onto the top of the stack the object referenced by iReference --- 426,430 ---- // wxLua lua Registry Table Functions ! // create a reference to the object at index iParam in the Lua stack int tinsert(int iParam); // push onto the top of the stack the object referenced by iReference |
From: John L. <jr...@us...> - 2006-05-02 22:46:57
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23730/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: rename coroutine tracking functions luaX_ to wxLua_lua_ to make them more obvious slight cleanup otherwise Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** wxlstate.cpp 2 May 2006 05:25:06 -0000 1.62 --- wxlstate.cpp 2 May 2006 22:46:53 -0000 1.63 *************** *** 131,138 **** static void wxLuaState_SetupThreadHandlers() { ! if (luaX_getnewthreadhandler() == NULL) ! luaX_setnewthreadhandler( wxLuaState_newthread_handler ); ! if (luaX_getfreethreadhandler() == NULL) ! luaX_setfreethreadhandler( wxLuaState_freethread_handler ); } --- 131,138 ---- static void wxLuaState_SetupThreadHandlers() { ! if (wxLua_lua_getnewthreadhandler() == NULL) ! wxLua_lua_setnewthreadhandler( wxLuaState_newthread_handler ); ! if (wxLua_lua_getfreethreadhandler() == NULL) ! wxLua_lua_setfreethreadhandler( wxLuaState_freethread_handler ); } *************** *** 1983,1990 **** if (data != NULL) { // if the object we are referencing is derived from wxWindow if (IsDerivedClass(iTag, GetwxWindowTag())) // s_wxluatag_wxWindow { ! wxWindow *win = wxDynamicCast(data, wxWindow); if (win != NULL) { --- 1983,1992 ---- if (data != NULL) { + wxWindow *win = NULL; + // if the object we are referencing is derived from wxWindow if (IsDerivedClass(iTag, GetwxWindowTag())) // s_wxluatag_wxWindow { ! win = wxDynamicCast(data, wxWindow); if (win != NULL) { *************** *** 1999,2013 **** } } - else - { - // Otherwise handle normally - tpushusertag(data, iTag); - } } ! else ! { ! // Otherwise handle normally tpushusertag(data, iTag); ! } } else --- 2001,2010 ---- } } } ! ! // Otherwise handle normally ! if (win == NULL) tpushusertag(data, iTag); ! } else |