From: John L. <jr...@us...> - 2007-07-04 05:39:18
|
Update of /cvsroot/wxlua/wxLua/bindings/wxaui In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv478/wxLua/bindings/wxaui Added Files: Makefile aui.i wxaui_rules.lua Log Message: Add wxAUI library and rebuild all build files Cleanup Makefiles using wx-config and include common bits to simplify them --- NEW FILE: aui.i --- // =========================================================================== // Purpose: wxAUI // Author: John Labenski // Created: 07/03/2007 // Copyright: (c) 2007 John Labenski. All rights reserved. // Licence: wxWidgets licence // =========================================================================== // NOTE: This file is mostly copied from wxWidget's include/aui/*.h headers // to make updating it easier. %if wxLUA_USE_wxAUI && %wxchkver_2_8 && wxUSE_AUI %include "wx/aui/aui.h" // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- //%include "wx/aui/auibook.h" // already included by aui.h %enum wxAuiNotebookOption wxAUI_NB_TOP wxAUI_NB_LEFT // not implemented yet wxAUI_NB_RIGHT // not implemented yet wxAUI_NB_BOTTOM // not implemented yet wxAUI_NB_TAB_SPLIT wxAUI_NB_TAB_MOVE wxAUI_NB_TAB_EXTERNAL_MOVE wxAUI_NB_TAB_FIXED_WIDTH wxAUI_NB_SCROLL_BUTTONS wxAUI_NB_WINDOWLIST_BUTTON wxAUI_NB_CLOSE_BUTTON 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 // --------------------------------------------------------------------------- // wxAuiNotebookEvent %class %delete wxAuiNotebookEvent, wxNotifyEvent %define_event wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE // EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) %define_event wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED // EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) %define_event wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING // EVT_AUINOTEBOOK_PAGE_CHANGING(winid, fn) %define_event wxEVT_COMMAND_AUINOTEBOOK_BUTTON // EVT_AUINOTEBOOK_BUTTON(winid, fn) %define_event wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG // EVT_AUINOTEBOOK_BEGIN_DRAG(winid, fn) %define_event wxEVT_COMMAND_AUINOTEBOOK_END_DRAG // EVT_AUINOTEBOOK_END_DRAG(winid, fn) %define_event wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION // EVT_AUINOTEBOOK_DRAG_MOTION(winid, fn) %define_event wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND // EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL, int win_id = 0) wxAuiNotebookEvent(const wxAuiNotebookEvent& c) void SetSelection(int s) int GetSelection() const void SetOldSelection(int s) int GetOldSelection() const void SetDragSource(wxAuiNotebook* s) wxAuiNotebook* GetDragSource() const %endclass // --------------------------------------------------------------------------- // wxAuiNotebookPage %class %delete %noclassinfo %encapsulate wxAuiNotebookPage %member wxWindow* window; // page's associated window %member wxString caption; // caption displayed on the tab %member wxBitmap bitmap; // tab's bitmap %member wxRect rect; // tab's hit rectangle %member bool active; // true if the page is currently active %endclass // --------------------------------------------------------------------------- // wxAuiNotebookPageArray %class %delete %noclassinfo %encapsulate wxAuiNotebookPageArray wxAuiNotebookPageArray() wxAuiNotebookPageArray(const wxAuiNotebookPageArray& array) void Add(wxAuiNotebookPage* page) void Clear() int GetCount() const void Insert(wxAuiNotebookPage* page, int nIndex) bool IsEmpty() wxAuiNotebookPage Item(size_t nIndex) const void RemoveAt(size_t nIndex) %endclass // --------------------------------------------------------------------------- // wxAuiTabContainerButton %class %delete %noclassinfo %encapsulate wxAuiTabContainerButton %member int id; // button's id %member int cur_state; // current state (normal, hover, pressed, etc.) %member int location; // buttons location (wxLEFT, wxRIGHT, or wxCENTER) %member wxBitmap bitmap; // button's hover bitmap %member wxBitmap dis_bitmap; // button's disabled bitmap %member wxRect rect; // button's hit rectangle %endclass //WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiTabContainerButton, wxAuiTabContainerButtonArray, WXDLLIMPEXP_AUI); // --------------------------------------------------------------------------- // wxAuiTabArt %class %delete %noclassinfo %encapsulate wxAuiTabArt // wxAuiTabArt() No constructor - base class %gc virtual wxAuiTabArt* Clone() //= 0; virtual void SetFlags(unsigned int flags) //= 0; virtual void SetSizingInfo(const wxSize& tab_ctrl_size, size_t tab_count) //= 0; virtual void SetNormalFont(const wxFont& font) //= 0; virtual void SetSelectedFont(const wxFont& font) //= 0; virtual void SetMeasuringFont(const wxFont& font) //= 0; virtual void DrawBackground( wxDC& dc, wxWindow* wnd, const wxRect& rect) //= 0; virtual void DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& pane, const wxRect& in_rect, int close_button_state, wxRect* out_tab_rect, wxRect* out_button_rect, int* x_extent) //= 0; virtual void DrawButton( wxDC& dc, wxWindow* wnd, const wxRect& in_rect, int bitmap_id, int button_state, int orientation, wxRect* out_rect) //= 0; virtual wxSize GetTabSize( wxDC& dc, wxWindow* wnd, const wxString& caption, const wxBitmap& bitmap, bool active, int close_button_state, int* x_extent) //= 0; virtual int ShowDropDown( wxWindow* wnd, const wxAuiNotebookPageArray& items, int active_idx) //= 0; virtual int GetIndentSize() //= 0; virtual int GetBestTabCtrlSize( wxWindow* wnd, const wxAuiNotebookPageArray& pages, const wxSize& required_bmp_size) //= 0; %endclass // --------------------------------------------------------------------------- // wxAuiDefaultTabArt %class %delete %noclassinfo %encapsulate wxAuiDefaultTabArt, wxAuiTabArt wxAuiDefaultTabArt(); %endclass // --------------------------------------------------------------------------- // wxAuiSimpleTabArt %class %delete %noclassinfo %encapsulate wxAuiSimpleTabArt, wxAuiTabArt wxAuiSimpleTabArt(); %endclass // --------------------------------------------------------------------------- // wxAuiTabContainer //%class %delete %noclassinfo %encapsulate wxAuiTabContainer // wxAuiTabContainer(); // // All methods put into wxAuiTabCtrl since this isn't the base class of anything else // //%endclass // --------------------------------------------------------------------------- // wxAuiTabCtrl %class wxAuiTabCtrl, wxControl //, wxAuiTabContainer wxAuiTabCtrl(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); void SetArtProvider(wxAuiTabArt* art); wxAuiTabArt* GetArtProvider() const; void SetFlags(unsigned int flags); unsigned int GetFlags() const; bool AddPage(wxWindow* page, const wxAuiNotebookPage& info); bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx); bool MovePage(wxWindow* page, size_t new_idx); bool RemovePage(wxWindow* page); bool SetActivePage(wxWindow* page); bool SetActivePage(size_t page); void SetNoneActive(); int GetActivePage() const; bool TabHitTest(int x, int y, wxWindow** hit) const; bool ButtonHitTest(int x, int y, wxAuiTabContainerButton** hit) const; wxWindow* GetWindowFromIdx(size_t idx) const; int GetIdxFromWindow(wxWindow* page) const; size_t GetPageCount() const; wxAuiNotebookPage& GetPage(size_t idx); const wxAuiNotebookPage& GetPage(size_t idx) const; wxAuiNotebookPageArray& GetPages(); void SetNormalFont(const wxFont& normal_font); void SetSelectedFont(const wxFont& selected_font); void SetMeasuringFont(const wxFont& measuring_font); void DoShowHide(); void SetRect(const wxRect& rect); void RemoveButton(int id); void AddButton(int id, int location, const wxBitmap& normal_bitmap = wxNullBitmap, const wxBitmap& disabled_bitmap = wxNullBitmap); size_t GetTabOffset() const; void SetTabOffset(size_t offset); %endclass // --------------------------------------------------------------------------- // wxAuiNotebook %class wxAuiNotebook, wxControl wxAuiNotebook(); wxAuiNotebook(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAUI_NB_DEFAULT_STYLE); bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); void SetWindowStyleFlag(long style); void SetArtProvider(wxAuiTabArt* art); wxAuiTabArt* GetArtProvider() const; virtual void SetUniformBitmapSize(const wxSize& size); virtual void SetTabCtrlHeight(int height); bool AddPage(wxWindow* page, const wxString& caption, bool select = false, const wxBitmap& bitmap = wxNullBitmap); bool InsertPage(size_t page_idx, wxWindow* page, const wxString& caption, bool select = false, const wxBitmap& bitmap = wxNullBitmap); bool DeletePage(size_t page); bool RemovePage(size_t page); size_t GetPageCount() const; wxWindow* GetPage(size_t page_idx) const; int GetPageIndex(wxWindow* page_wnd) const; bool SetPageText(size_t page, const wxString& text); wxString GetPageText(size_t page_idx) const; bool SetPageBitmap(size_t page, const wxBitmap& bitmap); wxBitmap GetPageBitmap(size_t page_idx) const; size_t SetSelection(size_t new_page); int GetSelection() const; virtual void Split(size_t page, int direction); //#if wxABI_VERSION >= 20801 const wxAuiManager& GetAuiManager() const //#endif //#if wxABI_VERSION >= 20805 // Sets the normal font void SetNormalFont(const wxFont& font); // Sets the selected tab font void SetSelectedFont(const wxFont& font); // Sets the measuring font void SetMeasuringFont(const wxFont& font); // Sets the tab font virtual bool SetFont(const wxFont& font); // Gets the tab control height int GetTabCtrlHeight() const; // Gets the height of the notebook for a given page height int GetHeightForPageHeight(int pageHeight); //#endif %endclass // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- //%include "wx/aui/dockart.h" // --------------------------------------------------------------------------- // wxAuiDockArt %class %delete %encapsulate %noclassinfo wxAuiDockArt // wxAuiDockArt() - No constructor - base class virtual int GetMetric(int id) //= 0; virtual void SetMetric(int id, int new_val) //= 0; virtual void SetFont(int id, const wxFont& font) //= 0; virtual wxFont GetFont(int id) //= 0; virtual wxColour GetColour(int id) //= 0; virtual void SetColour(int id, const wxColour& colour) //= 0; wxColour GetColor(int id) void SetColor(int id, const wxColour& color) virtual void DrawSash(wxDC& dc, wxWindow* window, int orientation, const wxRect& rect) //= 0; virtual void DrawBackground(wxDC& dc, wxWindow* window, int orientation, const wxRect& rect) //= 0; virtual void DrawCaption(wxDC& dc, wxWindow* window, const wxString& text, const wxRect& rect, wxAuiPaneInfo& pane) //= 0; virtual void DrawGripper(wxDC& dc, wxWindow* window, const wxRect& rect, wxAuiPaneInfo& pane) //= 0; virtual void DrawBorder(wxDC& dc, wxWindow* window, const wxRect& rect, wxAuiPaneInfo& pane) //= 0; virtual void DrawPaneButton(wxDC& dc, wxWindow* window, int button, int button_state, const wxRect& rect, wxAuiPaneInfo& pane) //= 0; %endclass // --------------------------------------------------------------------------- // wxAuiDefaultDockArt %class %delete %noclassinfo %encapsulate wxAuiDefaultDockArt, wxAuiDockArt wxAuiDefaultDockArt(); %endclass // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- //%include "wx/aui/floatpane.h" // --------------------------------------------------------------------------- // wxAuiFloatingFrame %class wxAuiFloatingFrame, wxFrame // wxAuiFloatingFrameBaseClass wxAuiFloatingFrame(wxWindow* parent, wxAuiManager* owner_mgr, const wxAuiPaneInfo& pane, wxWindowID id = wxID_ANY, long style = wxRESIZE_BORDER|wxSYSTEM_MENU|wxCAPTION|wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT|wxCLIP_CHILDREN); void SetPaneWindow(const wxAuiPaneInfo& pane); wxAuiManager* GetOwnerManager() const; %endclass // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- //%include "wx/aui/framemanager.h" %enum wxAuiManagerDock wxAUI_DOCK_NONE wxAUI_DOCK_TOP wxAUI_DOCK_RIGHT wxAUI_DOCK_BOTTOM wxAUI_DOCK_LEFT wxAUI_DOCK_CENTER wxAUI_DOCK_CENTRE //= wxAUI_DOCK_CENTER %endenum %enum wxAuiManagerOption wxAUI_MGR_ALLOW_FLOATING wxAUI_MGR_ALLOW_ACTIVE_PANE wxAUI_MGR_TRANSPARENT_DRAG wxAUI_MGR_TRANSPARENT_HINT wxAUI_MGR_VENETIAN_BLINDS_HINT wxAUI_MGR_RECTANGLE_HINT wxAUI_MGR_HINT_FADE wxAUI_MGR_NO_VENETIAN_BLINDS_FADE wxAUI_MGR_DEFAULT //= wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_TRANSPARENT_HINT | wxAUI_MGR_HINT_FADE | wxAUI_MGR_NO_VENETIAN_BLINDS_FADE %endenum %enum wxAuiPaneDockArtSetting wxAUI_DOCKART_SASH_SIZE wxAUI_DOCKART_CAPTION_SIZE wxAUI_DOCKART_GRIPPER_SIZE wxAUI_DOCKART_PANE_BORDER_SIZE wxAUI_DOCKART_PANE_BUTTON_SIZE wxAUI_DOCKART_BACKGROUND_COLOUR wxAUI_DOCKART_SASH_COLOUR wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR wxAUI_DOCKART_BORDER_COLOUR wxAUI_DOCKART_GRIPPER_COLOUR wxAUI_DOCKART_CAPTION_FONT wxAUI_DOCKART_GRADIENT_TYPE %endenum %enum wxAuiPaneDockArtGradients wxAUI_GRADIENT_NONE wxAUI_GRADIENT_VERTICAL wxAUI_GRADIENT_HORIZONTAL %endenum %enum wxAuiPaneButtonState wxAUI_BUTTON_STATE_NORMAL wxAUI_BUTTON_STATE_HOVER wxAUI_BUTTON_STATE_PRESSED wxAUI_BUTTON_STATE_DISABLED wxAUI_BUTTON_STATE_HIDDEN wxAUI_BUTTON_STATE_CHECKED %endenum %enum wxAuiButtonId wxAUI_BUTTON_CLOSE wxAUI_BUTTON_MAXIMIZE_RESTORE wxAUI_BUTTON_MINIMIZE wxAUI_BUTTON_PIN wxAUI_BUTTON_OPTIONS wxAUI_BUTTON_WINDOWLIST wxAUI_BUTTON_LEFT wxAUI_BUTTON_RIGHT wxAUI_BUTTON_UP wxAUI_BUTTON_DOWN wxAUI_BUTTON_CUSTOM1 wxAUI_BUTTON_CUSTOM2 wxAUI_BUTTON_CUSTOM3 %endenum %enum wxAuiPaneInsertLevel wxAUI_INSERT_PANE wxAUI_INSERT_ROW wxAUI_INSERT_DOCK %endenum //WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockInfo, wxAuiDockInfoArray, WXDLLIMPEXP_AUI); //WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockUIPart, wxAuiDockUIPartArray, WXDLLIMPEXP_AUI); //WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiPaneButton, wxAuiPaneButtonArray, WXDLLIMPEXP_AUI); //WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiPaneInfo, wxAuiPaneInfoArray, WXDLLIMPEXP_AUI); //WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxAuiPaneInfo*, wxAuiPaneInfoPtrArray, class WXDLLIMPEXP_AUI); //WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxAuiDockInfo*, wxAuiDockInfoPtrArray, class WXDLLIMPEXP_AUI); // --------------------------------------------------------------------------- // wxAuiPaneInfo // NOTE: You can add and subtract flags from this list, // but do not change the values of the flags, because // they are stored in a binary integer format in the // perspective string. If you really need to change the // values around, you'll have to ensure backwards-compatibility // in the perspective loading code. %enum wxAuiPaneInfo::wxAuiPaneState optionFloating optionHidden optionLeftDockable optionRightDockable optionTopDockable optionBottomDockable optionFloatable optionMovable optionResizable optionPaneBorder optionCaption optionGripper optionDestroyOnClose optionToolbar optionActive optionGripperTop optionMaximized buttonClose buttonMaximize buttonMinimize buttonPin buttonCustom1 buttonCustom2 buttonCustom3 savedHiddenState // used internally actionPane // used internally %endenum %class %delete %noclassinfo %encapsulate wxAuiPaneInfo %define_object wxAuiNullPaneInfo wxAuiPaneInfo() wxAuiPaneInfo(const wxAuiPaneInfo& c) %operator wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c) // Write the safe parts of a newly loaded PaneInfo structure "source" into "this" // used on loading perspectives etc. void SafeSet(wxAuiPaneInfo source) bool IsOk() const bool IsFixed() const bool IsResizable() const bool IsShown() const bool IsFloating() const bool IsDocked() const bool IsToolbar() const bool IsTopDockable() const bool IsBottomDockable() const bool IsLeftDockable() const bool IsRightDockable() const bool IsFloatable() const bool IsMovable() const bool IsDestroyOnClose() const bool IsMaximized() const bool HasCaption() const bool HasGripper() const bool HasBorder() const bool HasCloseButton() const bool HasMaximizeButton() const bool HasMinimizeButton() const bool HasPinButton() const bool HasGripperTop() const wxAuiPaneInfo& Window(wxWindow* w) wxAuiPaneInfo& Name(const wxString& n) wxAuiPaneInfo& Caption(const wxString& c) wxAuiPaneInfo& Left() wxAuiPaneInfo& Right() wxAuiPaneInfo& Top() wxAuiPaneInfo& Bottom() wxAuiPaneInfo& Center() wxAuiPaneInfo& Centre() wxAuiPaneInfo& Direction(int direction) wxAuiPaneInfo& Layer(int layer) wxAuiPaneInfo& Row(int row) wxAuiPaneInfo& Position(int pos) wxAuiPaneInfo& BestSize(const wxSize& size) wxAuiPaneInfo& MinSize(const wxSize& size) wxAuiPaneInfo& MaxSize(const wxSize& size) wxAuiPaneInfo& BestSize(int x, int y) wxAuiPaneInfo& MinSize(int x, int y) wxAuiPaneInfo& MaxSize(int x, int y) wxAuiPaneInfo& FloatingPosition(const wxPoint& pos) wxAuiPaneInfo& FloatingPosition(int x, int y) wxAuiPaneInfo& FloatingSize(const wxSize& size) wxAuiPaneInfo& FloatingSize(int x, int y) wxAuiPaneInfo& Fixed() wxAuiPaneInfo& Resizable(bool resizable = true) wxAuiPaneInfo& Dock() wxAuiPaneInfo& Float() wxAuiPaneInfo& Hide() wxAuiPaneInfo& Show(bool show = true) wxAuiPaneInfo& CaptionVisible(bool visible = true) wxAuiPaneInfo& Maximize() wxAuiPaneInfo& Restore() wxAuiPaneInfo& PaneBorder(bool visible = true) wxAuiPaneInfo& Gripper(bool visible = true) wxAuiPaneInfo& GripperTop(bool attop = true) wxAuiPaneInfo& CloseButton(bool visible = true) wxAuiPaneInfo& MaximizeButton(bool visible = true) wxAuiPaneInfo& MinimizeButton(bool visible = true) wxAuiPaneInfo& PinButton(bool visible = true) wxAuiPaneInfo& DestroyOnClose(bool b = true) wxAuiPaneInfo& TopDockable(bool b = true) wxAuiPaneInfo& BottomDockable(bool b = true) wxAuiPaneInfo& LeftDockable(bool b = true) wxAuiPaneInfo& RightDockable(bool b = true) wxAuiPaneInfo& Floatable(bool b = true) wxAuiPaneInfo& Movable(bool b = true) wxAuiPaneInfo& Dockable(bool b = true) wxAuiPaneInfo& DefaultPane() wxAuiPaneInfo& CentrePane() wxAuiPaneInfo& CenterPane() wxAuiPaneInfo& ToolbarPane() wxAuiPaneInfo& SetFlag(unsigned int flag, bool option_state) 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 // --------------------------------------------------------------------------- // wxAuiPaneInfoArray %class %delete %noclassinfo %encapsulate wxAuiPaneInfoArray wxAuiPaneInfoArray() wxAuiPaneInfoArray(const wxAuiPaneInfoArray& array) void Add(wxAuiPaneInfo pi) void Clear() int GetCount() const //int Index(wxAuiPaneInfo* page) void Insert(wxAuiPaneInfo pi, int nIndex) bool IsEmpty() wxAuiPaneInfo Item(size_t nIndex) const void RemoveAt(size_t nIndex) %endclass // --------------------------------------------------------------------------- // wxAuiManager %class wxAuiManager, wxEvtHandler wxAuiManager(wxWindow* managed_wnd = NULL, unsigned int flags = wxAUI_MGR_DEFAULT); void UnInit(); void SetFlags(unsigned int flags); unsigned int GetFlags() const; void SetManagedWindow(wxWindow* managed_wnd); wxWindow* GetManagedWindow() const; static wxAuiManager* GetManager(wxWindow* window); void SetArtProvider(%ungc wxAuiDockArt* art_provider); %gc wxAuiDockArt* GetArtProvider() const; wxAuiPaneInfo& GetPane(wxWindow* window); wxAuiPaneInfo& GetPane(const wxString& name); wxAuiPaneInfoArray& GetAllPanes(); bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info); bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info, const wxPoint& drop_pos); bool AddPane(wxWindow* window, int direction = wxLEFT, const wxString& caption = wxEmptyString); bool InsertPane(wxWindow* window, const wxAuiPaneInfo& insert_location, int insert_level = wxAUI_INSERT_PANE); bool DetachPane(wxWindow* window); void Update(); wxString SavePaneInfo(wxAuiPaneInfo& pane); void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane); wxString SavePerspective(); bool LoadPerspective(const wxString& perspective, bool update = true); void SetDockSizeConstraint(double width_pct, double height_pct); void GetDockSizeConstraint(double* width_pct, double* height_pct) const; void ClosePane(wxAuiPaneInfo& pane_info); void MaximizePane(wxAuiPaneInfo& pane_info); void RestorePane(wxAuiPaneInfo& pane_info); void RestoreMaximizedPane(); virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p); void StartPaneDrag( wxWindow* pane_window, const wxPoint& offset); wxRect CalculateHintRect( wxWindow* pane_window, const wxPoint& pt, const wxPoint& offset); void DrawHintRect( wxWindow* pane_window, const wxPoint& pt, const wxPoint& offset); virtual void ShowHint(const wxRect& rect); virtual void HideHint(); // public events (which can be invoked externally) void OnRender(wxAuiManagerEvent& evt); void OnPaneButton(wxAuiManagerEvent& evt); %endclass // --------------------------------------------------------------------------- // wxAuiManagerEvent %class %delete wxAuiManagerEvent, wxEvent %define_event wxEVT_AUI_PANE_BUTTON // EVT_AUI_PANE_BUTTON(func) %define_event wxEVT_AUI_PANE_CLOSE // EVT_AUI_PANE_CLOSE(func) %define_event wxEVT_AUI_PANE_MAXIMIZE // EVT_AUI_PANE_MAXIMIZE(func) %define_event wxEVT_AUI_PANE_RESTORE // EVT_AUI_PANE_RESTORE(func) %define_event wxEVT_AUI_RENDER // EVT_AUI_RENDER(func) %define_event wxEVT_AUI_FIND_MANAGER // EVT_AUI_FIND_MANAGER(func) wxAuiManagerEvent(wxEventType type=wxEVT_NULL) wxAuiManagerEvent(const wxAuiManagerEvent& c) void SetManager(wxAuiManager* mgr) void SetPane(wxAuiPaneInfo* p) void SetButton(int b) void SetDC(wxDC* pdc) wxAuiManager* GetManager() const wxAuiPaneInfo* GetPane() const int GetButton() const wxDC* GetDC() const void Veto(bool veto = true) bool GetVeto() const void SetCanVeto(bool can_veto) bool CanVeto() const %endclass // --------------------------------------------------------------------------- // wxAuiDockInfo %class %delete %noclassinfo %encapsulate wxAuiDockInfo %define_object wxAuiNullDockInfo wxAuiDockInfo() wxAuiDockInfo(const wxAuiDockInfo& c) %operator wxAuiDockInfo& operator=(const wxAuiDockInfo& c) bool IsOk() const 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 // --------------------------------------------------------------------------- // wxAuiDockUIPart %enum wxAuiDockUIPart::dummy typeCaption, typeGripper, typeDock, typeDockSizer, typePane, typePaneSizer, typeBackground, typePaneBorder, typePaneButton %endenum %class %delete %noclassinfo %encapsulate wxAuiDockUIPart %member int type; // ui part type (see enum above) %member int orientation; // orientation (either wxHORIZONTAL or wxVERTICAL) %member wxAuiDockInfo* dock; // which dock the item is associated with %member wxAuiPaneInfo* pane; // which pane the item is associated with %member wxAuiPaneButton* button; // which pane button the item is associated with %member wxSizer* cont_sizer; // the part's containing sizer %member wxSizerItem* sizer_item; // the sizer item of the part %member wxRect rect; // client coord rectangle of the part itself %endclass // --------------------------------------------------------------------------- // wxAuiPaneButton %class %delete %noclassinfo %encapsulate wxAuiPaneButton %member int button_id; // id of the button (e.g. buttonClose) %endclass %endif // wxLUA_USE_wxAUI && %wxchkver_2_8 && wxUSE_AUI --- NEW FILE: Makefile --- # # File: makefile.unx # Author: John Labenski, J Winwood # Created: 2002 # Updated: # Copyright: (c) 2002. J Winwood # # # Makefile for generating the bindings WXLUA_DIR = ../.. all: genwxbind genwxbind: @(cd $(WXLUA_DIR)/bindings && ../bin/lua -e"rulesFilename=\"wxaui/wxaui_rules.lua\"" genwxbind.lua > wxaui/error.txt) # do nothing to clean clean: --- NEW FILE: wxaui_rules.lua --- ------------------------------------------------------------------------------- -- Rules to build wxWidgets' wxAUI binding for wxLua -- load using : $lua -e"rulesFilename=\"rules.lua\"" genwxbind.lua ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Set the root directory of the wxLua distribution, used only in this file wxlua_dir = "../" --============================================================================= -- Set the lua namespace (lua table) that the bindings will be placed into. -- eg. wx.wxWindow(...) hook_lua_namespace = "wxaui" -- Set the C++ "namespace" that the bindings will be placed. -- eg. cpp function names contain this to prevent duplicate function names hook_cpp_namespace = "wxaui" --============================================================================= -- Set the directory to output the bindings to, both C++ header and source files output_cpp_header_filepath = wxlua_dir.."modules/wxbindaui/include" output_cpp_filepath = wxlua_dir.."modules/wxbindaui/src" --============================================================================= -- Set the DLLIMPEXP macros for compiling these bindings into a DLL -- Use "WXLUA_NO_DLLIMPEXP" and "WXLUA_NO_DLLIMPEXP_DATA" for no IMPEXP macros output_cpp_impexpsymbol = "WXDLLIMPEXP_WXBINDAUI" output_cpp_impexpdatasymbol = "WXDLLIMPEXP_DATA_WXBINDAUI" ------------------------------------------------------------------------------- -- Set the name of the header file that will have the #includes from the -- bindings in it. This will be used as #include "hook_cpp_header_filename" in -- the C++ wrapper files, so it must include the proper #include path. hook_cpp_header_filename = "wxbindaui/include/wxbind.h" ------------------------------------------------------------------------------- -- Set the name of the main binding file that will have the glue code for the -- bindings in it. This file along with the output from the *.i files will be -- placed in the "output_cpp_filepath". hook_cpp_binding_filename = hook_cpp_namespace.."_bind.cpp" ------------------------------------------------------------------------------- -- Set the name of the subclassed wxLuaBinding class hook_cpp_binding_classname = "wxLuaBinding_"..hook_cpp_namespace ------------------------------------------------------------------------------- -- Set the function names that wrap the output structs of defined values, -- objects, events, functions, and classes. hook_cpp_define_funcname = "wxLuaGetDefineList_"..hook_cpp_namespace hook_cpp_string_funcname = "wxLuaGetStringList_"..hook_cpp_namespace hook_cpp_object_funcname = "wxLuaGetObjectList_"..hook_cpp_namespace hook_cpp_event_funcname = "wxLuaGetEventList_"..hook_cpp_namespace hook_cpp_function_funcname = "wxLuaGetFunctionList_"..hook_cpp_namespace hook_cpp_class_funcname = "wxLuaGetClassList_"..hook_cpp_namespace ------------------------------------------------------------------------------- -- Set any #includes or other C++ code to be placed verbatim at the top of -- every generated cpp file or "" for none hook_cpp_binding_includes = "" ------------------------------------------------------------------------------- -- Set any #includes or other C++ code to be placed verbatim below the -- #includes of every generated cpp file or "" for none hook_cpp_binding_post_includes = "" ------------------------------------------------------------------------------- -- Add additional include information or C++ code for the binding header file. -- This code will be place directly after any #includes at the top of the file hook_cpp_binding_header_includes = "#include \"wx/defs.h\"\n".. "#include \"wxbind/include/wxbind.h\"\n".. "#include \"wxbindaui/include/wxbindauidefs.h\"\n".. "#ifndef wxUSE_WAVE\n#define wxUSE_WAVE 0\n#endif\n".. "#ifndef wxUSE_SOUND\n#define wxUSE_SOUND 0\n#endif\n" ------------------------------------------------------------------------------- -- Set any #includes or other C++ code to be placed verbatim at the top of -- the single hook_cpp_binding_filename generated cpp file or "" for none hook_cpp_binding_source_includes = "" --============================================================================= -- Set the bindings directory that contains the *.i interface files interface_filepath = wxlua_dir.."bindings/wxaui" ------------------------------------------------------------------------------- -- A list of interface files to use to make the bindings. These files will be -- converted into *.cpp and placed in the output_cpp_filepath directory. -- The files are loaded from the interface_filepath. interface_fileTable = { "aui.i" } ------------------------------------------------------------------------------- -- A list of files that contain bindings that need to be overridden or empty -- table {} for none. -- The files are loaded from the interface_filepath. --override_fileTable = { "override.hpp" } --============================================================================= -- A table containing filenames of XXX_datatype.lua from other wrappers to -- to define classes and data types used in this wrapper -- NOTE: for the base wxWidgets wrappers we don't load the cache since they -- don't depend on other wrappers and can cause problems when interface -- files are updated. Make sure you delete or have updated any cache file -- that changes any data types used by this binding. datatype_cache_input_fileTable = { wxlua_dir.."bindings/wxwidgets/wx_datatypes.lua" } ------------------------------------------------------------------------------- -- The file to output the data type cache for later use with a binding that -- makes use of data types (classes, enums, etc) that are declared in this -- binding. The file will be generated in the interface_filepath. datatypes_cache_output_filename = hook_cpp_namespace.."_datatypes.lua" --============================================================================= -- virtual void wxLuaBinding::PreRegister function body for the -- hook_cpp_binding_classname. You can initialize data here. -- Typically this is not necessary and you can rem this out. -- wxLuaBinding_PreRegister = nothing to do here --============================================================================= -- virtual void wxLuaBinding::PostRegister function body for the -- hook_cpp_binding_classname. You can load any other custom bindings here. -- Typically this is not necessary and you can rem this out. -- wxLuaBinding_PostRegister = nothing to do here --============================================================================= -- Add additional conditions here -- example: conditions["DOXYGEN_INCLUDE"] = "defined(DOXYGEN_INCLUDE)" ------------------------------------------------------------------------------- -- Add additional data types here -- example: AllocDataType("wxArrayInt", "class",false) --============================================================================= -- Generate comments into binding C++ code comment_cpp_binding_code = true |