From: John L. <jr...@us...> - 2006-05-06 16:58:33
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13749/wxLua/bindings/wxwidgets Modified Files: defsutil.i grid.i mdi.i override.hpp wx_datatypes.lua Log Message: update mdi.i to wxWidgets 2.6.3 Index: defsutil.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/defsutil.i,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** defsutil.i 1 May 2006 19:36:30 -0000 1.19 --- defsutil.i 6 May 2006 16:58:29 -0000 1.20 *************** *** 447,451 **** %define wxBACKINGSTORE %define wxBACKWARD - %define wxBOTH %define wxBOTTOM %define wxCANCEL --- 447,450 ---- *************** *** 465,469 **** %define wxGTK %define wxHELP - %define wxHORIZONTAL %define wxINVERT %define wxMORE --- 464,467 ---- *************** *** 491,495 **** %define wxUNKNOWN_PLATFORM //%define wxUSER_COLOURS deprecated use wxNO_3D - %define wxVERTICAL %define wxWINDOWS %define wxWS_EX_VALIDATE_RECURSIVELY --- 489,492 ---- *************** *** 499,502 **** --- 496,505 ---- %define wxYES_NO + %enum wxOrientation + wxHORIZONTAL + wxVERTICAL + wxBOTH + %endenum + %enum wxDirection wxLEFT Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wx_datatypes.lua 2 May 2006 05:25:01 -0000 1.22 --- wx_datatypes.lua 6 May 2006 16:58:30 -0000 1.23 *************** *** 1807,1810 **** --- 1807,1815 ---- Name = "wxObjectRefData", }, + wxOrientation = { + DefType = "enum", + Intrinsic = true, + Name = "wxOrientation", + }, wxOutCode = { Condition = "wxLUA_USE_Geometry", Index: mdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/mdi.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mdi.i 5 Mar 2006 00:54:21 -0000 1.6 --- mdi.i 6 May 2006 16:58:29 -0000 1.7 *************** *** 5,8 **** --- 5,9 ---- // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. // Licence: wxWidgets licence + // wxWidgets: Updated to 2.6.3 ///////////////////////////////////////////////////////////////////////////// *************** *** 23,26 **** --- 24,28 ---- %constructor wxMDIParentFrameDefault() wxMDIParentFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = "wxMDIParentFrame") + void ActivateNext() void ActivatePrevious() *************** *** 28,43 **** void Cascade() bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = "wxMDIParentFrame") virtual void GetClientSize(int* width, int* height) const wxMDIChildFrame* GetActiveChild() const - %property=ActiveChild, read wxMDIClientWindow* GetClientWindow() const - %property=ClientWindow, read virtual wxWindow* GetToolBar() const %win wxMenu* GetWindowMenu() const virtual void SetToolBar(wxToolBar* toolbar) - %property=ToolBar, read, write %win void SetWindowMenu(wxMenu* menu) %win %property=WindowMenu, read, write - void Tile() %endclass --- 30,47 ---- void Cascade() bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = "wxMDIParentFrame") + // %override [int width, int height] wxMDIParentFrame::GetClientSize() const virtual void GetClientSize(int* width, int* height) const 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) + + %property=ActiveChild, read + %property=ClientWindow, read + %property=ToolBar, read, write %win %property=WindowMenu, read, write %endclass *************** *** 48,51 **** --- 52,56 ---- %constructor wxMDIChildFrameDefault() wxMDIChildFrame(wxMDIParentFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxMDIChildFrame") + void Activate() bool Create(wxMDIParentFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxMDIChildFrame") *************** *** 61,68 **** --- 66,75 ---- %class wxDocChildFrame, wxFrame wxDocChildFrame(wxDocument* doc, wxView* view, wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocChildFrame") + wxDocument* GetDocument() const wxView* GetView() const void SetDocument(wxDocument *doc) void SetView(wxView *view) + %property=View, read, write %endclass *************** *** 71,79 **** // wxDocManager %class wxDocManager, wxEvtHandler - %define wxDEFAULT_DOCMAN_FLAGS - %define wxDOC_NEW - %define wxDOC_SILENT wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true) %wxchkver25 void ActivateView(wxView* view, bool activate) %wxchkver22&!%wxchkver25 void ActivateView(wxView* view, bool activate, bool deleting) --- 78,88 ---- // wxDocManager + %define wxDEFAULT_DOCMAN_FLAGS + %define wxDOC_NEW + %define wxDOC_SILENT + %class wxDocManager, wxEvtHandler wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true) + %wxchkver25 void ActivateView(wxView* view, bool activate) %wxchkver22&!%wxchkver25 void ActivateView(wxView* view, bool activate, bool deleting) *************** *** 81,84 **** --- 90,94 ---- void AddFileToHistory(const wxString& filename) void AssociateTemplate(wxDocTemplate *temp) + bool CloseDocuments(bool force = true) wxDocument* CreateDocument(const wxString& path, long flags) wxView* CreateView(wxDocument*doc, long flags) *************** *** 93,96 **** --- 103,107 ---- wxDocument * GetCurrentDocument() wxView * GetCurrentView() + // %overide wxList& wxDocManager::GetDocuments() - returns a copied list wxList& GetDocuments() wxFileHistory * GetFileHistory() *************** *** 98,108 **** int GetMaxDocsOpen() !%wxchkver26 int GetNoHistoryFiles() ! %wxchkver26 size_t GetHistoryFilesCount() const; bool Initialize() ! bool MakeDefaultName(wxString& buf) // FIXME needs override to return string ! wxFileHistory * OnCreateFileHistory() void OnFileClose(wxCommandEvent &event) void OnFileNew(wxCommandEvent &event) void OnFileOpen(wxCommandEvent &event) void OnFileSave(wxCommandEvent &event) void OnFileSaveAs(wxCommandEvent &event) --- 109,124 ---- int GetMaxDocsOpen() !%wxchkver26 int GetNoHistoryFiles() ! %wxchkver26 size_t GetHistoryFilesCount() const ! // %overide wxList& wxDocManager::GetTemplates() - returns a copied list ! wxList& GetTemplates() bool Initialize() ! // %override [bool, string buf] wxDocManager::MakeDefaultName(wxString& buf) ! bool MakeDefaultName(wxString& buf) ! wxFileHistory* OnCreateFileHistory() void OnFileClose(wxCommandEvent &event) + void OnFileCloseAll(wxCommandEvent& event) void OnFileNew(wxCommandEvent &event) void OnFileOpen(wxCommandEvent &event) + void OnFileRevert(wxCommandEvent& event) void OnFileSave(wxCommandEvent &event) void OnFileSaveAs(wxCommandEvent &event) *************** *** 113,118 **** //wxDocTemplate * SelectViewType(wxDocTemplate **templates, int noTemplates, bool sort = false) void SetLastDirectory(const wxString& dir) - %property=LastDirectory, read, write void SetMaxDocsOpen(int n) %property=MaxDocsOpen, read, write %endclass --- 129,135 ---- //wxDocTemplate * SelectViewType(wxDocTemplate **templates, int noTemplates, bool sort = false) void SetLastDirectory(const wxString& dir) void SetMaxDocsOpen(int n) + + %property=LastDirectory, read, write %property=MaxDocsOpen, read, write %endclass *************** *** 122,131 **** //%class wxDocMDIChildFrame, wxMDIChildFrame ! //wxDocMDIChildFrame(wxDocument* doc, wxView* view, wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIChildFrame") ! //wxDocument* GetDocument() const ! //wxView* GetView() const ! //void OnActivate(wxActivateEvent event) ! //void OnCloseWindow(wxCloseEvent& event) ! //void SetView(wxView *view) //%endclass --- 139,150 ---- //%class wxDocMDIChildFrame, wxMDIChildFrame ! // wxDocMDIChildFrame(wxDocument* doc, wxView* view, wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIChildFrame") ! // ! // wxDocument* GetDocument() const ! // wxView* GetView() const ! // void OnActivate(wxActivateEvent event) ! // void OnCloseWindow(wxCloseEvent& event) ! // void SetDocument(wxDocument *doc) ! // void SetView(wxView *view) //%endclass *************** *** 134,139 **** //%class wxDocMDIParentFrame, wxMDIParentFrame ! //wxDocMDIParentFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIParentFrame") ! //void OnCloseWindow(wxCloseEvent& event) //%endclass --- 153,159 ---- //%class wxDocMDIParentFrame, wxMDIParentFrame ! // wxDocMDIParentFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIParentFrame") ! // ! // void OnCloseWindow(wxCloseEvent& event) //%endclass *************** *** 143,146 **** --- 163,167 ---- %class wxDocParentFrame, wxFrame wxDocParentFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocParentFrame") + //void OnCloseWindow(wxCloseEvent& event) %endclass *************** *** 149,157 **** // wxDocTemplate %class wxDocTemplate, wxObject wxDocTemplate(wxDocManager* manager, const wxString& descr, const wxString& filter, const wxString& dir, const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName, wxClassInfo* docClassInfo = NULL, wxClassInfo* viewClassInfo = NULL, long flags = wxDEFAULT_TEMPLATE_FLAGS) ! %define wxTEMPLATE_VISIBLE ! %define wxTEMPLATE_INVISIBLE ! %define wxDEFAULT_TEMPLATE_FLAGS wxDocument * CreateDocument(const wxString& path, long flags = 0) wxView * CreateView(wxDocument *doc, long flags = 0) --- 170,180 ---- // wxDocTemplate + %define wxTEMPLATE_VISIBLE + %define wxTEMPLATE_INVISIBLE + %define wxDEFAULT_TEMPLATE_FLAGS + %class wxDocTemplate, wxObject wxDocTemplate(wxDocManager* manager, const wxString& descr, const wxString& filter, const wxString& dir, const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName, wxClassInfo* docClassInfo = NULL, wxClassInfo* viewClassInfo = NULL, long flags = wxDEFAULT_TEMPLATE_FLAGS) ! wxDocument * CreateDocument(const wxString& path, long flags = 0) wxView * CreateView(wxDocument *doc, long flags = 0) *************** *** 164,179 **** long GetFlags() wxString GetViewName() bool IsVisible() void SetDefaultExtension(const wxString& ext) - %property=DefaultExtension, read, write void SetDescription(const wxString& descr) - %property=Description, read, write void SetDirectory(const wxString& dir) - %property=Directory, read, write void SetDocumentManager(wxDocManager *manager) - %property=DocumentManager, read, write void SetFileFilter(const wxString& filter) - %property=FileFilter, read, write void SetFlags(long flags) %property=Flags, read, write %endclass --- 187,204 ---- long GetFlags() wxString GetViewName() + bool InitDocument(wxDocument* doc, const wxString& path, long flags = 0) bool IsVisible() void SetDefaultExtension(const wxString& ext) void SetDescription(const wxString& descr) void SetDirectory(const wxString& dir) void SetDocumentManager(wxDocManager *manager) void SetFileFilter(const wxString& filter) void SetFlags(long flags) + + %property=DefaultExtension, read, write + %property=Description, read, write + %property=Directory, read, write + %property=DocumentManager, read, write + %property=FileFilter, read, write %property=Flags, read, write %endclass *************** *** 184,187 **** --- 209,213 ---- %class wxDocument, wxEvtHandler wxDocument() + virtual bool AddView(wxView *view) virtual bool Close() *************** *** 194,197 **** --- 220,224 ---- wxString GetFilename() const wxView * GetFirstView() const + // %override [string name] wxDocument::GetPrintableName(wxString& name) const virtual void GetPrintableName(wxString& name) const wxString GetTitle() const *************** *** 216,227 **** virtual void SetCommandProcessor(wxCommandProcessor *processor) void SetDocumentName(const wxString& name) - %property=DocumentName, read, write void SetDocumentTemplate(wxDocTemplate* templ) - %property=DocumentTemplate, read, write void SetFilename(const wxString& filename, bool notifyViews = false) - %property=Filename, read, write void SetTitle(const wxString& title) - %property=Title, read, write void UpdateAllViews(wxView* sender = NULL, wxObject* hint = NULL) %endclass --- 243,255 ---- virtual void SetCommandProcessor(wxCommandProcessor *processor) void SetDocumentName(const wxString& name) void SetDocumentTemplate(wxDocTemplate* templ) void SetFilename(const wxString& filename, bool notifyViews = false) void SetTitle(const wxString& title) void UpdateAllViews(wxView* sender = NULL, wxObject* hint = NULL) + + %property=DocumentName, read, write + %property=DocumentTemplate, read, write + %property=Filename, read, write + %property=Title, read, write %endclass *************** *** 230,233 **** --- 258,263 ---- %class wxView, wxEvtHandler + //wxView() + virtual void Activate(bool activate) virtual bool Close(bool deleteWindow = true) *************** *** 239,250 **** virtual void OnChangeFilename() virtual bool OnClose(bool deleteWindow) virtual bool OnCreate(wxDocument* doc, long flags) virtual wxPrintout* OnCreatePrintout() virtual void OnUpdate(wxView* sender, wxObject* hint) void SetDocument(wxDocument* doc) - %property=Document, read, write void SetFrame(wxFrame* frame) - %property=Frame, read, write void SetViewName(const wxString& name) %property=ViewName, read, write %endclass --- 269,283 ---- virtual void OnChangeFilename() virtual bool OnClose(bool deleteWindow) + //virtual void OnClosingDoocument() virtual bool OnCreate(wxDocument* doc, long flags) virtual wxPrintout* OnCreatePrintout() + //virtual void OnDraw(wxDC& dc) virtual void OnUpdate(wxView* sender, wxObject* hint) void SetDocument(wxDocument* doc) void SetFrame(wxFrame* frame) void SetViewName(const wxString& name) + + %property=Document, read, write + %property=Frame, read, write %property=ViewName, read, write %endclass *************** *** 261,278 **** %class wxCommandProcessor, wxObject wxCommandProcessor(int maxCommands = -1) ! virtual bool Submit(wxCommand *command, bool storeIt = true) ! %wxchkver23 virtual void Store(wxCommand *command) ! virtual bool Undo() ! virtual bool Redo() ! virtual bool CanUndo() const virtual bool CanRedo() const virtual void Initialize() ! virtual void SetMenuStrings() void SetEditMenu(wxMenu *menu) ! wxMenu *GetEditMenu() const ! wxList& GetCommands() const %wxchkver23 wxCommand *GetCurrentCommand() const ! int GetMaxCommands() const ! virtual void ClearCommands() %endclass --- 294,321 ---- %class wxCommandProcessor, wxObject wxCommandProcessor(int maxCommands = -1) ! virtual bool CanRedo() const + virtual bool CanUndo() const + virtual bool Redo() + virtual bool Undo() + virtual void ClearCommands() + wxList& GetCommands() const + int GetMaxCommands() const + wxMenu *GetEditMenu() const + wxString GetRedoAccelerator() const + wxString GetRedoMenuLabel() const + wxString GetUndoAccelerator() const + wxString GetUndoMenuLabel() const virtual void Initialize() ! virtual bool IsDirty() ! virtual void MarkAsSaved() void SetEditMenu(wxMenu *menu) ! virtual void SetMenuStrings() ! void SetRedoAccelerator(const wxString& accel) ! void SetUndoAccelerator(const wxString& accel) ! virtual bool Submit(wxCommand *command, bool storeIt = true) ! %wxchkver23 virtual void Store(wxCommand *command) %wxchkver23 wxCommand *GetCurrentCommand() const ! %endclass *************** *** 282,285 **** --- 325,329 ---- %class wxCommand, wxObject //wxCommand(bool canUndo = false, const wxString& name = "") + bool CanUndo() bool Do() *************** *** 298,302 **** %class wxFileHistory, wxObject ! wxFileHistory(int maxFiles = 9) void AddFileToHistory(const wxString& filename) void AddFilesToMenu() --- 342,347 ---- %class wxFileHistory, wxObject ! wxFileHistory(int maxFiles = 9, wxWindowID idBase = wxID_FILE1) ! void AddFileToHistory(const wxString& filename) void AddFilesToMenu() *************** *** 304,309 **** wxString GetHistoryFile(int index) const int GetMaxFiles() const ! %wxchkver22&!%wxchkver23 int GetNoHistoryFiles() const void Load(wxConfigBase& config) void RemoveMenu(wxMenu* menu) void Save(wxConfigBase& config) --- 349,355 ---- wxString GetHistoryFile(int index) const int GetMaxFiles() const ! size_t GetCount() const void Load(wxConfigBase& config) + void RemoveFileFromHistory(size_t i) void RemoveMenu(wxMenu* menu) void Save(wxConfigBase& config) Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** override.hpp 5 May 2006 22:02:44 -0000 1.35 --- override.hpp 6 May 2006 16:58:30 -0000 1.36 *************** *** 3015,3019 **** %end ! %override wxLua_wxDocManager_GetDocuments // wxList& GetDocuments() --- 3015,3019 ---- %end ! // FIXME - do we really need to copy the wxList here? %override wxLua_wxDocManager_GetDocuments // wxList& GetDocuments() *************** *** 3034,3037 **** --- 3034,3093 ---- %end + // FIXME - do we really need to copy the wxList here? + %override wxLua_wxDocManager_GetTemplates + // wxList& GetTemplates() + static int LUACALL wxLua_wxDocManager_GetTemplates(lua_State *L) + { + wxLuaState wxlState(L); + wxList *returns; + // get this + wxDocManager *self = (wxDocManager *)wxlState.GetUserDataType(1, s_wxluatag_wxDocManager); + // call GetDocuments + wxList &docs = self->GetTemplates(); + returns = new wxList(docs); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxList, returns); + // return the number of parameters + return 1; + } + %end + + %override wxLua_wxDocManager_MakeDefaultName + // bool MakeDefaultName(wxString& buf) + static int LUACALL wxLua_wxDocManager_MakeDefaultName(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // wxString buf + wxString buf = lua2wx(wxlState.GetStringType(2)); + // get this + wxDocManager * self = (wxDocManager *)wxlState.GetUserDataType(1, s_wxluatag_wxDocManager); + // call MakeDefaultName + returns = self->MakeDefaultName(buf); + // push the result flag + lua_pushboolean(L, returns); + lua_pushstring(L, wx2lua(buf)); + + return 2; + } + %end + + %override wxLua_wxDocument_GetPrintableName + // virtual void GetPrintableName(wxString& name) const + static int LUACALL wxLua_wxDocument_GetPrintableName(lua_State *L) + { + wxLuaState wxlState(L); + // wxString name + wxString name = lua2wx(wxlState.GetStringType(2)); + // get this + wxDocument * self = (wxDocument *)wxlState.GetUserDataType(1, s_wxluatag_wxDocument); + // call GetPrintableName + self->GetPrintableName(name); + lua_pushstring(L, wx2lua(name)); + + return 1; + } + %end + %override wxLua_wxDocument_GetViews // wxList& GetViews() const Index: grid.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/grid.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** grid.i 2 May 2006 05:25:01 -0000 1.6 --- grid.i 6 May 2006 16:58:29 -0000 1.7 *************** *** 237,245 **** bool HasEditor() const wxColour GetTextColour() const - %property=TextColour, read, write wxColour GetBackgroundColour() const - %property=BackgroundColour, read, write wxFont GetFont() const - %property=Font, read, write void GetAlignment(int *horz, int *vert) const wxGridCellRenderer *GetRenderer(wxGrid* grid, int row, int col) const --- 237,242 ---- *************** *** 250,253 **** --- 247,254 ---- %wxchkver23 bool HasReadWriteMode() const %wxchkver23 void MergeWith(wxGridCellAttr *mergefrom) + + %property=BackgroundColour, read, write + %property=Font, read, write + %property=TextColour, read, write %endclass *************** *** 257,260 **** --- 258,262 ---- %class %noclassinfo wxGridCellAttrProvider wxGridCellAttrProvider() + %wxchkver23 wxGridCellAttr *GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind) const void SetAttr(wxGridCellAttr *attr, int row, int col) |