From: John L. <jr...@us...> - 2009-09-25 18:48:09
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3461/wxLua/bindings/wxwidgets Modified Files: wx_datatypes.lua wxbase_base.i wxbase_data.i wxcore_controls.i wxcore_gdi.i Log Message: Fix multiple inheritance by adding the offset to the vtable for base classes that are second or higher. Index: wxcore_gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_gdi.i,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxcore_gdi.i 29 Oct 2008 04:44:33 -0000 1.7 --- wxcore_gdi.i 25 Sep 2009 18:47:57 -0000 1.8 *************** *** 658,662 **** %if wxLUA_USE_wxPenList ! %class %noclassinfo wxPenList, wxList %define_pointer wxThePenList --- 658,662 ---- %if wxLUA_USE_wxPenList ! %class %noclassinfo wxPenList //, wxList - it's not really derived from a wxList %define_pointer wxThePenList *************** *** 666,672 **** wxPen* FindOrCreatePen(const wxColour& colour, int width, int style) - // Use the wxList methods, see also wxNode - //void AddPen(wxPen *pen) internal use for wxWidgets - //void RemovePen(wxPen *pen) %endclass --- 666,669 ---- *************** *** 717,721 **** %if wxLUA_USE_wxBrushList ! %class %noclassinfo wxBrushList, wxList %define_pointer wxTheBrushList --- 714,718 ---- %if wxLUA_USE_wxBrushList ! %class %noclassinfo wxBrushList //, wxList - it's not really derived from it %define_pointer wxTheBrushList *************** *** 728,731 **** --- 725,729 ---- //void AddBrush(wxBrush *brush) internal use for wxWidgets //void RemoveBrush(wxBrush *brush) + %endclass Index: wxbase_base.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxbase_base.i,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxbase_base.i 22 Oct 2008 05:31:45 -0000 1.4 --- wxbase_base.i 25 Sep 2009 18:47:57 -0000 1.5 *************** *** 443,447 **** // wxLogNull ! %class %delete %noclassinfo %encapsulate wxLogNull, wxLog // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxLogNull() --- 443,447 ---- // wxLogNull ! %class %delete %noclassinfo %encapsulate wxLogNull // NOTE: this is not derived from wxLog // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxLogNull() Index: wxbase_data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxbase_data.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxbase_data.i 29 Oct 2008 04:44:33 -0000 1.3 --- wxbase_data.i 25 Sep 2009 18:47:57 -0000 1.4 *************** *** 215,219 **** // To convert wxObject* GetData() to another type use wxObject::DynamicCast ! // See wxPenList, wxBrushList, wxMenuItemList, wxWindowList // Example: How to use a wxWindowList --- 215,219 ---- // To convert wxObject* GetData() to another type use wxObject::DynamicCast ! // See wxMenuItemList, wxWindowList // Example: How to use a wxWindowList Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** wx_datatypes.lua 29 Jun 2009 03:22:46 -0000 1.102 --- wx_datatypes.lua 25 Sep 2009 18:47:57 -0000 1.103 *************** *** 648,654 **** }, wxBrushList = { - BaseClasses = { - [1] = "wxList", - }, Condition = "(wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxBrushList)", IsNumber = false, --- 648,651 ---- *************** *** 967,971 **** wxComboBox = { BaseClasses = { ! [1] = "wxControlWithItems", }, Condition = "wxLUA_USE_wxComboBox && wxUSE_COMBOBOX", --- 964,969 ---- wxComboBox = { BaseClasses = { ! [1] = "wxControl", ! [2] = "wxItemContainer", }, Condition = "wxLUA_USE_wxComboBox && wxUSE_COMBOBOX", *************** *** 1067,1072 **** BaseClasses = { [1] = "wxControl", }, - Condition = "(wxLUA_USE_wxChoice || wxLUA_USE_wxComboBox || wxLUA_USE_wxListBox ) && wxUSE_CONTROLS", IsNumber = false, Name = "wxControlWithItems", --- 1065,1070 ---- BaseClasses = { [1] = "wxControl", + [2] = "wxItemContainer", }, IsNumber = false, Name = "wxControlWithItems", *************** *** 2706,2709 **** --- 2704,2722 ---- ValueType = "class", }, + wxItemContainer = { + BaseClasses = { + [1] = "wxItemContainerImmutable", + }, + Condition = "(wxLUA_USE_wxChoice || wxLUA_USE_wxComboBox || wxLUA_USE_wxListBox ) && wxUSE_CONTROLS", + IsNumber = false, + Name = "wxItemContainer", + ValueType = "class", + }, + wxItemContainerImmutable = { + Condition = "(wxLUA_USE_wxChoice || wxLUA_USE_wxComboBox || wxLUA_USE_wxListBox ) && wxUSE_CONTROLS", + IsNumber = false, + Name = "wxItemContainerImmutable", + ValueType = "class", + }, wxItemKind = { Condition = "wxLUA_USE_wxMenu && wxUSE_MENUS", *************** *** 2982,2988 **** wxLogNull = { ["%encapsulate"] = true, - BaseClasses = { - [1] = "wxLog", - }, Condition = "wxLUA_USE_wxLog && wxUSE_LOG", IsNumber = false, --- 2995,2998 ---- *************** *** 3585,3591 **** }, wxPenList = { - BaseClasses = { - [1] = "wxList", - }, Condition = "(wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxPenList)", IsNumber = false, --- 3595,3598 ---- Index: wxcore_controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_controls.i,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxcore_controls.i 4 Dec 2008 05:12:38 -0000 1.8 --- wxcore_controls.i 25 Sep 2009 18:47:57 -0000 1.9 *************** *** 118,122 **** // --------------------------------------------------------------------------- ! // wxControlWithItems %if (wxLUA_USE_wxChoice|wxLUA_USE_wxComboBox|wxLUA_USE_wxListBox) && wxUSE_CONTROLS --- 118,122 ---- // --------------------------------------------------------------------------- ! // wxItemContainerImmutable %if (wxLUA_USE_wxChoice|wxLUA_USE_wxComboBox|wxLUA_USE_wxListBox) && wxUSE_CONTROLS *************** *** 124,157 **** %include "wx/ctrlsub.h" ! %class wxControlWithItems, wxControl ! // no constructor, this is just a base class ! int Append(const wxString& item) ! int Append(const wxString& item, voidptr_long number) // C++ is (void *clientData) You can put a number here ! int Append(const wxString& item, wxClientData *clientData) ! void Append(const wxArrayString& strings) ! void Clear() ! void Delete(unsigned int n) ! int FindString(const wxString& string) ! // C++ Func: void* GetClientData(unsigned int n) const ! voidptr_long GetClientData(unsigned int n) const // C++ returns (void *) You get a number here ! wxClientData* GetClientObject(unsigned int n) const ! %rename GetStringClientObject wxStringClientData* GetClientObject(unsigned int n) const ! int GetCount() const ! int GetSelection() const ! wxString GetString(unsigned int n) const wxString GetStringSelection() const ! int Insert(const wxString& item, int pos) ! int Insert(const wxString& item, unsigned int pos, voidptr_long number) // C++ is (void *clientData) You can put a number here ! int Insert(const wxString& item, unsigned int pos, wxClientData *clientData) ! bool IsEmpty() const ! // int Number() const // obsolete since 2.2 use GetCount() void Select(int n) void SetClientData(unsigned int n, voidptr_long number) // C++ is (void *clientData) You can put a number here ! void SetClientObject(unsigned int n, wxClientData *data) ! void SetSelection(unsigned int n) ! void SetString(unsigned int n, const wxString& string) ! bool SetStringSelection(const wxString& string) %endclass --- 124,196 ---- %include "wx/ctrlsub.h" ! %class %noclassinfo wxItemContainerImmutable ! // no constructor, used only as a base class ! virtual unsigned int GetCount() const ! virtual bool IsEmpty() const ! virtual wxString GetString(unsigned int n) // = 0; ! wxArrayString GetStrings() const ! virtual void SetString(unsigned int n, const wxString& s) // = 0; ! ! virtual int FindString(const wxString& s, bool bCase = false) const ! ! virtual void SetSelection(int n) //= 0; ! virtual int GetSelection() const //= 0; ! ! bool SetStringSelection(const wxString& s) wxString GetStringSelection() const ! void Select(int n) + + %endclass + + // --------------------------------------------------------------------------- + // wxItemContainer + + %include "wx/ctrlsub.h" + + %class %noclassinfo wxItemContainer, wxItemContainerImmutable + // no constructor, used only as base class + + int Append(const wxString& item) + int Append(const wxString& item, voidptr_long number) // C++ is (void *clientData) You can put a number here + int Append(const wxString& item, wxClientData *clientData) + + void AppendString( const wxString& item) + + void Append(const wxArrayString& strings); + + int Insert(const wxString& item, unsigned int pos) + int Insert(const wxString& item, unsigned int pos, voidptr_long number) // C++ is (void *clientData) You can put a number here + int Insert(const wxString& item, unsigned int pos, wxClientData *clientData); + + virtual void Clear() //= 0; + virtual void Delete(unsigned int n) //= 0; + + void SetClientData(unsigned int n, voidptr_long number) // C++ is (void *clientData) You can put a number here ! voidptr_long GetClientData(unsigned int n) const // C++ returns (void *) You get a number here ! ! void SetClientObject(unsigned int n, wxClientData* clientData) ! wxClientData* GetClientObject(unsigned int n) const ! ! bool HasClientObjectData() const ! bool HasClientUntypedData() const ! ! %endclass ! ! %endif ! ! // --------------------------------------------------------------------------- ! // wxControlWithItems ! ! %include "wx/ctrlsub.h" ! ! %class wxControlWithItems, wxControl, wxItemContainer ! // no constructor, this is just a base class ! ! virtual bool ShouldInheritColours() const ! %endclass *************** *** 173,176 **** --- 212,217 ---- //int GetColumns() const // Motif only but returns 1 otherwise //void SetColumns(int n = 1) + + void Command(wxCommandEvent& event) %endclass *************** *** 189,193 **** %define wxCB_SORT ! %class wxComboBox, wxControlWithItems wxComboBox() wxComboBox(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxComboBox") --- 230,234 ---- %define wxCB_SORT ! %class wxComboBox, wxControl, wxItemContainer wxComboBox() wxComboBox(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxComboBox") |