From: John L. <jr...@us...> - 2007-11-25 21:34:08
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23733/wxLua/bindings/wxwidgets Modified Files: wx_datatypes.lua wxaui_aui.i Log Message: Updated wxAUI to 2.8.6 and added a sample for it Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** wx_datatypes.lua 8 Nov 2007 00:06:38 -0000 1.87 --- wx_datatypes.lua 25 Nov 2007 21:34:04 -0000 1.88 *************** *** 353,356 **** --- 353,377 ---- ValueType = "class", }, + wxAuiMDIChildFrame = { + BaseClass = "wxPanel", + Condition = "wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI", + IsNumber = false, + Name = "wxAuiMDIChildFrame", + ValueType = "class", + }, + wxAuiMDIClientWindow = { + BaseClass = "wxAuiNotebook", + Condition = "wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI", + IsNumber = false, + Name = "wxAuiMDIClientWindow", + ValueType = "class", + }, + wxAuiMDIParentFrame = { + BaseClass = "wxFrame", + Condition = "wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI", + IsNumber = false, + Name = "wxAuiMDIParentFrame", + ValueType = "class", + }, wxAuiManager = { BaseClass = "wxEvtHandler", Index: wxaui_aui.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxaui_aui.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxaui_aui.i 16 Jul 2007 19:34:23 -0000 1.1 --- wxaui_aui.i 25 Nov 2007 21:34:04 -0000 1.2 *************** *** 5,9 **** // Copyright: (c) 2007 John Labenski. All rights reserved. // Licence: wxWidgets licence ! // wxWidgets: Updated to 2.8.4 // =========================================================================== --- 5,9 ---- // Copyright: (c) 2007 John Labenski. All rights reserved. // Licence: wxWidgets licence ! // wxWidgets: Updated to 2.8.6 // =========================================================================== *************** *** 35,40 **** wxAUI_NB_CLOSE_ON_ACTIVE_TAB wxAUI_NB_CLOSE_ON_ALL_TABS ! wxAUI_NB_DEFAULT_STYLE //= wxAUI_NB_TOP|wxAUI_NB_TAB_SPLIT|wxAUI_NB_TAB_MOVE|wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_CLOSE_ON_ACTIVE_TAB %endenum --- 35,41 ---- wxAUI_NB_CLOSE_ON_ACTIVE_TAB wxAUI_NB_CLOSE_ON_ALL_TABS + wxAUI_NB_MIDDLE_CLICK_CLOSE ! wxAUI_NB_DEFAULT_STYLE //= wxAUI_NB_TOP|wxAUI_NB_TAB_SPLIT|wxAUI_NB_TAB_MOVE|wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_CLOSE_ON_ACTIVE_TAB|wxAUI_NB_MIDDLE_CLICK_CLOSE %endenum *************** *** 53,56 **** --- 54,68 ---- %define_event wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND // EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) + %if %wxchkver_2_8_5 + %define_event wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN // EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) + %define_event wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP // EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) + %define_event wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN // EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) + %define_event wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP // EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) + %define_event wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED // + %define_event wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE // EVT_AUINOTEBOOK_DRAG_DONE(winid, fn) + %define_event wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK // EVT_AUINOTEBOOK_BG_DCLICK(winid, fn) + %endif //%wxchkver_2_8_5 + + wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL, int win_id = 0) wxAuiNotebookEvent(const wxAuiNotebookEvent& c) *************** *** 203,206 **** --- 215,222 ---- void SetTabOffset(size_t offset); + bool IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWindow* wnd); + void MakeTabVisible(int tabPage, wxWindow* win); + + bool IsDragging() const %endclass *************** *** 265,268 **** --- 281,290 ---- // Gets the height of the notebook for a given page height int GetHeightForPageHeight(int pageHeight); + + // Advances the selection, generation page selection events + void AdvanceSelection(bool forward = true); + + // Shows the window menu + bool ShowWindowMenu(); %endif *************** *** 552,580 **** bool HasFlag(unsigned int flag) const - /* - wxString name; // name of the pane - wxString caption; // caption displayed on the window ! wxWindow* window; // window that is in this pane ! wxFrame* frame; // floating frame window that holds the pane ! unsigned int state; // a combination of wxPaneState values ! int dock_direction; // dock direction (top, bottom, left, right, center) ! int dock_layer; // layer number (0 = innermost layer) ! int dock_row; // row number on the docking bar (0 = first row) ! int dock_pos; // position inside the row (0 = first position) ! wxSize best_size; // size that the layout engine will prefer ! wxSize min_size; // minimum size the pane window can tolerate ! wxSize max_size; // maximum size the pane window can tolerate ! wxPoint floating_pos; // position while floating ! wxSize floating_size; // size while floating ! int dock_proportion; // proportion while docked ! wxAuiPaneButtonArray buttons; // buttons on the pane - wxRect rect; // current rectangle (populated by wxAUI) - */ %endclass --- 574,602 ---- bool HasFlag(unsigned int flag) const ! %member wxString name; // name of the pane ! %member wxString caption; // caption displayed on the window ! %member wxWindow* window; // window that is in this pane ! %member wxFrame* frame; // floating frame window that holds the pane ! %member unsigned int state; // a combination of wxPaneState values ! %member int dock_direction; // dock direction (top, bottom, left, right, center) ! %member int dock_layer; // layer number (0 = innermost layer) ! %member int dock_row; // row number on the docking bar (0 = first row) ! %member int dock_pos; // position inside the row (0 = first position) ! %member wxSize best_size; // size that the layout engine will prefer ! %member wxSize min_size; // minimum size the pane window can tolerate ! %member wxSize max_size; // maximum size the pane window can tolerate ! %member wxPoint floating_pos; // position while floating ! %member wxSize floating_size; // size while floating ! %member int dock_proportion; // proportion while docked ! ! //%member wxAuiPaneButtonArray buttons; // buttons on the pane ! ! %member wxRect rect; // current rectangle (populated by wxAUI) %endclass *************** *** 616,620 **** void SetArtProvider(%ungc wxAuiDockArt* art_provider); ! %gc wxAuiDockArt* GetArtProvider() const; wxAuiPaneInfo& GetPane(wxWindow* window); --- 638,642 ---- void SetArtProvider(%ungc wxAuiDockArt* art_provider); ! wxAuiDockArt* GetArtProvider() const; wxAuiPaneInfo& GetPane(wxWindow* window); *************** *** 703,721 **** bool IsHorizontal() const bool IsVertical() const ! /* ! public: ! wxAuiPaneInfoPtrArray panes; // array of panes ! wxRect rect; // current rectangle ! int dock_direction; // dock direction (top, bottom, left, right, center) ! int dock_layer; // layer number (0 = innermost layer) ! int dock_row; // row number on the docking bar (0 = first row) ! int size; // size of the dock ! int min_size; // minimum size of a dock (0 if there is no min) ! bool resizable; // flag indicating whether the dock is resizable ! bool toolbar; // flag indicating dock contains only toolbars ! bool fixed; // flag indicating that the dock operates on ! // absolute coordinates as opposed to proportional ! bool reserved1; ! */ %endclass --- 725,743 ---- bool IsHorizontal() const bool IsVertical() const ! ! ! //%member wxAuiPaneInfoPtrArray panes; // array of panes - FIXME ! %member wxRect rect; // current rectangle ! %member int dock_direction; // dock direction (top, bottom, left, right, center) ! %member int dock_layer; // layer number (0 = innermost layer) ! %member int dock_row; // row number on the docking bar (0 = first row) ! %member int size; // size of the dock ! %member int min_size; // minimum size of a dock (0 if there is no min) ! %member bool resizable; // flag indicating whether the dock is resizable ! %member bool toolbar; // flag indicating dock contains only toolbars ! %member bool fixed; // flag indicating that the dock operates on ! // absolute coordinates as opposed to proportional ! %member bool reserved1; ! %endclass *************** *** 757,759 **** --- 779,906 ---- + // --------------------------------------------------------------------------- + // --------------------------------------------------------------------------- + + //%include "wx/aui/tabmdi.h" + + //----------------------------------------------------------------------------- + // wxAuiMDIParentFrame + //----------------------------------------------------------------------------- + + %class wxAuiMDIParentFrame, wxFrame + wxAuiMDIParentFrame() + wxAuiMDIParentFrame(wxWindow *parent, wxWindowID winid, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = "wxAuiMDIParentFrame") + + bool Create(wxWindow *parent, wxWindowID winid, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,const wxString& name = "wxAuiMDIParentFrame" ) + + void SetArtProvider(%ungc wxAuiTabArt* provider); + wxAuiTabArt* GetArtProvider(); + wxAuiNotebook* GetNotebook() const; + + wxMenu* GetWindowMenu() const + void SetWindowMenu(wxMenu* pMenu); + + virtual void SetMenuBar(wxMenuBar *pMenuBar); + + void SetChildMenuBar(wxAuiMDIChildFrame *pChild); + + virtual bool ProcessEvent(wxEvent& event); + + wxAuiMDIChildFrame *GetActiveChild() const; + void SetActiveChild(wxAuiMDIChildFrame* pChildFrame); + + wxAuiMDIClientWindow *GetClientWindow() const; + virtual wxAuiMDIClientWindow *OnCreateClient(); + + virtual void Cascade() //{ /* Has no effect */ } + virtual void Tile(wxOrientation orient = wxHORIZONTAL); + virtual void ArrangeIcons() //{ /* Has no effect */ } + virtual void ActivateNext(); + virtual void ActivatePrevious(); + + %endclass + + //----------------------------------------------------------------------------- + // wxAuiMDIChildFrame + //----------------------------------------------------------------------------- + + %class wxAuiMDIChildFrame, wxPanel + wxAuiMDIChildFrame() + wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent, wxWindowID winid, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxAuiMDIChildFrame"); + + bool Create(wxAuiMDIParentFrame *parent, wxWindowID winid, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxAuiMDIChildFrame"); + + virtual void SetMenuBar(wxMenuBar *menu_bar); + virtual wxMenuBar *GetMenuBar() const; + + virtual void SetTitle(const wxString& title); + virtual wxString GetTitle() const; + + virtual void SetIcons(const wxIconBundle& icons); + virtual const wxIconBundle& GetIcons() const; + + virtual void SetIcon(const wxIcon& icon); + virtual const wxIcon& GetIcon() const; + + virtual void Activate(); + virtual bool Destroy(); + + %if wxUSE_STATUSBAR + // no status bars + //virtual wxStatusBar* CreateStatusBar(int number = 1, long style = 1, wxWindowID winid = 1, const wxString& name = "") //{ return (wxStatusBar*)NULL; } - FIXME + + //virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; } + //virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {} + //virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {} + %endif //wxUSE_STATUSBAR + + // no size hints + //virtual void DoSetSizeHints(int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW) = wxDefaultCoord, int WXUNUSED(maxH) = wxDefaultCoord, int WXUNUSED(incW) = wxDefaultCoord, int WXUNUSED(incH) = wxDefaultCoord) {} - FIXME + %if wxUSE_TOOLBAR + // no toolbar bars + //virtual wxToolBar* CreateToolBar(long WXUNUSED(style), wxWindowID WXUNUSED(winid), const wxString& WXUNUSED(name)) { return (wxToolBar*)NULL; } + //virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; } + %endif //wxUSE_TOOLBAR + + + // no maximize etc + //virtual void Maximize(bool WXUNUSED(maximize) = true) { /* Has no effect */ } + //virtual void Restore() { /* Has no effect */ } + //virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ } + //virtual bool IsMaximized() const { return true; } + //virtual bool IsIconized() const { return false; } + //virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; } + //virtual bool IsFullScreen() const { return false; } + + //virtual bool IsTopLevel() const { return false; } + + //void OnMenuHighlight(wxMenuEvent& evt); + //void OnActivate(wxActivateEvent& evt); + //void OnCloseWindow(wxCloseEvent& evt); + + void SetMDIParentFrame(wxAuiMDIParentFrame* parent); + wxAuiMDIParentFrame* GetMDIParentFrame() const; + + // This function needs to be called when a size change is confirmed, + // we needed this function to prevent anybody from the outside + // changing the panel... it messes the UI layout when we would allow it. + void ApplyMDIChildFrameRect(); + void DoShow(bool show); + + %endclass + + //----------------------------------------------------------------------------- + // wxAuiMDIClientWindow + //----------------------------------------------------------------------------- + + %class wxAuiMDIClientWindow, wxAuiNotebook + wxAuiMDIClientWindow(); + wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0); + + virtual bool CreateClient(wxAuiMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL); + + virtual int SetSelection(size_t page); + + %endclass + %endif // wxLUA_USE_wxAUI && %wxchkver_2_8 && wxUSE_AUI |