From: John L. <jr...@us...> - 2007-06-13 04:15:58
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9645/wxLua/bindings/wxwidgets Modified Files: appframe.i controls.i data.i dialogs.i gdi.i help.i html.i mdi.i menutool.i socket.i windows.i wx_datatypes.lua Log Message: Remove class member functions that are duplicates of their baseclass functions Fix wxClassInfo is NOT a wxObject Add more capability to bindings.wx.lua Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** wx_datatypes.lua 12 Jun 2007 00:08:36 -0000 1.65 --- wx_datatypes.lua 13 Jun 2007 04:15:22 -0000 1.66 *************** *** 521,525 **** }, wxClassInfo = { - BaseClass = "wxObject", Condition = "wxLUA_USE_wxClassInfo", DefType = "class", --- 521,524 ---- Index: mdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/mdi.i,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mdi.i 1 Jun 2007 18:19:46 -0000 1.14 --- mdi.i 13 Jun 2007 04:15:22 -0000 1.15 *************** *** 32,38 **** wxMDIChildFrame* GetActiveChild() const wxMDIClientWindow* GetClientWindow() const ! virtual wxWindow* GetToolBar() const %win wxMenu* GetWindowMenu() const ! virtual void SetToolBar(wxToolBar* toolbar) %win void SetWindowMenu(wxMenu* menu) void Tile(wxOrientation orient = wxHORIZONTAL) --- 32,38 ---- wxMDIChildFrame* GetActiveChild() const wxMDIClientWindow* GetClientWindow() const ! // virtual wxToolBar* GetToolBar() const - see wxFrame %win wxMenu* GetWindowMenu() const ! // virtual void SetToolBar(wxToolBar* toolbar) - see wxFrame %win void SetWindowMenu(wxMenu* menu) void Tile(wxOrientation orient = wxHORIZONTAL) Index: help.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/help.i,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** help.i 1 Jun 2007 18:19:46 -0000 1.15 --- help.i 13 Jun 2007 04:15:22 -0000 1.16 *************** *** 247,251 **** void Display(const wxString& x) void Display(const int id) ! void DisplayContents() void DisplayIndex() bool KeywordSearch(const wxString& keyword, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) --- 247,251 ---- void Display(const wxString& x) void Display(const int id) ! //void DisplayContents() - see wxHelpController void DisplayIndex() bool KeywordSearch(const wxString& keyword, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** windows.i 11 Jun 2007 03:57:59 -0000 1.38 --- windows.i 13 Jun 2007 04:15:22 -0000 1.39 *************** *** 314,322 **** // wxNode::GetData():DynamicCast("wxWindow") to retrieve the wxWindow ! // frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "Test"); ! // win = wx.wxWindow(frame, wx.wxID_ANY) ! // frame:Show(true) ! // wlist = frame:GetChildren() ! // wlist:Item(0):GetData():DynamicCast("wxWindow"):SetBackgroundColour(wx.wxRED) %endclass --- 314,319 ---- // wxNode::GetData():DynamicCast("wxWindow") to retrieve the wxWindow ! // Use the wxList methods, see also wxNode ! %endclass *************** *** 332,336 **** bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "wxPanel") //!%wxchkver_2_7 wxWindow* GetDefaultItem() const - see wxWindow ! void InitDialog() //!%wxchkver_2_7 wxWindow* SetDefaultItem(wxWindow *win) - see wxWindow //virtual void SetFocus() - see wxWindow --- 329,333 ---- bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "wxPanel") //!%wxchkver_2_7 wxWindow* GetDefaultItem() const - see wxWindow ! // void InitDialog() see wxWindow //!%wxchkver_2_7 wxWindow* SetDefaultItem(wxWindow *win) - see wxWindow //virtual void SetFocus() - see wxWindow *************** *** 349,354 **** bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxControl") void Command(wxCommandEvent& event) ! !%wxchkver_2_6 wxString GetLabel() // see wxWindow ! !%wxchkver_2_6 void SetLabel(const wxString& label) // see wxWindow //static wxString GetLabelText(const wxString& label) translates arbitrary string, removes mnemonic characters ('&') --- 346,351 ---- bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxControl") void Command(wxCommandEvent& event) ! // wxString GetLabel() // see wxWindow ! // void SetLabel(const wxString& label) // see wxWindow //static wxString GetLabelText(const wxString& label) translates arbitrary string, removes mnemonic characters ('&') *************** *** 831,839 **** void GetViewStart() const ! // %override [int x, int y] GetVirtualSize() const ! // C++ Func: void GetVirtualSize(int* x, int* y) const ! void GetVirtualSize() const ! bool IsRetained() const void PrepareDC(wxDC& dc) void Scroll(int x, int y) --- 828,836 ---- void GetViewStart() const ! //// %override [int x, int y] GetVirtualSize() const ! //// C++ Func: void GetVirtualSize(int* x, int* y) const ! //void GetVirtualSize() const // see wxWindow::GetVirtualSize ! //bool IsRetained() const // see wxWindow::IsRetained void PrepareDC(wxDC& dc) void Scroll(int x, int y) *************** *** 962,967 **** bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticText") ! wxString GetLabel() const ! virtual void SetLabel(const wxString& label) void Wrap(int width) %endclass --- 959,964 ---- bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticText") ! // wxString GetLabel() const - see wxWindow ! // void SetLabel(const wxString& label) - see wxWindow void Wrap(int width) %endclass Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** gdi.i 11 Jun 2007 03:57:59 -0000 1.50 --- gdi.i 13 Jun 2007 04:15:22 -0000 1.51 *************** *** 713,716 **** --- 713,719 ---- //void RemovePen(wxPen *pen) wxPen* FindOrCreatePen(const wxColour& colour, int width, int style) + + // Use the wxList methods, see also wxNode + %endclass *************** *** 764,767 **** --- 767,773 ---- //void RemoveBrush(wxBrush *brush) wxBrush* FindOrCreateBrush(const wxColour& colour, int style) + + // Use the wxList methods, see also wxNode + %endclass *************** *** 1050,1054 **** wxCursor(const wxImage& image) ! bool Ok() //%win WXHANDLE GetHandle() //%win void SetHandle(WXHANDLE handle) --- 1056,1060 ---- wxCursor(const wxImage& image) ! //bool Ok() - see wxBitmap //%win WXHANDLE GetHandle() //%win void SetHandle(WXHANDLE handle) Index: html.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/html.i,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** html.i 11 Jun 2007 03:57:59 -0000 1.20 --- html.i 13 Jun 2007 04:15:22 -0000 1.21 *************** *** 148,153 **** void SetWidthFloat(const wxHtmlTag& tag, double pixel_scale = 1.0) ! %wxchkver_2_5 wxHtmlCell* GetFirstChild() ! !%wxchkver_2_5 wxHtmlCell* GetFirstCell() %endclass --- 148,153 ---- void SetWidthFloat(const wxHtmlTag& tag, double pixel_scale = 1.0) ! // %wxchkver_2_5 wxHtmlCell* GetFirstChild() see wxHtmlCell ! // !%wxchkver_2_5 wxHtmlCell* GetFirstCell() - nobody probably uses this %endclass Index: socket.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/socket.i,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** socket.i 11 Jun 2007 03:57:59 -0000 1.14 --- socket.i 13 Jun 2007 04:15:22 -0000 1.15 *************** *** 241,245 **** int GetResponse() const ! //wxInputStream *GetInputStream(const wxString& path) void SetHeader(const wxString& header, const wxString& h_data) wxString GetHeader(const wxString& header) --- 241,245 ---- int GetResponse() const ! // wxInputStream *GetInputStream(const wxString& path) - see wxProtocol void SetHeader(const wxString& header, const wxString& h_data) wxString GetHeader(const wxString& header) *************** *** 278,283 **** void SetPassive(bool pasv) bool SetTransferMode(wxFTP::TransferMode mode) ! void SetUser(const wxString& user) ! void SetPassword(const wxString& passwd) bool FileExists(const wxString& filename) int GetFileSize(const wxString& filename) --- 278,283 ---- void SetPassive(bool pasv) bool SetTransferMode(wxFTP::TransferMode mode) ! // void SetUser(const wxString& user) - see wxProtocol ! // void SetPassword(const wxString& passwd) - see wxProtocol bool FileExists(const wxString& filename) int GetFileSize(const wxString& filename) *************** *** 285,289 **** bool GetFilesList(wxArrayString& files, const wxString& wildcard = "") wxOutputStream * GetOutputStream(const wxString& file) ! wxInputStream * GetInputStream(const wxString& path) %endclass --- 285,289 ---- bool GetFilesList(wxArrayString& files, const wxString& wildcard = "") wxOutputStream * GetOutputStream(const wxString& file) ! // wxInputStream * GetInputStream(const wxString& path) - see wxProtocol %endclass Index: menutool.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/menutool.i,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** menutool.i 11 Jun 2007 03:57:59 -0000 1.18 --- menutool.i 13 Jun 2007 04:15:22 -0000 1.19 *************** *** 156,163 **** %class %noclassinfo wxMenuItemList, wxList ! void Clear() ! void DeleteContents(bool destroy) ! bool DeleteObject(wxMenuItem *pMenuItem) ! int GetCount() const %endclass --- 156,163 ---- %class %noclassinfo wxMenuItemList, wxList ! // no constructor, you only get this back from wxMenu::GetMenuItems ! ! // Use the wxList methods, see also wxNode ! %endclass Index: controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/controls.i,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** controls.i 11 Jun 2007 03:57:58 -0000 1.37 --- controls.i 13 Jun 2007 04:15:22 -0000 1.38 *************** *** 430,434 **** //void RefreshItems(long itemFrom, long itemTo) bool ScrollList(int dx, int dy) ! void SetBackgroundColour(const wxColour& col) bool SetColumn(int col, wxListItem& item) bool SetColumnWidth(int col, int width) --- 430,434 ---- //void RefreshItems(long itemFrom, long itemTo) bool ScrollList(int dx, int dy) ! //void SetBackgroundColour(const wxColour& col) - see wxWindow bool SetColumn(int col, wxListItem& item) bool SetColumnWidth(int col, int width) *************** *** 447,451 **** void SetSingleStyle(long style, const bool add = true) void SetTextColour(const wxColour& col) ! void SetWindowStyleFlag(long style) --- 447,451 ---- void SetSingleStyle(long style, const bool add = true) void SetTextColour(const wxColour& col) ! //void SetWindowStyleFlag(long style) - see wxWindow *************** *** 606,614 **** wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox") ! // these are marked deprecated in 2.6, use wxControl::Get/SetLabel/String ! //wxString GetLabel() const ! //void SetLabel(const wxString& label) ! //wxString GetLabel(int n) const ! //void SetLabel(int n, const wxString& label) bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox") --- 606,614 ---- wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox") ! // these are marked deprecated in 2.6, use wxWindow::Get/SetLabel and Get/SetString below ! // wxString GetLabel() const - see wxWindow ! // void SetLabel(const wxString& label) - see wxWindow ! // wxString GetLabel(int n) const ! // void SetLabel(int n, const wxString& label) bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox") *************** *** 1096,1100 **** void SetItemTextColour(const wxTreeItemId& item, const wxColour& col) void SetStateImageList(wxImageList* imageList) ! void SetWindowStyle(long styles) void SortChildren(const wxTreeItemId& item) void Toggle(const wxTreeItemId& item) --- 1096,1100 ---- void SetItemTextColour(const wxTreeItemId& item, const wxColour& col) void SetStateImageList(wxImageList* imageList) ! // void SetWindowStyle(long styles) - see wxWindow void SortChildren(const wxTreeItemId& item) void Toggle(const wxTreeItemId& item) Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** appframe.i 11 Jun 2007 03:57:58 -0000 1.36 --- appframe.i 13 Jun 2007 04:15:22 -0000 1.37 *************** *** 270,274 **** wxFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxFrame") ! void Centre(int direction = wxBOTH) bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxFrame") virtual wxStatusBar* CreateStatusBar(int number = 1, long style = 0, wxWindowID id = wxID_ANY, const wxString& name = "wxStatusBar") --- 270,274 ---- wxFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxFrame") ! // void Centre(int direction = wxBOTH) - see wxWindow bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxFrame") virtual wxStatusBar* CreateStatusBar(int number = 1, long style = 0, wxWindowID id = wxID_ANY, const wxString& name = "wxStatusBar") Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** data.i 12 Jun 2007 00:08:36 -0000 1.30 --- data.i 13 Jun 2007 04:15:22 -0000 1.31 *************** *** 63,66 **** --- 63,67 ---- wxObjectRefData* GetRefData() const bool IsKindOf(wxClassInfo *info) + bool IsSameAs(const wxObject& o) const void Ref(const wxObject& clone) void SetRefData(wxObjectRefData* data) *************** *** 81,85 **** %include "wx/object.h" ! %class %noclassinfo wxClassInfo, wxObject // %override wxClassInfo() constructor creates an instance using wxClassInfo::FindClass wxClassInfo(const wxString &name) --- 82,86 ---- %include "wx/object.h" ! %class %noclassinfo wxClassInfo // %override wxClassInfo() constructor creates an instance using wxClassInfo::FindClass wxClassInfo(const wxString &name) *************** *** 89,95 **** --- 90,103 ---- wxString GetBaseClassName1() const wxString GetBaseClassName2() const + const wxClassInfo *GetBaseClass1() const + const wxClassInfo *GetBaseClass2() const wxString GetClassName() const int GetSize() const + bool IsDynamic() bool IsKindOf(wxClassInfo* info) + + static const wxClassInfo *GetFirst() + const wxClassInfo *GetNext() const + %endclass *************** *** 238,241 **** --- 246,266 ---- void SetData(wxObject *data) //int IndexOf() - unfortunately a protected member of wxNodeBase + + // To convert wxObject* GetData() to another type use wxObject::DynamicCast + // See wxPenList, wxBrushList, wxMenuItemList, wxWindowList + + // Example: How to use a wxWindowList + // frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "Test"); + // win = wx.wxWindow(frame, wx.wxID_ANY) + // frame:Show(true) + // wlist = frame:GetChildren() + // wlist:Item(0):GetData():DynamicCast("wxWindow"):SetBackgroundColour(wx.wxRED) + + // Example: How to use a wxMenuItemList + // local fileMenu = wx.wxMenu() + // fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program") + // mList = fileMenu:GetMenuItems() + // print(mList:GetCount(), mList:GetFirst():GetData():DynamicCast("wxMenuItem"):GetLabel()) + %endclass Index: dialogs.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/dialogs.i,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** dialogs.i 11 Jun 2007 03:57:58 -0000 1.31 --- dialogs.i 13 Jun 2007 04:15:22 -0000 1.32 *************** *** 95,99 **** wxDialog(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog") ! void Centre(int direction = wxBOTH) bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog") wxUSE_BUTTON wxSizer* CreateButtonSizer(long flags) --- 95,99 ---- wxDialog(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog") ! //void Centre(int direction = wxBOTH) - see wxWindow bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog") wxUSE_BUTTON wxSizer* CreateButtonSizer(long flags) *************** *** 105,109 **** // int GetAffirmativeId() const - pocketpc only int GetReturnCode() ! wxString GetTitle() const //void Iconize(bool iconize) - in wxToplevelWindow //bool IsIconized() const - in wxToplevelWindow --- 105,109 ---- // int GetAffirmativeId() const - pocketpc only int GetReturnCode() ! // wxString GetTitle() const - see wxToplevelWindow //void Iconize(bool iconize) - in wxToplevelWindow //bool IsIconized() const - in wxToplevelWindow *************** *** 114,118 **** void SetReturnCode(int retCode) // void SetTitle(const wxString& title) - in wxToplevelWindow ! bool Show(const bool show) int ShowModal() %endclass --- 114,118 ---- void SetReturnCode(int retCode) // void SetTitle(const wxString& title) - in wxToplevelWindow ! // bool Show(const bool show) - see wxWindow int ShowModal() %endclass |