From: John L. <jr...@us...> - 2006-10-11 03:24:06
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11324/wxLua/modules/wxbindstc/src Modified Files: stc.cpp Log Message: osx fixes, compiles and runs now Index: stc.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/stc.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** stc.cpp 26 Sep 2006 05:05:55 -0000 1.16 --- stc.cpp 11 Oct 2006 03:24:02 -0000 1.17 *************** *** 28,31 **** --- 28,103 ---- + #if (wxCHECK_VERSION(2,7,1)) && (wxLUA_USE_wxColourPenBrush) + // %wxchkver271 wxColour GetCaretLineBackground(); + static int LUACALL wxLua_wxStyledTextCtrl_GetCaretLineBackground(lua_State *L) + { + wxLuaState wxlState(L); + wxColour *returns; + // get this + wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); + // call GetCaretLineBackground + // allocate a new object using the copy constructor + returns = new wxColour(self->GetCaretLineBackground()); + // add the new object to the tracked memory list + wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxColour, returns); + + return 1; + } + + // %wxchkver271 void SetCaretLineBackground(const wxColour& back); + static int LUACALL wxLua_wxStyledTextCtrl_SetCaretLineBackground(lua_State *L) + { + wxLuaState wxlState(L); + // const wxColour back + const wxColour * back = (const wxColour *)wxlState.GetUserDataType(2, s_wxluatag_wxColour); + // get this + wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); + // call SetCaretLineBackground + self->SetCaretLineBackground(*back); + + return 0; + } + + #endif // (wxCHECK_VERSION(2,7,1)) && (wxLUA_USE_wxColourPenBrush) + + + #if (wxLUA_USE_wxColourPenBrush) && (!wxCHECK_VERSION(2,7,1)) + // !%wxchkver271 wxColour GetCaretLineBack(); + static int LUACALL wxLua_wxStyledTextCtrl_GetCaretLineBack(lua_State *L) + { + wxLuaState wxlState(L); + wxColour *returns; + // get this + wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); + // call GetCaretLineBack + // allocate a new object using the copy constructor + returns = new wxColour(self->GetCaretLineBack()); + // add the new object to the tracked memory list + wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxColour, returns); + + return 1; + } + + // !%wxchkver271 void SetCaretLineBack(const wxColour& back); + static int LUACALL wxLua_wxStyledTextCtrl_SetCaretLineBack(lua_State *L) + { + wxLuaState wxlState(L); + // const wxColour back + const wxColour * back = (const wxColour *)wxlState.GetUserDataType(2, s_wxluatag_wxColour); + // get this + wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); + // call SetCaretLineBack + self->SetCaretLineBack(*back); + + return 0; + } + + #endif // (wxLUA_USE_wxColourPenBrush) && (!wxCHECK_VERSION(2,7,1)) + + #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxDC) // int FormatRange(bool doDraw, int startPos, int endPos, wxDC* draw, wxDC* target, const wxRect& renderRect, const wxRect& pageRect); *************** *** 6181,6216 **** } - // wxColour GetCaretLineBack(); - static int LUACALL wxLua_wxStyledTextCtrl_GetCaretLineBack(lua_State *L) - { - wxLuaState wxlState(L); - wxColour *returns; - // get this - wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); - // call GetCaretLineBack - // allocate a new object using the copy constructor - returns = new wxColour(self->GetCaretLineBack()); - // add the new object to the tracked memory list - wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxColour, returns); - - return 1; - } - - // void SetCaretLineBack(const wxColour& back); - static int LUACALL wxLua_wxStyledTextCtrl_SetCaretLineBack(lua_State *L) - { - wxLuaState wxlState(L); - // const wxColour back - const wxColour * back = (const wxColour *)wxlState.GetUserDataType(2, s_wxluatag_wxColour); - // get this - wxStyledTextCtrl * self = (wxStyledTextCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextCtrl); - // call SetCaretLineBack - self->SetCaretLineBack(*back); - - return 0; - } - // wxColour GetCaretForeground(); static int LUACALL wxLua_wxStyledTextCtrl_GetCaretForeground(lua_State *L) --- 6253,6256 ---- *************** *** 6545,6548 **** --- 6585,6604 ---- static WXLUAMETHOD s_wxStyledTextCtrl_methods[] = { + #if (wxCHECK_VERSION(2,7,1)) && (wxLUA_USE_wxColourPenBrush) + { LuaMethod, "GetCaretLineBackground", wxLua_wxStyledTextCtrl_GetCaretLineBackground, 0, 0, { 0 } }, + { LuaMethod, "SetCaretLineBackground", wxLua_wxStyledTextCtrl_SetCaretLineBackground, 1, 1, { &s_wxluatag_wxColour, 0 } }, + { LuaGetProp, "CaretLineBackground", wxLua_wxStyledTextCtrl_GetCaretLineBackground, 0, 0, {0} }, + { LuaSetProp, "CaretLineBackground", wxLua_wxStyledTextCtrl_SetCaretLineBackground, 1, 1, {0} }, + #endif // (wxCHECK_VERSION(2,7,1)) && (wxLUA_USE_wxColourPenBrush) + + + #if (wxLUA_USE_wxColourPenBrush) && (!wxCHECK_VERSION(2,7,1)) + { LuaMethod, "GetCaretLineBack", wxLua_wxStyledTextCtrl_GetCaretLineBack, 0, 0, { 0 } }, + { LuaMethod, "SetCaretLineBack", wxLua_wxStyledTextCtrl_SetCaretLineBack, 1, 1, { &s_wxluatag_wxColour, 0 } }, + { LuaGetProp, "CaretLineBack", wxLua_wxStyledTextCtrl_GetCaretLineBack, 0, 0, {0} }, + { LuaSetProp, "CaretLineBack", wxLua_wxStyledTextCtrl_SetCaretLineBack, 1, 1, {0} }, + #endif // (wxLUA_USE_wxColourPenBrush) && (!wxCHECK_VERSION(2,7,1)) + + #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxDC) { LuaMethod, "FormatRange", wxLua_wxStyledTextCtrl_FormatRange, 7, 7, { &s_wxluaarg_Boolean, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluatag_wxDC, &s_wxluatag_wxDC, &s_wxluatag_wxRect, &s_wxluatag_wxRect, 0 } }, *************** *** 7086,7091 **** { LuaMethod, "SetWhitespaceForeground", wxLua_wxStyledTextCtrl_SetWhitespaceForeground, 2, 2, { &s_wxluaarg_Boolean, &s_wxluatag_wxColour, 0 } }, { LuaMethod, "SetWhitespaceBackground", wxLua_wxStyledTextCtrl_SetWhitespaceBackground, 2, 2, { &s_wxluaarg_Boolean, &s_wxluatag_wxColour, 0 } }, - { LuaMethod, "GetCaretLineBack", wxLua_wxStyledTextCtrl_GetCaretLineBack, 0, 0, { 0 } }, - { LuaMethod, "SetCaretLineBack", wxLua_wxStyledTextCtrl_SetCaretLineBack, 1, 1, { &s_wxluatag_wxColour, 0 } }, { LuaMethod, "GetCaretForeground", wxLua_wxStyledTextCtrl_GetCaretForeground, 0, 0, { 0 } }, { LuaMethod, "CallTipSetBackground", wxLua_wxStyledTextCtrl_CallTipSetBackground, 1, 1, { &s_wxluatag_wxColour, 0 } }, --- 7142,7145 ---- *************** *** 7098,7103 **** { LuaMethod, "SetHotspotActiveForeground", wxLua_wxStyledTextCtrl_SetHotspotActiveForeground, 2, 2, { &s_wxluaarg_Boolean, &s_wxluatag_wxColour, 0 } }, { LuaMethod, "SetHotspotActiveBackground", wxLua_wxStyledTextCtrl_SetHotspotActiveBackground, 2, 2, { &s_wxluaarg_Boolean, &s_wxluatag_wxColour, 0 } }, - { LuaGetProp, "CaretLineBack", wxLua_wxStyledTextCtrl_GetCaretLineBack, 0, 0, {0} }, - { LuaSetProp, "CaretLineBack", wxLua_wxStyledTextCtrl_SetCaretLineBack, 1, 1, {0} }, { LuaGetProp, "EdgeColour", wxLua_wxStyledTextCtrl_GetEdgeColour, 0, 0, {0} }, { LuaSetProp, "EdgeColour", wxLua_wxStyledTextCtrl_SetEdgeColour, 1, 1, {0} }, --- 7152,7155 ---- |