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...> - 2007-03-02 05:44:56
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18504/wxLua/bindings/wxstc Modified Files: wxstc_datatypes.lua Log Message: update more bindings to 2.8 using header files Index: wxstc_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_datatypes.lua,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** wxstc_datatypes.lua 23 Feb 2007 04:35:30 -0000 1.44 --- wxstc_datatypes.lua 2 Mar 2007 05:44:21 -0000 1.45 *************** *** 267,270 **** --- 267,277 ---- Name = "wxArtProvider", }, + wxAutoBufferedPaintDC = { + BaseClass = "wxDC", + Condition = "(wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC)", + DefType = "class", + IsNumber = false, + Name = "wxAutoBufferedPaintDC", + }, wxBMPHandler = { BaseClass = "wxImageHandler", *************** *** 667,670 **** --- 674,683 ---- Name = "wxDataFormatId", }, + wxDataInputStream = { + Condition = "wxUSE_STREAMS", + DefType = "class", + IsNumber = false, + Name = "wxDataInputStream", + }, wxDataObject = { Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", *************** *** 693,696 **** --- 706,715 ---- Name = "wxDataObjectSimple", }, + wxDataOutputStream = { + Condition = "wxUSE_STREAMS", + DefType = "class", + IsNumber = false, + Name = "wxDataOutputStream", + }, wxDateEvent = { BaseClass = "wxCommandEvent", *************** *** 1752,1755 **** --- 1771,1780 ---- Name = "wxLayoutConstraints", }, + wxLayoutDirection = { + Condition = "(wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC)", + DefType = "enum", + IsNumber = true, + Name = "wxLayoutDirection", + }, wxLayoutOrientation = { Condition = "wxLUA_USE_wxSashWindow && wxUSE_SASH", |
From: John L. <jr...@us...> - 2007-03-02 05:44:33
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18504/wxLua/modules/wxbind/src Modified Files: appframe.cpp clipdrag.cpp controls.cpp file.cpp gdi.cpp image.cpp print.cpp wave.cpp windows.cpp wx_bind.cpp Log Message: update more bindings to 2.8 using header files Index: print.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/print.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** print.cpp 26 Feb 2007 01:57:04 -0000 1.28 --- print.cpp 2 Mar 2007 05:44:28 -0000 1.29 *************** *** 597,600 **** --- 597,664 ---- + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE) + // %wxchkver_2_8 int GetMedia() const + static int LUACALL wxLua_wxPrintData_GetMedia(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // get this + wxPrintData * self = (wxPrintData *)wxlState.GetUserDataType(1, s_wxluatag_wxPrintData); + // call GetMedia + returns = self->GetMedia(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // %wxchkver_2_8 bool IsOrientationReversed() const + static int LUACALL wxLua_wxPrintData_IsOrientationReversed(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxPrintData * self = (wxPrintData *)wxlState.GetUserDataType(1, s_wxluatag_wxPrintData); + // call IsOrientationReversed + returns = self->IsOrientationReversed(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxPrintData_SetOrientationReversed[] = { &s_wxluaarg_Boolean, 0 }; + // %wxchkver_2_8 void SetOrientationReversed(bool reversed) + static int LUACALL wxLua_wxPrintData_SetOrientationReversed(lua_State *L) + { + wxLuaState wxlState(L); + // bool reversed + bool reversed = wxlState.GetBooleanType(2); + // get this + wxPrintData * self = (wxPrintData *)wxlState.GetUserDataType(1, s_wxluatag_wxPrintData); + // call SetOrientationReversed + self->SetOrientationReversed(reversed); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxPrintData_SetMedia[] = { &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 void SetMedia(int media) + static int LUACALL wxLua_wxPrintData_SetMedia(lua_State *L) + { + wxLuaState wxlState(L); + // int media + int media = (int)wxlState.GetNumberType(2); + // get this + wxPrintData * self = (wxPrintData *)wxlState.GetUserDataType(1, s_wxluatag_wxPrintData); + // call SetMedia + self->SetMedia(media); + + return 0; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE) + + #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE) // wxSize GetPaperSize() const *************** *** 1049,1052 **** --- 1113,1124 ---- + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE) + { LuaMethod, "GetMedia", wxLua_wxPrintData_GetMedia, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "IsOrientationReversed", wxLua_wxPrintData_IsOrientationReversed, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetOrientationReversed", wxLua_wxPrintData_SetOrientationReversed, 1, 1, s_wxluatagArray_wxLua_wxPrintData_SetOrientationReversed }, + { LuaMethod, "SetMedia", wxLua_wxPrintData_SetMedia, 1, 1, s_wxluatagArray_wxLua_wxPrintData_SetMedia }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE) + + #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE) { LuaMethod, "GetPaperSize", wxLua_wxPrintData_GetPaperSize, 0, 0, s_wxluaargArray_None }, Index: controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/controls.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** controls.cpp 26 Feb 2007 01:57:01 -0000 1.43 --- controls.cpp 2 Mar 2007 05:44:24 -0000 1.44 *************** *** 403,406 **** --- 403,443 ---- #endif // ((wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON) && (wxLUA_USE_wxButton && wxUSE_BUTTON)) && (wxLUA_USE_wxBitmap) + + #if (wxLUA_USE_wxBitmap) && ((wxCHECK_VERSION(2,8,0)) && ((wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON) && (wxLUA_USE_wxButton && wxUSE_BUTTON))) + // %wxchkver_2_8 wxBitmap GetBitmapHover() const + static int LUACALL wxLua_wxBitmapButton_GetBitmapHover(lua_State *L) + { + wxLuaState wxlState(L); + wxBitmap *returns; + // get this + wxBitmapButton * self = (wxBitmapButton *)wxlState.GetUserDataType(1, s_wxluatag_wxBitmapButton); + // call GetBitmapHover + // allocate a new object using the copy constructor + returns = new wxBitmap(self->GetBitmapHover()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxBitmap *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxBitmap, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxBitmapButton_SetBitmapHover[] = { &s_wxluatag_wxBitmap, 0 }; + // %wxchkver_2_8 void SetBitmapHover(const wxBitmap& hover) + static int LUACALL wxLua_wxBitmapButton_SetBitmapHover(lua_State *L) + { + wxLuaState wxlState(L); + // const wxBitmap hover + const wxBitmap * hover = (const wxBitmap *)wxlState.GetUserDataType(2, s_wxluatag_wxBitmap); + // get this + wxBitmapButton * self = (wxBitmapButton *)wxlState.GetUserDataType(1, s_wxluatag_wxBitmapButton); + // call SetBitmapHover + self->SetBitmapHover(*hover); + + return 0; + } + + #endif // (wxLUA_USE_wxBitmap) && ((wxCHECK_VERSION(2,8,0)) && ((wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON) && (wxLUA_USE_wxButton && wxUSE_BUTTON))) + // %constructor wxBitmapButtonDefault() static int LUACALL wxLua_wxBitmapButtonDefault_constructor(lua_State *L) *************** *** 454,457 **** --- 491,500 ---- #endif // ((wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON) && (wxLUA_USE_wxButton && wxUSE_BUTTON)) && (wxLUA_USE_wxBitmap) + + #if (wxLUA_USE_wxBitmap) && ((wxCHECK_VERSION(2,8,0)) && ((wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON) && (wxLUA_USE_wxButton && wxUSE_BUTTON))) + { LuaMethod, "GetBitmapHover", wxLua_wxBitmapButton_GetBitmapHover, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetBitmapHover", wxLua_wxBitmapButton_SetBitmapHover, 1, 1, s_wxluatagArray_wxLua_wxBitmapButton_SetBitmapHover }, + #endif // (wxLUA_USE_wxBitmap) && ((wxCHECK_VERSION(2,8,0)) && ((wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON) && (wxLUA_USE_wxButton && wxUSE_BUTTON))) + { LuaConstructor, "wxBitmapButtonDefault", wxLua_wxBitmapButtonDefault_constructor, 0, 0, s_wxluaargArray_None }, { LuaDelete, "wxBitmapButton", wxLua_wxBitmapButton_destructor, 0, 0, s_wxluaargArray_None }, Index: file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/file.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** file.cpp 26 Feb 2007 01:57:02 -0000 1.32 --- file.cpp 2 Mar 2007 05:44:24 -0000 1.33 *************** *** 2977,2978 **** --- 2977,3284 ---- #endif // wxUSE_STREAMS + + #if wxUSE_STREAMS + // --------------------------------------------------------------------------- + // Bind class wxDataInputStream + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxDataInputStream' + int s_wxluatag_wxDataInputStream = -1; + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDataInputStream_constructor[] = { &s_wxluatag_wxInputStream, 0 }; + // wxDataInputStream(wxInputStream& s) + static int LUACALL wxLua_wxDataInputStream_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxDataInputStream *returns; + // wxInputStream s + wxInputStream * s = (wxInputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxInputStream); + // call constructor + returns = new wxDataInputStream(*s); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxDataInputStream, returns); + + return 1; + } + + // bool IsOk() + static int LUACALL wxLua_wxDataInputStream_IsOk(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxDataInputStream * self = (wxDataInputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataInputStream); + // call IsOk + returns = self->IsOk(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // wxUint32 Read32() + static int LUACALL wxLua_wxDataInputStream_Read32(lua_State *L) + { + wxLuaState wxlState(L); + wxUint32 returns; + // get this + wxDataInputStream * self = (wxDataInputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataInputStream); + // call Read32 + returns = self->Read32(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxUint16 Read16() + static int LUACALL wxLua_wxDataInputStream_Read16(lua_State *L) + { + wxLuaState wxlState(L); + wxUint16 returns; + // get this + wxDataInputStream * self = (wxDataInputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataInputStream); + // call Read16 + returns = self->Read16(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxUint8 Read8() + static int LUACALL wxLua_wxDataInputStream_Read8(lua_State *L) + { + wxLuaState wxlState(L); + wxUint8 returns; + // get this + wxDataInputStream * self = (wxDataInputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataInputStream); + // call Read8 + returns = self->Read8(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // double ReadDouble() + static int LUACALL wxLua_wxDataInputStream_ReadDouble(lua_State *L) + { + wxLuaState wxlState(L); + double returns; + // get this + wxDataInputStream * self = (wxDataInputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataInputStream); + // call ReadDouble + returns = self->ReadDouble(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxString ReadString() + static int LUACALL wxLua_wxDataInputStream_ReadString(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxDataInputStream * self = (wxDataInputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataInputStream); + // call ReadString + returns = self->ReadString(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDataInputStream_BigEndianOrdered[] = { &s_wxluaarg_Boolean, 0 }; + // void BigEndianOrdered(bool be_order) + static int LUACALL wxLua_wxDataInputStream_BigEndianOrdered(lua_State *L) + { + wxLuaState wxlState(L); + // bool be_order + bool be_order = wxlState.GetBooleanType(2); + // get this + wxDataInputStream * self = (wxDataInputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataInputStream); + // call BigEndianOrdered + self->BigEndianOrdered(be_order); + + return 0; + } + + static int LUACALL wxLua_wxDataInputStream_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxDataInputStream_methods[] = { + { LuaConstructor, "wxDataInputStream", wxLua_wxDataInputStream_constructor, 1, 1, s_wxluatagArray_wxLua_wxDataInputStream_constructor }, + { LuaMethod, "IsOk", wxLua_wxDataInputStream_IsOk, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Read32", wxLua_wxDataInputStream_Read32, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Read16", wxLua_wxDataInputStream_Read16, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Read8", wxLua_wxDataInputStream_Read8, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "ReadDouble", wxLua_wxDataInputStream_ReadDouble, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "ReadString", wxLua_wxDataInputStream_ReadString, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "BigEndianOrdered", wxLua_wxDataInputStream_BigEndianOrdered, 1, 1, s_wxluatagArray_wxLua_wxDataInputStream_BigEndianOrdered }, + { LuaDelete, "wxDataInputStream", wxLua_wxDataInputStream_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxDataInputStream_methodCount = sizeof(wxDataInputStream_methods)/sizeof(wxDataInputStream_methods[0]); + #endif // wxUSE_STREAMS + + + #if wxUSE_STREAMS + // --------------------------------------------------------------------------- + // Bind class wxDataOutputStream + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxDataOutputStream' + int s_wxluatag_wxDataOutputStream = -1; + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDataOutputStream_constructor[] = { &s_wxluatag_wxOutputStream, 0 }; + // wxDataOutputStream(wxOutputStream& s); + static int LUACALL wxLua_wxDataOutputStream_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxDataOutputStream *returns; + // wxOutputStream s + wxOutputStream * s = (wxOutputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxOutputStream); + // call constructor + returns = new wxDataOutputStream(*s); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxDataOutputStream, returns); + + return 1; + } + + // bool IsOk() + static int LUACALL wxLua_wxDataOutputStream_IsOk(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxDataOutputStream * self = (wxDataOutputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataOutputStream); + // call IsOk + returns = self->IsOk(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDataOutputStream_Write32[] = { &s_wxluaarg_Number, 0 }; + // void Write32(wxUint32 i) + static int LUACALL wxLua_wxDataOutputStream_Write32(lua_State *L) + { + wxLuaState wxlState(L); + // wxUint32 i + wxUint32 i = (wxUint32)wxlState.GetNumberType(2); + // get this + wxDataOutputStream * self = (wxDataOutputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataOutputStream); + // call Write32 + self->Write32(i); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDataOutputStream_Write16[] = { &s_wxluaarg_Number, 0 }; + // void Write16(wxUint16 i) + static int LUACALL wxLua_wxDataOutputStream_Write16(lua_State *L) + { + wxLuaState wxlState(L); + // wxUint16 i + wxUint16 i = (wxUint16)wxlState.GetNumberType(2); + // get this + wxDataOutputStream * self = (wxDataOutputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataOutputStream); + // call Write16 + self->Write16(i); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDataOutputStream_Write8[] = { &s_wxluaarg_Number, 0 }; + // void Write8(wxUint8 i) + static int LUACALL wxLua_wxDataOutputStream_Write8(lua_State *L) + { + wxLuaState wxlState(L); + // wxUint8 i + wxUint8 i = (wxUint8)wxlState.GetNumberType(2); + // get this + wxDataOutputStream * self = (wxDataOutputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataOutputStream); + // call Write8 + self->Write8(i); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDataOutputStream_WriteDouble[] = { &s_wxluaarg_Number, 0 }; + // void WriteDouble(double d) + static int LUACALL wxLua_wxDataOutputStream_WriteDouble(lua_State *L) + { + wxLuaState wxlState(L); + // double d + double d = (double)wxlState.GetNumberType(2); + // get this + wxDataOutputStream * self = (wxDataOutputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataOutputStream); + // call WriteDouble + self->WriteDouble(d); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDataOutputStream_WriteString[] = { &s_wxluaarg_String, 0 }; + // void WriteString(const wxString& string) + static int LUACALL wxLua_wxDataOutputStream_WriteString(lua_State *L) + { + wxLuaState wxlState(L); + // const wxString string + const wxString string = wxlState.GetwxStringType(2); + // get this + wxDataOutputStream * self = (wxDataOutputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataOutputStream); + // call WriteString + self->WriteString(string); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDataOutputStream_BigEndianOrdered[] = { &s_wxluaarg_Boolean, 0 }; + // void BigEndianOrdered(bool be_order) + static int LUACALL wxLua_wxDataOutputStream_BigEndianOrdered(lua_State *L) + { + wxLuaState wxlState(L); + // bool be_order + bool be_order = wxlState.GetBooleanType(2); + // get this + wxDataOutputStream * self = (wxDataOutputStream *)wxlState.GetUserDataType(1, s_wxluatag_wxDataOutputStream); + // call BigEndianOrdered + self->BigEndianOrdered(be_order); + + return 0; + } + + static int LUACALL wxLua_wxDataOutputStream_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxDataOutputStream_methods[] = { + { LuaConstructor, "wxDataOutputStream", wxLua_wxDataOutputStream_constructor, 1, 1, s_wxluatagArray_wxLua_wxDataOutputStream_constructor }, + { LuaMethod, "IsOk", wxLua_wxDataOutputStream_IsOk, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Write32", wxLua_wxDataOutputStream_Write32, 1, 1, s_wxluatagArray_wxLua_wxDataOutputStream_Write32 }, + { LuaMethod, "Write16", wxLua_wxDataOutputStream_Write16, 1, 1, s_wxluatagArray_wxLua_wxDataOutputStream_Write16 }, + { LuaMethod, "Write8", wxLua_wxDataOutputStream_Write8, 1, 1, s_wxluatagArray_wxLua_wxDataOutputStream_Write8 }, + { LuaMethod, "WriteDouble", wxLua_wxDataOutputStream_WriteDouble, 1, 1, s_wxluatagArray_wxLua_wxDataOutputStream_WriteDouble }, + { LuaMethod, "WriteString", wxLua_wxDataOutputStream_WriteString, 1, 1, s_wxluatagArray_wxLua_wxDataOutputStream_WriteString }, + { LuaMethod, "BigEndianOrdered", wxLua_wxDataOutputStream_BigEndianOrdered, 1, 1, s_wxluatagArray_wxLua_wxDataOutputStream_BigEndianOrdered }, + { LuaDelete, "wxDataOutputStream", wxLua_wxDataOutputStream_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxDataOutputStream_methodCount = sizeof(wxDataOutputStream_methods)/sizeof(wxDataOutputStream_methods[0]); + #endif // wxUSE_STREAMS + Index: clipdrag.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/clipdrag.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** clipdrag.cpp 26 Feb 2007 01:57:01 -0000 1.31 --- clipdrag.cpp 2 Mar 2007 05:44:24 -0000 1.32 *************** *** 784,787 **** --- 784,809 ---- int s_wxluatag_wxDataObjectComposite = -1; + + #if (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ)) + // %wxchkver_2_8 wxDataFormat GetReceivedFormat() const + static int LUACALL wxLua_wxDataObjectComposite_GetReceivedFormat(lua_State *L) + { + wxLuaState wxlState(L); + wxDataFormat *returns; + // get this + wxDataObjectComposite * self = (wxDataObjectComposite *)wxlState.GetUserDataType(1, s_wxluatag_wxDataObjectComposite); + // call GetReceivedFormat + // allocate a new object using the copy constructor + returns = new wxDataFormat(self->GetReceivedFormat()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxDataFormat *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxDataFormat, returns); + + return 1; + } + + #endif // (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ)) + // wxDataObjectComposite() static int LUACALL wxLua_wxDataObjectComposite_constructor(lua_State *L) *************** *** 847,850 **** --- 869,877 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxDataObjectComposite_methods[] = { + + #if (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ)) + { LuaMethod, "GetReceivedFormat", wxLua_wxDataObjectComposite_GetReceivedFormat, 0, 0, s_wxluaargArray_None }, + #endif // (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ)) + { LuaConstructor, "wxDataObjectComposite", wxLua_wxDataObjectComposite_constructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Add", wxLua_wxDataObjectComposite_Add, 2, 1, s_wxluatagArray_wxLua_wxDataObjectComposite_Add }, Index: appframe.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/appframe.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** appframe.cpp 26 Feb 2007 01:57:01 -0000 1.35 --- appframe.cpp 2 Mar 2007 05:44:24 -0000 1.36 *************** *** 1922,1925 **** --- 1922,1977 ---- int s_wxluatag_wxAcceleratorEntry = -1; + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + // bool IsOk() const + static int LUACALL wxLua_wxAcceleratorEntry_IsOk(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxAcceleratorEntry * self = (wxAcceleratorEntry *)wxlState.GetUserDataType(1, s_wxluatag_wxAcceleratorEntry); + // call IsOk + returns = self->IsOk(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // wxString ToString() const + static int LUACALL wxLua_wxAcceleratorEntry_ToString(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxAcceleratorEntry * self = (wxAcceleratorEntry *)wxlState.GetUserDataType(1, s_wxluatag_wxAcceleratorEntry); + // call ToString + returns = self->ToString(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxAcceleratorEntry_FromString[] = { &s_wxluaarg_String, 0 }; + // bool FromString(const wxString& str) + static int LUACALL wxLua_wxAcceleratorEntry_FromString(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxString str + const wxString str = wxlState.GetwxStringType(2); + // get this + wxAcceleratorEntry * self = (wxAcceleratorEntry *)wxlState.GetUserDataType(1, s_wxluatag_wxAcceleratorEntry); + // call FromString + returns = self->FromString(str); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + static wxLuaArgTag s_wxluatagArray_wxLua_wxAcceleratorEntry_constructor1[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; // %overload wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0) *************** *** 2077,2080 **** --- 2129,2139 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxAcceleratorEntry_methods[] = { + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + { LuaMethod, "IsOk", wxLua_wxAcceleratorEntry_IsOk, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "ToString", wxLua_wxAcceleratorEntry_ToString, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "FromString", wxLua_wxAcceleratorEntry_FromString, 1, 1, s_wxluatagArray_wxLua_wxAcceleratorEntry_FromString }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + { LuaConstructor, "wxAcceleratorEntry", wxLua_wxAcceleratorEntry_constructor, 3, 0, s_wxluatagArray_wxLua_wxAcceleratorEntry_constructor1 }, { LuaConstructor, "wxAcceleratorEntryCopy", wxLua_wxAcceleratorEntryCopy_constructor, 1, 1, s_wxluatagArray_wxLua_wxAcceleratorEntryCopy_constructor }, Index: windows.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/windows.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** windows.cpp 26 Feb 2007 01:57:04 -0000 1.40 --- windows.cpp 2 Mar 2007 05:44:28 -0000 1.41 *************** *** 4157,4160 **** --- 4157,4179 ---- + #if wxCHECK_VERSION(2,8,0) + // %wxchkver_2_8 wxString GetLabelText() const + static int LUACALL wxLua_wxControl_GetLabelText(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxControl * self = (wxControl *)wxlState.GetUserDataType(1, s_wxluatag_wxControl); + // call GetLabelText + returns = self->GetLabelText(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + #endif // wxCHECK_VERSION(2,8,0) + + // Map Lua Class Methods to C Binding Functions *************** *** 4177,4180 **** --- 4196,4204 ---- { LuaMethod, "Command", wxLua_wxControl_Command, 1, 1, s_wxluatagArray_wxLua_wxControl_Command }, { LuaDelete, "wxControl", wxLua_wxControl_destructor, 0, 0, s_wxluaargArray_None }, + + #if wxCHECK_VERSION(2,8,0) + { LuaMethod, "GetLabelText", wxLua_wxControl_GetLabelText, 0, 0, s_wxluaargArray_None }, + #endif // wxCHECK_VERSION(2,8,0) + }; *************** *** 4191,4194 **** --- 4215,4346 ---- + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL)) && (wxLUA_USE_wxSizer) + // wxSizer* GetControlSizer() const + static int LUACALL wxLua_wxBookCtrlBase_GetControlSizer(lua_State *L) + { + wxLuaState wxlState(L); + wxSizer *returns; + // get this + wxBookCtrlBase * self = (wxBookCtrlBase *)wxlState.GetUserDataType(1, s_wxluatag_wxBookCtrlBase); + // call GetControlSizer + returns = self->GetControlSizer(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxSizer, returns); + + return 1; + } + + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL)) && (wxLUA_USE_wxSizer) + + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) + // unsigned int GetInternalBorder() const + static int LUACALL wxLua_wxBookCtrlBase_GetInternalBorder(lua_State *L) + { + wxLuaState wxlState(L); + unsigned int returns; + // get this + wxBookCtrlBase * self = (wxBookCtrlBase *)wxlState.GetUserDataType(1, s_wxluatag_wxBookCtrlBase); + // call GetInternalBorder + returns = self->GetInternalBorder(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxBookCtrlBase_SetInternalBorder[] = { &s_wxluaarg_Number, 0 }; + // void SetInternalBorder(unsigned int border) + static int LUACALL wxLua_wxBookCtrlBase_SetInternalBorder(lua_State *L) + { + wxLuaState wxlState(L); + // unsigned int border + unsigned int border = (int)wxlState.GetNumberType(2); + // get this + wxBookCtrlBase * self = (wxBookCtrlBase *)wxlState.GetUserDataType(1, s_wxluatag_wxBookCtrlBase); + // call SetInternalBorder + self->SetInternalBorder(border); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxBookCtrlBase_SetControlMargin[] = { &s_wxluaarg_Number, 0 }; + // void SetControlMargin(int margin) + static int LUACALL wxLua_wxBookCtrlBase_SetControlMargin(lua_State *L) + { + wxLuaState wxlState(L); + // int margin + int margin = (int)wxlState.GetNumberType(2); + // get this + wxBookCtrlBase * self = (wxBookCtrlBase *)wxlState.GetUserDataType(1, s_wxluatag_wxBookCtrlBase); + // call SetControlMargin + self->SetControlMargin(margin); + + return 0; + } + + // int GetControlMargin() const + static int LUACALL wxLua_wxBookCtrlBase_GetControlMargin(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // get this + wxBookCtrlBase * self = (wxBookCtrlBase *)wxlState.GetUserDataType(1, s_wxluatag_wxBookCtrlBase); + // call GetControlMargin + returns = self->GetControlMargin(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // bool IsVertical() const + static int LUACALL wxLua_wxBookCtrlBase_IsVertical(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxBookCtrlBase * self = (wxBookCtrlBase *)wxlState.GetUserDataType(1, s_wxluatag_wxBookCtrlBase); + // call IsVertical + returns = self->IsVertical(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxBookCtrlBase_SetFitToCurrentPage[] = { &s_wxluaarg_Boolean, 0 }; + // void SetFitToCurrentPage(bool fit) + static int LUACALL wxLua_wxBookCtrlBase_SetFitToCurrentPage(lua_State *L) + { + wxLuaState wxlState(L); + // bool fit + bool fit = wxlState.GetBooleanType(2); + // get this + wxBookCtrlBase * self = (wxBookCtrlBase *)wxlState.GetUserDataType(1, s_wxluatag_wxBookCtrlBase); + // call SetFitToCurrentPage + self->SetFitToCurrentPage(fit); + + return 0; + } + + // bool GetFitToCurrentPage() const + static int LUACALL wxLua_wxBookCtrlBase_GetFitToCurrentPage(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxBookCtrlBase * self = (wxBookCtrlBase *)wxlState.GetUserDataType(1, s_wxluatag_wxBookCtrlBase); + // call GetFitToCurrentPage + returns = self->GetFitToCurrentPage(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) + + #if (wxLUA_USE_wxImageList) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) // wxImageList* GetImageList() const *************** *** 4553,4556 **** --- 4705,4724 ---- WXLUAMETHOD wxBookCtrlBase_methods[] = { + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL)) && (wxLUA_USE_wxSizer) + { LuaMethod, "GetControlSizer", wxLua_wxBookCtrlBase_GetControlSizer, 0, 0, s_wxluaargArray_None }, + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL)) && (wxLUA_USE_wxSizer) + + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) + { LuaMethod, "GetInternalBorder", wxLua_wxBookCtrlBase_GetInternalBorder, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetInternalBorder", wxLua_wxBookCtrlBase_SetInternalBorder, 1, 1, s_wxluatagArray_wxLua_wxBookCtrlBase_SetInternalBorder }, + { LuaMethod, "SetControlMargin", wxLua_wxBookCtrlBase_SetControlMargin, 1, 1, s_wxluatagArray_wxLua_wxBookCtrlBase_SetControlMargin }, + { LuaMethod, "GetControlMargin", wxLua_wxBookCtrlBase_GetControlMargin, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "IsVertical", wxLua_wxBookCtrlBase_IsVertical, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetFitToCurrentPage", wxLua_wxBookCtrlBase_SetFitToCurrentPage, 1, 1, s_wxluatagArray_wxLua_wxBookCtrlBase_SetFitToCurrentPage }, + { LuaMethod, "GetFitToCurrentPage", wxLua_wxBookCtrlBase_GetFitToCurrentPage, 0, 0, s_wxluaargArray_None }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) + + #if (wxLUA_USE_wxImageList) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) { LuaMethod, "GetImageList", wxLua_wxBookCtrlBase_GetImageList, 0, 0, s_wxluaargArray_None }, Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** image.cpp 26 Feb 2007 01:57:03 -0000 1.27 --- image.cpp 2 Mar 2007 05:44:27 -0000 1.28 *************** *** 2395,2398 **** --- 2395,2477 ---- + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) + // %static bool Pop() + static int LUACALL wxLua_wxArtProvider_Pop(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // call Pop + returns = wxArtProvider::Pop(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) + + + #if (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) + static wxLuaArgTag s_wxluatagArray_wxLua_wxArtProvider_Push[] = { &s_wxluatag_wxArtProvider, 0 }; + // %static void Push(wxArtProvider *provider) + static int LUACALL wxLua_wxArtProvider_Push(lua_State *L) + { + wxLuaState wxlState(L); + // wxArtProvider provider + wxArtProvider * provider = (wxArtProvider *)wxlState.GetUserDataType(2, s_wxluatag_wxArtProvider); + // call Push + wxArtProvider::Push(provider); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxArtProvider_Insert[] = { &s_wxluatag_wxArtProvider, 0 }; + // %static void Insert(wxArtProvider *provider) + static int LUACALL wxLua_wxArtProvider_Insert(lua_State *L) + { + wxLuaState wxlState(L); + // wxArtProvider provider + wxArtProvider * provider = (wxArtProvider *)wxlState.GetUserDataType(2, s_wxluatag_wxArtProvider); + // call Insert + wxArtProvider::Insert(provider); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxArtProvider_Remove[] = { &s_wxluatag_wxArtProvider, 0 }; + // %static bool Remove(wxArtProvider *provider) + static int LUACALL wxLua_wxArtProvider_Remove(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // wxArtProvider provider + wxArtProvider * provider = (wxArtProvider *)wxlState.GetUserDataType(2, s_wxluatag_wxArtProvider); + // call Remove + returns = wxArtProvider::Remove(provider); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxArtProvider_Delete[] = { &s_wxluatag_wxArtProvider, 0 }; + // %static bool Delete(wxArtProvider *provider) + static int LUACALL wxLua_wxArtProvider_Delete(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // wxArtProvider provider + wxArtProvider * provider = (wxArtProvider *)wxlState.GetUserDataType(2, s_wxluatag_wxArtProvider); + // call Delete + returns = wxArtProvider::Delete(provider); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) + + #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxArtProvider) static wxLuaArgTag s_wxluatagArray_wxLua_wxArtProvider_GetSizeHint[] = { &s_wxluaarg_String, &s_wxluaarg_Boolean, 0 }; *************** *** 2441,2444 **** --- 2520,2536 ---- + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) + { LuaMethod, "Pop", wxLua_wxArtProvider_Pop, 0, 0, s_wxluaargArray_None }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) + + + #if (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) + { LuaMethod, "Push", wxLua_wxArtProvider_Push, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Push }, + { LuaMethod, "Insert", wxLua_wxArtProvider_Insert, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Insert }, + { LuaMethod, "Remove", wxLua_wxArtProvider_Remove, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Remove }, + { LuaMethod, "Delete", wxLua_wxArtProvider_Delete, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Delete }, + #endif // (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) + + #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxArtProvider) { LuaMethod, "GetSizeHint", wxLua_wxArtProvider_GetSizeHint, 2, 1, s_wxluatagArray_wxLua_wxArtProvider_GetSizeHint }, Index: wave.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wave.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** wave.cpp 26 Feb 2007 01:57:04 -0000 1.27 --- wave.cpp 2 Mar 2007 05:44:28 -0000 1.28 *************** *** 830,833 **** --- 830,869 ---- + #if (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + // !%wxchkver_2_8 int GetNumberJoysticks() const + static int LUACALL wxLua_wxJoystick_GetNumberJoysticks(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // get this + wxJoystick * self = (wxJoystick *)wxlState.GetUserDataType(1, s_wxluatag_wxJoystick); + // call GetNumberJoysticks + returns = self->GetNumberJoysticks(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + #endif // (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + // %wxchkver_2_8 %static int GetNumberJoysticks() const + static int LUACALL wxLua_wxJoystick_GetNumberJoysticks(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // call GetNumberJoysticks + returns = wxJoystick::GetNumberJoysticks(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + + #if (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) && (wxLUA_USE_wxPointSizeRect) // wxPoint GetPosition() const *************** *** 946,962 **** } - // %static int GetNumberJoysticks() const - static int LUACALL wxLua_wxJoystick_GetNumberJoysticks(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // call GetNumberJoysticks - returns = wxJoystick::GetNumberJoysticks(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - // int GetPollingMax() const static int LUACALL wxLua_wxJoystick_GetPollingMax(lua_State *L) --- 982,985 ---- *************** *** 1491,1494 **** --- 1514,1527 ---- WXLUAMETHOD wxJoystick_methods[] = { + #if (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + { LuaMethod, "GetNumberJoysticks", wxLua_wxJoystick_GetNumberJoysticks, 0, 0, s_wxluaargArray_None }, + #endif // (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + { LuaMethod, "GetNumberJoysticks", wxLua_wxJoystick_GetNumberJoysticks, 0, 0, s_wxluaargArray_None }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + + #if (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) && (wxLUA_USE_wxPointSizeRect) { LuaMethod, "GetPosition", wxLua_wxJoystick_GetPosition, 0, 0, s_wxluaargArray_None }, *************** *** 1501,1505 **** { LuaMethod, "GetNumberAxes", wxLua_wxJoystick_GetNumberAxes, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetNumberButtons", wxLua_wxJoystick_GetNumberButtons, 0, 0, s_wxluaargArray_None }, - { LuaMethod, "GetNumberJoysticks", wxLua_wxJoystick_GetNumberJoysticks, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetPollingMax", wxLua_wxJoystick_GetPollingMax, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetPollingMin", wxLua_wxJoystick_GetPollingMin, 0, 0, s_wxluaargArray_None }, --- 1534,1537 ---- Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** wx_bind.cpp 26 Feb 2007 01:57:05 -0000 1.79 --- wx_bind.cpp 2 Mar 2007 05:44:28 -0000 1.80 *************** *** 418,427 **** #endif // (wxCHECK_VERSION(2,6,0)) && (wxLUA_USE_wxButton && wxUSE_BUTTON) ! #if (wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxNotebook && wxUSE_NOTEBOOK) { "wxBK_BOTTOM", wxBK_BOTTOM }, { "wxBK_LEFT", wxBK_LEFT }, { "wxBK_RIGHT", wxBK_RIGHT }, { "wxBK_TOP", wxBK_TOP }, ! #endif // (wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxNotebook && wxUSE_NOTEBOOK) #if (wxLUA_USE_wxHtmlHelpController && wxUSE_WXHTML_HELP) && (wxLUA_USE_wxHelpController && wxUSE_HELP) --- 418,454 ---- #endif // (wxCHECK_VERSION(2,6,0)) && (wxLUA_USE_wxButton && wxUSE_BUTTON) ! #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush) ! { "wxALPHA_OPAQUE", wxALPHA_OPAQUE }, ! { "wxALPHA_TRANSPARENT", wxALPHA_TRANSPARENT }, ! { "wxC2S_CSS_SYNTAX", wxC2S_CSS_SYNTAX }, ! { "wxC2S_HTML_SYNTAX", wxC2S_HTML_SYNTAX }, ! { "wxC2S_NAME", wxC2S_NAME }, ! #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush) ! ! #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC) ! { "wxALWAYS_NATIVE_DOUBLE_BUFFER", wxALWAYS_NATIVE_DOUBLE_BUFFER }, ! #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC) ! ! #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxID_XXX) ! { "wxID_EDIT", wxID_EDIT }, ! { "wxID_FILE", wxID_FILE }, ! { "wxID_HELP_INDEX", wxID_HELP_INDEX }, ! { "wxID_HELP_SEARCH", wxID_HELP_SEARCH }, ! { "wxID_PAGE_SETUP", wxID_PAGE_SETUP }, ! #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxID_XXX) ! ! #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) ! { "wxBK_ALIGN_MASK", wxBK_ALIGN_MASK }, { "wxBK_BOTTOM", wxBK_BOTTOM }, + { "wxBK_DEFAULT", wxBK_DEFAULT }, { "wxBK_LEFT", wxBK_LEFT }, { "wxBK_RIGHT", wxBK_RIGHT }, { "wxBK_TOP", wxBK_TOP }, ! #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) ! ! #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxStaticText && wxUSE_STATTEXT) ! { "wxST_DOTS_END", wxST_DOTS_END }, ! { "wxST_DOTS_MIDDLE", wxST_DOTS_MIDDLE }, ! #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxStaticText && wxUSE_STATTEXT) #if (wxLUA_USE_wxHtmlHelpController && wxUSE_WXHTML_HELP) && (wxLUA_USE_wxHelpController && wxUSE_HELP) *************** *** 475,478 **** --- 502,506 ---- { "wxCLIP_CHILDREN", wxCLIP_CHILDREN }, { "wxCOLOURED", wxCOLOURED }, + { "wxDD_NEW_DIR_BUTTON", wxDD_NEW_DIR_BUTTON }, { "wxDOUBLE_BORDER", wxDOUBLE_BORDER }, { "wxEQUIV", wxEQUIV }, *************** *** 523,527 **** { "wxSIZE_USE_EXISTING", wxSIZE_USE_EXISTING }, { "wxSTATIC_BORDER", wxSTATIC_BORDER }, - { "wxST_NO_AUTORESIZE", wxST_NO_AUTORESIZE }, { "wxSUBRELEASE_NUMBER", wxSUBRELEASE_NUMBER }, { "wxSUNKEN_BORDER", wxSUNKEN_BORDER }, --- 551,554 ---- *************** *** 1377,1380 **** --- 1404,1438 ---- #endif // (wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML) + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + { "wxACCEL_CMD", wxACCEL_CMD }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC) + { "wxLayout_Default", wxLayout_Default }, + { "wxLayout_LeftToRight", wxLayout_LeftToRight }, + { "wxLayout_RightToLeft", wxLayout_RightToLeft }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC) + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME) + { "wxDateTime_GMT13", wxDateTime::GMT13 }, + { "wxDateTime_NZDT", wxDateTime::NZDT }, + { "wxDateTime_NZST", wxDateTime::NZST }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME) + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) + { "wxBK_HITTEST_NOWHERE", wxBK_HITTEST_NOWHERE }, + { "wxBK_HITTEST_ONICON", wxBK_HITTEST_ONICON }, + { "wxBK_HITTEST_ONITEM", wxBK_HITTEST_ONITEM }, + { "wxBK_HITTEST_ONLABEL", wxBK_HITTEST_ONLABEL }, + { "wxBK_HITTEST_ONPAGE", wxBK_HITTEST_ONPAGE }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL) + + #if (wxCHECK_VERSION(2,8,0)) && (wxUSE_HOTKEY) + { "wxMOD_ALL", wxMOD_ALL }, + { "wxMOD_ALTGR", wxMOD_ALTGR }, + { "wxMOD_CMD", wxMOD_CMD }, + { "wxMOD_META", wxMOD_META }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxUSE_HOTKEY) + #if (wxLUA_USE_wxLuaPrintout) && (wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE) { "wxPRINTER_CANCELLED", wxPRINTER_CANCELLED }, *************** *** 1637,1641 **** #if wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL { "wxACCEL_ALT", wxACCEL_ALT }, - { "wxACCEL_CMD", wxACCEL_CMD }, { "wxACCEL_CTRL", wxACCEL_CTRL }, { "wxACCEL_NORMAL", wxACCEL_NORMAL }, --- 1695,1698 ---- *************** *** 2874,2877 **** --- 2931,2954 ---- #endif // ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD)) && (wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD) + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + + static wxLuaArgTag s_wxluatagArray_wxLua_wxAcceleratorEntry_Create[] = { &s_wxluaarg_String, 0 }; + // %staticonly wxAcceleratorEntry *Create(const wxString& str) + static int LUACALL wxLua_wxAcceleratorEntry_Create(lua_State *L) + { + wxLuaState wxlState(L); + wxAcceleratorEntry *returns; + // const wxString str + const wxString str = wxlState.GetwxStringType(1); + // call Create + returns = wxAcceleratorEntry::Create(str); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxAcceleratorEntry, returns); + + return 1; + } + + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + #if ((wxLUA_USE_wxBitmap) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxArtProvider) *************** *** 2990,2993 **** --- 3067,3186 ---- #endif // (wxCHECK_VERSION(2,6,0)) && (wxLUA_USE_wxProcess) + #if (wxCHECK_VERSION(2,8,0) || !defined(__WXGTK__)) && (wxLUA_USE_wxDisplay && wxUSE_DISPLAY) + + static wxLuaArgTag s_wxluatagArray_wxLua_wxDisplay_GetFromWindow[] = { &s_wxluatag_wxWindow, 0 }; + // %wxchkver_2_8|!%gtk %static int GetFromWindow(wxWindow* win) + static int LUACALL wxLua_wxDisplay_GetFromWindow(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // wxWindow win + wxWindow * win = (wxWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxWindow); + // call GetFromWindow + returns = wxDisplay::GetFromWindow(win); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0) || !defined(__WXGTK__)) && (wxLUA_USE_wxDisplay && wxUSE_DISPLAY) + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) + + // %static bool Pop() + static int LUACALL wxLua_wxArtProvider_Pop(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // call Pop + returns = wxArtProvider::Pop(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + + // %wxchkver_2_8 %static int GetNumberJoysticks() const + static int LUACALL wxLua_wxJoystick_GetNumberJoysticks(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // call GetNumberJoysticks + returns = wxJoystick::GetNumberJoysticks(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + + #if (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) + + static wxLuaArgTag s_wxluatagArray_wxLua_wxArtProvider_Delete[] = { &s_wxluatag_wxArtProvider, 0 }; + // %static bool Delete(wxArtProvider *provider) + static int LUACALL wxLua_wxArtProvider_Delete(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // wxArtProvider provider + wxArtProvider * provider = (wxArtProvider *)wxlState.GetUserDataType(1, s_wxluatag_wxArtProvider); + // call Delete + returns = wxArtProvider::Delete(provider); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxArtProvider_Insert[] = { &s_wxluatag_wxArtProvider, 0 }; + // %static void Insert(wxArtProvider *provider) + static int LUACALL wxLua_wxArtProvider_Insert(lua_State *L) + { + wxLuaState wxlState(L); + // wxArtProvider provider + wxArtProvider * provider = (wxArtProvider *)wxlState.GetUserDataType(1, s_wxluatag_wxArtProvider); + // call Insert + wxArtProvider::Insert(provider); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxArtProvider_Push[] = { &s_wxluatag_wxArtProvider, 0 }; + // %static void Push(wxArtProvider *provider) + static int LUACALL wxLua_wxArtProvider_Push(lua_State *L) + { + wxLuaState wxlState(L); + // wxArtProvider provider + wxArtProvider * provider = (wxArtProvider *)wxlState.GetUserDataType(1, s_wxluatag_wxArtProvider); + // call Push + wxArtProvider::Push(provider); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxArtProvider_Remove[] = { &s_wxluatag_wxArtProvider, 0 }; + // %static bool Remove(wxArtProvider *provider) + static int LUACALL wxLua_wxArtProvider_Remove(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // wxArtProvider provider + wxArtProvider * provider = (wxArtProvider *)wxlState.GetUserDataType(1, s_wxluatag_wxArtProvider); + // call Remove + returns = wxArtProvider::Remove(provider); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) + #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxSystemSettings) *************** *** 3013,3020 **** #endif // (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxSystemSettings) ! #if (wxLUA_USE_wxColourPenBrush) && (wxUSE_COLOURDLG) static wxLuaArgTag s_wxluatagArray_wxLua_function_wxGetColourFromUser[] = { &s_wxluatag_wxWindow, &s_wxluatag_wxColour, 0 }; ! // wxUSE_COLOURDLG %function wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit) static int LUACALL wxLua_function_wxGetColourFromUser(lua_State *L) { --- 3206,3213 ---- #endif // (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxSystemSettings) ! #if (wxLUA_USE_wxColourPenBrush) && (wxUSE_COLOURDLG && !wxCHECK_VERSION(2,8,0)) static wxLuaArgTag s_wxluatagArray_wxLua_function_wxGetColourFromUser[] = { &s_wxluatag_wxWindow, &s_wxluatag_wxColour, 0 }; ! // wxUSE_COLOURDLG&&!%wxchkver_2_8 %function wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit) static int LUACALL wxLua_function_wxGetColourFromUser(lua_State *L) { *************** *** 3036,3040 **** } ! #endif // (wxLUA_USE_wxColourPenBrush) && (wxUSE_COLOURDLG) #if (wxLUA_USE_wxDateTime && wxUSE_DATETIME) && (wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME) --- 3229,3233 ---- } ! #endif // (wxLUA_USE_wxColourPenBrush) && (wxUSE_COLOURDLG && !wxCHECK_VERSION(2,8,0)) #if (wxLUA_USE_wxDateTime && wxUSE_DATETIME) && (wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME) *************** *** 3174,3177 **** --- 3367,3399 ---- #endif // (wxLUA_USE_wxProcess) && (!wxCHECK_VERSION(2,6,0)) + #if (wxUSE_COLOURDLG && wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush) + + static wxLuaArgTag s_wxluatagArray_wxLua_function_wxGetColourFromUser[] = { &s_wxluatag_wxWindow, &s_wxluatag_wxColour, &s_wxluaarg_String, 0 }; + // wxUSE_COLOURDLG&&%wxchkver_2_8 %function wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit, const wxString& caption = "") + static int LUACALL wxLua_function_wxGetColourFromUser(lua_State *L) + { + wxLuaState wxlState(L); + wxColour *returns; + // get number of arguments + int argCount = lua_gettop(L); + // const wxString caption = "" + const wxString caption = (argCount >= 3 ? wxlState.GetwxStringType(3) : wxString(wxEmptyString)); + // const wxColour colInit + const wxColour * colInit = (const wxColour *)wxlState.GetUserDataType(2, s_wxluatag_wxColour); + // wxWindow parent + wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxWindow); + // call wxGetColourFromUser + // allocate a new object using the copy constructor + returns = new wxColour(wxGetColourFromUser(parent, *colInit, caption)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxColour *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxColour, returns); + + return 1; + } + + #endif // (wxUSE_COLOURDLG && wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush) + #if (wxUSE_FONTDLG) && (wxLUA_USE_wxFont) *************** *** 4633,4652 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxDisplay_GetFromWindow[] = { &s_wxluatag_wxWindow, 0 }; - // %static int GetFromWindow(wxWindow* win) - static int LUACALL wxLua_wxDisplay_GetFromWindow(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // wxWindow win - wxWindow * win = (wxWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxWindow); - // call GetFromWindow - returns = wxDisplay::GetFromWindow(win); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - #endif // wxLUA_USE_wxDisplay && wxUSE_DISPLAY --- 4855,4858 ---- *************** *** 4695,4715 **** #endif // wxLUA_USE_wxFrame - #if wxLUA_USE_wxJoystick && wxUSE_JOYSTICK - - // %static int GetNumberJoysticks() const - static int LUACALL wxLua_wxJoystick_GetNumberJoysticks(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // call GetNumberJoysticks - returns = wxJoystick::GetNumberJoysticks(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - - #endif // wxLUA_USE_wxJoystick && wxUSE_JOYSTICK - #if wxLUA_USE_wxObject --- 4901,4904 ---- *************** *** 5162,5165 **** --- 5351,5359 ---- + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + { LuaGlobal, "wxAcceleratorEntry_Create", wxLua_wxAcceleratorEntry_Create, 1, 1, s_wxluatagArray_wxLua_wxAcceleratorEntry_Create }, + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL)) && (wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL) + + #if ((wxLUA_USE_wxBitmap) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxArtProvider) { LuaGlobal, "wxArtProvider_GetBitmap", wxLua_wxArtProvider_GetBitmap, 3, 1, s_wxluatagArray_wxLua_wxArtProvider_GetBitmap }, *************** *** 5183,5186 **** --- 5377,5403 ---- + #if (wxCHECK_VERSION(2,8,0) || !defined(__WXGTK__)) && (wxLUA_USE_wxDisplay && wxUSE_DISPLAY) + { LuaGlobal, "wxDisplay_GetFromWindow", wxLua_wxDisplay_GetFromWindow, 1, 1, s_wxluatagArray_wxLua_wxDisplay_GetFromWindow }, + #endif // (wxCHECK_VERSION(2,8,0) || !defined(__WXGTK__)) && (wxLUA_USE_wxDisplay && wxUSE_DISPLAY) + + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) + { LuaGlobal, "wxArtProvider_Pop", wxLua_wxArtProvider_Pop, 0, 0, s_wxluaargArray_None }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) + + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + { LuaGlobal, "wxJoystick_GetNumberJoysticks", wxLua_wxJoystick_GetNumberJoysticks, 0, 0, s_wxluaargArray_None }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxJoystick && wxUSE_JOYSTICK) + + + #if (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) + { LuaGlobal, "wxArtProvider_Delete", wxLua_wxArtProvider_Delete, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Delete }, + { LuaGlobal, "wxArtProvider_Insert", wxLua_wxArtProvider_Insert, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Insert }, + { LuaGlobal, "wxArtProvider_Push", wxLua_wxArtProvider_Push, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Push }, + { LuaGlobal, "wxArtProvider_Remove", wxLua_wxArtProvider_Remove, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Remove }, + #endif // (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) + + #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxSystemSettings) { LuaGlobal, "wxSystemSettings_GetColour", wxLua_wxSystemSettings_GetColour, 1, 1, s_wxluatagArray_wxLua_wxSystemSettings_GetColour }, *************** *** 5188,5194 **** ! #if (wxLUA_USE_wxColourPenBrush) && (wxUSE_COLOURDLG) { LuaGlobal, "wxGetColourFromUser", wxLua_function_wxGetColourFromUser, 2, 2, s_wxluatagArray_wxLua_function_wxGetColourFromUser }, ! #endif // (wxLUA_USE_wxColourPenBrush) && (wxUSE_COLOURDLG) --- 5405,5411 ---- ! #if (wxLUA_USE_wxColourPenBrush) && (wxUSE_COLOURDLG && !wxCHECK_VERSION(2,8,0)) { LuaGlobal, "wxGetColourFromUser", wxLua_function_wxGetColourFromUser, 2, 2, s_wxluatagArray_wxLua_function_wxGetColourFromUser }, ! #endif // (wxLUA_USE_wxColourPenBrush) && (wxUSE_COLOURDLG && !wxCHECK_VERSION(2,8,0)) *************** *** 5219,5222 **** --- 5436,5444 ---- + #if (wxUSE_COLOURDLG && wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush) + { LuaGlobal, "wxGetColourFromUser", wxLua_function_wxGetColourFromUser, 3, 2, s_wxluatagArray_wxLua_function_wxGetColourFromUser }, + #endif // (wxUSE_COLOURDLG && wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush) + + #if (wxUSE_FONTDLG) && (wxLUA_USE_wxFont) { LuaGlobal, "wxGetFontFromUser", wxLua_function_wxGetFontFromUser, 2, 2, s_wxluatagArray_wxLua_function_wxGetFontFromUser }, *************** *** 5359,5363 **** #if wxLUA_USE_wxDisplay && wxUSE_DISPLAY { LuaGlobal, "wxDisplay_GetCount", wxLua_wxDisplay_GetCount, 0, 0, s_wxluaargArray_None }, - { LuaGlobal, "wxDisplay_GetFromWindow", wxLua_wxDisplay_GetFromWindow, 1, 1, s_wxluatagArray_wxLua_wxDisplay_GetFromWindow }, #endif // wxLUA_USE_wxDisplay && wxUSE_DISPLAY --- 5581,5584 ---- *************** *** 5373,5381 **** - #if wxLUA_USE_wxJoystick && wxUSE_JOYSTICK - { LuaGlobal, "wxJoystick_GetNumberJoysticks", wxLua_wxJoystick_GetNumberJoysticks, 0, 0, s_wxluaargArray_None }, - #endif // wxLUA_USE_wxJoystick && wxUSE_JOYSTICK - - #if wxLUA_USE_wxObject { LuaGlobal, "wxCreateDynamicObject", wxLua_function_wxCreateDynamicObject, 1, 1, s_wxluatagArray_wxLua_function_wxCreateDynamicObject }, --- 5594,5597 ---- *************** *** 5488,5491 **** --- 5704,5712 ---- + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC) + { "wxAutoBufferedPaintDC", wxAutoBufferedPaintDC_methods, wxAutoBufferedPaintDC_methodCount, CLASSINFO(wxAutoBufferedPaintDC), &s_wxluatag_wxAutoBufferedPaintDC, "wxDC", NULL }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC) + + #if (wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON) && (wxLUA_USE_wxButton && wxUSE_BUTTON) { "wxBitmapButton", wxBitmapButton_methods, wxBitmapButton_methodCount, CLASSINFO(wxBitmapButton), &s_wxluatag_wxBitmapButton, "wxButton", NULL }, *************** *** 6403,6406 **** --- 6624,6629 ---- #if wxUSE_STREAMS + { "wxDataInputStream", wxDataInputStream_methods, wxDataInputStream_methodCount, NULL, &s_wxluatag_wxDataInputStream, NULL, NULL }, + { "wxDataOutputStream", wxDataOutputStream_methods, wxDataOutputStream_methodCount, NULL, &s_wxluatag_wxDataOutputStream, NULL, NULL }, { "wxFileInputStream", wxFileInputStream_methods, wxFileInputStream_methodCount, NULL, &s_wxluatag_wxFileInputStream, "wxInputStream", NULL }, { "wxFileOutputStream", wxFileOutputStream_methods, wxFileOutputStream_methodCount, NULL, &s_wxluatag_wxFileOutputStream, "wxOutpu... [truncated message content] |
From: John L. <jr...@us...> - 2007-03-01 23:12:37
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3623/bindings/wxwidgets Modified Files: appframe.i controls.i gdi.i image.i windows.i Log Message: start updating bindings to 2.8 by diffing headers to 2.6 Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** windows.i 23 Feb 2007 04:35:30 -0000 1.26 --- windows.i 1 Mar 2007 23:12:31 -0000 1.27 *************** *** 354,357 **** --- 354,374 ---- %include "wx/bookctrl.h" + %if %wxchkver28 + %define wxBK_DEFAULT + %define wxBK_TOP + %define wxBK_LEFT + %define wxBK_RIGHT + %define wxBK_BOTTOM + %define wxBK_ALIGN_MASK + + %enum + wxBK_HITTEST_NOWHERE + wxBK_HITTEST_ONICON + wxBK_HITTEST_ONLABEL + wxBK_HITTEST_ONITEM + wxBK_HITTEST_ONPAGE + %endenum + %endif // %wxchkver28 + %class wxBookCtrlBase, wxControl // no constructors, base class *************** *** 378,381 **** --- 395,416 ---- virtual int SetSelection(size_t n) + %if %wxchkver_2_8 + unsigned int GetInternalBorder() const + void SetInternalBorder(unsigned int border) + void SetControlMargin(int margin) + int GetControlMargin() const + bool IsVertical() const + void SetFitToCurrentPage(bool fit) + bool GetFitToCurrentPage() const + + // virtual int ChangeSelection(size_t n) = 0; FIXME pure virtual + + //virtual int HitTest(const wxPoint& pt, long* flags = NULL) const + //virtual bool HasMultiplePages() const - FIXME do we need this? + %endif // %wxchkver_2_8 + + wxSizer* GetControlSizer() const { return m_controlSizer; } + + %property=ImageList, read, write %property=PageCount, read *************** *** 410,425 **** %define wxNB_MULTILINE ! !%wxchkver27|%wxcompat26 %define wxNB_TOP // use wxBK_XXX after 2.6 ! !%wxchkver27|%wxcompat26 %define wxNB_LEFT ! !%wxchkver27|%wxcompat26 %define wxNB_RIGHT ! !%wxchkver27|%wxcompat26 %define wxNB_BOTTOM ! !%wxchkver27|%wxcompat26 %define wxNB_FIXEDWIDTH ! !%wxchkver27|%wxcompat26 %define wxNB_MULTILINE ! !%wxchkver27|%wxcompat26 %define wxNB_NOPAGETHEME ! ! %wxchkver27 %define wxBK_TOP ! %wxchkver27 %define wxBK_LEFT ! %wxchkver27 %define wxBK_RIGHT ! %wxchkver27 %define wxBK_BOTTOM %enum --- 445,457 ---- %define wxNB_MULTILINE ! %if !%wxchkver27|%wxcompat26 ! %define wxNB_TOP // use wxBK_XXX after 2.6 ! %define wxNB_LEFT ! %define wxNB_RIGHT ! %define wxNB_BOTTOM ! %define wxNB_FIXEDWIDTH ! %define wxNB_MULTILINE ! %define wxNB_NOPAGETHEME ! %endif // !%wxchkver27|%wxcompat26 %enum Index: controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/controls.i,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** controls.i 23 Feb 2007 04:35:30 -0000 1.26 --- controls.i 1 Mar 2007 23:12:31 -0000 1.27 *************** *** 50,57 **** --- 50,59 ---- wxBitmap GetBitmapDisabled() const wxBitmap GetBitmapFocus() const + %wxchkver_2_8 wxBitmap GetBitmapHover() const wxBitmap GetBitmapLabel() const wxBitmap GetBitmapSelected() const void SetBitmapDisabled(const wxBitmap& bitmap) void SetBitmapFocus(const wxBitmap& bitmap) + %wxchkver_2_8 void SetBitmapHover(const wxBitmap& hover) void SetBitmapLabel(const wxBitmap& bitmap) void SetBitmapSelected(const wxBitmap& bitmap) Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** gdi.i 23 Feb 2007 04:35:30 -0000 1.37 --- gdi.i 1 Mar 2007 23:12:31 -0000 1.38 *************** *** 746,749 **** --- 746,750 ---- bool LoadFile(const wxString& name, wxBitmapType type) bool Ok() const + %wxchkver_2_8 virtual wxColour QuantizeColour(const wxColour& colour) const //%win static bool RemoveHandler(const wxString& name) bool SaveFile(const wxString& name, wxBitmapType type, wxPalette* palette = NULL) Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** appframe.i 23 Feb 2007 04:35:30 -0000 1.26 --- appframe.i 1 Mar 2007 23:12:31 -0000 1.27 *************** *** 304,308 **** wxACCEL_CTRL wxACCEL_SHIFT ! wxACCEL_CMD // Command key on OS X else ctrl %endenum --- 304,308 ---- wxACCEL_CTRL wxACCEL_SHIFT ! %wxchkver_2_8 wxACCEL_CMD // Command key on OS X else wxACCEL_CTRL %endenum *************** *** 316,319 **** --- 316,326 ---- void Set(int flags, int keyCode, int Cmd) + %if %wxchkver_2_8 + %staticonly wxAcceleratorEntry *Create(const wxString& str) + bool IsOk() const + wxString ToString() const + bool FromString(const wxString& str) + %endif // %wxchkver_2_8 + // these are probably not necessary //%operator wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry) Index: image.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/image.i,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** image.i 23 Feb 2007 04:35:30 -0000 1.16 --- image.i 1 Mar 2007 23:12:31 -0000 1.17 *************** *** 430,436 **** --- 430,447 ---- // wxArtProvider() - abstract class + %if %wxchkver_2_8 + %static void Push(wxArtProvider *provider) + %static void Insert(wxArtProvider *provider) + %static bool Pop() + %static bool Remove(wxArtProvider *provider) + %static bool Delete(wxArtProvider *provider) + %endif // %wxchkver_2_8 + + //%if !%wxcompat_2_6 //static void PushProvider(wxArtProvider *provider) FIXME add wxLuaArtProvider maybe? //static bool PopProvider() //static bool RemoveProvider(wxArtProvider *provider) + //%endif // !%wxcompat_2_6 + %static wxBitmap GetBitmap(const wxString& id, const wxString& client = wxART_OTHER, const wxSize& size = wxDefaultSize) %static wxIcon GetIcon(const wxString& id, const wxString& client = wxART_OTHER, const wxSize& size = wxDefaultSize) |
From: John L. <jr...@us...> - 2007-03-01 05:27:51
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5986/wxLua/samples Modified Files: wxluasudoku.wx.lua Log Message: fix printing bug, don't need to return the table passed to a function that we've modified Index: wxluasudoku.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/wxluasudoku.wx.lua,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** wxluasudoku.wx.lua 8 Feb 2007 04:10:41 -0000 1.64 --- wxluasudoku.wx.lua 1 Mar 2007 05:27:47 -0000 1.65 *************** *** 50,55 **** -- Set a value in the table or subtable, first making sure that the subtables ! -- are created first. ! -- a = TableSetValue(3, a, "How", "Are", 4, "You") ==> a.How.Are[4].You = 3 function TableSetValue(value, atable, ...) if type(atable) ~= "table" then atable = {} end --- 50,55 ---- -- Set a value in the table or subtable, first making sure that the subtables ! -- are created first. Modifies the input table. [...990 lines suppressed...] sudokuGUI.sudokuTables[1] = s --- 4987,4991 ---- local s = sudoku.CreateTable() ! sudoku.SetValues(values, s) sudokuGUI.sudokuTables_pos = 1 sudokuGUI.sudokuTables[1] = s *************** *** 5128,5132 **** local s = sudoku.GeneratePuzzle() s = sudoku.GeneratePuzzleDifficulty(35, s, true) ! s = sudoku.UpdateTable(s) local n, h = sudoku.FindAllNakedHiddenGroups(true, s) --- 5106,5110 ---- local s = sudoku.GeneratePuzzle() s = sudoku.GeneratePuzzleDifficulty(35, s, true) ! sudoku.UpdateTable(s) local n, h = sudoku.FindAllNakedHiddenGroups(true, s) |
From: Francesco M. <fr...@us...> - 2007-02-28 22:39:24
|
Update of /cvsroot/wxlua/wxLua/distrib/innosetup In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8489 Modified Files: Readme.txt Log Message: remember to include MSVC7.1 dependencies in the innosetup Index: Readme.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/distrib/innosetup/Readme.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Readme.txt 10 Dec 2006 18:04:25 -0000 1.1 --- Readme.txt 28 Feb 2007 22:39:17 -0000 1.2 *************** *** 14,18 **** 2) run the 'compress' utility target to optimize the .exe 3) run the 'docs' utility target to create doxygen docs ! 4) open the wxLua\build\innosetup\wxlua.iss file ! 5) eventually update version numbers ! 6) click 'Compile' to create in wxLua\.. the installer. --- 14,20 ---- 2) run the 'compress' utility target to optimize the .exe 3) run the 'docs' utility target to create doxygen docs ! 4) copy the MSVCR71.dll and MSVCP71.dll files in the "bin" folder ! so to include them in the final .exe package ! 5) open the wxLua\build\innosetup\wxlua.iss file ! 6) eventually update version numbers ! 7) click 'Compile' to create in wxLua\.. the installer. |
From: Francesco M. <fr...@us...> - 2007-02-28 22:27:26
|
Update of /cvsroot/wxlua/wxLua/modules In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3484/modules Modified Files: Makefile.in Log Message: fixed the install rules after breaking it in last commits Index: Makefile.in =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/Makefile.in,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** Makefile.in 13 Feb 2007 18:43:11 -0000 1.53 --- Makefile.in 28 Feb 2007 22:27:12 -0000 1.54 *************** *** 801,805 **** @COND_SHARED_0_USE_SYSTEM_LUA_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0_USE_SYSTEM_LUA_0@ fi; \ ! @COND_SHARED_0_USE_SYSTEM_LUA_0@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0_USE_SYSTEM_LUA_0@ done --- 801,805 ---- @COND_SHARED_0_USE_SYSTEM_LUA_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0_USE_SYSTEM_LUA_0@ fi; \ ! @COND_SHARED_0_USE_SYSTEM_LUA_0@ $(INSTALL_DATA) $(srcdir)/lua/include/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0_USE_SYSTEM_LUA_0@ done *************** *** 831,835 **** @COND_SHARED_1_USE_SYSTEM_LUA_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1_USE_SYSTEM_LUA_0@ fi; \ ! @COND_SHARED_1_USE_SYSTEM_LUA_0@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1_USE_SYSTEM_LUA_0@ done --- 831,835 ---- @COND_SHARED_1_USE_SYSTEM_LUA_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1_USE_SYSTEM_LUA_0@ fi; \ ! @COND_SHARED_1_USE_SYSTEM_LUA_0@ $(INSTALL_DATA) $(srcdir)/lua/include/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1_USE_SYSTEM_LUA_0@ done *************** *** 860,864 **** @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0@ fi; \ ! @COND_SHARED_0@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0@ done --- 860,864 ---- @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0@ fi; \ ! @COND_SHARED_0@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0@ done *************** *** 893,897 **** @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1@ fi; \ ! @COND_SHARED_1@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1@ done --- 893,897 ---- @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1@ fi; \ ! @COND_SHARED_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1@ done *************** *** 922,926 **** @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0@ fi; \ ! @COND_SHARED_0@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0@ done --- 922,926 ---- @COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0@ fi; \ ! @COND_SHARED_0@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0@ done *************** *** 955,959 **** @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1@ fi; \ ! @COND_SHARED_1@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1@ done --- 955,959 ---- @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1@ fi; \ ! @COND_SHARED_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1@ done *************** *** 984,988 **** @COND_SHARED_0_USE_WXBINDSTC_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0_USE_WXBINDSTC_1@ fi; \ ! @COND_SHARED_0_USE_WXBINDSTC_1@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0_USE_WXBINDSTC_1@ done --- 984,988 ---- @COND_SHARED_0_USE_WXBINDSTC_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0_USE_WXBINDSTC_1@ fi; \ ! @COND_SHARED_0_USE_WXBINDSTC_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0_USE_WXBINDSTC_1@ done *************** *** 1017,1021 **** @COND_SHARED_1_USE_WXBINDSTC_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1_USE_WXBINDSTC_1@ fi; \ ! @COND_SHARED_1_USE_WXBINDSTC_1@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1_USE_WXBINDSTC_1@ done --- 1017,1021 ---- @COND_SHARED_1_USE_WXBINDSTC_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1_USE_WXBINDSTC_1@ fi; \ ! @COND_SHARED_1_USE_WXBINDSTC_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1_USE_WXBINDSTC_1@ done *************** *** 1046,1050 **** @COND_SHARED_0_USE_WXLUADEBUG_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0_USE_WXLUADEBUG_1@ fi; \ ! @COND_SHARED_0_USE_WXLUADEBUG_1@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0_USE_WXLUADEBUG_1@ done --- 1046,1050 ---- @COND_SHARED_0_USE_WXLUADEBUG_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0_USE_WXLUADEBUG_1@ fi; \ ! @COND_SHARED_0_USE_WXLUADEBUG_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0_USE_WXLUADEBUG_1@ done *************** *** 1079,1083 **** @COND_SHARED_1_USE_WXLUADEBUG_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1_USE_WXLUADEBUG_1@ fi; \ ! @COND_SHARED_1_USE_WXLUADEBUG_1@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1_USE_WXLUADEBUG_1@ done --- 1079,1083 ---- @COND_SHARED_1_USE_WXLUADEBUG_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1_USE_WXLUADEBUG_1@ fi; \ ! @COND_SHARED_1_USE_WXLUADEBUG_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1_USE_WXLUADEBUG_1@ done *************** *** 1108,1112 **** @COND_SHARED_0_USE_WXLUASOCKET_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0_USE_WXLUASOCKET_1@ fi; \ ! @COND_SHARED_0_USE_WXLUASOCKET_1@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0_USE_WXLUASOCKET_1@ done --- 1108,1112 ---- @COND_SHARED_0_USE_WXLUASOCKET_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_0_USE_WXLUASOCKET_1@ fi; \ ! @COND_SHARED_0_USE_WXLUASOCKET_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_0_USE_WXLUASOCKET_1@ done *************** *** 1141,1145 **** @COND_SHARED_1_USE_WXLUASOCKET_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1_USE_WXLUASOCKET_1@ fi; \ ! @COND_SHARED_1_USE_WXLUASOCKET_1@ $(INSTALL_DATA) $(srcdir)//$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1_USE_WXLUASOCKET_1@ done --- 1141,1145 ---- @COND_SHARED_1_USE_WXLUASOCKET_1@ $(INSTALL_DIR) $(DESTDIR)$(includedir)/`dirname $$f`; \ @COND_SHARED_1_USE_WXLUASOCKET_1@ fi; \ ! @COND_SHARED_1_USE_WXLUASOCKET_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/$$f; \ @COND_SHARED_1_USE_WXLUASOCKET_1@ done |
From: John L. <jr...@us...> - 2007-02-28 04:28:40
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27437/wxLua/docs Modified Files: wxlua.html Log Message: add more to docs make a copy of the initial pen to use since we'll modify it Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** wxlua.html 28 Feb 2007 00:47:33 -0000 1.13 --- wxlua.html 28 Feb 2007 04:28:32 -0000 1.14 *************** *** 126,133 **** <ul> ! <li>All variables are untyped and you can freely overwrite them with other values or types, there is no "const" keyword.</li> ! <li>All variables are global unless you put the keyword "local" in front of them, this is sometimes good practice.</li> --- 126,134 ---- <ul> ! <li>Variables are not permanently typed and you can freely ! overwrite them with other values or types, there is no "const" keyword.</li> ! <li>Variables are global unless you put the keyword "local" in front of them, this is sometimes good practice.</li> *************** *** 139,143 **** <li>Use the function <i>type(var_name)</i> to ! get the type as a string, "string", "number", "boolean", "table", "userdata", "function".</li> --- 140,145 ---- <li>Use the function <i>type(var_name)</i> to ! get the type as a string, "nil", "boolean", "number", ! "string", "table", "userdata", "function".</li> *************** *** 149,154 **** <li><b>nil</b> : A special value meaning NULL or ! nothing, all ! variables that are not assigned a value are nil.</li> <li><b>boolean</b> : true or false, nil works as --- 151,164 ---- <li><b>nil</b> : A special value meaning NULL or ! nothing.</li> ! ! <ul> ! ! <li>Variables that are not assigned a value are nil and can ! be reset back to nil at any time.</li> ! ! <li>This value is often returned for functions that fail.</li> ! ! </ul> <li><b>boolean</b> : true or false, nil works as *************** *** 186,191 **** <li><b>string</b> : Strings in lua can have ! embedded nulls "\0" and ! follow the same escape characters as C.</li> <ul> --- 196,200 ---- <li><b>string</b> : Strings in lua can have ! embedded nulls "\0" and use the same escape characters as C.</li> <ul> *************** *** 234,238 **** <li><i>mytable = {}</i> a default empty table, ! must declare table variable before using it's indexes.</li> --- 243,247 ---- <li><i>mytable = {}</i> a default empty table, ! you must declare table variable before using it's indexes.</li> *************** *** 262,266 **** <li>The length operator <i>#mytable</i> returns 2 since there are only two contiguous numeric table indexes ! starting from 1.</li> </ul> --- 271,276 ---- <li>The length operator <i>#mytable</i> returns 2 since there are only two contiguous numeric table indexes ! starting from 1 even though in this case there are actually 4 entries ! in the table.</li> </ul> *************** *** 272,276 **** <li>See string.XXX, math.XXX, os.XXX etc in the lua ! documentation</li> <li>wxLua places the wxWidgets bindings into the wx.XXX --- 282,286 ---- <li>See string.XXX, math.XXX, os.XXX etc in the lua ! documentation.</li> <li>wxLua places the wxWidgets bindings into the wx.XXX *************** *** 290,293 **** --- 300,318 ---- </ul> + <li><b>userdata</b> :</li> + + <ul> + + <li>This is a C/C++ pointer to an object that by itself + cannot be used in lua.</li> + + <li>Through the metatable (see lua documentation) functions + can be attached to it to operate on it or with it.</li> + + <li>This is the datatype that wxLua uses when you + create wxWidgets C++ objects.</li> + + </ul> + <li><b>function</b> :</li> *************** *** 304,310 **** </ul> ! <li>Can return multiple values and be passed less variables than specified. The unhandled returns or inputs are set to ! nil. </li> <li>Variables can be assigned to functions if desired or --- 329,336 ---- </ul> ! <li>Can return multiple values and be passed less or more ! variables than specified. The unhandled returns or inputs are set to ! nil or if there are extra thrown out. </li> <li>Variables can be assigned to functions if desired or *************** *** 325,330 **** <ul> ! <li>Values passed to functions are local and not ! modified unless they are tables</li> </ul> --- 351,356 ---- <ul> ! <li>Values passed to functions are local copies and not ! modified unless they are tables or userdata</li> </ul> *************** *** 337,346 **** atable[#atable+1] = val end</i></li> ! <li><i>mytable = {}; AppendToTable(mytable, "hello")</i> adds "hello" to index 1, eg. mytable[1] == "hello"</li> ! <li>Note that the table is not returned, but modified inplace.</li> </ul> --- 363,381 ---- atable[#atable+1] = val end</i></li> ! <ul> ! ! <li><i>mytable = {}; AppendToTable(mytable, ! "hello")</i> adds "hello" to index 1, eg. mytable[1] == "hello"</li> ! </ul> ! ! <ul> ! ! <li>Note that the table is not returned, but modified inplace.</li> + </ul> + </ul> *************** *** 349,353 **** </ul> ! <li>Operators :</li> <ul> --- 384,388 ---- </ul> ! <li><b>Operators</b></li> <ul> *************** *** 356,360 **** Note: not equal is ~= </li> ! <li>Logical: and or not</li> <li>Precedence:</li> --- 391,395 ---- Note: not equal is ~= </li> ! <li>Logical: <i>and or not</i></li> <li>Precedence:</li> *************** *** 396,409 **** </ul> ! <li>Keywords</li> <ul> ! <li>and break do else elseif end false for function if in ! local nil not or repeat return then true until while </li> </ul> ! <li>do ... end</li> <ul> --- 431,445 ---- </ul> ! <li><b>Keywords</b></li> <ul> ! <li><i>and break do else elseif end false for function ! if in ! local nil not or repeat return then true until while</i> </li> </ul> ! <li><b>do ... end</b></li> <ul> *************** *** 411,414 **** --- 447,455 ---- <li>Create a new local scope in a do end block.</li> + <li>Note : You cannot write <i>function + printHi() return; print("hi") end</i>, but you can have <i>function + printHi() do return end; print("hi") end</i> which can be useful + for debugging functions.</li> + </ul> *************** *** 422,431 **** <ul> ! <li>if (bool) then ... elseif (bool) then ... else ... end</li> </ul> <blockquote> ! <pre>local a, b, c -- can't assign all at once when using local keyword<br>a = 1; b = 2; c = 3 -- use ; for multiple lines of code on single line<br>a, b, c = 1, 2, 3 -- this works too<br>if (a == 1) and ((b <= 2) or (c != 3)) then <br> print(a+b/c) <br>elseif a == 2 then -- no parentheses necessary<br> print(a)<br>else<br> print(b)<br>end</pre> </blockquote> --- 463,473 ---- <ul> ! <li><b>if (bool) then ... elseif (bool) then ... else ... ! end</b></li> </ul> <blockquote> ! <pre>local a, b, c = 1, 2, 3 -- can assign multiple values<br>a = 1; b = 2; c = 3 -- use ; for multiple lines of code on single line<br>a, b, c = 1, 2, 3 -- this works too<br>if (a == 1) and ((b <= 2) or (c ~= 3)) then <br> print(a+b/c) <br>elseif a == 2 then -- no parentheses necessary<br> print(a)<br>else<br> print(b)<br>end</pre> </blockquote> *************** *** 439,443 **** <blockquote> ! <pre>mycase = {}<br>mycase[1] = function() print("Hello") end<br>...<br>if mycase[value] then<br> mycase[value]()<br>else<br> print("Unknown case value")<br>end</pre> </blockquote> --- 481,485 ---- <blockquote> ! <pre>mycase = {}<br>mycase[1] = function() print("Hello #1") end<br>mycase[2] = function() print("Hello #2") end<br>...<br>if mycase[value] then<br> mycase[value]()<br>else<br> print("Unknown case value")<br>end</pre> </blockquote> *************** *** 445,453 **** </ul> ! <li>while (bool) ... end</li> <ul> ! <li>Note : there is no continue keyword only break</li> </ul> --- 487,496 ---- </ul> ! <li><b>while (bool) ... end</b></li> <ul> ! <li>Note : there is no <i>continue</i> keyword ! only <i>break</i></li> </ul> *************** *** 456,460 **** <blockquote> ! <pre>function CheckA(val) if a == 5 then return true end<br>local a = 1<br>while a < 10 do<br> print(a)<br> a = a + 1 -- no increment operator<br> if CheckA(a) then break end<br>end</pre> </blockquote> --- 499,503 ---- <blockquote> ! <pre>function CheckA(val) if val == 5 then return true end end<br>local a = 1<br>while a < 10 do<br> print(a)<br> a = a + 1 -- no increment operator<br> if CheckA(a) then break end<br>end</pre> </blockquote> *************** *** 462,466 **** <ul> ! <li>repeat ... until (bool)</li> <ul> --- 505,525 ---- <ul> ! <ul> ! ! <li>You can make a "fake" continue by doing this, doesn't ! print # 5.</li> ! ! </ul> ! ! </ul> ! ! <blockquote> ! <pre>function CheckA(val) if val == 5 then return true end end<br>local a = 1<br>while a < 10 do while true do<br> a = a + 1 -- no increment operator<br> if CheckA(a) then <br> break <br> else<br> print(a)<br> end<br>break end end</pre> ! ! </blockquote> ! ! <ul> ! ! <li><b>repeat ... until (bool)</b></li> <ul> *************** *** 479,483 **** <ul> ! <li>for var = init_value, end_value [, increment] do ... end</li> <ul> --- 538,543 ---- <ul> ! <li><b>for var = init_value, end_value [, increment] do ! ... end</b></li> <ul> *************** *** 496,500 **** <ul> ! <li>functions</li> <ul> --- 556,560 ---- <ul> ! <li><b>functions</b></li> <ul> *************** *** 505,509 **** <li>Missing input variables are assigned the value nil</li> ! <li>Return values using "return" keyword</li> <li>Not all return values need to be assigned to variables</li> --- 565,569 ---- <li>Missing input variables are assigned the value nil</li> ! <li>Return values using the "return" keyword</li> <li>Not all return values need to be assigned to variables</li> *************** *** 514,518 **** <blockquote> ! <pre>function DoStuff(a, b, c)<br> a = b*c -- does not change global a<br> local function Calc(a)<br> return a*2<br> end<br> <br> return Calc(a)*b*c -- or for multiple values "return a*b*c, a*b"<br>end<br>-- call function<br>a = 21<br>result = DoStuff(a, 1, 2)<br>-- can also put function into a table<br>stuff = {}<br>stuff.DoStuff = DoStuff<br>result = stuff.DoStuff(1, 2, 3)</pre> </blockquote> --- 574,578 ---- <blockquote> ! <pre>function DoStuff(a, b, c)<br> a = b*c -- does not change global and/or input number a<br> local function Calc(a)<br> return a*2<br> end<br> <br> return Calc(a)*b*c -- or for multiple values "return a*b*c, a*b"<br>end<br>-- call function<br>a = 21<br>result = DoStuff(a, 1, 2)<br>-- can also put function into a table<br>stuff = {}<br>stuff.DoStuff = DoStuff<br>result = stuff.DoStuff(1, 2, 3)<br>print(result)</pre> </blockquote> *************** *** 651,655 **** <li>wxLua does not use the static event tables since it is ! not a compiled language. Rather the wxEvent::Connect function is used to connect event types to an event handler, typically a wxWindow derived class. Therefore you do not use EVT_XXX, but the --- 711,716 ---- <li>wxLua does not use the static event tables since it is ! not a compiled language. Rather the wxEvtHandler::Connect function is ! used to connect event types to an event handler, typically a wxWindow derived class. Therefore you do not use EVT_XXX, but the *************** *** 1118,1122 **** <li>Deprecated, wxWidgets is not actively maintaining the docking library FL ! contrib.</li> </ul> --- 1179,1183 ---- <li>Deprecated, wxWidgets is not actively maintaining the docking library FL ! contrib and neither are we.</li> </ul> *************** *** 1159,1163 **** <ul> ! <li>Demonstrates how to use the printing and some wxDC drawing classes in wxLua.</li> --- 1220,1225 ---- <ul> ! <li>Demonstrates how to use the printing architecture and ! some wxDC drawing classes in wxLua.</li> *************** *** 1503,1508 **** create a wxLuaState call <i>wxLuaBinding_wx_init()</i>. This is because different compilers seem to have problems with the ! various techniques we've tried to automatically initialize this or ! throw out the whole library unless you explicitly use something in it.</li> </ul> --- 1565,1572 ---- create a wxLuaState call <i>wxLuaBinding_wx_init()</i>. This is because different compilers seem to have problems with the ! various techniques we've tried to automatically initialize the binding ! or ! throw out the whole library when linking unless you explicitly use ! something in it.</li> </ul> *************** *** 1573,1577 **** Lua uses char strings while wxWidgets uses the wxString class which uses the wxChar data type. Depending on whether you have compiled ! wxWidgets in Unicode mode or not wxChar can be either w_char or char. Therefore, wxLua uses the functions <i>"wxString lua2wx(const char* str)"</i> and <i>"const wxCharBuffer --- 1637,1641 ---- Lua uses char strings while wxWidgets uses the wxString class which uses the wxChar data type. Depending on whether you have compiled ! wxWidgets in Unicode mode or not, wxChar can be either w_char or char. Therefore, wxLua uses the functions <i>"wxString lua2wx(const char* str)"</i> and <i>"const wxCharBuffer *************** *** 1613,1619 **** The wxLuaState contains all of the lua 'C' functions, such as lua_gettop(lua_State* L), but as member functions named lua_GetTop() ! which<br> ! ! use the internal lua_State and check for it's validity before use when compiled in debug mode. The functions are capitalized to make them easier to find in an editor. If you want the greatest performance just --- 1677,1682 ---- The wxLuaState contains all of the lua 'C' functions, such as lua_gettop(lua_State* L), but as member functions named lua_GetTop() ! which use the internal lua_State and check for it's validity before use ! when compiled in debug mode. The functions are capitalized to make them easier to find in an editor. If you want the greatest performance just |
From: John L. <jr...@us...> - 2007-02-28 04:28:39
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27437/wxLua/samples Modified Files: scribble.wx.lua Log Message: add more to docs make a copy of the initial pen to use since we'll modify it Index: scribble.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/scribble.wx.lua,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** scribble.wx.lua 27 Feb 2007 05:10:29 -0000 1.15 --- scribble.wx.lua 28 Feb 2007 04:28:34 -0000 1.16 *************** *** 28,32 **** ID_PENWIDTH_SPINCTRL = wx.wxID_HIGHEST + 5 ! currentPen = wx.wxRED_PEN; currentPen:SetWidth(3) penStyles = { wx.wxSOLID, wx.wxDOT, wx.wxLONG_DASH, wx.wxSHORT_DASH, wx.wxDOT_DASH, wx.wxBDIAGONAL_HATCH, wx.wxCROSSDIAG_HATCH, --- 28,32 ---- ID_PENWIDTH_SPINCTRL = wx.wxID_HIGHEST + 5 ! currentPen = wx.wxPenCopy(wx.wxRED_PEN); currentPen:SetWidth(3) penStyles = { wx.wxSOLID, wx.wxDOT, wx.wxLONG_DASH, wx.wxSHORT_DASH, wx.wxDOT_DASH, wx.wxBDIAGONAL_HATCH, wx.wxCROSSDIAG_HATCH, |
From: John L. <jr...@us...> - 2007-02-28 00:47:38
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7230/wxLua/docs Modified Files: wxlua.html Log Message: add a little more about the lua language Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxlua.html 5 Feb 2007 23:23:56 -0000 1.12 --- wxlua.html 28 Feb 2007 00:47:33 -0000 1.13 *************** *** 111,119 **** <ul> ! <li>Comments</li> <ul> ! <li>Line comments are marked by --</li> <li>Block Comments are <i>--[[ multiple line comment ]]</i></li> --- 111,120 ---- <ul> ! <li><b>Comments</b></li> <ul> ! <li>Line comments are marked by <i>-- rest of line is ! commented</i></li> <li>Block Comments are <i>--[[ multiple line comment ]]</i></li> *************** *** 121,125 **** </ul> ! <li>Variables</li> <ul> --- 122,126 ---- </ul> ! <li><b>Variables</b></li> <ul> *************** *** 137,150 **** variable only temporarily supersedes the global.</li> </ul> ! <li>Lua Types</li> <ul> ! <li>nil : A special value meaning NULL or nothing, all variables that are not assigned a value are nil.</li> ! <li>Boolean : true or false, nil works as false </li> <ul> --- 138,157 ---- variable only temporarily supersedes the global.</li> + <li>Use the function <i>type(var_name)</i> to + get the type as a string, "string", "number", "boolean", "table", + "userdata", "function".</li> + </ul> ! <li><b>Lua Types</b></li> <ul> ! <li><b>nil</b> : A special value meaning NULL or ! nothing, all variables that are not assigned a value are nil.</li> ! <li><b>boolean</b> : true or false, nil works as ! false </li> <ul> *************** *** 152,156 **** <li>Note: <i>"a = 0; if a then print(a) end"</i> evaluates "a" to ! true since it has a value, eg. not nil.</li> </ul> --- 159,163 ---- <li>Note: <i>"a = 0; if a then print(a) end"</i> evaluates "a" to ! true since it has a value, eg. not nil, use <i>"a ~= 0"</i>.</li> </ul> *************** *** 160,180 **** <ul> ! <li>Numbers : All numbers in Lua are double valued floating point numbers. </li> <ul> ! <li><i>mynumber = (1+ 2 * 3 / (4 * 1) )*math.pow(2, 4)</i></li> </ul> ! <li>Strings : Strings in lua can have embedded nulls "\0" and follow the same escape characters as C.</li> <ul> <li><i>mystring = "How are 'you'!"</i> or <i>mystring = 'How ! are\t"You"!\n'</i> are both valid</li> <li><i>mystring = [[How are "'you'"!]]</i> --- 167,202 ---- <ul> ! <li><b>number</b> : All numbers in Lua are double ! valued floating point numbers. </li> <ul> ! <li><i>mynumber = (1E1+ 2e-2 * 3.14 / (4 * 1) ! )*math.pow(2.5e+2, 4)</i></li> ! ! <li>Variables can be coerced into numbers using the ! function <i>tonumber(variable)</i> which returns <i>nil</i> ! on failure.</li> ! ! <li>Additional math functions are in the <i>math</i> ! table.</li> </ul> ! <li><b>string</b> : Strings in lua can have ! embedded nulls "\0" and follow the same escape characters as C.</li> <ul> + <li>Strings are all hashed so that there is only one copy + of a particular string stored at any one time no matter how many + variables reference it.</li> + <li><i>mystring = "How are 'you'!"</i> or <i>mystring = 'How ! are\t"You"!\n'</i> are both valid since either " or ' can be used ! to quote strings.</li> <li><i>mystring = [[How are "'you'"!]]</i> *************** *** 190,198 **** "..str2.." "..tostring(2).."!"</i></li> </ul> </ul> ! <li>Tables : Tables can be indexed by numbers, strings, functions, other tables...</li> --- 212,232 ---- "..str2.." "..tostring(2).."!"</i></li> + <li>Numbers can be typically coerced into strings as <i>("A + "..1)</i>, but not <i>(1.." A")</i> since in the + second case the string "A" cannot be coerced into a number.</li> + </ul> + <li>Variables can be coerced into strings using the + function <i>tostring(variable)</i> which returns <i>nil</i> + on failure. </li> + + <li>Additional string functions are in the <i>string</i> + table.</li> + </ul> ! <li><b>table</b> : Tables can be indexed by ! numbers, strings, functions, other tables...</li> *************** *** 205,209 **** <li><i>mytable = { ["index1"] = 1, "first value", "second ! value", ["index2"] = 2 }</i></li> <ul> --- 239,243 ---- <li><i>mytable = { ["index1"] = 1, "first value", "second ! value", index2 = 2 }</i></li> <ul> *************** *** 222,227 **** created</li> ! <li>Clear values by setting them to nil : mytable.index1 ! = nil</li> <li>The length operator <i>#mytable</i> --- 256,262 ---- created</li> ! <li>Clear values by setting them to <i>nil</i> ! : <i>mytable.index1 ! = nil</i></li> <li>The length operator <i>#mytable</i> *************** *** 255,259 **** </ul> ! <li>Functions :</li> <ul> --- 290,294 ---- </ul> ! <li><b>function</b> :</li> <ul> *************** *** 946,950 **** </ul> ! <li><b>Extending classes</b> </li> <ul> --- 981,985 ---- </ul> ! <li><b>Extending classes</b> </li> <ul> *************** *** 952,964 **** <li>You cannot arbitrarily override "virtual" functions in wxLua as this must be done in C++. The class must be subclassed and ! the virtual functions overridden to check to see if there is a lua function to call instead of the base class function. This has only been done for cases where it is necessary, in many cases you can intercept the appropriate wxEvent and change the behavior from within the handler. Examples of virtual functions that must or can be ! overridden are in wxLuaPrintout class, see the printing sample, and wxLuaHtmlWindow, see html sample. The only virtual functions that you can override are marked with comments in the binding ! files and wxluaref.htm. </li> <li>You may also add your own functions to classes that --- 987,999 ---- <li>You cannot arbitrarily override "virtual" functions in wxLua as this must be done in C++. The class must be subclassed and ! the virtual functions overridden to check to see if there is a lua function to call instead of the base class function. This has only been done for cases where it is necessary, in many cases you can intercept the appropriate wxEvent and change the behavior from within the handler. Examples of virtual functions that must or can be ! overridden are in wxLuaPrintout class, see the printing sample, and wxLuaHtmlWindow, see html sample. The only virtual functions that you can override are marked with comments in the binding ! files and wxluaref.htm. </li> <li>You may also add your own functions to classes that *************** *** 970,977 **** <ul> ! <li>Example : <i>"r = wx.wxRect(1,2,3,4); r.PrintXY = function(self) print(self:GetX(), self:GetY()) end; r:PrintXY()"</i> adds the function PrintXY to ! the wxRect instance r. The userdata, class instance, r is passed to the lua function as the parameter "self" which is pushed onto the stack when the PrintXY function is called with the ":" notation.</li> --- 1005,1012 ---- <ul> ! <li>Example : <i>"r = wx.wxRect(1,2,3,4); r.PrintXY = function(self) print(self:GetX(), self:GetY()) end; r:PrintXY()"</i> adds the function PrintXY to ! the wxRect instance r. The userdata, class instance, r is passed to the lua function as the parameter "self" which is pushed onto the stack when the PrintXY function is called with the ":" notation.</li> *************** *** 983,990 **** <li>You may also create the lua function beforehand and then assign it to the rect object. <i>"function ! wxRect_PrintXY_func(self) print(self:GetX(), self:GetY()) end; r1 = wx.wxRect(1,2,3,4); r1.PrintXY = wxRect_PrintXY_func; r1:PrintXY()"</i>. ! You can see that using this idea you can make a lua function ! that creates a new wxRect, sets your extra functions for it, and returns it for use.</li> --- 1018,1025 ---- <li>You may also create the lua function beforehand and then assign it to the rect object. <i>"function ! wxRect_PrintXY_func(self) print(self:GetX(), self:GetY()) end; r1 = wx.wxRect(1,2,3,4); r1.PrintXY = wxRect_PrintXY_func; r1:PrintXY()"</i>. ! You can see that using this idea you can make a lua function ! that creates a new wxRect, sets your extra functions for it, and returns it for use.</li> |
From: Francesco M. <fr...@us...> - 2007-02-27 21:01:38
|
Update of /cvsroot/wxlua/website In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10800 Modified Files: screenshots.php Log Message: added more Mac screenshots Index: screenshots.php =================================================================== RCS file: /cvsroot/wxlua/website/screenshots.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** screenshots.php 22 Dec 2006 19:17:19 -0000 1.17 --- screenshots.php 27 Feb 2007 21:00:51 -0000 1.18 *************** *** 56,59 **** --- 56,63 ---- write_screenshot("wxlua_sudoku_mac.png", "wxLuaSudoku (in wxMac)"); + write_screenshot("wxlua_mac_wxgtk.png", + "wxLua (on a Mac but using wxGTK port)"); + write_screenshot("wxlua_mac_wxmac.png", + "wxLuaSudoku (in wxMac)"); ?> </div> |
From: Francesco M. <fr...@us...> - 2007-02-27 21:01:38
|
Update of /cvsroot/wxlua/website/thumbnails In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10800/thumbnails Added Files: wxlua_mac_wxgtk.png wxlua_mac_wxmac.png Log Message: added more Mac screenshots --- NEW FILE: wxlua_mac_wxmac.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: wxlua_mac_wxgtk.png --- (This appears to be a binary file; contents omitted.) |
From: Francesco M. <fr...@us...> - 2007-02-27 21:01:38
|
Update of /cvsroot/wxlua/website/screenshots In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10800/screenshots Added Files: wxlua_mac_wxgtk.png wxlua_mac_wxmac.png Log Message: added more Mac screenshots --- NEW FILE: wxlua_mac_wxmac.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: wxlua_mac_wxgtk.png --- (This appears to be a binary file; contents omitted.) |
From: Francesco M. <fr...@us...> - 2007-02-27 20:52:45
|
Update of /cvsroot/wxlua/wxLua/apps/wxluafreeze/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9003/apps/wxluafreeze/src Modified Files: wxluafreeze.cpp Log Message: do include locale.h for __WXGTK__ so that MacOSX is able to find setlocale() Index: wxluafreeze.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluafreeze/src/wxluafreeze.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxluafreeze.cpp 14 May 2006 01:49:10 -0000 1.7 --- wxluafreeze.cpp 27 Feb 2007 20:52:37 -0000 1.8 *************** *** 22,25 **** --- 22,29 ---- #endif + #ifdef __WXGTK__ + #include <locale.h> + #endif + //#include "wx/cmdline.h" #include "wx/image.h" |
From: Francesco M. <fr...@us...> - 2007-02-27 20:52:40
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9003/apps/wxluaedit/src Modified Files: wxluaedit.cpp Log Message: do include locale.h for __WXGTK__ so that MacOSX is able to find setlocale() Index: wxluaedit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** wxluaedit.cpp 15 Dec 2006 19:04:48 -0000 1.29 --- wxluaedit.cpp 27 Feb 2007 20:52:37 -0000 1.30 *************** *** 21,24 **** --- 21,28 ---- #endif + #ifdef __WXGTK__ + #include <locale.h> + #endif + #include "wx/cmdline.h" #include "wx/image.h" |
From: Francesco M. <fr...@us...> - 2007-02-27 20:52:39
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9003/apps/wxlua/src Modified Files: wxlua.cpp Log Message: do include locale.h for __WXGTK__ so that MacOSX is able to find setlocale() Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** wxlua.cpp 19 Dec 2006 21:11:59 -0000 1.44 --- wxlua.cpp 27 Feb 2007 20:52:36 -0000 1.45 *************** *** 20,23 **** --- 20,27 ---- #endif + #ifdef __WXGTK__ + #include <locale.h> + #endif + #include "wx/cmdline.h" #include "wx/fs_mem.h" |
From: Francesco M. <fr...@us...> - 2007-02-27 20:47:58
|
Update of /cvsroot/wxlua/wxLua/build/bakefiles In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7347/build/bakefiles Modified Files: mac_bundles.bkl Log Message: don't name mac bundles using uid=1000(frm) gid=1000(frm) gruppi=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(lpadmin),111(scanner),113(admin),1000(frm) but rather tag's Index: mac_bundles.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/bakefiles/mac_bundles.bkl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mac_bundles.bkl 26 Dec 2006 11:00:49 -0000 1.3 --- mac_bundles.bkl 27 Feb 2007 20:47:45 -0000 1.4 *************** *** 62,66 **** <!-- bundle directory: --> ! <set var="BUNDLE">$(value).app/Contents</set> <set var="BUNDLE_TGT">$(BUNDLE)/PkgInfo</set> <set var="BUNDLE_TGT_REF">$(BUNDLE)/PkgInfo</set> --- 62,67 ---- <!-- bundle directory: --> ! <set var="BUNDLE_NAME">$(value)</set> ! <set var="BUNDLE">$(BUNDLE_NAME).app/Contents</set> <set var="BUNDLE_TGT">$(BUNDLE)/PkgInfo</set> <set var="BUNDLE_TGT_REF">$(BUNDLE)/PkgInfo</set> *************** *** 81,85 **** <!-- Info.plist: --> sed -e "s/IDENTIFIER/$(BUNDLE_IDENTIFIER)/" \ ! -e "s/EXECUTABLE/$(id)/" \ -e "s/VERSION/$(BUNDLE_VERSION)/" \ $(BUNDLE_PLIST) >$(BUNDLE)/Info.plist --- 82,86 ---- <!-- Info.plist: --> sed -e "s/IDENTIFIER/$(BUNDLE_IDENTIFIER)/" \ ! -e "s/EXECUTABLE/$(BUNDLE_NAME)/" \ -e "s/VERSION/$(BUNDLE_VERSION)/" \ $(BUNDLE_PLIST) >$(BUNDLE)/Info.plist *************** *** 89,93 **** <!-- make a hardlink to the binary: --> ! ln -f $(ref("__targetdir",id))$(ref("__targetname",id)) $(BUNDLE)/MacOS/$(id) <!-- ditto resources and icons: --> --- 90,94 ---- <!-- make a hardlink to the binary: --> ! ln -f $(ref("__targetdir",id))$(ref("__targetname",id)) $(BUNDLE)/MacOS/$(BUNDLE_NAME) <!-- ditto resources and icons: --> |
From: Francesco M. <fr...@us...> - 2007-02-27 20:47:53
|
Update of /cvsroot/wxlua/wxLua/apps In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7347/apps Modified Files: Makefile.in Log Message: don't name mac bundles using uid=1000(frm) gid=1000(frm) gruppi=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(lpadmin),111(scanner),113(admin),1000(frm) but rather tag's Index: Makefile.in =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/Makefile.in,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Makefile.in 27 Dec 2006 10:57:36 -0000 1.55 --- Makefile.in 27 Feb 2007 20:47:45 -0000 1.56 *************** *** 249,253 **** @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ ! @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ -e "s/EXECUTABLE/app_wxlua/" \ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ -e "s/VERSION/2.8.0/" \ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ $(top_srcdir)/distrib/macbundle/Info.plist.in >wxLua.app/Contents/Info.plist --- 249,253 ---- @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ ! @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ -e "s/EXECUTABLE/wxLua/" \ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ -e "s/VERSION/2.8.0/" \ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ $(top_srcdir)/distrib/macbundle/Info.plist.in >wxLua.app/Contents/Info.plist *************** *** 257,261 **** @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ ! @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ ln -f $(top_builddir)/bin/wxlua$(EXEEXT) wxLua.app/Contents/MacOS/app_wxlua @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ --- 257,261 ---- @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ ! @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ ln -f $(top_builddir)/bin/wxlua$(EXEEXT) wxLua.app/Contents/MacOS/wxLua @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAAPP_1_USE_WXLUADEBUG_1@ *************** *** 284,288 **** @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ ! @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ -e "s/EXECUTABLE/app_wxluaedit/" \ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ -e "s/VERSION/2.8.0/" \ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ $(top_srcdir)/distrib/macbundle/Info.plist.in >wxLuaEdit.app/Contents/Info.plist --- 284,288 ---- @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ ! @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ -e "s/EXECUTABLE/wxLuaEdit/" \ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ -e "s/VERSION/2.8.0/" \ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ $(top_srcdir)/distrib/macbundle/Info.plist.in >wxLuaEdit.app/Contents/Info.plist *************** *** 292,296 **** @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ ! @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ ln -f $(top_builddir)/bin/wxluaedit$(EXEEXT) wxLuaEdit.app/Contents/MacOS/app_wxluaedit @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ --- 292,296 ---- @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ ! @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ ln -f $(top_builddir)/bin/wxluaedit$(EXEEXT) wxLuaEdit.app/Contents/MacOS/wxLuaEdit @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ @COND_USE_WXBINDSTC_1_USE_WXLUAEDITAPP_1@ *************** *** 319,323 **** @COND_USE_WXLUACANAPP_1@ @COND_USE_WXLUACANAPP_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ ! @COND_USE_WXLUACANAPP_1@ -e "s/EXECUTABLE/app_wxluacan/" \ @COND_USE_WXLUACANAPP_1@ -e "s/VERSION/2.8.0/" \ @COND_USE_WXLUACANAPP_1@ $(top_srcdir)/distrib/macbundle/Info.plist.in >wxLuaCan.app/Contents/Info.plist --- 319,323 ---- @COND_USE_WXLUACANAPP_1@ @COND_USE_WXLUACANAPP_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ ! @COND_USE_WXLUACANAPP_1@ -e "s/EXECUTABLE/wxLuaCan/" \ @COND_USE_WXLUACANAPP_1@ -e "s/VERSION/2.8.0/" \ @COND_USE_WXLUACANAPP_1@ $(top_srcdir)/distrib/macbundle/Info.plist.in >wxLuaCan.app/Contents/Info.plist *************** *** 327,331 **** @COND_USE_WXLUACANAPP_1@ @COND_USE_WXLUACANAPP_1@ ! @COND_USE_WXLUACANAPP_1@ ln -f $(top_builddir)/bin/wxluacan$(EXEEXT) wxLuaCan.app/Contents/MacOS/app_wxluacan @COND_USE_WXLUACANAPP_1@ @COND_USE_WXLUACANAPP_1@ --- 327,331 ---- @COND_USE_WXLUACANAPP_1@ @COND_USE_WXLUACANAPP_1@ ! @COND_USE_WXLUACANAPP_1@ ln -f $(top_builddir)/bin/wxluacan$(EXEEXT) wxLuaCan.app/Contents/MacOS/wxLuaCan @COND_USE_WXLUACANAPP_1@ @COND_USE_WXLUACANAPP_1@ *************** *** 354,358 **** @COND_USE_WXLUAFREEZEAPP_1@ @COND_USE_WXLUAFREEZEAPP_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ ! @COND_USE_WXLUAFREEZEAPP_1@ -e "s/EXECUTABLE/app_wxluafreeze/" \ @COND_USE_WXLUAFREEZEAPP_1@ -e "s/VERSION/2.8.0/" \ @COND_USE_WXLUAFREEZEAPP_1@ $(top_srcdir)/distrib/macbundle/Info.plist.in >wxLuaFreeze.app/Contents/Info.plist --- 354,358 ---- @COND_USE_WXLUAFREEZEAPP_1@ @COND_USE_WXLUAFREEZEAPP_1@ sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \ ! @COND_USE_WXLUAFREEZEAPP_1@ -e "s/EXECUTABLE/wxLuaFreeze/" \ @COND_USE_WXLUAFREEZEAPP_1@ -e "s/VERSION/2.8.0/" \ @COND_USE_WXLUAFREEZEAPP_1@ $(top_srcdir)/distrib/macbundle/Info.plist.in >wxLuaFreeze.app/Contents/Info.plist *************** *** 362,366 **** @COND_USE_WXLUAFREEZEAPP_1@ @COND_USE_WXLUAFREEZEAPP_1@ ! @COND_USE_WXLUAFREEZEAPP_1@ ln -f $(top_builddir)/bin/wxluafreeze$(EXEEXT) wxLuaFreeze.app/Contents/MacOS/app_wxluafreeze @COND_USE_WXLUAFREEZEAPP_1@ @COND_USE_WXLUAFREEZEAPP_1@ --- 362,366 ---- @COND_USE_WXLUAFREEZEAPP_1@ @COND_USE_WXLUAFREEZEAPP_1@ ! @COND_USE_WXLUAFREEZEAPP_1@ ln -f $(top_builddir)/bin/wxluafreeze$(EXEEXT) wxLuaFreeze.app/Contents/MacOS/wxLuaFreeze @COND_USE_WXLUAFREEZEAPP_1@ @COND_USE_WXLUAFREEZEAPP_1@ |
From: Francesco M. <fr...@us...> - 2007-02-27 20:47:53
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7347/build/autoconf Modified Files: aclocal.m4 Log Message: don't name mac bundles using uid=1000(frm) gid=1000(frm) gruppi=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(lpadmin),111(scanner),113(admin),1000(frm) but rather tag's |
From: Francesco M. <fr...@us...> - 2007-02-27 19:52:05
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17056/build/autoconf Modified Files: aclocal.m4 wxpresets.m4 Log Message: fixed the problem as reported by Anders about stc/gl additional lib problem Index: wxpresets.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/wxpresets.m4,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxpresets.m4 14 May 2006 12:55:56 -0000 1.17 --- wxpresets.m4 27 Feb 2007 19:51:58 -0000 1.18 *************** *** 158,162 **** [ dnl The piece '$WX_CONFIG_PATH $wx_config_args' was taken from wxwin.m4 ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS $1,$WX_ADDITIONAL_LIBS --libs)" ]) --- 158,168 ---- [ dnl The piece '$WX_CONFIG_PATH $wx_config_args' was taken from wxwin.m4 ! if test -z "$WX_ADDITIONAL_LIBS"; then ! WX_ADDITIONAL_LIBS="$1" ! else ! WX_ADDITIONAL_LIBS="$1,$WX_ADDITIONAL_LIBS" ! fi ! ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS $WX_ADDITIONAL_LIBS --libs)" ]) |
From: Francesco M. <fr...@us...> - 2007-02-27 19:52:02
|
Update of /cvsroot/wxlua/wxLua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17056 Modified Files: configure Log Message: fixed the problem as reported by Anders about stc/gl additional lib problem Index: configure =================================================================== RCS file: /cvsroot/wxlua/wxLua/configure,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** configure 27 Feb 2007 19:05:02 -0000 1.49 --- configure 27 Feb 2007 19:51:58 -0000 1.50 *************** *** 6988,6992 **** OLD_WXLIBS=$WX_LIBS ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS stc,$WX_ADDITIONAL_LIBS --libs)" LIBS="$LIBS $WX_LIBS" --- 6988,6998 ---- OLD_WXLIBS=$WX_LIBS ! if test -z "$WX_ADDITIONAL_LIBS"; then ! WX_ADDITIONAL_LIBS="stc" ! else ! WX_ADDITIONAL_LIBS="stc,$WX_ADDITIONAL_LIBS" ! fi ! ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS $WX_ADDITIONAL_LIBS --libs)" LIBS="$LIBS $WX_LIBS" *************** *** 7080,7084 **** # add to the library to link to the wxSTC lib ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS stc,$WX_ADDITIONAL_LIBS --libs)" else --- 7086,7096 ---- # add to the library to link to the wxSTC lib ! if test -z "$WX_ADDITIONAL_LIBS"; then ! WX_ADDITIONAL_LIBS="stc" ! else ! WX_ADDITIONAL_LIBS="stc,$WX_ADDITIONAL_LIBS" ! fi ! ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS $WX_ADDITIONAL_LIBS --libs)" else *************** *** 7364,7368 **** OLD_WXLIBS=$WX_LIBS ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS gl,$WX_ADDITIONAL_LIBS --libs)" LIBS="$LIBS $WX_LIBS" --- 7376,7386 ---- OLD_WXLIBS=$WX_LIBS ! if test -z "$WX_ADDITIONAL_LIBS"; then ! WX_ADDITIONAL_LIBS="gl" ! else ! WX_ADDITIONAL_LIBS="gl,$WX_ADDITIONAL_LIBS" ! fi ! ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS $WX_ADDITIONAL_LIBS --libs)" LIBS="$LIBS $WX_LIBS" *************** *** 7455,7459 **** # won't have linking errors ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS gl,$WX_ADDITIONAL_LIBS --libs)" fi --- 7473,7483 ---- # won't have linking errors ! if test -z "$WX_ADDITIONAL_LIBS"; then ! WX_ADDITIONAL_LIBS="gl" ! else ! WX_ADDITIONAL_LIBS="gl,$WX_ADDITIONAL_LIBS" ! fi ! ! WX_LIBS="$($WX_CONFIG_PATH $wx_config_args $WXCFG_FLAGS $WX_ADDITIONAL_LIBS --libs)" fi |
From: Francesco M. <fr...@us...> - 2007-02-27 19:05:18
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30765/build/autoconf Modified Files: aclocal.m4 Log Message: Mac build fixes Index: aclocal.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/aclocal.m4,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** aclocal.m4 3 Jan 2007 23:10:02 -0000 1.39 --- aclocal.m4 27 Feb 2007 19:05:04 -0000 1.40 *************** *** 12,21 **** # PARTICULAR PURPOSE. ! dnl --------------------------------------------------------------------------- ! dnl Support macros for makefiles generated by BAKEFILE. ! dnl --------------------------------------------------------------------------- dnl Lots of compiler & linker detection code contained here was taken from ! dnl wxWindows configure.in script (see http://www.wxwindows.org) [...1408 lines suppressed...] ! #if ($majsym > ($major) || \ ! ($majsym == ($major) && $minsym > ($minor)) || \ ! ($majsym == ($major) && $minsym == ($minor) && $relsym >= ($release))) ! // this component is recent enough ! #else ! #error $1 is too old ! At least version $5 is required ! #endif ! #else ! #error $1 does not define its version symbols $majsym, $minsym, $relsym ! #endif ! ], ! [$8], [$9]) ! ]) ! m4_include([wxwin.m4]) --- 1634,1637 ---- ]) ! m4_include([wxcodecheck.m4]) m4_include([wxwin.m4]) |
From: Francesco M. <fr...@us...> - 2007-02-27 19:05:12
|
Update of /cvsroot/wxlua/wxLua/distrib/macbundle In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30765/distrib/macbundle Added Files: wxLuaFile.icns Log Message: Mac build fixes --- NEW FILE: wxLuaFile.icns --- (This appears to be a binary file; contents omitted.) |
From: Francesco M. <fr...@us...> - 2007-02-27 19:05:10
|
Update of /cvsroot/wxlua/wxLua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30765 Modified Files: configure Log Message: Mac build fixes Index: configure =================================================================== RCS file: /cvsroot/wxlua/wxLua/configure,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** configure 3 Jan 2007 23:10:00 -0000 1.48 --- configure 27 Feb 2007 19:05:02 -0000 1.49 *************** *** 7381,7385 **** main () { ! wxGLContext dummy(NULL); ; return 0; --- 7381,7385 ---- main () { ! wxGLCanvas dummy(NULL); ; return 0; *************** *** 7760,7765 **** if test "x$SUNCXX" = "xyes"; then AR=$CXX - AROPTIONS="-xar -o" else if test -n "$ac_tool_prefix"; then --- 7760,7769 ---- if test "x$SUNCXX" = "xyes"; then AR=$CXX AROPTIONS="-xar -o" + + elif test "x$SGICC" = "xyes"; then + AR=$CXX + AROPTIONS="-ar -o" + else if test -n "$ac_tool_prefix"; then *************** *** 8410,8413 **** --- 8414,8421 ---- ldargs="-r -keep_private_externs -nostdlib" + if test "x${D}CXX" = "x"; then + CXX="c++" + fi + while test ${D}# -gt 0; do case ${D}1 in *************** *** 8423,8426 **** --- 8431,8440 ---- ;; + -arch|-isysroot) + # collect these options and values + ldargs="${D}{ldargs} ${D}1 ${D}2" + shift + ;; + -s|-Wl,*) # collect these load args *************** *** 8462,8468 **** # if test ${D}{verbose} = 1; then ! echo "c++ ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o" fi ! c++ ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o status=${D}? --- 8476,8482 ---- # if test ${D}{verbose} = 1; then ! echo "${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o" fi ! ${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o status=${D}? *************** *** 8473,8479 **** if test ${D}{status} = 0; then if test ${D}{verbose} = 1; then ! echo "c++ ${D}{linking_flag} master.${D}${D}.o ${D}{args}" fi ! c++ ${D}{linking_flag} master.${D}${D}.o ${D}{args} status=${D}? fi --- 8487,8493 ---- if test ${D}{status} = 0; then if test ${D}{verbose} = 1; then ! echo "${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args}" fi ! ${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args} status=${D}? fi *************** *** 8489,8493 **** chmod +x shared-ld-sh ! SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o" SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" --- 8503,8507 ---- chmod +x shared-ld-sh ! SHARED_LD_MODULE_CC="\$(CXX) `pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o" SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" |
From: Francesco M. <fr...@us...> - 2007-02-27 17:41:14
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26499 Modified Files: configure.ac Log Message: workaround wxMac bogus wxGLContext doing the test on wxGLCanvas instead Index: configure.ac =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/configure.ac,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** configure.ac 3 Jan 2007 23:10:02 -0000 1.39 --- configure.ac 27 Feb 2007 17:41:06 -0000 1.40 *************** *** 381,385 **** AC_LINK_IFELSE([ AC_LANG_PROGRAM([#include <wx/glcanvas.h>], ! [wxGLContext dummy(NULL);]) ], [WXGL_PRESENCE=1], [WXGL_PRESENCE=0]) --- 381,385 ---- AC_LINK_IFELSE([ AC_LANG_PROGRAM([#include <wx/glcanvas.h>], ! [wxGLCanvas dummy(NULL);]) ], [WXGL_PRESENCE=1], [WXGL_PRESENCE=0]) |
From: John L. <jr...@us...> - 2007-02-27 05:10:34
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32133/wxLua/samples Modified Files: scribble.wx.lua Log Message: add a toolbar, show off some dialogs to choose colours and line widths Index: scribble.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/scribble.wx.lua,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** scribble.wx.lua 26 Feb 2007 05:17:30 -0000 1.14 --- scribble.wx.lua 27 Feb 2007 05:10:29 -0000 1.15 *************** *** 15,20 **** mouseDown = false -- left mouse button is down pointsList = {} -- list of the points added to the drawing ! -- pointsList[segment] = {penColour = index, [n] = {x = x_pos, y = x_pos}} ! itemColour = 1 -- current pen colour isModified = false -- has the drawing been modified redrawRequired = true -- redraw the image --- 15,21 ---- mouseDown = false -- left mouse button is down pointsList = {} -- list of the points added to the drawing ! -- pointsList[segment] = ! -- { pen = {colour = {r, g, b}, width = 1, style = N}, ! -- [n] = {x = x_pos, y = x_pos} } isModified = false -- has the drawing been modified redrawRequired = true -- redraw the image *************** *** 22,33 **** fileName = "" -- filename to save to ID_SAVEBITMAP = wx.wxID_HIGHEST + 1 - penColours = { "Red", "Orange", "Yellow", "Green", "Blue", "Purple", "Black", "Grey" } - pens = {} screenWidth, screenHeight = wx.wxDisplaySize() bitmap = wx.wxEmptyBitmap(screenWidth, screenHeight) ! for n = 1, #penColours do ! table.insert(pens, wx.wxPenFromColourName(penColours[n], 3, wx.wxSOLID)) end --- 23,87 ---- fileName = "" -- filename to save to ID_SAVEBITMAP = wx.wxID_HIGHEST + 1 + ID_PENCOLOUR = wx.wxID_HIGHEST + 2 + ID_PENWIDTH = wx.wxID_HIGHEST + 3 + ID_PENSTYLE = wx.wxID_HIGHEST + 4 + ID_PENWIDTH_SPINCTRL = wx.wxID_HIGHEST + 5 + + currentPen = wx.wxRED_PEN; currentPen:SetWidth(3) + penStyles = { wx.wxSOLID, wx.wxDOT, wx.wxLONG_DASH, wx.wxSHORT_DASH, + wx.wxDOT_DASH, wx.wxBDIAGONAL_HATCH, wx.wxCROSSDIAG_HATCH, + wx.wxFDIAGONAL_HATCH, wx.wxCROSS_HATCH, wx.wxHORIZONTAL_HATCH, + wx.wxVERTICAL_HATCH } + penStyleNames = { "Solid style", "Dotted style", "Long dashed style", "Short dashed style", + "Dot and dash style", "Backward diagonal hatch", "Cross-diagonal hatch", + "Forward diagonal hatch", "Cross hatch", "Horizontal hatch", + "Vertical hatch" } screenWidth, screenHeight = wx.wxDisplaySize() bitmap = wx.wxEmptyBitmap(screenWidth, screenHeight) ! -- --------------------------------------------------------------------------- ! -- Pen to table and back functions ! -- --------------------------------------------------------------------------- ! function PenToTable(pen) ! local c = pen:GetColour() ! local t = { colour = { c:Red(), c:Green(), c:Blue() }, width = pen:GetWidth(), style = pen:GetStyle() } ! c:Delete() ! return t ! end ! ! function TableToPen(penTable) ! local c = wx.wxColour(unpack(penTable.colour)) ! local pen = wx.wxPen(c, penTable.width, penTable.style) ! c:Delete() ! return pen ! end ! ! -- --------------------------------------------------------------------------- ! -- Drawing functions ! -- --------------------------------------------------------------------------- ! function CreateToolBarColourBitmap(size) ! local w, h = size:GetWidth(), size:GetHeight() ! local bmp = wx.wxEmptyBitmap(w, h) ! local memDC = wx.wxMemoryDC() ! memDC:SelectObject(bmp) -- select our bitmap to draw into ! ! local colour = currentPen:GetColour() ! local brush = wx.wxBrush(colour, wx.wxSOLID) ! memDC:SetBrush(brush) ! memDC:DrawRectangle(0, 0, w, h) ! memDC:SetBrush(wx.wxRED_BRUSH) ! memDC:DrawRectangle(0, 0, w/3, h) ! memDC:SetBrush(wx.wxGREEN_BRUSH) ! memDC:DrawRectangle(w/3, 0, w/3, h) ! memDC:SetBrush(wx.wxBLUE_BRUSH) ! memDC:DrawRectangle(2*math.floor(w/3), 0, w/3, h) ! ! memDC:SelectObject(wx.wxNullBitmap) -- always release bitmap ! memDC:Delete() ! brush:Delete() ! colour:Delete() ! ! return bmp end *************** *** 42,46 **** for list_index = start_index, #pointsList do local listValue = pointsList[list_index] ! drawDC:SetPen(pens[listValue.penColour]) local point = listValue[1] --- 96,102 ---- for list_index = start_index, #pointsList do local listValue = pointsList[list_index] ! local pen = TableToPen(listValue.pen) ! drawDC:SetPen(pen) ! pen:Delete() local point = listValue[1] *************** *** 62,66 **** if #listValue < 2 then return end ! drawDC:SetPen(pens[listValue.penColour]) local pt1 = listValue[#listValue-1] local pt2 = listValue[#listValue] --- 118,125 ---- if #listValue < 2 then return end ! local pen = TableToPen(listValue.pen) ! drawDC:SetPen(pen) ! pen:Delete() ! local pt1 = listValue[#listValue-1] local pt2 = listValue[#listValue] *************** *** 96,108 **** end function OnLeftDown(event) ! local pointItem = {penColour = itemColour, {x = event:GetX(), y = event:GetY()}} table.insert(pointsList, pointItem) - itemColour = itemColour + 1 - if penColours[itemColour] == nil then -- have colours wrap around - itemColour = 1 - end - if (not panel:HasCapture()) then panel:CaptureMouse() end mouseDown = true --- 155,166 ---- end + -- --------------------------------------------------------------------------- + -- Mouse functions + -- --------------------------------------------------------------------------- + function OnLeftDown(event) ! local pointItem = {pen = PenToTable(currentPen), {x = event:GetX(), y = event:GetY()}} table.insert(pointsList, pointItem) if (not panel:HasCapture()) then panel:CaptureMouse() end mouseDown = true *************** *** 125,134 **** panel:Refresh() end - - frame:SetStatusText(penColours[itemColour], 1) end function OnMotion(event) ! frame:SetStatusText(string.format("%d, %d", event:GetX(), event:GetY()), 2) if event:LeftIsDown() then --- 183,190 ---- panel:Refresh() end end function OnMotion(event) ! frame:SetStatusText(string.format("%d, %d", event:GetX(), event:GetY()), 1) if event:LeftIsDown() then *************** *** 148,151 **** --- 204,211 ---- end + -- --------------------------------------------------------------------------- + -- File functions + -- --------------------------------------------------------------------------- + function QuerySaveChanges() local dialog = wx.wxMessageDialog( frame, *************** *** 211,215 **** "", "", ! "Scribble files(*.scribble)|*.scribble", wx.wxOPEN + wx.wxFILE_MUST_EXIST) local result = false --- 271,275 ---- "", "", ! "Scribble files(*.scribble)|*.scribble|All files(*)|*", wx.wxOPEN + wx.wxFILE_MUST_EXIST) local result = false *************** *** 227,234 **** function SaveAs() local fileDialog = wx.wxFileDialog(frame, ! "Save wxLua scribble file as", "", "", ! "Scribble files(*.scribble)|*.scribble", wx.wxSAVE + wx.wxOVERWRITE_PROMPT) local result = false --- 287,294 ---- function SaveAs() local fileDialog = wx.wxFileDialog(frame, ! "Save wxLua scribble file", "", "", ! "Scribble files(*.scribble)|*.scribble|All files(*)|*", wx.wxSAVE + wx.wxOVERWRITE_PROMPT) local result = false *************** *** 254,257 **** --- 314,320 ---- end + -- --------------------------------------------------------------------------- + -- The main program + -- --------------------------------------------------------------------------- function main() *************** *** 260,275 **** wx.wxDEFAULT_FRAME_STYLE ) -- Create the menubar local fileMenu = wx.wxMenu() ! fileMenu:Append(wx.wxID_NEW, "&New", "Begin a new drawing") ! fileMenu:Append(wx.wxID_OPEN, "&Open...", "Open an existing drawing") fileMenu:AppendSeparator() ! fileMenu:Append(wx.wxID_SAVE, "&Save", "Save the drawing lines") ! fileMenu:Append(wx.wxID_SAVEAS, "Save &as...", "Save the drawing lines to a new file") ! fileMenu:Append(ID_SAVEBITMAP, "Save &bitmap...", "Save the drawing as a bitmap file") fileMenu:AppendSeparator() ! fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program") local editMenu = wx.wxMenu() editMenu:Append(wx.wxID_UNDO, "&Undo\tCtrl-Z", "Undo last drawn segment") --- 323,345 ---- wx.wxDEFAULT_FRAME_STYLE ) + -- ----------------------------------------------------------------------- -- Create the menubar local fileMenu = wx.wxMenu() ! fileMenu:Append(wx.wxID_NEW, "&New\tCtrl+N", "Begin a new drawing") ! fileMenu:Append(wx.wxID_OPEN, "&Open...\tCtrl+O", "Open an existing drawing") fileMenu:AppendSeparator() ! fileMenu:Append(wx.wxID_SAVE, "&Save\tCtrl+S", "Save the drawing lines") ! fileMenu:Append(wx.wxID_SAVEAS, "Save &as...\tAlt+S", "Save the drawing lines to a new file") ! fileMenu:Append(ID_SAVEBITMAP, "Save &bitmap...", "Save the drawing as a bitmap file") fileMenu:AppendSeparator() ! fileMenu:Append(wx.wxID_EXIT, "E&xit\tCtrl+Q", "Quit the program") local editMenu = wx.wxMenu() + editMenu:Append(ID_PENCOLOUR, "Set &Color\tCtrl+R", "Set the color of the pen to draw with") + editMenu:Append(ID_PENWIDTH, "Set &Width\tCtrl+T", "Set width of the pen to draw with") + -- Styles really only work for long lines, when you change direction the styles + -- blur into each other and just look like a solid line. + --editMenu:Append(ID_PENSTYLE, "Set &Style\tCtrl+Y", "Set style of the pen to draw with") + editMenu:AppendSeparator() editMenu:Append(wx.wxID_UNDO, "&Undo\tCtrl-Z", "Undo last drawn segment") *************** *** 283,292 **** frame:SetMenuBar(menuBar) -- Create the statusbar ! local statusBar = frame:CreateStatusBar(3) local status_width = statusBar:GetTextExtent("88888, 88888") ! frame:SetStatusWidths({ -1, status_width, status_width }) frame:SetStatusText("Welcome to wxLua Scribble.") - frame:SetStatusText(penColours[itemColour], 1) -- Create a wxPanel to draw on, always a good idea, it will fill the frame --- 353,384 ---- frame:SetMenuBar(menuBar) + -- ----------------------------------------------------------------------- + -- Create the toolbar + toolBar = frame:CreateToolBar(wx.wxNO_BORDER + wx.wxTB_FLAT + wx.wxTB_DOCKABLE) + -- note: Ususally the bmp size isn't necessary, but the HELP icon is not the right size in MSW + local toolBmpSize = toolBar:GetToolBitmapSize() + toolBar:AddToolSimple(wx.wxID_NEW, "New", wx.wxArtProvider_GetBitmap(wx.wxART_NORMAL_FILE, wx.wxART_MENU, toolBmpSize), "Create an empty scribble") + toolBar:AddToolSimple(wx.wxID_OPEN, "Open", wx.wxArtProvider_GetBitmap(wx.wxART_FILE_OPEN, wx.wxART_MENU, toolBmpSize), "Open an existing scribble") + toolBar:AddToolSimple(wx.wxID_SAVE, "Save", wx.wxArtProvider_GetBitmap(wx.wxART_FILE_SAVE, wx.wxART_MENU, toolBmpSize), "Save the current scribble") + toolBar:AddToolSimple(wx.wxID_SAVEAS, "Save as", wx.wxArtProvider_GetBitmap(wx.wxART_NEW_DIR, wx.wxART_MENU, toolBmpSize), "Save the current scribble to a new file") + toolBar:AddSeparator() + toolBar:AddToolSimple(wx.wxID_UNDO, "Undo", wx.wxArtProvider_GetBitmap(wx.wxART_UNDO, wx.wxART_MENU, toolBmpSize), "Undo last line drawn") + toolBar:AddSeparator() + local bmp = CreateToolBarColourBitmap(toolBmpSize) + toolBar:AddToolSimple(ID_PENCOLOUR, "Color", bmp, "Set pen color") + bmp:Delete() + penWidthSpinCtrl = wx.wxSpinCtrl(toolBar, ID_PENWIDTH_SPINCTRL, 3, + wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxSP_ARROW_KEYS, 1, 100, 3) + penWidthSpinCtrl:SetToolTip("Set pen width in pixels") + toolBar:AddControl(penWidthSpinCtrl) + + toolBar:Realize() + + -- ----------------------------------------------------------------------- -- Create the statusbar ! local statusBar = frame:CreateStatusBar(2) local status_width = statusBar:GetTextExtent("88888, 88888") ! frame:SetStatusWidths({ -1, status_width }) frame:SetStatusText("Welcome to wxLua Scribble.") -- Create a wxPanel to draw on, always a good idea, it will fill the frame *************** *** 299,307 **** panel:Connect(wx.wxEVT_MOTION, OnMotion ) ! -- Connect menu events ! frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, ! function (event) ! frame:Close(true) ! end ) frame:Connect(wx.wxID_NEW, wx.wxEVT_COMMAND_MENU_SELECTED, --- 391,396 ---- panel:Connect(wx.wxEVT_MOTION, OnMotion ) ! -- ----------------------------------------------------------------------- ! -- File menu events frame:Connect(wx.wxID_NEW, wx.wxEVT_COMMAND_MENU_SELECTED, *************** *** 383,386 **** --- 472,521 ---- end ) + frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, + function (event) + frame:Close(true) + end ) + + -- ----------------------------------------------------------------------- + -- End menu events + + frame:Connect(ID_PENCOLOUR, wx.wxEVT_COMMAND_MENU_SELECTED, + function (event) + local oldColour = currentPen:GetColour() + local c = wx.wxGetColourFromUser(frame, currentPen:GetColour(), + "wxLua Scribble") + oldColour:Delete() + if c:Ok() then + currentPen:SetColour(c) + end + c:Delete() + end ) + + frame:Connect(ID_PENWIDTH, wx.wxEVT_COMMAND_MENU_SELECTED, + function (event) + local ret = wx.wxGetNumberFromUser("Select pen width in pixels", "Width", "wxLua Scribble", + currentPen:GetWidth(), 1, 100, frame) + if ret > 0 then + currentPen:SetWidth(ret) + end + end ) + frame:Connect(ID_PENWIDTH_SPINCTRL, wx.wxEVT_COMMAND_SPINCTRL_UPDATED, + function (event) + currentPen:SetWidth(event:GetInt()) + end ) + + frame:Connect(ID_PENSTYLE, wx.wxEVT_COMMAND_MENU_SELECTED, + function (event) + local ret = wx.wxGetSingleChoice("Select pen style", "wxLua Scribble", + penStyleNames, + frame) + for n = 1, #penStyleNames do + if penStyleNames[n] == ret then + currentPen:SetStyle(penStyles[n]) + break + end + end + end ) + frame:Connect(wx.wxID_UNDO, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) *************** *** 397,400 **** --- 532,538 ---- end ) + -- ----------------------------------------------------------------------- + -- Help menu events + frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) *************** *** 406,409 **** --- 544,549 ---- end ) + -- ----------------------------------------------------------------------- + frame:Connect(wx.wxEVT_CLOSE_WINDOW, function (event) |