From: John L. <jr...@us...> - 2006-02-02 17:05:51
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28688/wxLua/bindings/wxwidgets Modified Files: override.hpp Log Message: add the overrides to the wxstc module Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** override.hpp 30 Dec 2005 04:35:59 -0000 1.7 --- override.hpp 2 Feb 2006 17:05:41 -0000 1.8 *************** *** 736,756 **** %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 - - %override wxGrid_GetRowLabelAlignment // void GetRowLabelAlignment( int *horz, int *vert ) --- 736,739 ---- *************** *** 833,911 **** %end - %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 wxFrame_SetStatusWidths // virtual void SetStatusWidths(int n, int *widths) --- 816,819 ---- |