From: John L. <jr...@us...> - 2006-02-02 17:05:50
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28688/wxLua/bindings/wxstc Modified Files: Makefile wxstc_rules.lua Added Files: override.hpp Log Message: add the overrides to the wxstc module Index: wxstc_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_rules.lua,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxstc_rules.lua 2 Feb 2006 16:07:45 -0000 1.2 --- wxstc_rules.lua 2 Feb 2006 17:05:41 -0000 1.3 *************** *** 60,64 **** ------------------------------------------------------------------------------- -- Set the file that contains bindings that need to be overridden ! --override_file = "override.hpp" ------------------------------------------------------------------------------- --- 60,64 ---- ------------------------------------------------------------------------------- -- Set the file that contains bindings that need to be overridden ! override_file = "override.hpp" ------------------------------------------------------------------------------- Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 2 Feb 2006 15:49:24 -0000 1.1 --- Makefile 2 Feb 2006 17:05:41 -0000 1.2 *************** *** 13,17 **** include $(WXLUA_DIR)/bindings/wxwidgets/wrappers.lst THEWRAPPERS=$(addprefix $(WXLUA_DIR)/bindings/wxwidgets/, $(WRAPPERS)) ! DEPFILES=wxluasetup.h.in $(WXLUA_DIR)/bindings/genwxbind.lua $(WXLUA_DIR)/bindings/wxwidgets/override.hpp # $(THEWRAPPERS) all: genwxbind --- 13,17 ---- include $(WXLUA_DIR)/bindings/wxwidgets/wrappers.lst THEWRAPPERS=$(addprefix $(WXLUA_DIR)/bindings/wxwidgets/, $(WRAPPERS)) ! DEPFILES=wxluasetup.h.in $(WXLUA_DIR)/bindings/genwxbind.lua $(WXLUA_DIR)/bindings/wxstc/override.hpp # $(THEWRAPPERS) all: genwxbind --- NEW FILE: override.hpp --- %override wxStyledTextCtrl_GetCurLine // wxString GetCurLine(int* linePos=NULL) static int LUACALL wxStyledTextCtrl_GetCurLine(lua_State *L) { wxLuaState wxlState(L); wxString returns; int linePos; // get this wxStyledTextCtrl *self = (wxStyledTextCtrl *)wxlState.getuserdatatype(1, s_wxluatag_wxStyledTextCtrl); // call GetCurLine returns = self->GetCurLine(&linePos); // push the result string lua_pushstring(L, wx2lua(returns)); lua_pushnumber(L, linePos); // return the number of parameters return 2; } %end %override wxStyledTextCtrl_GetSelection // void GetSelection(int* startPos, int* endPos) static int LUACALL wxStyledTextCtrl_GetSelection(lua_State *L) { wxLuaState wxlState(L); int endPos; int startPos; // get this wxStyledTextCtrl *self = (wxStyledTextCtrl *)wxlState.getuserdatatype(1, s_wxluatag_wxStyledTextCtrl); // call GetSelection self->GetSelection(&startPos, &endPos); // push results lua_pushnumber(L, startPos); lua_pushnumber(L, endPos); // return the number of parameters return 2; } %end %override wxStyledTextCtrl_SetStyleBytes // void SetStyleBytes(int length, const wxString &styleBytes) static int LUACALL wxStyledTextCtrl_SetStyleBytes(lua_State *L) { wxLuaState wxlState(L); // const wxString &styleBytes wxCharBuffer styleBytes(lua_tostring(L, 3)); // int length int length = (int)lua_tonumber(L, 2); // get this wxStyledTextCtrl *self = (wxStyledTextCtrl *)wxlState.getuserdatatype(1, s_wxluatag_wxStyledTextCtrl); // call SetStyleBytes self->SetStyleBytes(length, styleBytes.data()); // push result lua_pushstring(L, styleBytes); // return the number of parameters return 1; } %end %override wxStyledTextEvent_GetDragResult // wxDragResult GetDragResult() static int LUACALL wxStyledTextEvent_GetDragResult(lua_State *L) { wxLuaState wxlState(L); wxDragResult returns; // get this wxStyledTextEvent *self = (wxStyledTextEvent *)wxlState.getuserdatatype(1, s_wxluatag_wxStyledTextEvent); // call GetDragResult returns = self->GetDragResult(); // push the result datatype lua_pushnumber(L, (long) returns); // return the number of parameters return 1; } %end %override wxStyledTextEvent_SetDragResult // void SetDragResult(wxDragResult val) static int LUACALL wxStyledTextEvent_SetDragResult(lua_State *L) { wxLuaState wxlState(L); // wxDragResult val wxDragResult val = (wxDragResult)(int)lua_tonumber(L, 2); // get this wxStyledTextEvent *self = (wxStyledTextEvent *)wxlState.getuserdatatype(1, s_wxluatag_wxStyledTextEvent); // call SetDragResult self->SetDragResult(val); // return the number of parameters return 0; } %end |