// tab art class
-class WXDLLIMPEXP_AUI wxTabArt
+class WXDLLIMPEXP_AUI wxAuiTabArt
{
public:
- wxTabArt() { }
- virtual ~wxTabArt() { }
+ wxAuiTabArt() { }
+ virtual ~wxAuiTabArt() { }
virtual void SetNormalFont(const wxFont& font) = 0;
virtual void SetSelectedFont(const wxFont& font) = 0;
};
-class WXDLLIMPEXP_AUI wxDefaultTabArt : public wxTabArt
+class WXDLLIMPEXP_AUI wxAuiDefaultTabArt : public wxAuiTabArt
{
public:
- wxDefaultTabArt();
- virtual ~wxDefaultTabArt();
+ wxAuiDefaultTabArt();
+ virtual ~wxAuiDefaultTabArt();
void SetNormalFont(const wxFont& font);
void SetSelectedFont(const wxFont& font);
wxAuiTabContainer();
virtual ~wxAuiTabContainer();
- void SetArtProvider(wxTabArt* art);
- wxTabArt* GetArtProvider();
+ void SetArtProvider(wxAuiTabArt* art);
+ wxAuiTabArt* GetArtProvider();
void SetFlags(unsigned int flags);
unsigned int GetFlags() const;
private:
- wxTabArt* m_art;
+ wxAuiTabArt* m_art;
wxAuiNotebookPageArray m_pages;
wxAuiTabContainerButtonArray m_buttons;
wxRect m_rect;
-class WXDLLIMPEXP_AUI wxAuiMultiNotebook : public wxControl
+class WXDLLIMPEXP_AUI wxAuiNotebook : public wxControl
{
public:
- wxAuiMultiNotebook();
+ wxAuiNotebook();
- wxAuiMultiNotebook(wxWindow* parent,
+ wxAuiNotebook(wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxAUI_NB_DEFAULT_STYLE);
- virtual ~wxAuiMultiNotebook();
+ virtual ~wxAuiNotebook();
bool Create(wxWindow* parent,
wxWindowID id = wxID_ANY,
size_t GetPageCount() const;
wxWindow* GetPage(size_t page_idx) const;
- void SetArtProvider(wxTabArt* art);
- wxTabArt* GetArtProvider();
+ void SetArtProvider(wxAuiTabArt* art);
+ wxAuiTabArt* GetArtProvider();
protected:
void InitNotebook(long style);
void OnChildFocus(wxChildFocusEvent& evt);
- void OnRender(wxFrameManagerEvent& evt);
+ void OnRender(wxAuiManagerEvent& evt);
void OnEraseBackground(wxEraseEvent& evt);
void OnSize(wxSizeEvent& evt);
void OnTabClicked(wxCommandEvent& evt);
protected:
- wxFrameManager m_mgr;
+ wxAuiManager m_mgr;
wxAuiTabContainer m_tabs;
int m_curpage;
int m_tab_id_counter;
// functionality to the wxAui dock manager. This allows the dock
// manager to have plugable look-and-feels
-class WXDLLIMPEXP_AUI wxDockArt
+class WXDLLIMPEXP_AUI wxAuiDockArt
{
public:
- wxDockArt() { }
- virtual ~wxDockArt() { }
+ wxAuiDockArt() { }
+ virtual ~wxAuiDockArt() { }
virtual int GetMetric(int id) = 0;
virtual void SetMetric(int id, int new_val) = 0;
wxWindow *window,
const wxString& text,
const wxRect& rect,
- wxPaneInfo& pane) = 0;
+ wxAuiPaneInfo& pane) = 0;
virtual void DrawGripper(wxDC& dc,
wxWindow *window,
const wxRect& rect,
- wxPaneInfo& pane) = 0;
+ wxAuiPaneInfo& pane) = 0;
virtual void DrawBorder(wxDC& dc,
wxWindow *window,
const wxRect& rect,
- wxPaneInfo& pane) = 0;
+ wxAuiPaneInfo& pane) = 0;
virtual void DrawPaneButton(wxDC& dc,
wxWindow *window,
int button,
int button_state,
const wxRect& rect,
- wxPaneInfo& pane) = 0;
+ wxAuiPaneInfo& pane) = 0;
};
-// this is the default art provider for wxFrameManager. Dock art
+// this is the default art provider for wxAuiManager. Dock art
// can be customized by creating a class derived from this one,
// or replacing this class entirely
-class WXDLLIMPEXP_AUI wxDefaultDockArt : public wxDockArt
+class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt
{
public:
- wxDefaultDockArt();
+ wxAuiDefaultDockArt();
int GetMetric(int metric_id);
void SetMetric(int metric_id, int new_val);
wxWindow *window,
const wxString& text,
const wxRect& rect,
- wxPaneInfo& pane);
+ wxAuiPaneInfo& pane);
void DrawGripper(wxDC& dc,
wxWindow *window,
const wxRect& rect,
- wxPaneInfo& pane);
+ wxAuiPaneInfo& pane);
void DrawBorder(wxDC& dc,
wxWindow *window,
const wxRect& rect,
- wxPaneInfo& pane);
+ wxAuiPaneInfo& pane);
void DrawPaneButton(wxDC& dc,
wxWindow *window,
int button,
int button_state,
const wxRect& rect,
- wxPaneInfo& pane);
+ wxAuiPaneInfo& pane);
protected:
#if defined( __WXMSW__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ )
#include "wx/minifram.h"
-#define wxFloatingPaneBaseClass wxMiniFrame
+#define wxAuiFloatingPaneBaseClass wxMiniFrame
#else
-#define wxFloatingPaneBaseClass wxFrame
+#define wxAuiFloatingPaneBaseClass wxFrame
#endif
-class WXDLLIMPEXP_AUI wxFloatingPane : public wxFloatingPaneBaseClass
+class WXDLLIMPEXP_AUI wxAuiFloatingPane : public wxAuiFloatingPaneBaseClass
{
public:
- wxFloatingPane(wxWindow* parent,
- wxFrameManager* owner_mgr,
- const wxPaneInfo& pane,
+ wxAuiFloatingPane(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
);
- virtual ~wxFloatingPane();
- void SetPaneWindow(const wxPaneInfo& pane);
+ virtual ~wxAuiFloatingPane();
+ void SetPaneWindow(const wxAuiPaneInfo& pane);
protected:
virtual void OnMoveStart();
wxSize m_last_size;
wxDirection m_lastDirection;
- wxFrameManager* m_owner_mgr;
- wxFrameManager m_mgr;
+ wxAuiManager* m_owner_mgr;
+ wxAuiManager m_mgr;
#ifndef SWIG
DECLARE_EVENT_TABLE()
- DECLARE_CLASS(wxFloatingPaneBaseClass)
+ DECLARE_CLASS(wxAuiFloatingPaneBaseClass)
#endif // SWIG
};
#include "wx/timer.h"
#include "wx/sizer.h"
-enum wxFrameManagerDock
+enum wxAuiManagerDock
{
wxAUI_DOCK_NONE = 0,
wxAUI_DOCK_TOP = 1,
wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER
};
-enum wxFrameManagerOption
+enum wxAuiManagerOption
{
wxAUI_MGR_ALLOW_FLOATING = 1 << 0,
wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1,
};
-enum wxPaneDockArtSetting
+enum wxAuiPaneDockArtSetting
{
wxAUI_ART_SASH_SIZE = 0,
wxAUI_ART_CAPTION_SIZE = 1,
wxAUI_ART_GRADIENT_TYPE = 16
};
-enum wxPaneDockArtGradients
+enum wxAuiPaneDockArtGradients
{
wxAUI_GRADIENT_NONE = 0,
wxAUI_GRADIENT_VERTICAL = 1,
wxAUI_GRADIENT_HORIZONTAL = 2
};
-enum wxPaneButtonState
+enum wxAuiPaneButtonState
{
wxAUI_BUTTON_STATE_NORMAL = 0,
wxAUI_BUTTON_STATE_HOVER = 1 << 1,
wxAUI_BUTTON_CUSTOM3 = 203
};
-enum wxPaneInsertLevel
+enum wxAuiPaneInsertLevel
{
wxAUI_INSERT_PANE = 0,
wxAUI_INSERT_ROW = 1,
// forwards and array declarations
-class wxDockUIPart;
-class wxPaneButton;
-class wxPaneInfo;
-class wxDockInfo;
-class wxDockArt;
-class wxFrameManagerEvent;
+class wxAuiDockUIPart;
+class wxAuiPaneButton;
+class wxAuiPaneInfo;
+class wxAuiDockInfo;
+class wxAuiDockArt;
+class wxAuiManagerEvent;
#ifndef SWIG
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDockInfo, wxDockInfoArray, WXDLLIMPEXP_AUI);
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDockUIPart, wxDockUIPartArray, WXDLLIMPEXP_AUI);
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxPaneButton, wxPaneButtonArray, WXDLLIMPEXP_AUI);
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxPaneInfo, wxPaneInfoArray, WXDLLIMPEXP_AUI);
-WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxPaneInfo*, wxPaneInfoPtrArray, class WXDLLIMPEXP_AUI);
-WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxDockInfo*, wxDockInfoPtrArray, class WXDLLIMPEXP_AUI);
+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);
#endif // SWIG
-extern WXDLLIMPEXP_AUI wxDockInfo wxNullDockInfo;
-extern WXDLLIMPEXP_AUI wxPaneInfo wxNullPaneInfo;
+extern WXDLLIMPEXP_AUI wxAuiDockInfo wxAuiNullDockInfo;
+extern WXDLLIMPEXP_AUI wxAuiPaneInfo wxAuiNullPaneInfo;
-class WXDLLIMPEXP_AUI wxPaneInfo
+class WXDLLIMPEXP_AUI wxAuiPaneInfo
{
public:
- wxPaneInfo()
+ wxAuiPaneInfo()
{
window = NULL;
frame = NULL;
DefaultPane();
}
- ~wxPaneInfo() {}
+ ~wxAuiPaneInfo() {}
#ifndef SWIG
- wxPaneInfo(const wxPaneInfo& c)
+ wxAuiPaneInfo(const wxAuiPaneInfo& c)
{
name = c.name;
caption = c.caption;
rect = c.rect;
}
- wxPaneInfo& operator=(const wxPaneInfo& c)
+ wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c)
{
name = c.name;
caption = c.caption;
// Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
// used on loading perspectives etc.
- void SafeSet(wxPaneInfo source)
+ void SafeSet(wxAuiPaneInfo source)
{
// note source is not passed by reference so we can overwrite, to keep the
// unsafe bits of "dest"
bool HasGripperTop() const { return HasFlag(optionGripperTop); }
#ifdef SWIG
- %typemap(out) wxPaneInfo& { $result = $self; Py_INCREF($result); }
+ %typemap(out) wxAuiPaneInfo& { $result = $self; Py_INCREF($result); }
#endif
- wxPaneInfo& Window(wxWindow* w) { window = w; return *this; }
- wxPaneInfo& Name(const wxString& n) { name = n; return *this; }
- wxPaneInfo& Caption(const wxString& c) { caption = c; return *this; }
- wxPaneInfo& Left() { dock_direction = wxAUI_DOCK_LEFT; return *this; }
- wxPaneInfo& Right() { dock_direction = wxAUI_DOCK_RIGHT; return *this; }
- wxPaneInfo& Top() { dock_direction = wxAUI_DOCK_TOP; return *this; }
- wxPaneInfo& Bottom() { dock_direction = wxAUI_DOCK_BOTTOM; return *this; }
- wxPaneInfo& Center() { dock_direction = wxAUI_DOCK_CENTER; return *this; }
- wxPaneInfo& Centre() { dock_direction = wxAUI_DOCK_CENTRE; return *this; }
- wxPaneInfo& Direction(int direction) { dock_direction = direction; return *this; }
- wxPaneInfo& Layer(int layer) { dock_layer = layer; return *this; }
- wxPaneInfo& Row(int row) { dock_row = row; return *this; }
- wxPaneInfo& Position(int pos) { dock_pos = pos; return *this; }
- wxPaneInfo& BestSize(const wxSize& size) { best_size = size; return *this; }
- wxPaneInfo& MinSize(const wxSize& size) { min_size = size; return *this; }
- wxPaneInfo& MaxSize(const wxSize& size) { max_size = size; return *this; }
- wxPaneInfo& BestSize(int x, int y) { best_size.Set(x,y); return *this; }
- wxPaneInfo& MinSize(int x, int y) { min_size.Set(x,y); return *this; }
- wxPaneInfo& MaxSize(int x, int y) { max_size.Set(x,y); return *this; }
- wxPaneInfo& FloatingPosition(const wxPoint& pos) { floating_pos = pos; return *this; }
- wxPaneInfo& FloatingPosition(int x, int y) { floating_pos.x = x; floating_pos.y = y; return *this; }
- wxPaneInfo& FloatingSize(const wxSize& size) { floating_size = size; return *this; }
- wxPaneInfo& FloatingSize(int x, int y) { floating_size.Set(x,y); return *this; }
- wxPaneInfo& Fixed() { return SetFlag(optionResizable, false); }
- wxPaneInfo& Resizable(bool resizable = true) { return SetFlag(optionResizable, resizable); }
- wxPaneInfo& Dock() { return SetFlag(optionFloating, false); }
- wxPaneInfo& Float() { return SetFlag(optionFloating, true); }
- wxPaneInfo& Hide() { return SetFlag(optionHidden, true); }
- wxPaneInfo& Show(bool show = true) { return SetFlag(optionHidden, !show); }
- wxPaneInfo& CaptionVisible(bool visible = true) { return SetFlag(optionCaption, visible); }
- wxPaneInfo& Maximize() { return SetFlag(optionMaximized, true); }
- wxPaneInfo& Restore() { return SetFlag(optionMaximized, false); }
- wxPaneInfo& PaneBorder(bool visible = true) { return SetFlag(optionPaneBorder, visible); }
- wxPaneInfo& Gripper(bool visible = true) { return SetFlag(optionGripper, visible); }
- wxPaneInfo& GripperTop(bool attop = true) { return SetFlag(optionGripperTop, attop); }
- wxPaneInfo& CloseButton(bool visible = true) { return SetFlag(buttonClose, visible); }
- wxPaneInfo& MaximizeButton(bool visible = true) { return SetFlag(buttonMaximize, visible); }
- wxPaneInfo& MinimizeButton(bool visible = true) { return SetFlag(buttonMinimize, visible); }
- wxPaneInfo& PinButton(bool visible = true) { return SetFlag(buttonPin, visible); }
- wxPaneInfo& DestroyOnClose(bool b = true) { return SetFlag(optionDestroyOnClose, b); }
- wxPaneInfo& TopDockable(bool b = true) { return SetFlag(optionTopDockable, b); }
- wxPaneInfo& BottomDockable(bool b = true) { return SetFlag(optionBottomDockable, b); }
- wxPaneInfo& LeftDockable(bool b = true) { return SetFlag(optionLeftDockable, b); }
- wxPaneInfo& RightDockable(bool b = true) { return SetFlag(optionRightDockable, b); }
- wxPaneInfo& Floatable(bool b = true) { return SetFlag(optionFloatable, b); }
- wxPaneInfo& Movable(bool b = true) { return SetFlag(optionMovable, b); }
-
- wxPaneInfo& SaveHidden() { return SetFlag(optionSavedHidden, HasFlag(optionHidden)); }
- wxPaneInfo& RestoreHidden() { return SetFlag(optionHidden, HasFlag(optionSavedHidden)); }
-
- wxPaneInfo& Dockable(bool b = true)
+ wxAuiPaneInfo& Window(wxWindow* w) { window = w; return *this; }
+ wxAuiPaneInfo& Name(const wxString& n) { name = n; return *this; }
+ wxAuiPaneInfo& Caption(const wxString& c) { caption = c; return *this; }
+ wxAuiPaneInfo& Left() { dock_direction = wxAUI_DOCK_LEFT; return *this; }
+ wxAuiPaneInfo& Right() { dock_direction = wxAUI_DOCK_RIGHT; return *this; }
+ wxAuiPaneInfo& Top() { dock_direction = wxAUI_DOCK_TOP; return *this; }
+ wxAuiPaneInfo& Bottom() { dock_direction = wxAUI_DOCK_BOTTOM; return *this; }
+ wxAuiPaneInfo& Center() { dock_direction = wxAUI_DOCK_CENTER; return *this; }
+ wxAuiPaneInfo& Centre() { dock_direction = wxAUI_DOCK_CENTRE; return *this; }
+ wxAuiPaneInfo& Direction(int direction) { dock_direction = direction; return *this; }
+ wxAuiPaneInfo& Layer(int layer) { dock_layer = layer; return *this; }
+ wxAuiPaneInfo& Row(int row) { dock_row = row; return *this; }
+ wxAuiPaneInfo& Position(int pos) { dock_pos = pos; return *this; }
+ wxAuiPaneInfo& BestSize(const wxSize& size) { best_size = size; return *this; }
+ wxAuiPaneInfo& MinSize(const wxSize& size) { min_size = size; return *this; }
+ wxAuiPaneInfo& MaxSize(const wxSize& size) { max_size = size; return *this; }
+ wxAuiPaneInfo& BestSize(int x, int y) { best_size.Set(x,y); return *this; }
+ wxAuiPaneInfo& MinSize(int x, int y) { min_size.Set(x,y); return *this; }
+ wxAuiPaneInfo& MaxSize(int x, int y) { max_size.Set(x,y); return *this; }
+ wxAuiPaneInfo& FloatingPosition(const wxPoint& pos) { floating_pos = pos; return *this; }
+ wxAuiPaneInfo& FloatingPosition(int x, int y) { floating_pos.x = x; floating_pos.y = y; return *this; }
+ wxAuiPaneInfo& FloatingSize(const wxSize& size) { floating_size = size; return *this; }
+ wxAuiPaneInfo& FloatingSize(int x, int y) { floating_size.Set(x,y); return *this; }
+ wxAuiPaneInfo& Fixed() { return SetFlag(optionResizable, false); }
+ wxAuiPaneInfo& Resizable(bool resizable = true) { return SetFlag(optionResizable, resizable); }
+ wxAuiPaneInfo& Dock() { return SetFlag(optionFloating, false); }
+ wxAuiPaneInfo& Float() { return SetFlag(optionFloating, true); }
+ wxAuiPaneInfo& Hide() { return SetFlag(optionHidden, true); }
+ wxAuiPaneInfo& Show(bool show = true) { return SetFlag(optionHidden, !show); }
+ wxAuiPaneInfo& CaptionVisible(bool visible = true) { return SetFlag(optionCaption, visible); }
+ wxAuiPaneInfo& Maximize() { return SetFlag(optionMaximized, true); }
+ wxAuiPaneInfo& Restore() { return SetFlag(optionMaximized, false); }
+ wxAuiPaneInfo& PaneBorder(bool visible = true) { return SetFlag(optionPaneBorder, visible); }
+ wxAuiPaneInfo& Gripper(bool visible = true) { return SetFlag(optionGripper, visible); }
+ wxAuiPaneInfo& GripperTop(bool attop = true) { return SetFlag(optionGripperTop, attop); }
+ wxAuiPaneInfo& CloseButton(bool visible = true) { return SetFlag(buttonClose, visible); }
+ wxAuiPaneInfo& MaximizeButton(bool visible = true) { return SetFlag(buttonMaximize, visible); }
+ wxAuiPaneInfo& MinimizeButton(bool visible = true) { return SetFlag(buttonMinimize, visible); }
+ wxAuiPaneInfo& PinButton(bool visible = true) { return SetFlag(buttonPin, visible); }
+ wxAuiPaneInfo& DestroyOnClose(bool b = true) { return SetFlag(optionDestroyOnClose, b); }
+ wxAuiPaneInfo& TopDockable(bool b = true) { return SetFlag(optionTopDockable, b); }
+ wxAuiPaneInfo& BottomDockable(bool b = true) { return SetFlag(optionBottomDockable, b); }
+ wxAuiPaneInfo& LeftDockable(bool b = true) { return SetFlag(optionLeftDockable, b); }
+ wxAuiPaneInfo& RightDockable(bool b = true) { return SetFlag(optionRightDockable, b); }
+ wxAuiPaneInfo& Floatable(bool b = true) { return SetFlag(optionFloatable, b); }
+ wxAuiPaneInfo& Movable(bool b = true) { return SetFlag(optionMovable, b); }
+
+ wxAuiPaneInfo& SaveHidden() { return SetFlag(optionSavedHidden, HasFlag(optionHidden)); }
+ wxAuiPaneInfo& RestoreHidden() { return SetFlag(optionHidden, HasFlag(optionSavedHidden)); }
+
+ wxAuiPaneInfo& Dockable(bool b = true)
{
return TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b);
}
- wxPaneInfo& DefaultPane()
+ wxAuiPaneInfo& DefaultPane()
{
state |= optionTopDockable | optionBottomDockable |
optionLeftDockable | optionRightDockable |
return *this;
}
- wxPaneInfo& CentrePane() { return CenterPane(); }
- wxPaneInfo& CenterPane()
+ wxAuiPaneInfo& CentrePane() { return CenterPane(); }
+ wxAuiPaneInfo& CenterPane()
{
state = 0;
return Center().PaneBorder().Resizable();
}
- wxPaneInfo& ToolbarPane()
+ wxAuiPaneInfo& ToolbarPane()
{
DefaultPane();
state |= (optionToolbar | optionGripper);
return *this;
}
- wxPaneInfo& SetFlag(unsigned int flag, bool option_state)
+ wxAuiPaneInfo& SetFlag(unsigned int flag, bool option_state)
{
if (option_state)
state |= flag;
}
#ifdef SWIG
- %typemap(out) wxPaneInfo& ;
+ %typemap(out) wxAuiPaneInfo& ;
#endif
public:
- enum wxPaneState
+ enum wxAuiPaneState
{
optionFloating = 1 << 0,
optionHidden = 1 << 1,
wxSize floating_size; // size while floating
int dock_proportion; // proportion while docked
- wxPaneButtonArray buttons; // buttons on the pane
+ wxAuiPaneButtonArray buttons; // buttons on the pane
wxRect rect; // current rectangle (populated by wxAUI)
};
-class WXDLLIMPEXP_AUI wxFloatingPane;
+class WXDLLIMPEXP_AUI wxAuiFloatingPane;
-class WXDLLIMPEXP_AUI wxFrameManager : public wxEvtHandler
+class WXDLLIMPEXP_AUI wxAuiManager : public wxEvtHandler
{
-friend class wxFloatingPane;
+friend class wxAuiFloatingPane;
public:
- wxFrameManager(wxWindow* managed_wnd = NULL,
+ wxAuiManager(wxWindow* managed_wnd = NULL,
unsigned int flags = wxAUI_MGR_DEFAULT);
- virtual ~wxFrameManager();
+ virtual ~wxAuiManager();
void UnInit();
void SetFlags(unsigned int flags);
wxWindow* GetManagedWindow() const;
#ifdef SWIG
- %disownarg( wxDockArt* art_provider );
+ %disownarg( wxAuiDockArt* art_provider );
#endif
- void SetArtProvider(wxDockArt* art_provider);
- wxDockArt* GetArtProvider() const;
+ void SetArtProvider(wxAuiDockArt* art_provider);
+ wxAuiDockArt* GetArtProvider() const;
- wxPaneInfo& GetPane(wxWindow* window);
- wxPaneInfo& GetPane(const wxString& name);
- wxPaneInfoArray& GetAllPanes();
+ wxAuiPaneInfo& GetPane(wxWindow* window);
+ wxAuiPaneInfo& GetPane(const wxString& name);
+ wxAuiPaneInfoArray& GetAllPanes();
bool AddPane(wxWindow* window,
- const wxPaneInfo& pane_info);
+ const wxAuiPaneInfo& pane_info);
bool AddPane(wxWindow* window,
- const wxPaneInfo& pane_info,
+ const wxAuiPaneInfo& pane_info,
const wxPoint& drop_pos);
bool AddPane(wxWindow* window,
const wxString& caption = wxEmptyString);
bool InsertPane(wxWindow* window,
- const wxPaneInfo& insert_location,
+ const wxAuiPaneInfo& insert_location,
int insert_level = wxAUI_INSERT_PANE);
bool DetachPane(wxWindow* window);
- void ClosePane(wxPaneInfo& pane_info);
- void MaximizePane(wxPaneInfo& pane_info);
- void RestorePane(wxPaneInfo& pane_info);
+ void ClosePane(wxAuiPaneInfo& pane_info);
+ void MaximizePane(wxAuiPaneInfo& pane_info);
+ void RestorePane(wxAuiPaneInfo& pane_info);
void RestoreMaximizedPane();
- wxString SavePaneInfo(wxPaneInfo& pane);
- void LoadPaneInfo(wxString pane_part, wxPaneInfo &pane);
+ wxString SavePaneInfo(wxAuiPaneInfo& pane);
+ void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane);
wxString SavePerspective();
public:
- virtual wxFloatingPane* CreateFloatingFrame(wxWindow* parent, const wxPaneInfo& p);
+ virtual wxAuiFloatingPane* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p);
void DrawHintRect(wxWindow* pane_window,
const wxPoint& pt,
void DoFrameLayout();
void LayoutAddPane(wxSizer* container,
- wxDockInfo& dock,
- wxPaneInfo& pane,
- wxDockUIPartArray& uiparts,
+ wxAuiDockInfo& dock,
+ wxAuiPaneInfo& pane,
+ wxAuiDockUIPartArray& uiparts,
bool spacer_only);
void LayoutAddDock(wxSizer* container,
- wxDockInfo& dock,
- wxDockUIPartArray& uiparts,
+ wxAuiDockInfo& dock,
+ wxAuiDockUIPartArray& uiparts,
bool spacer_only);
- wxSizer* LayoutAll(wxPaneInfoArray& panes,
- wxDockInfoArray& docks,
- wxDockUIPartArray& uiparts,
+ wxSizer* LayoutAll(wxAuiPaneInfoArray& panes,
+ wxAuiDockInfoArray& docks,
+ wxAuiDockUIPartArray& uiparts,
bool spacer_only = false);
- virtual bool ProcessDockResult(wxPaneInfo& target,
- const wxPaneInfo& new_pos);
+ virtual bool ProcessDockResult(wxAuiPaneInfo& target,
+ const wxAuiPaneInfo& new_pos);
- bool DoDrop(wxDockInfoArray& docks,
- wxPaneInfoArray& panes,
- wxPaneInfo& drop,
+ bool DoDrop(wxAuiDockInfoArray& docks,
+ wxAuiPaneInfoArray& panes,
+ wxAuiPaneInfo& drop,
const wxPoint& pt,
const wxPoint& action_offset = wxPoint(0,0));
- wxPaneInfo& LookupPane(wxWindow* window);
- wxPaneInfo& LookupPane(const wxString& name);
- wxDockUIPart* HitTest(int x, int y);
- wxDockUIPart* GetPanePart(wxWindow* pane);
- int GetDockPixelOffset(wxPaneInfo& test);
+ wxAuiPaneInfo& LookupPane(wxWindow* window);
+ wxAuiPaneInfo& LookupPane(const wxString& name);
+ wxAuiDockUIPart* HitTest(int x, int y);
+ wxAuiDockUIPart* GetPanePart(wxWindow* pane);
+ int GetDockPixelOffset(wxAuiPaneInfo& test);
void OnFloatingPaneMoveStart(wxWindow* window);
void OnFloatingPaneMoving(wxWindow* window, wxDirection dir );
void OnFloatingPaneMoved(wxWindow* window, wxDirection dir);
void OnFloatingPaneResized(wxWindow* window, const wxSize& size);
void Render(wxDC* dc);
void Repaint(wxDC* dc = NULL);
- void ProcessMgrEvent(wxFrameManagerEvent& event);
- void UpdateButtonOnScreen(wxDockUIPart* button_ui_part,
+ void ProcessMgrEvent(wxAuiManagerEvent& event);
+ void UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part,
const wxMouseEvent& event);
- void GetPanePositionsAndSizes(wxDockInfo& dock,
+ void GetPanePositionsAndSizes(wxAuiDockInfo& dock,
wxArrayInt& positions,
wxArrayInt& sizes);
public:
// public events (which can be invoked externally)
- void OnRender(wxFrameManagerEvent& evt);
- void OnPaneButton(wxFrameManagerEvent& evt);
+ void OnRender(wxAuiManagerEvent& evt);
+ void OnPaneButton(wxAuiManagerEvent& evt);
protected:
protected:
wxWindow* m_frame; // the window being managed
- wxDockArt* m_art; // dock art object which does all drawing
+ wxAuiDockArt* m_art; // dock art object which does all drawing
unsigned int m_flags; // manager flags wxAUI_MGR_*
- wxPaneInfoArray m_panes; // array of panes structures
- wxDockInfoArray m_docks; // array of docks structures
- wxDockUIPartArray m_uiparts; // array of UI parts (captions, buttons, etc)
+ wxAuiPaneInfoArray m_panes; // array of panes structures
+ wxAuiDockInfoArray m_docks; // array of docks structures
+ wxAuiDockUIPartArray m_uiparts; // array of UI parts (captions, buttons, etc)
int m_action; // current mouse action
wxPoint m_action_start; // position where the action click started
wxPoint m_action_offset; // offset from upper left of the item clicked
- wxDockUIPart* m_action_part; // ptr to the part the action happened to
+ wxAuiDockUIPart* m_action_part; // ptr to the part the action happened to
wxWindow* m_action_window; // action frame or window (NULL if none)
wxRect m_action_hintrect; // hint rectangle for the action
bool m_skipping;
bool m_has_maximized;
wxRect m_last_rect;
- wxDockUIPart* m_hover_button;// button uipart being hovered over
+ wxAuiDockUIPart* m_hover_button;// button uipart being hovered over
wxRect m_last_hint; // last hint rectangle
wxPoint m_last_mouse_move; // last mouse move position (see OnMotion)
// event declarations/classes
-class WXDLLIMPEXP_AUI wxFrameManagerEvent : public wxEvent
+class WXDLLIMPEXP_AUI wxAuiManagerEvent : public wxEvent
{
public:
- wxFrameManagerEvent(wxEventType type=wxEVT_NULL) : wxEvent(0, type)
+ wxAuiManagerEvent(wxEventType type=wxEVT_NULL) : wxEvent(0, type)
{
pane = NULL;
button = 0;
dc = NULL;
}
#ifndef SWIG
- wxFrameManagerEvent(const wxFrameManagerEvent& c) : wxEvent(c)
+ wxAuiManagerEvent(const wxAuiManagerEvent& c) : wxEvent(c)
{
pane = c.pane;
button = c.button;
dc = c.dc;
}
#endif
- wxEvent *Clone() const { return new wxFrameManagerEvent(*this); }
+ wxEvent *Clone() const { return new wxAuiManagerEvent(*this); }
- void SetPane(wxPaneInfo* p) { pane = p; }
+ void SetPane(wxAuiPaneInfo* p) { pane = p; }
void SetButton(int b) { button = b; }
void SetDC(wxDC* pdc) { dc = pdc; }
- wxPaneInfo* GetPane() { return pane; }
+ wxAuiPaneInfo* GetPane() { return pane; }
int GetButton() { return button; }
wxDC* GetDC() { return dc; }
bool CanVeto() const { return canveto_flag && veto_flag; }
public:
- wxPaneInfo* pane;
+ wxAuiPaneInfo* pane;
int button;
bool veto_flag;
bool canveto_flag;
#ifndef SWIG
private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFrameManagerEvent)
+ DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiManagerEvent)
#endif
};
-class WXDLLIMPEXP_AUI wxDockInfo
+class WXDLLIMPEXP_AUI wxAuiDockInfo
{
public:
- wxDockInfo()
+ wxAuiDockInfo()
{
dock_direction = 0;
dock_layer = 0;
}
#ifndef SWIG
- wxDockInfo(const wxDockInfo& c)
+ wxAuiDockInfo(const wxAuiDockInfo& c)
{
dock_direction = c.dock_direction;
dock_layer = c.dock_layer;
rect = c.rect;
}
- wxDockInfo& operator=(const wxDockInfo& c)
+ wxAuiDockInfo& operator=(const wxAuiDockInfo& c)
{
dock_direction = c.dock_direction;
dock_layer = c.dock_layer;
dock_direction == wxAUI_DOCK_RIGHT ||
dock_direction == wxAUI_DOCK_CENTER) ? true:false; }
public:
- wxPaneInfoPtrArray panes; // array of panes
+ 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)
};
-class WXDLLIMPEXP_AUI wxDockUIPart
+class WXDLLIMPEXP_AUI wxAuiDockUIPart
{
public:
enum
int type; // ui part type (see enum above)
int orientation; // orientation (either wxHORIZONTAL or wxVERTICAL)
- wxDockInfo* dock; // which dock the item is associated with
- wxPaneInfo* pane; // which pane the item is associated with
- wxPaneButton* button; // which pane button the item is associated with
+ wxAuiDockInfo* dock; // which dock the item is associated with
+ wxAuiPaneInfo* pane; // which pane the item is associated with
+ wxAuiPaneButton* button; // which pane button the item is associated with
wxSizer* cont_sizer; // the part's containing sizer
wxSizerItem* sizer_item; // the sizer item of the part
wxRect rect; // client coord rectangle of the part itself
};
-class WXDLLIMPEXP_AUI wxPaneButton
+class WXDLLIMPEXP_AUI wxAuiPaneButton
{
public:
int button_id; // id of the button (e.g. buttonClose)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, 0)
END_DECLARE_EVENT_TYPES()
-typedef void (wxEvtHandler::*wxFrameManagerEventFunction)(wxFrameManagerEvent&);
+typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
-#define wxFrameManagerEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFrameManagerEventFunction, &func)
+#define wxAuiManagerEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiManagerEventFunction, &func)
#define EVT_AUI_PANEBUTTON(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANEBUTTON, wxFrameManagerEventHandler(func))
+ wx__DECLARE_EVT0(wxEVT_AUI_PANEBUTTON, wxAuiManagerEventHandler(func))
#define EVT_AUI_PANECLOSE(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANECLOSE, wxFrameManagerEventHandler(func))
+ wx__DECLARE_EVT0(wxEVT_AUI_PANECLOSE, wxAuiManagerEventHandler(func))
#define EVT_AUI_PANEMAXIMIZE(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANEMAXIMIZE, wxFrameManagerEventHandler(func))
+ wx__DECLARE_EVT0(wxEVT_AUI_PANEMAXIMIZE, wxAuiManagerEventHandler(func))
#define EVT_AUI_PANERESTORE(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANERESTORE, wxFrameManagerEventHandler(func))
+ wx__DECLARE_EVT0(wxEVT_AUI_PANERESTORE, wxAuiManagerEventHandler(func))
#define EVT_AUI_RENDER(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxFrameManagerEventHandler(func))
+ wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func))
#else
// classes
//-----------------------------------------------------------------------------
-class WXDLLIMPEXP_AUI wxTabMDIParentFrame;
-class WXDLLIMPEXP_AUI wxTabMDIClientWindow;
-class WXDLLIMPEXP_AUI wxTabMDIChildFrame;
+class WXDLLIMPEXP_AUI wxAuiMDIParentFrame;
+class WXDLLIMPEXP_AUI wxAuiTabMDIClientWindow;
+class WXDLLIMPEXP_AUI wxAuiMDIChildFrame;
//-----------------------------------------------------------------------------
-// wxTabMDIParentFrame
+// wxAuiMDIParentFrame
//-----------------------------------------------------------------------------
-class WXDLLIMPEXP_AUI wxTabMDIParentFrame : public wxFrame
+class WXDLLIMPEXP_AUI wxAuiMDIParentFrame : public wxFrame
{
public:
- wxTabMDIParentFrame();
- wxTabMDIParentFrame(wxWindow *parent,
+ wxAuiMDIParentFrame();
+ wxAuiMDIParentFrame(wxWindow *parent,
wxWindowID winid,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxFrameNameStr);
- ~wxTabMDIParentFrame();
+ ~wxAuiMDIParentFrame();
bool Create(wxWindow *parent,
wxWindowID winid,
virtual void SetMenuBar(wxMenuBar *pMenuBar);
#endif // wxUSE_MENUS
- void SetChildMenuBar(wxTabMDIChildFrame *pChild);
+ void SetChildMenuBar(wxAuiMDIChildFrame *pChild);
virtual bool ProcessEvent(wxEvent& event);
- wxTabMDIChildFrame *GetActiveChild() const;
- inline void SetActiveChild(wxTabMDIChildFrame* pChildFrame);
+ wxAuiMDIChildFrame *GetActiveChild() const;
+ inline void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
- wxTabMDIClientWindow *GetClientWindow() const;
- virtual wxTabMDIClientWindow *OnCreateClient();
+ wxAuiTabMDIClientWindow *GetClientWindow() const;
+ virtual wxAuiTabMDIClientWindow *OnCreateClient();
virtual void Cascade() { /* Has no effect */ }
virtual void Tile(wxOrientation WXUNUSED(orient) = wxHORIZONTAL) { }
virtual void ActivatePrevious();
protected:
- wxTabMDIClientWindow *m_pClientWindow;
- wxTabMDIChildFrame *m_pActiveChild;
+ wxAuiTabMDIClientWindow *m_pClientWindow;
+ wxAuiMDIChildFrame *m_pActiveChild;
#if wxUSE_MENUS
wxMenu *m_pWindowMenu;
private:
DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS(wxTabMDIParentFrame)
+ DECLARE_DYNAMIC_CLASS(wxAuiMDIParentFrame)
};
//-----------------------------------------------------------------------------
-// wxTabMDIChildFrame
+// wxAuiMDIChildFrame
//-----------------------------------------------------------------------------
-class WXDLLIMPEXP_AUI wxTabMDIChildFrame : public wxPanel
+class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxPanel
{
public:
- wxTabMDIChildFrame();
- wxTabMDIChildFrame(wxTabMDIParentFrame *parent,
+ wxAuiMDIChildFrame();
+ wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
wxWindowID winid,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
- virtual ~wxTabMDIChildFrame();
- bool Create(wxTabMDIParentFrame *parent,
+ virtual ~wxAuiMDIChildFrame();
+ bool Create(wxAuiMDIParentFrame *parent,
wxWindowID winid,
const wxString& title,
const wxPoint& pos = wxDefaultPosition,
void OnActivate(wxActivateEvent& evt);
void OnCloseWindow(wxCloseEvent& evt);
- void SetMDIParentFrame(wxTabMDIParentFrame* parent);
- wxTabMDIParentFrame* GetMDIParentFrame() const;
+ void SetMDIParentFrame(wxAuiMDIParentFrame* parent);
+ wxAuiMDIParentFrame* GetMDIParentFrame() const;
protected:
- wxTabMDIParentFrame *m_pMDIParentFrame;
+ wxAuiMDIParentFrame *m_pMDIParentFrame;
wxRect m_mdi_newrect;
wxRect m_mdi_currect;
wxString m_title;
void DoShow(bool show);
private:
- DECLARE_DYNAMIC_CLASS(wxTabMDIChildFrame)
+ DECLARE_DYNAMIC_CLASS(wxAuiMDIChildFrame)
DECLARE_EVENT_TABLE()
- friend class wxTabMDIClientWindow;
+ friend class wxAuiTabMDIClientWindow;
};
//-----------------------------------------------------------------------------
-// wxTabMDIClientWindow
+// wxAuiTabMDIClientWindow
//-----------------------------------------------------------------------------
-class WXDLLIMPEXP_AUI wxTabMDIClientWindow : public wxAuiMultiNotebook
+class WXDLLIMPEXP_AUI wxAuiTabMDIClientWindow : public wxAuiNotebook
{
public:
- wxTabMDIClientWindow();
- wxTabMDIClientWindow(wxTabMDIParentFrame *parent, long style = 0);
- ~wxTabMDIClientWindow();
+ wxAuiTabMDIClientWindow();
+ wxAuiTabMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0);
+ ~wxAuiTabMDIClientWindow();
- virtual bool CreateClient(wxTabMDIParentFrame *parent,
+ virtual bool CreateClient(wxAuiMDIParentFrame *parent,
long style = wxVSCROLL | wxHSCROLL);
virtual int SetSelection(size_t page);
void OnSize(wxSizeEvent& evt);
private:
- DECLARE_DYNAMIC_CLASS(wxTabMDIClientWindow)
+ DECLARE_DYNAMIC_CLASS(wxAuiTabMDIClientWindow)
DECLARE_EVENT_TABLE()
};
#endif // wxUSE_AUI
~MyFrame();
- wxDockArt* GetDockArt();
+ wxAuiDockArt* GetDockArt();
void DoUpdate();
private:
wxSizeReportCtrl* CreateSizeReportCtrl(int width = 80, int height = 80);
wxPoint GetStartPosition();
wxHtmlWindow* CreateHTMLCtrl(wxWindow* parent = NULL);
- wxAuiMultiNotebook* CreateNotebook();
+ wxAuiNotebook* CreateNotebook();
wxString GetIntroText();
void OnManagerFlag(wxCommandEvent& evt);
void OnUpdateUI(wxUpdateUIEvent& evt);
- void OnPaneClose(wxFrameManagerEvent& evt);
+ void OnPaneClose(wxAuiManagerEvent& evt);
private:
- wxFrameManager m_mgr;
+ wxAuiManager m_mgr;
wxArrayString m_perspectives;
wxMenu* m_perspectives_menu;
wxSizeReportCtrl(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- wxFrameManager* mgr = NULL)
+ wxAuiManager* mgr = NULL)
: wxControl(parent, id, pos, size, wxNO_BORDER)
{
m_mgr = mgr;
if (m_mgr)
{
- wxPaneInfo pi = m_mgr->GetPane(this);
+ wxAuiPaneInfo pi = m_mgr->GetPane(this);
s.Printf(wxT("Layer: %d"), pi.dock_layer);
dc.GetTextExtent(s, &w, &h);
}
private:
- wxFrameManager* m_mgr;
+ wxAuiManager* m_mgr;
DECLARE_EVENT_TABLE()
};
long style)
: wxFrame(parent, id, title, pos, size, style)
{
- // tell wxFrameManager to manage this frame
+ // tell wxAuiManager to manage this frame
m_mgr.SetManagedWindow(this);
// set frame icon
// min size for the frame itself isn't completely done.
- // see the end up wxFrameManager::Update() for the test
+ // see the end up wxAuiManager::Update() for the test
// code. For now, just hard code a frame minimum size
SetMinSize(wxSize(400,300));
tb5->Realize();
// add a bunch of panes
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test1")).Caption(wxT("Pane Caption")).
Top());
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test2")).Caption(wxT("Client Size Reporter")).
Bottom().Position(1).
PinButton(true).CloseButton(true).MaximizeButton(true));
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test3")).Caption(wxT("Client Size Reporter")).
Bottom().
PinButton(true).CloseButton(true).MaximizeButton(true));
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test4")).Caption(wxT("Pane Caption")).
Left());
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test5")).Caption(wxT("No Close Button")).
Right().CloseButton(false));
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test6")).Caption(wxT("Client Size Reporter")).
Right().Row(1).
PinButton(true).CloseButton(true).MaximizeButton(true));
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test7")).Caption(wxT("Client Size Reporter")).
Left().Layer(1).
PinButton(true).CloseButton(true).MaximizeButton(true));
- m_mgr.AddPane(CreateTreeCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateTreeCtrl(), wxAuiPaneInfo().
Name(wxT("test8")).Caption(wxT("Tree Pane")).
Left().Layer(1).Position(1).
CloseButton(true).MaximizeButton(true));
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test9")).Caption(wxT("Min Size 200x100")).
BestSize(wxSize(200,100)).MinSize(wxSize(200,100)).
Bottom().Layer(1).
CloseButton(true).MaximizeButton(true));
wxWindow* wnd10 = CreateTextCtrl(wxT("This pane will prompt the user before hiding."));
- m_mgr.AddPane(wnd10, wxPaneInfo().
+ m_mgr.AddPane(wnd10, wxAuiPaneInfo().
Name(wxT("test10")).Caption(wxT("Text Pane with Hide Prompt")).
Bottom().Layer(1).Position(1));
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("test11")).Caption(wxT("Fixed Pane")).
Bottom().Layer(1).Position(2).Fixed());
- m_mgr.AddPane(new SettingsPanel(this,this), wxPaneInfo().
+ m_mgr.AddPane(new SettingsPanel(this,this), wxAuiPaneInfo().
Name(wxT("settings")).Caption(wxT("Dock Manager Settings")).
Dockable(false).Float().Hide());
// create some center panes
- m_mgr.AddPane(CreateGrid(), wxPaneInfo().Name(wxT("grid_content")).
+ m_mgr.AddPane(CreateGrid(), wxAuiPaneInfo().Name(wxT("grid_content")).
CenterPane().Hide());
- m_mgr.AddPane(CreateTreeCtrl(), wxPaneInfo().Name(wxT("tree_content")).
+ m_mgr.AddPane(CreateTreeCtrl(), wxAuiPaneInfo().Name(wxT("tree_content")).
CenterPane().Hide());
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().Name(wxT("sizereport_content")).
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().Name(wxT("sizereport_content")).
CenterPane().Hide());
- m_mgr.AddPane(CreateTextCtrl(), wxPaneInfo().Name(wxT("text_content")).
+ m_mgr.AddPane(CreateTextCtrl(), wxAuiPaneInfo().Name(wxT("text_content")).
CenterPane().Hide());
- m_mgr.AddPane(CreateHTMLCtrl(), wxPaneInfo().Name(wxT("html_content")).
+ m_mgr.AddPane(CreateHTMLCtrl(), wxAuiPaneInfo().Name(wxT("html_content")).
CenterPane());
- m_mgr.AddPane(CreateNotebook(), wxPaneInfo().Name(wxT("notebook_content")).
+ m_mgr.AddPane(CreateNotebook(), wxAuiPaneInfo().Name(wxT("notebook_content")).
CenterPane().PaneBorder(false));
// add the toolbars to the manager
- m_mgr.AddPane(tb1, wxPaneInfo().
+ m_mgr.AddPane(tb1, wxAuiPaneInfo().
Name(wxT("tb1")).Caption(wxT("Big Toolbar")).
ToolbarPane().Top().
LeftDockable(false).RightDockable(false));
- m_mgr.AddPane(tb2, wxPaneInfo().
+ m_mgr.AddPane(tb2, wxAuiPaneInfo().
Name(wxT("tb2")).Caption(wxT("Toolbar 2")).
ToolbarPane().Top().Row(1).
LeftDockable(false).RightDockable(false));
- m_mgr.AddPane(tb3, wxPaneInfo().
+ m_mgr.AddPane(tb3, wxAuiPaneInfo().
Name(wxT("tb3")).Caption(wxT("Toolbar 3")).
ToolbarPane().Top().Row(1).Position(1).
LeftDockable(false).RightDockable(false));
- m_mgr.AddPane(tb4, wxPaneInfo().
+ m_mgr.AddPane(tb4, wxAuiPaneInfo().
Name(wxT("tb4")).Caption(wxT("Sample Bookmark Toolbar")).
ToolbarPane().Top().Row(2).
LeftDockable(false).RightDockable(false));
- m_mgr.AddPane(tb5, wxPaneInfo().
+ m_mgr.AddPane(tb5, wxAuiPaneInfo().
Name(wxT("tb5")).Caption(wxT("Sample Vertical Toolbar")).
ToolbarPane().Left().
GripperTop().
TopDockable(false).BottomDockable(false));
m_mgr.AddPane(new wxButton(this, wxID_ANY, _("Test Button")),
- wxPaneInfo().Name(wxT("tb6")).
+ wxAuiPaneInfo().Name(wxT("tb6")).
ToolbarPane().Top().Row(2).Position(1).
LeftDockable(false).RightDockable(false));
wxString perspective_all = m_mgr.SavePerspective();
int i, count;
- wxPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+ wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
for (i = 0, count = all_panes.GetCount(); i < count; ++i)
if (!all_panes.Item(i).IsToolbar())
all_panes.Item(i).Hide();
m_perspectives.Add(perspective_default);
m_perspectives.Add(perspective_all);
- // "commit" all changes made to wxFrameManager
+ // "commit" all changes made to wxAuiManager
m_mgr.Update();
}
m_mgr.UnInit();
}
-wxDockArt* MyFrame::GetDockArt()
+wxAuiDockArt* MyFrame::GetDockArt()
{
return m_mgr.GetArtProvider();
}
void MyFrame::OnSettings(wxCommandEvent& WXUNUSED(event))
{
// show the settings pane, and float it
- wxPaneInfo& floating_pane = m_mgr.GetPane(wxT("settings")).Float().Show();
+ wxAuiPaneInfo& floating_pane = m_mgr.GetPane(wxT("settings")).Float().Show();
if (floating_pane.floating_pos == wxDefaultPosition)
floating_pane.FloatingPosition(GetStartPosition());
}
}
-void MyFrame::OnPaneClose(wxFrameManagerEvent& evt)
+void MyFrame::OnPaneClose(wxAuiManagerEvent& evt)
{
if (evt.pane->name == wxT("test10"))
{
void MyFrame::OnCreateTree(wxCommandEvent& WXUNUSED(event))
{
- m_mgr.AddPane(CreateTreeCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateTreeCtrl(), wxAuiPaneInfo().
Name(wxT("Test")).Caption(wxT("Tree Control")).
Float().FloatingPosition(GetStartPosition()).
FloatingSize(wxSize(150,300)));
void MyFrame::OnCreateGrid(wxCommandEvent& WXUNUSED(event))
{
- m_mgr.AddPane(CreateGrid(), wxPaneInfo().
+ m_mgr.AddPane(CreateGrid(), wxAuiPaneInfo().
Name(wxT("Test")).Caption(wxT("Grid")).
Float().FloatingPosition(GetStartPosition()).
FloatingSize(wxSize(300,200)));
void MyFrame::OnCreateHTML(wxCommandEvent& WXUNUSED(event))
{
- m_mgr.AddPane(CreateHTMLCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateHTMLCtrl(), wxAuiPaneInfo().
Name(wxT("Test")).Caption(wxT("HTML Control")).
Float().FloatingPosition(GetStartPosition()).
FloatingSize(wxSize(300,200)));
void MyFrame::OnCreateNotebook(wxCommandEvent& WXUNUSED(event))
{
- m_mgr.AddPane(CreateNotebook(), wxPaneInfo().
+ m_mgr.AddPane(CreateNotebook(), wxAuiPaneInfo().
Name(wxT("Test")).Caption(wxT("Notebook")).
Float().FloatingPosition(GetStartPosition()).
FloatingSize(wxSize(300,200)));
void MyFrame::OnCreateText(wxCommandEvent& WXUNUSED(event))
{
- m_mgr.AddPane(CreateTextCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateTextCtrl(), wxAuiPaneInfo().
Name(wxT("Test")).Caption(wxT("Text Control")).
Float().FloatingPosition(GetStartPosition()));
m_mgr.Update();
void MyFrame::OnCreateSizeReport(wxCommandEvent& WXUNUSED(event))
{
- m_mgr.AddPane(CreateSizeReportCtrl(), wxPaneInfo().
+ m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
Name(wxT("Test")).Caption(wxT("Client Size Reporter")).
Float().FloatingPosition(GetStartPosition()).
PinButton(true).CloseButton(true).MaximizeButton(true));
return ctrl;
}
-wxAuiMultiNotebook* MyFrame::CreateNotebook()
+wxAuiNotebook* MyFrame::CreateNotebook()
{
- wxAuiMultiNotebook* ctrl = new wxAuiMultiNotebook( this, wxID_ANY,
+ wxAuiNotebook* ctrl = new wxAuiNotebook( this, wxID_ANY,
wxDefaultPosition, wxSize(400,300),
wxAUI_NB_DEFAULT_STYLE | wxNO_BORDER );
-// -- wxDefaultTabArt class implementation --
+// -- wxAuiDefaultTabArt class implementation --
-wxDefaultTabArt::wxDefaultTabArt()
+wxAuiDefaultTabArt::wxAuiDefaultTabArt()
{
m_normal_font = *wxNORMAL_FONT;
m_selected_font = *wxNORMAL_FONT;
m_disabled_right_bmp = BitmapFromBits(right_bits, 16, 16, wxColour(128,128,128));
}
-wxDefaultTabArt::~wxDefaultTabArt()
+wxAuiDefaultTabArt::~wxAuiDefaultTabArt()
{
}
-void wxDefaultTabArt::DrawBackground(wxDC* dc,
+void wxAuiDefaultTabArt::DrawBackground(wxDC* dc,
const wxRect& rect)
{
// draw background
// out_rect - actual output rectangle
// x_extent - the advance x; where the next tab should start
-void wxDefaultTabArt::DrawTab(wxDC* dc,
+void wxAuiDefaultTabArt::DrawTab(wxDC* dc,
const wxRect& in_rect,
const wxString& caption_text,
bool active,
}
-wxSize wxDefaultTabArt::GetTabSize(wxDC* dc,
+wxSize wxAuiDefaultTabArt::GetTabSize(wxDC* dc,
const wxString& caption,
bool WXUNUSED(active),
bool with_close_button,
}
-void wxDefaultTabArt::DrawButton(
+void wxAuiDefaultTabArt::DrawButton(
wxDC* dc,
const wxRect& in_rect,
int bitmap_id,
-int wxDefaultTabArt::GetBestTabCtrlSize(wxWindow* wnd)
+int wxAuiDefaultTabArt::GetBestTabCtrlSize(wxWindow* wnd)
{
wxClientDC dc(wnd);
dc.SetFont(m_measuring_font);
return s.y+3;
}
-void wxDefaultTabArt::SetNormalFont(const wxFont& font)
+void wxAuiDefaultTabArt::SetNormalFont(const wxFont& font)
{
m_normal_font = font;
}
-void wxDefaultTabArt::SetSelectedFont(const wxFont& font)
+void wxAuiDefaultTabArt::SetSelectedFont(const wxFont& font)
{
m_selected_font = font;
}
-void wxDefaultTabArt::SetMeasuringFont(const wxFont& font)
+void wxAuiDefaultTabArt::SetMeasuringFont(const wxFont& font)
{
m_measuring_font = font;
}
{
m_tab_offset = 0;
m_flags = 0;
- m_art = new wxDefaultTabArt;
+ m_art = new wxAuiDefaultTabArt;
AddButton(wxAUI_BUTTON_LEFT, wxLEFT);
AddButton(wxAUI_BUTTON_RIGHT, wxRIGHT);
delete m_art;
}
-void wxAuiTabContainer::SetArtProvider(wxTabArt* art)
+void wxAuiTabContainer::SetArtProvider(wxAuiTabArt* art)
{
delete m_art;
m_art = art;
}
-wxTabArt* wxAuiTabContainer::GetArtProvider()
+wxAuiTabArt* wxAuiTabContainer::GetArtProvider()
{
return m_art;
}
// the utility function ShowWnd() is the same as show,
-// except it handles wxTabMDIChildFrame windows as well,
+// except it handles wxAuiMDIChildFrame windows as well,
// as the Show() method on this class is "unplugged"
static void ShowWnd(wxWindow* wnd, bool show)
{
- if (wnd->IsKindOf(CLASSINFO(wxTabMDIChildFrame)))
+ if (wnd->IsKindOf(CLASSINFO(wxAuiMDIChildFrame)))
{
- wxTabMDIChildFrame* cf = (wxTabMDIChildFrame*)wnd;
+ wxAuiMDIChildFrame* cf = (wxAuiMDIChildFrame*)wnd;
cf->DoShow(show);
}
else
wxAuiNotebookPage& page = pages.Item(i);
page.window->SetSize(m_rect.x, m_rect.y+tab_height, m_rect.width, m_rect.height-tab_height);
- if (page.window->IsKindOf(CLASSINFO(wxTabMDIChildFrame)))
+ if (page.window->IsKindOf(CLASSINFO(wxAuiMDIChildFrame)))
{
- wxTabMDIChildFrame* wnd = (wxTabMDIChildFrame*)page.window;
+ wxAuiMDIChildFrame* wnd = (wxAuiMDIChildFrame*)page.window;
wnd->ApplyMDIChildFrameRect();
}
}
-// -- wxAuiMultiNotebook class implementation --
+// -- wxAuiNotebook class implementation --
-BEGIN_EVENT_TABLE(wxAuiMultiNotebook, wxControl)
- //EVT_ERASE_BACKGROUND(wxAuiMultiNotebook::OnEraseBackground)
- //EVT_SIZE(wxAuiMultiNotebook::OnSize)
- //EVT_LEFT_DOWN(wxAuiMultiNotebook::OnLeftDown)
- EVT_CHILD_FOCUS(wxAuiMultiNotebook::OnChildFocus)
+BEGIN_EVENT_TABLE(wxAuiNotebook, wxControl)
+ //EVT_ERASE_BACKGROUND(wxAuiNotebook::OnEraseBackground)
+ //EVT_SIZE(wxAuiNotebook::OnSize)
+ //EVT_LEFT_DOWN(wxAuiNotebook::OnLeftDown)
+ EVT_CHILD_FOCUS(wxAuiNotebook::OnChildFocus)
EVT_COMMAND_RANGE(10000, 10100,
wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING,
- wxAuiMultiNotebook::OnTabClicked)
+ wxAuiNotebook::OnTabClicked)
EVT_COMMAND_RANGE(10000, 10100,
wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG,
- wxAuiMultiNotebook::OnTabBeginDrag)
+ wxAuiNotebook::OnTabBeginDrag)
EVT_COMMAND_RANGE(10000, 10100,
wxEVT_COMMAND_AUINOTEBOOK_END_DRAG,
- wxAuiMultiNotebook::OnTabEndDrag)
+ wxAuiNotebook::OnTabEndDrag)
EVT_COMMAND_RANGE(10000, 10100,
wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION,
- wxAuiMultiNotebook::OnTabDragMotion)
+ wxAuiNotebook::OnTabDragMotion)
EVT_COMMAND_RANGE(10000, 10100,
wxEVT_COMMAND_AUINOTEBOOK_BUTTON,
- wxAuiMultiNotebook::OnTabButton)
+ wxAuiNotebook::OnTabButton)
END_EVENT_TABLE()
-wxAuiMultiNotebook::wxAuiMultiNotebook()
+wxAuiNotebook::wxAuiNotebook()
{
m_curpage = -1;
m_tab_id_counter = 10000;
m_tab_ctrl_height = 20;
}
-wxAuiMultiNotebook::wxAuiMultiNotebook(wxWindow *parent,
+wxAuiNotebook::wxAuiNotebook(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
InitNotebook(style);
}
-bool wxAuiMultiNotebook::Create(wxWindow* parent,
+bool wxAuiNotebook::Create(wxWindow* parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
// InitNotebook() contains common initialization
// code called by all constructors
-void wxAuiMultiNotebook::InitNotebook(long style)
+void wxAuiNotebook::InitNotebook(long style)
{
m_curpage = -1;
m_tab_id_counter = 10000;
m_mgr.SetManagedWindow(this);
m_mgr.AddPane(m_dummy_wnd,
- wxPaneInfo().Name(wxT("dummy")).Bottom().Show(false));
+ wxAuiPaneInfo().Name(wxT("dummy")).Bottom().Show(false));
m_mgr.Update();
}
-wxAuiMultiNotebook::~wxAuiMultiNotebook()
+wxAuiNotebook::~wxAuiNotebook()
{
m_mgr.UnInit();
}
-void wxAuiMultiNotebook::SetArtProvider(wxTabArt* art)
+void wxAuiNotebook::SetArtProvider(wxAuiTabArt* art)
{
m_tabs.SetArtProvider(art);
}
-wxTabArt* wxAuiMultiNotebook::GetArtProvider()
+wxAuiTabArt* wxAuiNotebook::GetArtProvider()
{
return m_tabs.GetArtProvider();
}
-bool wxAuiMultiNotebook::AddPage(wxWindow* page,
+bool wxAuiNotebook::AddPage(wxWindow* page,
const wxString& caption,
bool select,
const wxBitmap& bitmap)
return InsertPage(GetPageCount(), page, caption, select, bitmap);
}
-bool wxAuiMultiNotebook::InsertPage(size_t page_idx,
+bool wxAuiNotebook::InsertPage(size_t page_idx,
wxWindow* page,
const wxString& caption,
bool select,
if (select)
{
int idx = m_tabs.GetIdxFromWindow(page);
- wxASSERT_MSG(idx != -1, wxT("Invalid Page index returned on wxAuiMultiNotebook::InsertPage()"));
+ wxASSERT_MSG(idx != -1, wxT("Invalid Page index returned on wxAuiNotebook::InsertPage()"));
SetSelection(idx);
}
// DeletePage() removes a tab from the multi-notebook,
// and destroys the window as well
-bool wxAuiMultiNotebook::DeletePage(size_t page_idx)
+bool wxAuiNotebook::DeletePage(size_t page_idx)
{
wxWindow* wnd = m_tabs.GetWindowFromIdx(page_idx);
wxWindow* new_active = NULL;
ctrl->RemovePage(wnd);
// actually destroy the window now
- if (wnd->IsKindOf(CLASSINFO(wxTabMDIChildFrame)))
+ if (wnd->IsKindOf(CLASSINFO(wxAuiMDIChildFrame)))
{
// delete the child frame with pending delete, as is
// customary with frame windows
// RemovePage() removes a tab from the multi-notebook,
// but does not destroy the window
-bool wxAuiMultiNotebook::RemovePage(size_t page_idx)
+bool wxAuiNotebook::RemovePage(size_t page_idx)
{
// remove the tab from our own catalog
wxWindow* wnd = m_tabs.GetWindowFromIdx(page_idx);
}
// SetPageText() changes the tab caption of the specified page
-bool wxAuiMultiNotebook::SetPageText(size_t page_idx, const wxString& text)
+bool wxAuiNotebook::SetPageText(size_t page_idx, const wxString& text)
{
if (page_idx >= m_tabs.GetPageCount())
return false;
}
// GetSelection() returns the index of the currently active page
-int wxAuiMultiNotebook::GetSelection() const
+int wxAuiNotebook::GetSelection() const
{
return m_curpage;
}
// SetSelection() sets the currently active page
-size_t wxAuiMultiNotebook::SetSelection(size_t new_page)
+size_t wxAuiNotebook::SetSelection(size_t new_page)
{
wxWindow* wnd = m_tabs.GetWindowFromIdx(new_page);
if (!wnd)
// set fonts
- wxPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+ wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
size_t i, pane_count = all_panes.GetCount();
for (i = 0; i < pane_count; ++i)
{
- wxPaneInfo& pane = all_panes.Item(i);
+ wxAuiPaneInfo& pane = all_panes.Item(i);
if (pane.name == wxT("dummy"))
continue;
wxAuiTabCtrl* tabctrl = ((wxTabFrame*)pane.window)->m_tabs;
// GetPageCount() returns the total number of
// pages managed by the multi-notebook
-size_t wxAuiMultiNotebook::GetPageCount() const
+size_t wxAuiNotebook::GetPageCount() const
{
return m_tabs.GetPageCount();
}
// GetPage() returns the wxWindow pointer of the
// specified page
-wxWindow* wxAuiMultiNotebook::GetPage(size_t page_idx) const
+wxWindow* wxAuiNotebook::GetPage(size_t page_idx) const
{
wxASSERT(page_idx < m_tabs.GetPageCount());
}
// DoSizing() performs all sizing operations in each tab control
-void wxAuiMultiNotebook::DoSizing()
+void wxAuiNotebook::DoSizing()
{
- wxPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+ wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
size_t i, pane_count = all_panes.GetCount();
for (i = 0; i < pane_count; ++i)
{
// GetActiveTabCtrl() returns the active tab control. It is
// called to determine which control gets new windows being added
-wxAuiTabCtrl* wxAuiMultiNotebook::GetActiveTabCtrl()
+wxAuiTabCtrl* wxAuiNotebook::GetActiveTabCtrl()
{
if (m_curpage >= 0 && m_curpage < (int)m_tabs.GetPageCount())
{
}
// no current page, just find the first tab ctrl
- wxPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+ wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
size_t i, pane_count = all_panes.GetCount();
for (i = 0; i < pane_count; ++i)
{
wxNO_BORDER);
tabframe->m_tabs->SetFlags(m_flags);
m_mgr.AddPane(tabframe,
- wxPaneInfo().Center().CaptionVisible(false));
+ wxAuiPaneInfo().Center().CaptionVisible(false));
m_mgr.Update();
// FindTab() finds the tab control that currently contains the window as well
// as the index of the window in the tab control. It returns true if the
// window was found, otherwise false.
-bool wxAuiMultiNotebook::FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx)
+bool wxAuiNotebook::FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx)
{
- wxPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+ wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
size_t i, pane_count = all_panes.GetCount();
for (i = 0; i < pane_count; ++i)
{
}
-void wxAuiMultiNotebook::OnEraseBackground(wxEraseEvent&)
+void wxAuiNotebook::OnEraseBackground(wxEraseEvent&)
{
}
-void wxAuiMultiNotebook::OnSize(wxSizeEvent&)
+void wxAuiNotebook::OnSize(wxSizeEvent&)
{
}
-void wxAuiMultiNotebook::OnTabClicked(wxCommandEvent& command_evt)
+void wxAuiNotebook::OnTabClicked(wxCommandEvent& command_evt)
{
wxAuiNotebookEvent& evt = (wxAuiNotebookEvent&)command_evt;
SetSelection(idx);
}
-void wxAuiMultiNotebook::OnTabBeginDrag(wxCommandEvent&)
+void wxAuiNotebook::OnTabBeginDrag(wxCommandEvent&)
{
m_last_drag_x = 0;
}
-void wxAuiMultiNotebook::OnTabDragMotion(wxCommandEvent& evt)
+void wxAuiNotebook::OnTabDragMotion(wxCommandEvent& evt)
{
wxPoint screen_pt = ::wxGetMousePosition();
wxPoint client_pt = ScreenToClient(screen_pt);
-void wxAuiMultiNotebook::OnTabEndDrag(wxCommandEvent& command_evt)
+void wxAuiNotebook::OnTabEndDrag(wxCommandEvent& command_evt)
{
wxAuiNotebookEvent& evt = (wxAuiNotebookEvent&)command_evt;
new_tabs->m_tabs->SetFlags(m_flags);
m_mgr.AddPane(new_tabs,
- wxPaneInfo().Bottom().CaptionVisible(false),
+ wxAuiPaneInfo().Bottom().CaptionVisible(false),
mouse_client_pt);
m_mgr.Update();
dest_tabs = new_tabs->m_tabs;
SetSelection(m_tabs.GetIdxFromWindow(page_info.window));
}
-wxAuiTabCtrl* wxAuiMultiNotebook::GetTabCtrlFromPoint(const wxPoint& pt)
+wxAuiTabCtrl* wxAuiNotebook::GetTabCtrlFromPoint(const wxPoint& pt)
{
// if we've just removed the last tab from the source
// tab set, the remove the tab control completely
- wxPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+ wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
size_t i, pane_count = all_panes.GetCount();
for (i = 0; i < pane_count; ++i)
{
return NULL;
}
-wxWindow* wxAuiMultiNotebook::GetTabFrameFromTabCtrl(wxWindow* tab_ctrl)
+wxWindow* wxAuiNotebook::GetTabFrameFromTabCtrl(wxWindow* tab_ctrl)
{
// if we've just removed the last tab from the source
// tab set, the remove the tab control completely
- wxPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+ wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
size_t i, pane_count = all_panes.GetCount();
for (i = 0; i < pane_count; ++i)
{
return NULL;
}
-void wxAuiMultiNotebook::RemoveEmptyTabFrames()
+void wxAuiNotebook::RemoveEmptyTabFrames()
{
// if we've just removed the last tab from the source
// tab set, the remove the tab control completely
- wxPaneInfoArray all_panes = m_mgr.GetAllPanes();
+ wxAuiPaneInfoArray all_panes = m_mgr.GetAllPanes();
size_t i, pane_count = all_panes.GetCount();
for (i = 0; i < pane_count; ++i)
{
// check to see if there is still a center pane;
// if there isn't, make a frame the center pane
- wxPaneInfoArray panes = m_mgr.GetAllPanes();
+ wxAuiPaneInfoArray panes = m_mgr.GetAllPanes();
pane_count = panes.GetCount();
wxWindow* first_good = NULL;
bool center_found = false;
m_mgr.Update();
}
-void wxAuiMultiNotebook::OnChildFocus(wxChildFocusEvent& evt)
+void wxAuiNotebook::OnChildFocus(wxChildFocusEvent& evt)
{
int idx = m_tabs.GetIdxFromWindow(evt.GetWindow());
if (idx != -1 && idx != m_curpage)
}
-void wxAuiMultiNotebook::OnTabButton(wxCommandEvent& command_evt)
+void wxAuiNotebook::OnTabButton(wxCommandEvent& command_evt)
{
wxAuiNotebookEvent& evt = (wxAuiNotebookEvent&)command_evt;
wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject();
{
wxWindow* close_wnd = tabs->GetWindowFromIdx(selection);
- if (close_wnd->IsKindOf(CLASSINFO(wxTabMDIChildFrame)))
+ if (close_wnd->IsKindOf(CLASSINFO(wxAuiMDIChildFrame)))
{
close_wnd->Close();
}
#endif
-// -- wxDefaultDockArt class implementation --
+// -- wxAuiDefaultDockArt class implementation --
-// wxDefaultDockArt is an art provider class which does all of the drawing for
-// wxFrameManager. This allows the library caller to customize the dock art
+// wxAuiDefaultDockArt is an art provider class which does all of the drawing for
+// wxAuiManager. This allows the library caller to customize the dock art
// (probably by deriving from this class), or to completely replace all drawing
// with custom dock art (probably by writing a new stand-alone class derived
-// from the wxDockArt base class). The active dock art class can be set via
-// wxFrameManager::SetDockArt()
+// from the wxAuiDockArt base class). The active dock art class can be set via
+// wxAuiManager::SetDockArt()
// StepColour() it a utility function that simply darkens
}
-wxDefaultDockArt::wxDefaultDockArt()
+wxAuiDefaultDockArt::wxAuiDefaultDockArt()
{
#ifdef __WXMAC__
wxBrush toolbarbrush;
m_gradient_type = wxAUI_GRADIENT_VERTICAL;
}
-int wxDefaultDockArt::GetMetric(int id)
+int wxAuiDefaultDockArt::GetMetric(int id)
{
switch (id)
{
return 0;
}
-void wxDefaultDockArt::SetMetric(int id, int new_val)
+void wxAuiDefaultDockArt::SetMetric(int id, int new_val)
{
switch (id)
{
}
}
-wxColour wxDefaultDockArt::GetColour(int id)
+wxColour wxAuiDefaultDockArt::GetColour(int id)
{
switch (id)
{
return wxColour();
}
-void wxDefaultDockArt::SetColour(int id, const wxColor& colour)
+void wxAuiDefaultDockArt::SetColour(int id, const wxColor& colour)
{
switch (id)
{
}
}
-void wxDefaultDockArt::SetFont(int id, const wxFont& font)
+void wxAuiDefaultDockArt::SetFont(int id, const wxFont& font)
{
if (id == wxAUI_ART_CAPTION_FONT)
m_caption_font = font;
}
-wxFont wxDefaultDockArt::GetFont(int id)
+wxFont wxAuiDefaultDockArt::GetFont(int id)
{
if (id == wxAUI_ART_CAPTION_FONT)
return m_caption_font;
return wxNullFont;
}
-void wxDefaultDockArt::DrawSash(wxDC& dc, wxWindow *window, int orientation, const wxRect& rect)
+void wxAuiDefaultDockArt::DrawSash(wxDC& dc, wxWindow *window, int orientation, const wxRect& rect)
{
#if defined(__WXMAC__)
HIRect splitterRect = CGRectMake( rect.x , rect.y , rect.width , rect.height );
}
-void wxDefaultDockArt::DrawBackground(wxDC& dc, wxWindow *WXUNUSED(window), int, const wxRect& rect)
+void wxAuiDefaultDockArt::DrawBackground(wxDC& dc, wxWindow *WXUNUSED(window), int, const wxRect& rect)
{
dc.SetPen(*wxTRANSPARENT_PEN);
#ifdef __WXMAC__
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
}
-void wxDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const wxRect& _rect,
- wxPaneInfo& pane)
+void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const wxRect& _rect,
+ wxAuiPaneInfo& pane)
{
dc.SetPen(m_border_pen);
dc.SetBrush(*wxTRANSPARENT_BRUSH);
}
-void wxDefaultDockArt::DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active)
+void wxAuiDefaultDockArt::DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active)
{
if (m_gradient_type == wxAUI_GRADIENT_NONE)
{
}
-void wxDefaultDockArt::DrawCaption(wxDC& dc, wxWindow *WXUNUSED(window),
+void wxAuiDefaultDockArt::DrawCaption(wxDC& dc, wxWindow *WXUNUSED(window),
const wxString& text,
const wxRect& rect,
- wxPaneInfo& pane)
+ wxAuiPaneInfo& pane)
{
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetFont(m_caption_font);
DrawCaptionBackground(dc, rect,
- (pane.state & wxPaneInfo::optionActive)?true:false);
+ (pane.state & wxAuiPaneInfo::optionActive)?true:false);
- if (pane.state & wxPaneInfo::optionActive)
+ if (pane.state & wxAuiPaneInfo::optionActive)
dc.SetTextForeground(m_active_caption_text_colour);
else
dc.SetTextForeground(m_inactive_caption_text_colour);
dc.DestroyClippingRegion();
}
-void wxDefaultDockArt::DrawGripper(wxDC& dc, wxWindow *WXUNUSED(window),
+void wxAuiDefaultDockArt::DrawGripper(wxDC& dc, wxWindow *WXUNUSED(window),
const wxRect& rect,
- wxPaneInfo& pane)
+ wxAuiPaneInfo& pane)
{
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(m_gripper_brush);
}
}
-void wxDefaultDockArt::DrawPaneButton(wxDC& dc, wxWindow *WXUNUSED(window),
+void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc, wxWindow *WXUNUSED(window),
int button,
int button_state,
const wxRect& _rect,
- wxPaneInfo& pane)
+ wxAuiPaneInfo& pane)
{
wxRect rect = _rect;
if (button_state == wxAUI_BUTTON_STATE_HOVER ||
button_state == wxAUI_BUTTON_STATE_PRESSED)
{
- if (pane.state & wxPaneInfo::optionActive)
+ if (pane.state & wxAuiPaneInfo::optionActive)
{
dc.SetBrush(wxBrush(StepColour(m_active_caption_colour, 120)));
dc.SetPen(wxPen(StepColour(m_active_caption_colour, 70)));
default:
case wxAUI_BUTTON_MAXIMIZE_RESTORE:
if (pane.IsMaximized()) {
- if (pane.state & wxPaneInfo::optionActive)
+ if (pane.state & wxAuiPaneInfo::optionActive)
bmp = m_active_restore_bitmap;
else
bmp = m_inactive_restore_bitmap;
} else {
- if (pane.state & wxPaneInfo::optionActive)
+ if (pane.state & wxAuiPaneInfo::optionActive)
bmp = m_active_maximize_bitmap;
else
bmp = m_inactive_maximize_bitmap;
}
break;
case wxAUI_BUTTON_CLOSE:
- if (pane.state & wxPaneInfo::optionActive)
+ if (pane.state & wxAuiPaneInfo::optionActive)
bmp = m_active_close_bitmap;
else
bmp = m_inactive_close_bitmap;
break;
case wxAUI_BUTTON_PIN:
- if (pane.state & wxPaneInfo::optionActive)
+ if (pane.state & wxAuiPaneInfo::optionActive)
bmp = m_active_pin_bitmap;
else
bmp = m_inactive_pin_bitmap;
#include "wx/msw/private.h"
#endif
-IMPLEMENT_CLASS( wxFloatingPane, wxFloatingPaneBaseClass )
+IMPLEMENT_CLASS( wxAuiFloatingPane, wxAuiFloatingPaneBaseClass )
-wxFloatingPane::wxFloatingPane(wxWindow* parent,
- wxFrameManager* owner_mgr,
- const wxPaneInfo& pane,
+wxAuiFloatingPane::wxAuiFloatingPane(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
*/)
- : wxFloatingPaneBaseClass(parent, id, wxEmptyString,
+ : wxAuiFloatingPaneBaseClass(parent, id, wxEmptyString,
pane.floating_pos, pane.floating_size,
style |
(pane.HasCloseButton()?wxCLOSE_BOX:0) |
SetExtraStyle(wxWS_EX_PROCESS_IDLE);
}
-wxFloatingPane::~wxFloatingPane()
+wxAuiFloatingPane::~wxAuiFloatingPane()
{
// if we do not do this, then we can crash...
if(m_owner_mgr && m_owner_mgr->m_action_window == this) {
m_mgr.UnInit();
}
-void wxFloatingPane::SetPaneWindow(const wxPaneInfo& pane)
+void wxAuiFloatingPane::SetPaneWindow(const wxAuiPaneInfo& pane)
{
m_pane_window = pane.window;
m_pane_window->Reparent(this);
- wxPaneInfo contained_pane = pane;
+ wxAuiPaneInfo contained_pane = pane;
contained_pane.Dock().Center().Show().
CaptionVisible(false).
PaneBorder(false).
}
}
-void wxFloatingPane::OnSize(wxSizeEvent& event)
+void wxAuiFloatingPane::OnSize(wxSizeEvent& event)
{
m_owner_mgr->OnFloatingPaneResized(m_pane_window, event.GetSize());
}
-void wxFloatingPane::OnClose(wxCloseEvent& evt)
+void wxAuiFloatingPane::OnClose(wxCloseEvent& evt)
{
m_owner_mgr->OnFloatingPaneClosed(m_pane_window, evt);
if (!evt.GetVeto())
Destroy();
}
-void wxFloatingPane::OnMoveEvent(wxMoveEvent& event)
+void wxAuiFloatingPane::OnMoveEvent(wxMoveEvent& event)
{
if (!m_solid_drag)
{
OnMoving(event.GetRect(), dir);
}
-void wxFloatingPane::OnIdle(wxIdleEvent& event)
+void wxAuiFloatingPane::OnIdle(wxIdleEvent& event)
{
if (m_moving)
{
}
}
-void wxFloatingPane::OnMoveStart()
+void wxAuiFloatingPane::OnMoveStart()
{
// notify the owner manager that the pane has started to move
m_owner_mgr->OnFloatingPaneMoveStart(m_pane_window);
}
-void wxFloatingPane::OnMoving(const wxRect& WXUNUSED(window_rect), wxDirection dir)
+void wxAuiFloatingPane::OnMoving(const wxRect& WXUNUSED(window_rect), wxDirection dir)
{
// notify the owner manager that the pane is moving
m_owner_mgr->OnFloatingPaneMoving(m_pane_window, dir);
m_lastDirection = dir;
}
-void wxFloatingPane::OnMoveFinished()
+void wxAuiFloatingPane::OnMoveFinished()
{
// notify the owner manager that the pane has finished moving
m_owner_mgr->OnFloatingPaneMoved(m_pane_window, m_lastDirection);
}
-void wxFloatingPane::OnActivate(wxActivateEvent& event)
+void wxAuiFloatingPane::OnActivate(wxActivateEvent& event)
{
if (event.GetActive())
{
// (independant of having a wxMouseEvent handy) - utimately a better
// mechanism for this should be found (possibly by adding the
// functionality to wxWidgets itself)
-bool wxFloatingPane::isMouseDown()
+bool wxAuiFloatingPane::isMouseDown()
{
return wxGetMouseState().LeftDown();
}
-BEGIN_EVENT_TABLE(wxFloatingPane, wxFloatingPaneBaseClass)
- EVT_SIZE(wxFloatingPane::OnSize)
- EVT_MOVE(wxFloatingPane::OnMoveEvent)
- EVT_MOVING(wxFloatingPane::OnMoveEvent)
- EVT_CLOSE(wxFloatingPane::OnClose)
- EVT_IDLE(wxFloatingPane::OnIdle)
- EVT_ACTIVATE(wxFloatingPane::OnActivate)
+BEGIN_EVENT_TABLE(wxAuiFloatingPane, wxAuiFloatingPaneBaseClass)
+ EVT_SIZE(wxAuiFloatingPane::OnSize)
+ EVT_MOVE(wxAuiFloatingPane::OnMoveEvent)
+ EVT_MOVING(wxAuiFloatingPane::OnMoveEvent)
+ EVT_CLOSE(wxAuiFloatingPane::OnClose)
+ EVT_IDLE(wxAuiFloatingPane::OnIdle)
+ EVT_ACTIVATE(wxAuiFloatingPane::OnActivate)
END_EVENT_TABLE()
#include "wx/arrimpl.cpp"
WX_DECLARE_OBJARRAY(wxRect, wxAuiRectArray);
WX_DEFINE_OBJARRAY(wxAuiRectArray)
-WX_DEFINE_OBJARRAY(wxDockUIPartArray)
-WX_DEFINE_OBJARRAY(wxDockInfoArray)
-WX_DEFINE_OBJARRAY(wxPaneButtonArray)
-WX_DEFINE_OBJARRAY(wxPaneInfoArray)
+WX_DEFINE_OBJARRAY(wxAuiDockUIPartArray)
+WX_DEFINE_OBJARRAY(wxAuiDockInfoArray)
+WX_DEFINE_OBJARRAY(wxAuiPaneButtonArray)
+WX_DEFINE_OBJARRAY(wxAuiPaneInfoArray)
-wxPaneInfo wxNullPaneInfo;
-wxDockInfo wxNullDockInfo;
+wxAuiPaneInfo wxAuiNullPaneInfo;
+wxAuiDockInfo wxAuiNullDockInfo;
DEFINE_EVENT_TYPE(wxEVT_AUI_PANEBUTTON)
DEFINE_EVENT_TYPE(wxEVT_AUI_PANECLOSE)
DEFINE_EVENT_TYPE(wxEVT_AUI_PANEMAXIMIZE)
#include "wx/mac/private.h"
#endif
-IMPLEMENT_DYNAMIC_CLASS(wxFrameManagerEvent, wxEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxAuiManagerEvent, wxEvent)
class wxPseudoTransparentFrame : public wxFrame
{
// CopyDocksAndPanes() - this utility function creates copies of
-// the dock and pane info. wxDockInfo's usually contain pointers
-// to wxPaneInfo classes, thus this function is necessary to reliably
+// the dock and pane info. wxAuiDockInfo's usually contain pointers
+// to wxAuiPaneInfo classes, thus this function is necessary to reliably
// reconstruct that relationship in the new dock info and pane info arrays
-static void CopyDocksAndPanes(wxDockInfoArray& dest_docks,
- wxPaneInfoArray& dest_panes,
- const wxDockInfoArray& src_docks,
- const wxPaneInfoArray& src_panes)
+static void CopyDocksAndPanes(wxAuiDockInfoArray& dest_docks,
+ wxAuiPaneInfoArray& dest_panes,
+ const wxAuiDockInfoArray& src_docks,
+ const wxAuiPaneInfoArray& src_panes)
{
dest_docks = src_docks;
dest_panes = src_panes;
int i, j, k, dock_count, pc1, pc2;
for (i = 0, dock_count = dest_docks.GetCount(); i < dock_count; ++i)
{
- wxDockInfo& dock = dest_docks.Item(i);
+ wxAuiDockInfo& dock = dest_docks.Item(i);
for (j = 0, pc1 = dock.panes.GetCount(); j < pc1; ++j)
for (k = 0, pc2 = src_panes.GetCount(); k < pc2; ++k)
if (dock.panes.Item(j) == &src_panes.Item(k))
// GetMaxLayer() is an internal function which returns
// the highest layer inside the specified dock
-static int GetMaxLayer(const wxDockInfoArray& docks, int dock_direction)
+static int GetMaxLayer(const wxAuiDockInfoArray& docks, int dock_direction)
{
int i, dock_count, max_layer = 0;
for (i = 0, dock_count = docks.GetCount(); i < dock_count; ++i)
{
- wxDockInfo& dock = docks.Item(i);
+ wxAuiDockInfo& dock = docks.Item(i);
if (dock.dock_direction == dock_direction &&
dock.dock_layer > max_layer && !dock.fixed)
max_layer = dock.dock_layer;
// GetMaxRow() is an internal function which returns
// the highest layer inside the specified dock
-static int GetMaxRow(const wxPaneInfoArray& panes, int direction, int layer)
+static int GetMaxRow(const wxAuiPaneInfoArray& panes, int direction, int layer)
{
int i, pane_count, max_row = 0;
for (i = 0, pane_count = panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& pane = panes.Item(i);
+ wxAuiPaneInfo& pane = panes.Item(i);
if (pane.dock_direction == direction &&
pane.dock_layer == layer &&
pane.dock_row > max_row)
// DoInsertDockLayer() is an internal function that inserts a new dock
// layer by incrementing all existing dock layer values by one
-static void DoInsertDockLayer(wxPaneInfoArray& panes,
+static void DoInsertDockLayer(wxAuiPaneInfoArray& panes,
int dock_direction,
int dock_layer)
{
int i, pane_count;
for (i = 0, pane_count = panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& pane = panes.Item(i);
+ wxAuiPaneInfo& pane = panes.Item(i);
if (!pane.IsFloating() &&
pane.dock_direction == dock_direction &&
pane.dock_layer >= dock_layer)
// DoInsertDockLayer() is an internal function that inserts a new dock
// row by incrementing all existing dock row values by one
-static void DoInsertDockRow(wxPaneInfoArray& panes,
+static void DoInsertDockRow(wxAuiPaneInfoArray& panes,
int dock_direction,
int dock_layer,
int dock_row)
int i, pane_count;
for (i = 0, pane_count = panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& pane = panes.Item(i);
+ wxAuiPaneInfo& pane = panes.Item(i);
if (!pane.IsFloating() &&
pane.dock_direction == dock_direction &&
pane.dock_layer == dock_layer &&
// DoInsertDockLayer() is an internal function that inserts a space for
// another dock pane by incrementing all existing dock row values by one
-static void DoInsertPane(wxPaneInfoArray& panes,
+static void DoInsertPane(wxAuiPaneInfoArray& panes,
int dock_direction,
int dock_layer,
int dock_row,
int i, pane_count;
for (i = 0, pane_count = panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& pane = panes.Item(i);
+ wxAuiPaneInfo& pane = panes.Item(i);
if (!pane.IsFloating() &&
pane.dock_direction == dock_direction &&
pane.dock_layer == dock_layer &&
// FindDocks() is an internal function that returns a list of docks which meet
// the specified conditions in the parameters and returns a sorted array
// (sorted by layer and then row)
-static void FindDocks(wxDockInfoArray& docks,
+static void FindDocks(wxAuiDockInfoArray& docks,
int dock_direction,
int dock_layer,
int dock_row,
- wxDockInfoPtrArray& arr)
+ wxAuiDockInfoPtrArray& arr)
{
int begin_layer = dock_layer;
int end_layer = dock_layer;
for (row = begin_row; row <= end_row; ++row)
for (i = 0; i < dock_count; ++i)
{
- wxDockInfo& d = docks.Item(i);
+ wxAuiDockInfo& d = docks.Item(i);
if (dock_direction == -1 || dock_direction == d.dock_direction)
{
if (d.dock_layer == layer && d.dock_row == row)
}
// FindPaneInDock() looks up a specified window pointer inside a dock.
-// If found, the corresponding wxPaneInfo pointer is returned, otherwise NULL.
-static wxPaneInfo* FindPaneInDock(const wxDockInfo& dock, wxWindow* window)
+// If found, the corresponding wxAuiPaneInfo pointer is returned, otherwise NULL.
+static wxAuiPaneInfo* FindPaneInDock(const wxAuiDockInfo& dock, wxWindow* window)
{
int i, count = dock.panes.GetCount();
for (i = 0; i < count; ++i)
{
- wxPaneInfo* p = dock.panes.Item(i);
+ wxAuiPaneInfo* p = dock.panes.Item(i);
if (p->window == window)
return p;
}
// RemovePaneFromDocks() removes a pane window from all docks
// with a possible exception specified by parameter "ex_cept"
-static void RemovePaneFromDocks(wxDockInfoArray& docks,
- wxPaneInfo& pane,
- wxDockInfo* ex_cept = NULL )
+static void RemovePaneFromDocks(wxAuiDockInfoArray& docks,
+ wxAuiPaneInfo& pane,
+ wxAuiDockInfo* ex_cept = NULL )
{
int i, dock_count;
for (i = 0, dock_count = docks.GetCount(); i < dock_count; ++i)
{
- wxDockInfo& d = docks.Item(i);
+ wxAuiDockInfo& d = docks.Item(i);
if (&d == ex_cept)
continue;
- wxPaneInfo* pi = FindPaneInDock(d, pane.window);
+ wxAuiPaneInfo* pi = FindPaneInDock(d, pane.window);
if (pi)
d.panes.Remove(pi);
}
// RenumberDockRows() takes a dock and assigns sequential numbers
// to existing rows. Basically it takes out the gaps; so if a
// dock has rows with numbers 0,2,5, they will become 0,1,2
-static void RenumberDockRows(wxDockInfoPtrArray& docks)
+static void RenumberDockRows(wxAuiDockInfoPtrArray& docks)
{
int i, dock_count, j, pane_count;
for (i = 0, dock_count = docks.GetCount(); i < dock_count; ++i)
{
- wxDockInfo& dock = *docks.Item(i);
+ wxAuiDockInfo& dock = *docks.Item(i);
dock.dock_row = i;
for (j = 0, pane_count = dock.panes.GetCount(); j < pane_count; ++j)
dock.panes.Item(j)->dock_row = i;
// SetActivePane() sets the active pane, as well as cycles through
// every other pane and makes sure that all others' active flags
// are turned off
-static void SetActivePane(wxPaneInfoArray& panes, wxWindow* active_pane)
+static void SetActivePane(wxAuiPaneInfoArray& panes, wxWindow* active_pane)
{
int i, pane_count;
for (i = 0, pane_count = panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& pane = panes.Item(i);
- pane.state &= ~wxPaneInfo::optionActive;
+ wxAuiPaneInfo& pane = panes.Item(i);
+ pane.state &= ~wxAuiPaneInfo::optionActive;
if (pane.window == active_pane)
- pane.state |= wxPaneInfo::optionActive;
+ pane.state |= wxAuiPaneInfo::optionActive;
}
}
// this function is used to sort panes by dock position
-static int PaneSortFunc(wxPaneInfo** p1, wxPaneInfo** p2)
+static int PaneSortFunc(wxAuiPaneInfo** p1, wxAuiPaneInfo** p2)
{
return ((*p1)->dock_pos < (*p2)->dock_pos) ? -1 : 1;
}
-// -- wxFrameManager class implementation --
+// -- wxAuiManager class implementation --
-BEGIN_EVENT_TABLE(wxFrameManager, wxEvtHandler)
- EVT_AUI_PANEBUTTON(wxFrameManager::OnPaneButton)
- EVT_AUI_RENDER(wxFrameManager::OnRender)
- EVT_PAINT(wxFrameManager::OnPaint)
- EVT_ERASE_BACKGROUND(wxFrameManager::OnEraseBackground)
- EVT_SIZE(wxFrameManager::OnSize)
- EVT_SET_CURSOR(wxFrameManager::OnSetCursor)
- EVT_LEFT_DOWN(wxFrameManager::OnLeftDown)
- EVT_LEFT_UP(wxFrameManager::OnLeftUp)
- EVT_MOTION(wxFrameManager::OnMotion)
- EVT_LEAVE_WINDOW(wxFrameManager::OnLeaveWindow)
- EVT_CHILD_FOCUS(wxFrameManager::OnChildFocus)
- EVT_TIMER(101, wxFrameManager::OnHintFadeTimer)
+BEGIN_EVENT_TABLE(wxAuiManager, wxEvtHandler)
+ EVT_AUI_PANEBUTTON(wxAuiManager::OnPaneButton)
+ EVT_AUI_RENDER(wxAuiManager::OnRender)
+ EVT_PAINT(wxAuiManager::OnPaint)
+ EVT_ERASE_BACKGROUND(wxAuiManager::OnEraseBackground)
+ EVT_SIZE(wxAuiManager::OnSize)
+ EVT_SET_CURSOR(wxAuiManager::OnSetCursor)
+ EVT_LEFT_DOWN(wxAuiManager::OnLeftDown)
+ EVT_LEFT_UP(wxAuiManager::OnLeftUp)
+ EVT_MOTION(wxAuiManager::OnMotion)
+ EVT_LEAVE_WINDOW(wxAuiManager::OnLeaveWindow)
+ EVT_CHILD_FOCUS(wxAuiManager::OnChildFocus)
+ EVT_TIMER(101, wxAuiManager::OnHintFadeTimer)
END_EVENT_TABLE()
-wxFrameManager::wxFrameManager(wxWindow* managed_wnd, unsigned int flags)
+wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags)
{
m_action = actionNone;
m_last_mouse_move = wxPoint();
m_hover_button = NULL;
- m_art = new wxDefaultDockArt;
+ m_art = new wxAuiDefaultDockArt;
m_hint_wnd = NULL;
m_flags = flags;
m_skipping = false;
}
}
-wxFrameManager::~wxFrameManager()
+wxAuiManager::~wxAuiManager()
{
delete m_art;
}
// Creates a floating frame for the windows
-wxFloatingPane * wxFrameManager::CreateFloatingFrame(wxWindow* parent, const wxPaneInfo& p)
+wxAuiFloatingPane * wxAuiManager::CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p)
{
- return new wxFloatingPane(parent, this, p);
+ return new wxAuiFloatingPane(parent, this, p);
}
-// GetPane() looks up a wxPaneInfo structure based
+// GetPane() looks up a wxAuiPaneInfo structure based
// on the supplied window pointer. Upon failure, GetPane()
-// returns an empty wxPaneInfo, a condition which can be checked
-// by calling wxPaneInfo::IsOk().
+// returns an empty wxAuiPaneInfo, a condition which can be checked
+// by calling wxAuiPaneInfo::IsOk().
//
// The pane info's structure may then be modified. Once a pane's
-// info is modified, wxFrameManager::Update() must be called to
+// info is modified, wxAuiManager::Update() must be called to
// realize the changes in the UI.
-wxPaneInfo& wxFrameManager::GetPane(wxWindow* window)
+wxAuiPaneInfo& wxAuiManager::GetPane(wxWindow* window)
{
int i, pane_count;
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if (p.window == window)
return p;
}
- return wxNullPaneInfo;
+ return wxAuiNullPaneInfo;
}
// this version of GetPane() looks up a pane based on a
// 'pane name', see above comment for more info
-wxPaneInfo& wxFrameManager::GetPane(const wxString& name)
+wxAuiPaneInfo& wxAuiManager::GetPane(const wxString& name)
{
int i, pane_count;
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if (p.name == name)
return p;
}
- return wxNullPaneInfo;
+ return wxAuiNullPaneInfo;
}
// GetAllPanes() returns a reference to all the pane info structures
-wxPaneInfoArray& wxFrameManager::GetAllPanes()
+wxAuiPaneInfoArray& wxAuiManager::GetAllPanes()
{
return m_panes;
}
// HitTest() is an internal function which determines
// which UI item the specified coordinates are over
// (x,y) specify a position in client coordinates
-wxDockUIPart* wxFrameManager::HitTest(int x, int y)
+wxAuiDockUIPart* wxAuiManager::HitTest(int x, int y)
{
- wxDockUIPart* result = NULL;
+ wxAuiDockUIPart* result = NULL;
int i, part_count;
for (i = 0, part_count = m_uiparts.GetCount(); i < part_count; ++i)
{
- wxDockUIPart* item = &m_uiparts.Item(i);
+ wxAuiDockUIPart* item = &m_uiparts.Item(i);
// we are not interested in typeDock, because this space
// isn't used to draw anything, just for measurements;
// besides, the entire dock area is covered with other
// rectangles, which we are interested in.
- if (item->type == wxDockUIPart::typeDock)
+ if (item->type == wxAuiDockUIPart::typeDock)
continue;
// if we already have a hit on a more specific item, we are not
// interested in a pane hit. If, however, we don't already have
// a hit, returning a pane hit is necessary for some operations
- if ((item->type == wxDockUIPart::typePane ||
- item->type == wxDockUIPart::typePaneBorder) && result)
+ if ((item->type == wxAuiDockUIPart::typePane ||
+ item->type == wxAuiDockUIPart::typePaneBorder) && result)
continue;
// if the point is inside the rectangle, we have a hit
// SetFlags() and GetFlags() allow the owner to set various
-// options which are global to wxFrameManager
-void wxFrameManager::SetFlags(unsigned int flags)
+// options which are global to wxAuiManager
+void wxAuiManager::SetFlags(unsigned int flags)
{
// find out if we have to call UpdateHintWindowConfig()
bool update_hint_wnd = false;
}
}
-unsigned int wxFrameManager::GetFlags() const
+unsigned int wxAuiManager::GetFlags() const
{
return m_flags;
}
// don't use these anymore as they are deprecated
// use Set/GetManagedFrame() instead
-void wxFrameManager::SetFrame(wxFrame* frame)
+void wxAuiManager::SetFrame(wxFrame* frame)
{
SetManagedWindow((wxWindow*)frame);
}
-wxFrame* wxFrameManager::GetFrame() const
+wxFrame* wxAuiManager::GetFrame() const
{
return (wxFrame*)m_frame;
}
-void wxFrameManager::UpdateHintWindowConfig()
+void wxAuiManager::UpdateHintWindowConfig()
{
// find out if the the system can do transparent frames
bool can_do_transparent = false;
// SetManagedWindow() is usually called once when the frame
// manager class is being initialized. "frame" specifies
// the frame which should be managed by the frame mananger
-void wxFrameManager::SetManagedWindow(wxWindow* wnd)
+void wxAuiManager::SetManagedWindow(wxWindow* wnd)
{
wxASSERT_MSG(wnd, wxT("specified window must be non-NULL"));
wxASSERT_MSG(client_window, wxT("Client window is NULL!"));
AddPane(client_window,
- wxPaneInfo().Name(wxT("mdiclient")).
+ wxAuiPaneInfo().Name(wxT("mdiclient")).
CenterPane().PaneBorder(false));
}
#endif
// UnInit() must be called, usually in the destructor
// of the frame class. If it is not called, usually this
// will result in a crash upon program exit
-void wxFrameManager::UnInit()
+void wxAuiManager::UnInit()
{
if (m_frame)
{
}
// GetManagedWindow() returns the window pointer being managed
-wxWindow* wxFrameManager::GetManagedWindow() const
+wxWindow* wxAuiManager::GetManagedWindow() const
{
return m_frame;
}
-wxDockArt* wxFrameManager::GetArtProvider() const
+wxAuiDockArt* wxAuiManager::GetArtProvider() const
{
return m_art;
}
-void wxFrameManager::ProcessMgrEvent(wxFrameManagerEvent& event)
+void wxAuiManager::ProcessMgrEvent(wxAuiManagerEvent& event)
{
// first, give the owner frame a chance to override
if (m_frame)
ProcessEvent(event);
}
-// SetArtProvider() instructs wxFrameManager to use the
+// SetArtProvider() instructs wxAuiManager to use the
// specified art provider for all drawing calls. This allows
// plugable look-and-feel features. The pointer that is
-// passed to this method subsequently belongs to wxFrameManager,
+// passed to this method subsequently belongs to wxAuiManager,
// and is deleted in the frame manager destructor
-void wxFrameManager::SetArtProvider(wxDockArt* art_provider)
+void wxAuiManager::SetArtProvider(wxAuiDockArt* art_provider)
{
// delete the last art provider, if any
delete m_art;
}
-bool wxFrameManager::AddPane(wxWindow* window, const wxPaneInfo& pane_info)
+bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
{
// check if the pane has a valid window
if (!window)
m_panes.Add(pane_info);
- wxPaneInfo& pinfo = m_panes.Last();
+ wxAuiPaneInfo& pinfo = m_panes.Last();
// set the pane window
pinfo.window = window;
if (pinfo.HasMaximizeButton())
{
- wxPaneButton button;
+ wxAuiPaneButton button;
button.button_id = wxAUI_BUTTON_MAXIMIZE_RESTORE;
pinfo.buttons.Add(button);
}
if (pinfo.HasCloseButton())
{
- wxPaneButton button;
+ wxAuiPaneButton button;
button.button_id = wxAUI_BUTTON_CLOSE;
pinfo.buttons.Add(button);
}
return true;
}
-bool wxFrameManager::AddPane(wxWindow* window,
+bool wxAuiManager::AddPane(wxWindow* window,
int direction,
const wxString& caption)
{
- wxPaneInfo pinfo;
+ wxAuiPaneInfo pinfo;
pinfo.Caption(caption);
switch (direction)
{
return AddPane(window, pinfo);
}
-bool wxFrameManager::AddPane(wxWindow* window,
- const wxPaneInfo& pane_info,
+bool wxAuiManager::AddPane(wxWindow* window,
+ const wxAuiPaneInfo& pane_info,
const wxPoint& drop_pos)
{
if (!AddPane(window, pane_info))
return false;
- wxPaneInfo& pane = GetPane(window);
+ wxAuiPaneInfo& pane = GetPane(window);
DoDrop(m_docks, m_panes, pane, drop_pos, wxPoint(0,0));
return true;
}
-bool wxFrameManager::InsertPane(wxWindow* window, const wxPaneInfo& pane_info,
+bool wxAuiManager::InsertPane(wxWindow* window, const wxAuiPaneInfo& pane_info,
int insert_level)
{
// shift the panes around, depending on the insert level
// if the window already exists, we are basically just moving/inserting the
// existing window. If it doesn't exist, we need to add it and insert it
- wxPaneInfo& existing_pane = GetPane(window);
+ wxAuiPaneInfo& existing_pane = GetPane(window);
if (!existing_pane.IsOk())
{
return AddPane(window, pane_info);
// DetachPane() removes a pane from the frame manager. This
// method will not destroy the window that is removed.
-bool wxFrameManager::DetachPane(wxWindow* window)
+bool wxAuiManager::DetachPane(wxWindow* window)
{
int i, count;
for (i = 0, count = m_panes.GetCount(); i < count; ++i)
{
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if (p.window == window)
{
if (p.frame)
int pi, part_count;
for (pi = 0, part_count = (int)m_uiparts.GetCount(); pi < part_count; ++pi)
{
- wxDockUIPart& part = m_uiparts.Item(pi);
+ wxAuiDockUIPart& part = m_uiparts.Item(pi);
if (part.pane == &p)
{
m_uiparts.RemoveAt(pi);
// ClosePane() destroys or hides the pane depending on its
// flags
-void wxFrameManager::ClosePane(wxPaneInfo& pane_info)
+void wxAuiManager::ClosePane(wxAuiPaneInfo& pane_info)
{
// if we were maximized, restore
if(pane_info.IsMaximized()) {
}
}
-void wxFrameManager::MaximizePane(wxPaneInfo& pane_info)
+void wxAuiManager::MaximizePane(wxAuiPaneInfo& pane_info)
{
int i, pane_count;
// un-maximize and hide all other panes
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if(!p.IsToolbar()) {
p.Restore();
p.SaveHidden();
}
}
-void wxFrameManager::RestorePane(wxPaneInfo& pane_info)
+void wxAuiManager::RestorePane(wxAuiPaneInfo& pane_info)
{
int i, pane_count;
// restore all the panes
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if(!p.IsToolbar()) {
p.RestoreHidden();
}
}
}
-void wxFrameManager::RestoreMaximizedPane()
+void wxAuiManager::RestoreMaximizedPane()
{
int i, pane_count;
// restore all the panes
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if(p.IsMaximized()) {
RestorePane(p);
break;
return result;
}
-wxString wxFrameManager::SavePaneInfo(wxPaneInfo& pane)
+wxString wxAuiManager::SavePaneInfo(wxAuiPaneInfo& pane)
{
wxString result = wxT("name=");
result += EscapeDelimiters(pane.name);
}
// Load a "pane" with the pane infor settings in pane_part
-void wxFrameManager::LoadPaneInfo(wxString pane_part, wxPaneInfo &pane)
+void wxAuiManager::LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane)
{
// replace escaped characters so we can
// split up the string easily
// all pane settings. This save and load mechanism allows an
// exact pane configuration to be saved and restored at a later time
-wxString wxFrameManager::SavePerspective()
+wxString wxAuiManager::SavePerspective()
{
wxString result;
result.Alloc(500);
int pane_i, pane_count = m_panes.GetCount();
for (pane_i = 0; pane_i < pane_count; ++pane_i)
{
- wxPaneInfo& pane = m_panes.Item(pane_i);
+ wxAuiPaneInfo& pane = m_panes.Item(pane_i);
result += SavePaneInfo(pane)+wxT("|");
}
int dock_i, dock_count = m_docks.GetCount();
for (dock_i = 0; dock_i < dock_count; ++dock_i)
{
- wxDockInfo& dock = m_docks.Item(dock_i);
+ wxAuiDockInfo& dock = m_docks.Item(dock_i);
result += wxString::Format(wxT("dock_size(%d,%d,%d)=%d|"),
dock.dock_direction, dock.dock_layer,
// LoadPerspective() loads a layout which was saved with SavePerspective()
// If the "update" flag parameter is true, the GUI will immediately be updated
-bool wxFrameManager::LoadPerspective(const wxString& layout, bool update)
+bool wxAuiManager::LoadPerspective(const wxString& layout, bool update)
{
wxString input = layout;
wxString part;
while (1)
{
- wxPaneInfo pane;
+ wxAuiPaneInfo pane;
wxString pane_part = input.BeforeFirst(wxT('|'));
input = input.AfterFirst(wxT('|'));
piece.AfterFirst(wxT(',')).ToLong(&row);
value.ToLong(&size);
- wxDockInfo dock;
+ wxAuiDockInfo dock;
dock.dock_direction = dir;
dock.dock_layer = layer;
dock.dock_row = row;
LoadPaneInfo(pane_part, pane);
- wxPaneInfo& p = GetPane(pane.name);
+ wxAuiPaneInfo& p = GetPane(pane.name);
if (!p.IsOk())
{
// the pane window couldn't be found
return true;
}
-void wxFrameManager::GetPanePositionsAndSizes(wxDockInfo& dock,
+void wxAuiManager::GetPanePositionsAndSizes(wxAuiDockInfo& dock,
wxArrayInt& positions,
wxArrayInt& sizes)
{
// find the pane marked as our action pane
for (pane_i = 0; pane_i < pane_count; ++pane_i)
{
- wxPaneInfo& pane = *(dock.panes.Item(pane_i));
+ wxAuiPaneInfo& pane = *(dock.panes.Item(pane_i));
- if (pane.state & wxPaneInfo::actionPane)
+ if (pane.state & wxAuiPaneInfo::actionPane)
{
wxASSERT_MSG(action_pane==-1, wxT("Too many fixed action panes"));
action_pane = pane_i;
// on the dock's orientation) of each pane
for (pane_i = 0; pane_i < pane_count; ++pane_i)
{
- wxPaneInfo& pane = *(dock.panes.Item(pane_i));
+ wxAuiPaneInfo& pane = *(dock.panes.Item(pane_i));
positions.Add(pane.dock_pos);
int size = 0;
}
-void wxFrameManager::LayoutAddPane(wxSizer* cont,
- wxDockInfo& dock,
- wxPaneInfo& pane,
- wxDockUIPartArray& uiparts,
+void wxAuiManager::LayoutAddPane(wxSizer* cont,
+ wxAuiDockInfo& dock,
+ wxAuiPaneInfo& pane,
+ wxAuiDockUIPartArray& uiparts,
bool spacer_only)
{
- wxDockUIPart part;
+ wxAuiDockUIPart part;
wxSizerItem* sizer_item;
int caption_size = m_art->GetMetric(wxAUI_ART_CAPTION_SIZE);
else
sizer_item = horz_pane_sizer ->Add(gripper_size, 1, 0, wxEXPAND);
- part.type = wxDockUIPart::typeGripper;
+ part.type = wxAuiDockUIPart::typeGripper;
part.dock = &dock;
part.pane = &pane;
part.button = NULL;
sizer_item = caption_sizer->Add(1, caption_size, 1, wxEXPAND);
- part.type = wxDockUIPart::typeCaption;
+ part.type = wxAuiDockUIPart::typeCaption;
part.dock = &dock;
part.pane = &pane;
part.button = NULL;
for (i = 0, button_count = pane.buttons.GetCount();
i < button_count; ++i)
{
- wxPaneButton& button = pane.buttons.Item(i);
+ wxAuiPaneButton& button = pane.buttons.Item(i);
sizer_item = caption_sizer->Add(pane_button_size,
caption_size,
0, wxEXPAND);
- part.type = wxDockUIPart::typePaneButton;
+ part.type = wxAuiDockUIPart::typePaneButton;
part.dock = &dock;
part.pane = &pane;
part.button = &button;
vert_pane_sizer->SetItemMinSize(pane.window, 1, 1);
}
- part.type = wxDockUIPart::typePane;
+ part.type = wxAuiDockUIPart::typePane;
part.dock = &dock;
part.pane = &pane;
part.button = NULL;
sizer_item = cont->Add(horz_pane_sizer, pane_proportion,
wxEXPAND | wxALL, pane_border_size);
- part.type = wxDockUIPart::typePaneBorder;
+ part.type = wxAuiDockUIPart::typePaneBorder;
part.dock = &dock;
part.pane = &pane;
part.button = NULL;
}
}
-void wxFrameManager::LayoutAddDock(wxSizer* cont,
- wxDockInfo& dock,
- wxDockUIPartArray& uiparts,
+void wxAuiManager::LayoutAddDock(wxSizer* cont,
+ wxAuiDockInfo& dock,
+ wxAuiDockUIPartArray& uiparts,
bool spacer_only)
{
wxSizerItem* sizer_item;
- wxDockUIPart part;
+ wxAuiDockUIPart part;
int sash_size = m_art->GetMetric(wxAUI_ART_SASH_SIZE);
int orientation = dock.IsHorizontal() ? wxHORIZONTAL : wxVERTICAL;
{
sizer_item = cont->Add(sash_size, sash_size, 0, wxEXPAND);
- part.type = wxDockUIPart::typeDockSizer;
+ part.type = wxAuiDockUIPart::typeDockSizer;
part.orientation = orientation;
part.dock = &dock;
part.pane = NULL;
int offset = 0;
for (pane_i = 0; pane_i < pane_count; ++pane_i)
{
- wxPaneInfo& pane = *(dock.panes.Item(pane_i));
+ wxAuiPaneInfo& pane = *(dock.panes.Item(pane_i));
int pane_pos = pane_positions.Item(pane_i);
if(pane.IsMaximized()) {
has_maximized_pane = true;
else
sizer_item = dock_sizer->Add(amount, 1, 0, wxEXPAND);
- part.type = wxDockUIPart::typeBackground;
+ part.type = wxAuiDockUIPart::typeBackground;
part.dock = &dock;
part.pane = NULL;
part.button = NULL;
// at the end add a very small stretchable background area
sizer_item = dock_sizer->Add(1,1, 1, wxEXPAND);
- part.type = wxDockUIPart::typeBackground;
+ part.type = wxAuiDockUIPart::typeBackground;
part.dock = &dock;
part.pane = NULL;
part.button = NULL;
{
for (pane_i = 0; pane_i < pane_count; ++pane_i)
{
- wxPaneInfo& pane = *(dock.panes.Item(pane_i));
+ wxAuiPaneInfo& pane = *(dock.panes.Item(pane_i));
if(pane.IsMaximized()) {
has_maximized_pane = true;
}
{
sizer_item = dock_sizer->Add(sash_size, sash_size, 0, wxEXPAND);
- part.type = wxDockUIPart::typePaneSizer;
+ part.type = wxAuiDockUIPart::typePaneSizer;
part.dock = &dock;
part.pane = dock.panes.Item(pane_i-1);
part.button = NULL;
else
sizer_item = cont->Add(dock_sizer, 0, wxEXPAND);
- part.type = wxDockUIPart::typeDock;
+ part.type = wxAuiDockUIPart::typeDock;
part.dock = &dock;
part.pane = NULL;
part.button = NULL;
{
sizer_item = cont->Add(sash_size, sash_size, 0, wxEXPAND);
- part.type = wxDockUIPart::typeDockSizer;
+ part.type = wxAuiDockUIPart::typeDockSizer;
part.dock = &dock;
part.pane = NULL;
part.button = NULL;
}
}
-wxSizer* wxFrameManager::LayoutAll(wxPaneInfoArray& panes,
- wxDockInfoArray& docks,
- wxDockUIPartArray& uiparts,
+wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes,
+ wxAuiDockInfoArray& docks,
+ wxAuiDockUIPartArray& uiparts,
bool spacer_only)
{
wxBoxSizer* container = new wxBoxSizer(wxVERTICAL);
// pane does not exist in the dock, add it
for (i = 0, pane_count = panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& p = panes.Item(i);
+ wxAuiPaneInfo& p = panes.Item(i);
// find any docks in this layer
- wxDockInfo* dock;
- wxDockInfoPtrArray arr;
+ wxAuiDockInfo* dock;
+ wxAuiDockInfoPtrArray arr;
FindDocks(docks, p.dock_direction, p.dock_layer, p.dock_row, arr);
if (arr.GetCount() > 0)
else
{
// dock was not found, so we need to create a new one
- wxDockInfo d;
+ wxAuiDockInfo d;
d.dock_direction = p.dock_direction;
d.dock_layer = p.dock_layer;
d.dock_row = p.dock_row;
// configure the docks further
for (i = 0, dock_count = docks.GetCount(); i < dock_count; ++i)
{
- wxDockInfo& dock = docks.Item(i);
+ wxAuiDockInfo& dock = docks.Item(i);
int j, dock_pane_count = dock.panes.GetCount();
// sort the dock pane array by the pane's
for (j = 0; j < dock_pane_count; ++j)
{
- wxPaneInfo& pane = *dock.panes.Item(j);
+ wxAuiPaneInfo& pane = *dock.panes.Item(j);
wxSize pane_size = pane.best_size;
if (pane_size == wxDefaultSize)
pane_size = pane.min_size;
int dock_min_size = 0;
for (j = 0; j < dock_pane_count; ++j)
{
- wxPaneInfo& pane = *dock.panes.Item(j);
+ wxAuiPaneInfo& pane = *dock.panes.Item(j);
if (pane.min_size != wxDefaultSize)
{
if (pane.HasBorder())
dock.toolbar = true;
for (j = 0; j < dock_pane_count; ++j)
{
- wxPaneInfo& pane = *dock.panes.Item(j);
+ wxAuiPaneInfo& pane = *dock.panes.Item(j);
if (!pane.IsFixed())
dock.fixed = false;
if (!pane.IsToolbar())
dock.toolbar = false;
- if (pane.state & wxPaneInfo::actionPane)
+ if (pane.state & wxAuiPaneInfo::actionPane)
action_pane_marked = true;
}
{
for (j = 0; j < dock_pane_count; ++j)
{
- wxPaneInfo& pane = *dock.panes.Item(j);
+ wxAuiPaneInfo& pane = *dock.panes.Item(j);
pane.dock_pos = j;
}
}
int offset = 0;
for (j = 0; j < dock_pane_count; ++j)
{
- wxPaneInfo& pane = *(dock.panes.Item(j));
+ wxAuiPaneInfo& pane = *(dock.panes.Item(j));
pane.dock_pos = pane_positions[j];
int amount = pane.dock_pos - offset;
for (layer = 0; layer <= max_layer; ++layer)
{
- wxDockInfoPtrArray arr;
+ wxAuiDockInfoPtrArray arr;
// find any docks in this layer
FindDocks(docks, -1, layer, -1, arr);
{
// there are no center docks, add a background area
wxSizerItem* sizer_item = middle->Add(1,1, 1, wxEXPAND);
- wxDockUIPart part;
- part.type = wxDockUIPart::typeBackground;
+ wxAuiDockUIPart part;
+ part.type = wxAuiDockUIPart::typeBackground;
part.pane = NULL;
part.dock = NULL;
part.button = NULL;
// therefore we will create a simple background area
cont = new wxBoxSizer(wxVERTICAL);
wxSizerItem* sizer_item = cont->Add(1,1, 1, wxEXPAND);
- wxDockUIPart part;
- part.type = wxDockUIPart::typeBackground;
+ wxAuiDockUIPart part;
+ part.type = wxAuiDockUIPart::typeBackground;
part.pane = NULL;
part.dock = NULL;
part.button = NULL;
// one or more panes, this function should be called. It is the
// external entry point for running the layout engine.
-void wxFrameManager::Update()
+void wxAuiManager::Update()
{
wxSizer* sizer;
int i, pane_count = m_panes.GetCount();
// redocked or are becoming non-floating
for (i = 0; i < pane_count; ++i)
{
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if (!p.IsFloating() && p.frame)
{
// and float panes as necessary
for (i = 0; i < pane_count; ++i)
{
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if (p.IsFloating())
{
{
// we need to create a frame for this
// pane, which has recently been floated
- wxFloatingPane* frame = CreateFloatingFrame(m_frame, p);
+ wxAuiFloatingPane* frame = CreateFloatingFrame(m_frame, p);
#if wxCHECK_VERSION(2,7,0)
// on MSW and Mac, if the owner desires transparent dragging, and
else
{
// frame already exists, make sure it's position
- // and size reflect the information in wxPaneInfo
+ // and size reflect the information in wxAuiPaneInfo
if (p.frame->GetPosition() != p.floating_pos)
{
p.frame->SetSize(p.floating_pos.x, p.floating_pos.y,
// any optionActive values from the pane states
if ((m_flags & wxAUI_MGR_ALLOW_ACTIVE_PANE) == 0)
{
- p.state &= ~wxPaneInfo::optionActive;
+ p.state &= ~wxAuiPaneInfo::optionActive;
}
}
for (i = 0; i < pane_count; ++i)
{
wxRect r;
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if (p.window && p.IsShown() && p.IsDocked())
r = p.rect;
// changed, the corresponding panes must also be updated
for (i = 0; i < pane_count; ++i)
{
- wxPaneInfo& p = m_panes.Item(i);
+ wxAuiPaneInfo& p = m_panes.Item(i);
if (p.window && p.window->IsShown() && p.IsDocked())
{
if (p.rect != old_pane_rects[i])
// and updates their internal rectangles. This should always be called
// instead of calling m_frame->Layout() directly
-void wxFrameManager::DoFrameLayout()
+void wxAuiManager::DoFrameLayout()
{
m_frame->Layout();
int i, part_count;
for (i = 0, part_count = m_uiparts.GetCount(); i < part_count; ++i)
{
- wxDockUIPart& part = m_uiparts.Item(i);
+ wxAuiDockUIPart& part = m_uiparts.Item(i);
// get the rectangle of the UI part
// originally, this code looked like this:
part.rect.width += border;
- if (part.type == wxDockUIPart::typeDock)
+ if (part.type == wxAuiDockUIPart::typeDock)
part.dock->rect = part.rect;
- if (part.type == wxDockUIPart::typePane)
+ if (part.type == wxAuiDockUIPart::typePane)
part.pane->rect = part.rect;
}
}
// rectangle of the pane in question, including decorations like
// caption and border (if any).
-wxDockUIPart* wxFrameManager::GetPanePart(wxWindow* wnd)
+wxAuiDockUIPart* wxAuiManager::GetPanePart(wxWindow* wnd)
{
int i, part_count;
for (i = 0, part_count = m_uiparts.GetCount(); i < part_count; ++i)
{
- wxDockUIPart& part = m_uiparts.Item(i);
- if (part.type == wxDockUIPart::typePaneBorder &&
+ wxAuiDockUIPart& part = m_uiparts.Item(i);
+ if (part.type == wxAuiDockUIPart::typePaneBorder &&
part.pane && part.pane->window == wnd)
return ∂
}
for (i = 0, part_count = m_uiparts.GetCount(); i < part_count; ++i)
{
- wxDockUIPart& part = m_uiparts.Item(i);
- if (part.type == wxDockUIPart::typePane &&
+ wxAuiDockUIPart& part = m_uiparts.Item(i);
+ if (part.type == wxAuiDockUIPart::typePane &&
part.pane && part.pane->window == wnd)
return ∂
}
// vertical docks). This value is necessary for calculating
// fixel-pane/toolbar offsets when they are dragged.
-int wxFrameManager::GetDockPixelOffset(wxPaneInfo& test)
+int wxAuiManager::GetDockPixelOffset(wxAuiPaneInfo& test)
{
// the only way to accurately calculate the dock's
// offset is to actually run a theoretical layout
int i, part_count, dock_count;
- wxDockInfoArray docks;
- wxPaneInfoArray panes;
- wxDockUIPartArray uiparts;
+ wxAuiDockInfoArray docks;
+ wxAuiPaneInfoArray panes;
+ wxAuiDockUIPartArray uiparts;
CopyDocksAndPanes(docks, panes, m_docks, m_panes);
panes.Add(test);
for (i = 0, part_count = uiparts.GetCount(); i < part_count; ++i)
{
- wxDockUIPart& part = uiparts.Item(i);
+ wxAuiDockUIPart& part = uiparts.Item(i);
part.rect = wxRect(part.sizer_item->GetPosition(),
part.sizer_item->GetSize());
- if (part.type == wxDockUIPart::typeDock)
+ if (part.type == wxAuiDockUIPart::typeDock)
part.dock->rect = part.rect;
}
for (i = 0, dock_count = docks.GetCount(); i < dock_count; ++i)
{
- wxDockInfo& dock = docks.Item(i);
+ wxAuiDockInfo& dock = docks.Item(i);
if (test.dock_direction == dock.dock_direction &&
test.dock_layer==dock.dock_layer && test.dock_row==dock.dock_row)
{
// if a dock operation is allowed, the new dock position is copied into
// the target info. If the operation was allowed, the function returns true.
-bool wxFrameManager::ProcessDockResult(wxPaneInfo& target,
- const wxPaneInfo& new_pos)
+bool wxAuiManager::ProcessDockResult(wxAuiPaneInfo& target,
+ const wxAuiPaneInfo& new_pos)
{
bool allowed = false;
switch (new_pos.dock_direction)
// dropped, it performs the drop operation using the specified dock and pane
// arrays. By specifying copied dock and pane arrays when calling, a "what-if"
// scenario can be performed, giving precise coordinates for drop hints.
-// If, however, wxFrameManager:m_docks and wxFrameManager::m_panes are specified
+// If, however, wxAuiManager:m_docks and wxAuiManager::m_panes are specified
// as parameters, the changes will be made to the main state arrays
const int auiInsertRowPixels = 10;
const int auiLayerInsertPixels = 40;
const int auiLayerInsertOffset = 5;
-bool wxFrameManager::DoDrop(wxDockInfoArray& docks,
- wxPaneInfoArray& panes,
- wxPaneInfo& target,
+bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks,
+ wxAuiPaneInfoArray& panes,
+ wxAuiPaneInfo& target,
const wxPoint& pt,
const wxPoint& offset)
{
wxSize cli_size = m_frame->GetClientSize();
- wxPaneInfo drop = target;
+ wxAuiPaneInfo drop = target;
// The result should always be shown
return ProcessDockResult(target, drop);
}
- wxDockUIPart* part = HitTest(pt.x, pt.y);
+ wxAuiDockUIPart* part = HitTest(pt.x, pt.y);
if (drop.IsToolbar())
if (!part)
return false;
- if (part->type == wxDockUIPart::typePaneBorder ||
- part->type == wxDockUIPart::typeCaption ||
- part->type == wxDockUIPart::typeGripper ||
- part->type == wxDockUIPart::typePaneButton ||
- part->type == wxDockUIPart::typePane ||
- part->type == wxDockUIPart::typePaneSizer ||
- part->type == wxDockUIPart::typeDockSizer ||
- part->type == wxDockUIPart::typeBackground)
+ if (part->type == wxAuiDockUIPart::typePaneBorder ||
+ part->type == wxAuiDockUIPart::typeCaption ||
+ part->type == wxAuiDockUIPart::typeGripper ||
+ part->type == wxAuiDockUIPart::typePaneButton ||
+ part->type == wxAuiDockUIPart::typePane ||
+ part->type == wxAuiDockUIPart::typePaneSizer ||
+ part->type == wxAuiDockUIPart::typeDockSizer ||
+ part->type == wxAuiDockUIPart::typeBackground)
{
- if (part->type == wxDockUIPart::typeDockSizer)
+ if (part->type == wxAuiDockUIPart::typeDockSizer)
{
if (part->dock->panes.GetCount() != 1)
return false;
}
-void wxFrameManager::OnHintFadeTimer(wxTimerEvent& WXUNUSED(event))
+void wxAuiManager::OnHintFadeTimer(wxTimerEvent& WXUNUSED(event))
{
if (!m_hint_wnd || m_hint_fadeamt >= m_hint_fademax)
{
#endif
}
-void wxFrameManager::ShowHint(const wxRect& rect)
+void wxAuiManager::ShowHint(const wxRect& rect)
{
if (m_hint_wnd)
{
int i, pane_count;
for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
{
- wxPaneInfo& pane = m_panes.Item(i);
+ wxAuiPaneInfo& pane = m_panes.Item(i);
if (pane.IsFloating() &&
pane.frame->IsShown())
}
}
-void wxFrameManager::HideHint()
+void wxAuiManager::HideHint()
{
// hides a transparent window hint, if there is one
if (m_hint_wnd)
// DrawHintRect() then calls ShowHint() to indicate this drop rectangle.
// "pane_window" is the window pointer of the pane being dragged, pt is
// the mouse position, in client coordinates
-void wxFrameManager::DrawHintRect(wxWindow* pane_window,
+void wxAuiManager::DrawHintRect(wxWindow* pane_window,
const wxPoint& pt,
const wxPoint& offset)
{
// so that we don't modify the real thing on screen
int i, pane_count, part_count;
- wxDockInfoArray docks;
- wxPaneInfoArray panes;
- wxDockUIPartArray uiparts;
- wxPaneInfo hint = GetPane(pane_window);
+ wxAuiDockInfoArray docks;
+ wxAuiPaneInfoArray panes;
+ wxAuiDockUIPartArray uiparts;
+ wxAuiPaneInfo hint = GetPane(pane_window);
hint.name = wxT("__HINT__");
hint.Show();
for (i = 0, part_count = uiparts.GetCount();
i < part_count; ++i)
{
- wxDockUIPart& part = uiparts.Item(i);
+ wxAuiDockUIPart& part = uiparts.Item(i);
- if (part.type == wxDockUIPart::typePaneBorder &&
+ if (part.type == wxAuiDockUIPart::typePaneBorder &&
part.pane && part.pane->name == wxT("__HINT__"))
{
rect = wxRect(part.sizer_item->GetPosition(),
ShowHint(rect);
}
-void wxFrameManager::OnFloatingPaneMoveStart(wxWindow* wnd)
+void wxAuiManager::OnFloatingPaneMoveStart(wxWindow* wnd)
{
// try to find the pane
- wxPaneInfo& pane = GetPane(wnd);
+ wxAuiPaneInfo& pane = GetPane(wnd);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
#if wxCHECK_VERSION(2,7,0)
#endif
}
-void wxFrameManager::OnFloatingPaneMoving(wxWindow* wnd, wxDirection dir)
+void wxAuiManager::OnFloatingPaneMoving(wxWindow* wnd, wxDirection dir)
{
// try to find the pane
- wxPaneInfo& pane = GetPane(wnd);
+ wxAuiPaneInfo& pane = GetPane(wnd);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
wxPoint pt = ::wxGetMousePosition();
{
if (m_action == actionDragFloatingPane)
{
- wxDockInfoArray docks;
- wxPaneInfoArray panes;
- wxDockUIPartArray uiparts;
- wxPaneInfo hint = pane;
+ wxAuiDockInfoArray docks;
+ wxAuiPaneInfoArray panes;
+ wxAuiDockUIPartArray uiparts;
+ wxAuiPaneInfo hint = pane;
CopyDocksAndPanes(docks, panes, m_docks, m_panes);
m_frame->Update();
}
-void wxFrameManager::OnFloatingPaneMoved(wxWindow* wnd, wxDirection dir)
+void wxAuiManager::OnFloatingPaneMoved(wxWindow* wnd, wxDirection dir)
{
// try to find the pane
- wxPaneInfo& pane = GetPane(wnd);
+ wxAuiPaneInfo& pane = GetPane(wnd);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
wxPoint pt = ::wxGetMousePosition();
HideHint();
}
-void wxFrameManager::OnFloatingPaneResized(wxWindow* wnd, const wxSize& size)
+void wxAuiManager::OnFloatingPaneResized(wxWindow* wnd, const wxSize& size)
{
// try to find the pane
- wxPaneInfo& pane = GetPane(wnd);
+ wxAuiPaneInfo& pane = GetPane(wnd);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
pane.floating_size = size;
}
-void wxFrameManager::OnFloatingPaneClosed(wxWindow* wnd, wxCloseEvent& evt)
+void wxAuiManager::OnFloatingPaneClosed(wxWindow* wnd, wxCloseEvent& evt)
{
// try to find the pane
- wxPaneInfo& pane = GetPane(wnd);
+ wxAuiPaneInfo& pane = GetPane(wnd);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
// fire pane close event
- wxFrameManagerEvent e(wxEVT_AUI_PANECLOSE);
+ wxAuiManagerEvent e(wxEVT_AUI_PANECLOSE);
e.SetPane(&pane);
e.SetCanVeto(evt.CanVeto());
ProcessMgrEvent(e);
-void wxFrameManager::OnFloatingPaneActivated(wxWindow* wnd)
+void wxAuiManager::OnFloatingPaneActivated(wxWindow* wnd)
{
if (GetFlags() & wxAUI_MGR_ALLOW_ACTIVE_PANE)
{
// backgrounds, captions, grippers, pane borders and buttons.
// It renders the entire user interface.
-void wxFrameManager::OnRender(wxFrameManagerEvent& evt)
+void wxAuiManager::OnRender(wxAuiManagerEvent& evt)
{
wxDC* dc = evt.GetDC();
for (i = 0, part_count = m_uiparts.GetCount();
i < part_count; ++i)
{
- wxDockUIPart& part = m_uiparts.Item(i);
+ wxAuiDockUIPart& part = m_uiparts.Item(i);
// don't draw hidden pane items
if (part.sizer_item && !part.sizer_item->IsShown())
switch (part.type)
{
- case wxDockUIPart::typeDockSizer:
- case wxDockUIPart::typePaneSizer:
+ case wxAuiDockUIPart::typeDockSizer:
+ case wxAuiDockUIPart::typePaneSizer:
m_art->DrawSash(*dc, m_frame, part.orientation, part.rect);
break;
- case wxDockUIPart::typeBackground:
+ case wxAuiDockUIPart::typeBackground:
m_art->DrawBackground(*dc, m_frame, part.orientation, part.rect);
break;
- case wxDockUIPart::typeCaption:
+ case wxAuiDockUIPart::typeCaption:
m_art->DrawCaption(*dc, m_frame, part.pane->caption, part.rect, *part.pane);
break;
- case wxDockUIPart::typeGripper:
+ case wxAuiDockUIPart::typeGripper:
m_art->DrawGripper(*dc, m_frame, part.rect, *part.pane);
break;
- case wxDockUIPart::typePaneBorder:
+ case wxAuiDockUIPart::typePaneBorder:
m_art->DrawBorder(*dc, m_frame, part.rect, *part.pane);
break;
- case wxDockUIPart::typePaneButton:
+ case wxAuiDockUIPart::typePaneButton:
m_art->DrawPaneButton(*dc, m_frame, part.button->button_id,
wxAUI_BUTTON_STATE_NORMAL, part.rect, *part.pane);
break;
// Render() fire a render event, which is normally handled by
-// wxFrameManager::OnRender(). This allows the render function to
+// wxAuiManager::OnRender(). This allows the render function to
// be overridden via the render event. This can be useful for paintin
// custom graphics in the main window. Default behavior can be
// invoked in the overridden function by calling OnRender()
-void wxFrameManager::Render(wxDC* dc)
+void wxAuiManager::Render(wxDC* dc)
{
- wxFrameManagerEvent e(wxEVT_AUI_RENDER);
+ wxAuiManagerEvent e(wxEVT_AUI_RENDER);
e.SetDC(dc);
ProcessMgrEvent(e);
}
-void wxFrameManager::Repaint(wxDC* dc)
+void wxAuiManager::Repaint(wxDC* dc)
{
#ifdef __WXMAC__
if ( dc == NULL )
delete client_dc;
}
-void wxFrameManager::OnPaint(wxPaintEvent& WXUNUSED(event))
+void wxAuiManager::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(m_frame);
Repaint(&dc);
}
-void wxFrameManager::OnEraseBackground(wxEraseEvent& event)
+void wxAuiManager::OnEraseBackground(wxEraseEvent& event)
{
#ifdef __WXMAC__
event.Skip() ;
#endif
}
-void wxFrameManager::OnSize(wxSizeEvent& event)
+void wxAuiManager::OnSize(wxSizeEvent& event)
{
if (m_frame)
{
}
-void wxFrameManager::OnSetCursor(wxSetCursorEvent& event)
+void wxAuiManager::OnSetCursor(wxSetCursorEvent& event)
{
// determine cursor
- wxDockUIPart* part = HitTest(event.GetX(), event.GetY());
+ wxAuiDockUIPart* part = HitTest(event.GetX(), event.GetY());
wxCursor cursor = wxNullCursor;
if (part)
{
- if (part->type == wxDockUIPart::typeDockSizer ||
- part->type == wxDockUIPart::typePaneSizer)
+ if (part->type == wxAuiDockUIPart::typeDockSizer ||
+ part->type == wxAuiDockUIPart::typePaneSizer)
{
// a dock may not be resized if it has a single
// pane which is not resizable
- if (part->type == wxDockUIPart::typeDockSizer && part->dock &&
+ if (part->type == wxAuiDockUIPart::typeDockSizer && part->dock &&
part->dock->panes.GetCount() == 1 &&
part->dock->panes.Item(0)->IsFixed())
return;
else
cursor = wxCursor(wxCURSOR_SIZENS);
}
- else if (part->type == wxDockUIPart::typeGripper)
+ else if (part->type == wxAuiDockUIPart::typeGripper)
{
cursor = wxCursor(wxCURSOR_SIZING);
}
-void wxFrameManager::UpdateButtonOnScreen(wxDockUIPart* button_ui_part,
+void wxAuiManager::UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part,
const wxMouseEvent& event)
{
- wxDockUIPart* hit_test = HitTest(event.GetX(), event.GetY());
+ wxAuiDockUIPart* hit_test = HitTest(event.GetX(), event.GetY());
int state = wxAUI_BUTTON_STATE_NORMAL;
}
}
-void wxFrameManager::OnLeftDown(wxMouseEvent& event)
+void wxAuiManager::OnLeftDown(wxMouseEvent& event)
{
- wxDockUIPart* part = HitTest(event.GetX(), event.GetY());
+ wxAuiDockUIPart* part = HitTest(event.GetX(), event.GetY());
if (part)
{
if (part->dock && part->dock->dock_direction == wxAUI_DOCK_CENTER)
return;
- if (part->type == wxDockUIPart::typeDockSizer ||
- part->type == wxDockUIPart::typePaneSizer)
+ if (part->type == wxAuiDockUIPart::typeDockSizer ||
+ part->type == wxAuiDockUIPart::typePaneSizer)
{
// a dock may not be resized if it has a single
// pane which is not resizable
- if (part->type == wxDockUIPart::typeDockSizer && part->dock &&
+ if (part->type == wxAuiDockUIPart::typeDockSizer && part->dock &&
part->dock->panes.GetCount() == 1 &&
part->dock->panes.Item(0)->IsFixed())
return;
event.m_y - part->rect.y);
m_frame->CaptureMouse();
}
- else if (part->type == wxDockUIPart::typePaneButton)
+ else if (part->type == wxAuiDockUIPart::typePaneButton)
{
m_action = actionClickButton;
m_action_part = part;
UpdateButtonOnScreen(part, event);
}
- else if (part->type == wxDockUIPart::typeCaption ||
- part->type == wxDockUIPart::typeGripper)
+ else if (part->type == wxAuiDockUIPart::typeCaption ||
+ part->type == wxAuiDockUIPart::typeGripper)
{
if (GetFlags() & wxAUI_MGR_ALLOW_ACTIVE_PANE)
{
}
-void wxFrameManager::OnLeftUp(wxMouseEvent& event)
+void wxAuiManager::OnLeftUp(wxMouseEvent& event)
{
if (m_action == actionResize)
{
DrawResizeHint(dc, m_action_hintrect);
// resize the dock or the pane
- if (m_action_part && m_action_part->type==wxDockUIPart::typeDockSizer)
+ if (m_action_part && m_action_part->type==wxAuiDockUIPart::typeDockSizer)
{
wxRect& rect = m_action_part->dock->rect;
Repaint(NULL);
}
else if (m_action_part &&
- m_action_part->type == wxDockUIPart::typePaneSizer)
+ m_action_part->type == wxAuiDockUIPart::typePaneSizer)
{
- wxDockInfo& dock = *m_action_part->dock;
- wxPaneInfo& pane = *m_action_part->pane;
+ wxAuiDockInfo& dock = *m_action_part->dock;
+ wxAuiPaneInfo& pane = *m_action_part->pane;
int total_proportion = 0;
int dock_pixels = 0;
event.m_y - m_action_offset.y);
// determine the pane rectangle by getting the pane part
- wxDockUIPart* pane_part = GetPanePart(pane.window);
+ wxAuiDockUIPart* pane_part = GetPanePart(pane.window);
wxASSERT_MSG(pane_part,
wxT("Pane border part not found -- shouldn't happen"));
int pane_position = -1;
for (i = 0; i < dock_pane_count; ++i)
{
- wxPaneInfo& p = *dock.panes.Item(i);
+ wxAuiPaneInfo& p = *dock.panes.Item(i);
if (p.window == pane.window)
pane_position = i;
int borrow_pane = -1;
for (i = pane_position+1; i < dock_pane_count; ++i)
{
- wxPaneInfo& p = *dock.panes.Item(i);
+ wxAuiPaneInfo& p = *dock.panes.Item(i);
if (!p.IsFixed())
{
borrow_pane = i;
if (m_action_part == HitTest(event.GetX(), event.GetY()))
{
// fire button-click event
- wxFrameManagerEvent e(wxEVT_AUI_PANEBUTTON);
+ wxAuiManagerEvent e(wxEVT_AUI_PANEBUTTON);
e.SetPane(m_action_part->pane);
e.SetButton(m_action_part->button->button_id);
ProcessMgrEvent(e);
{
m_frame->ReleaseMouse();
- wxPaneInfo& pane = GetPane(m_action_window);
+ wxAuiPaneInfo& pane = GetPane(m_action_window);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
// save the new positions
- wxDockInfoPtrArray docks;
+ wxAuiDockInfoPtrArray docks;
FindDocks(m_docks, pane.dock_direction,
pane.dock_layer, pane.dock_row, docks);
if (docks.GetCount() == 1)
{
- wxDockInfo& dock = *docks.Item(0);
+ wxAuiDockInfo& dock = *docks.Item(0);
wxArrayInt pane_positions, pane_sizes;
GetPanePositionsAndSizes(dock, pane_positions, pane_sizes);
dock.panes.Item(i)->dock_pos = pane_positions[i];
}
- pane.state &= ~wxPaneInfo::actionPane;
+ pane.state &= ~wxAuiPaneInfo::actionPane;
Update();
}
else
}
-void wxFrameManager::OnMotion(wxMouseEvent& event)
+void wxAuiManager::OnMotion(wxMouseEvent& event)
{
// sometimes when Update() is called from inside this method,
// a spurious mouse move event is generated; this check will make
if (abs(event.m_x - m_action_start.x) > drag_x_threshold ||
abs(event.m_y - m_action_start.y) > drag_y_threshold)
{
- wxPaneInfo* pane_info = m_action_part->pane;
+ wxAuiPaneInfo* pane_info = m_action_part->pane;
if (!pane_info->IsToolbar())
{
}
else if (m_action == actionDragToolbarPane)
{
- wxPaneInfo& pane = GetPane(m_action_window);
+ wxAuiPaneInfo& pane = GetPane(m_action_window);
wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
- pane.state |= wxPaneInfo::actionPane;
+ pane.state |= wxAuiPaneInfo::actionPane;
wxPoint pt = event.GetPosition();
DoDrop(m_docks, m_panes, pane, pt, m_action_offset);
// EVT_MOTION() events will move the floating pane
if (pane.IsFloating())
{
- pane.state &= ~wxPaneInfo::actionPane;
+ pane.state &= ~wxAuiPaneInfo::actionPane;
m_action = actionDragFloatingPane;
m_action_window = pane.frame;
}
}
else
{
- wxDockUIPart* part = HitTest(event.GetX(), event.GetY());
- if (part && part->type == wxDockUIPart::typePaneButton)
+ wxAuiDockUIPart* part = HitTest(event.GetX(), event.GetY());
+ if (part && part->type == wxAuiDockUIPart::typePaneButton)
{
if (part != m_hover_button)
{
}
}
-void wxFrameManager::OnLeaveWindow(wxMouseEvent& WXUNUSED(event))
+void wxAuiManager::OnLeaveWindow(wxMouseEvent& WXUNUSED(event))
{
if (m_hover_button)
{
}
}
-void wxFrameManager::OnChildFocus(wxChildFocusEvent& event)
+void wxAuiManager::OnChildFocus(wxChildFocusEvent& event)
{
// when a child pane has it's focus set, we should change the
// pane's active state to reflect this. (this is only true if
// OnPaneButton() is an event handler that is called
// when a pane button has been pressed.
-void wxFrameManager::OnPaneButton(wxFrameManagerEvent& evt)
+void wxAuiManager::OnPaneButton(wxAuiManagerEvent& evt)
{
- wxASSERT_MSG(evt.pane, wxT("Pane Info passed to wxFrameManager::OnPaneButton must be non-null"));
+ wxASSERT_MSG(evt.pane, wxT("Pane Info passed to wxAuiManager::OnPaneButton must be non-null"));
- wxPaneInfo& pane = *(evt.pane);
+ wxAuiPaneInfo& pane = *(evt.pane);
if (evt.button == wxAUI_BUTTON_CLOSE)
{
// fire pane close event
- wxFrameManagerEvent e(wxEVT_AUI_PANECLOSE);
+ wxAuiManagerEvent e(wxEVT_AUI_PANECLOSE);
e.SetPane(evt.pane);
ProcessMgrEvent(e);
else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && !pane.IsMaximized())
{
// fire pane close event
- wxFrameManagerEvent e(wxEVT_AUI_PANEMAXIMIZE);
+ wxAuiManagerEvent e(wxEVT_AUI_PANEMAXIMIZE);
e.SetPane(evt.pane);
ProcessMgrEvent(e);
else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && pane.IsMaximized())
{
// fire pane close event
- wxFrameManagerEvent e(wxEVT_AUI_PANERESTORE);
+ wxAuiManagerEvent e(wxEVT_AUI_PANERESTORE);
e.SetPane(evt.pane);
ProcessMgrEvent(e);
};
//-----------------------------------------------------------------------------
-// wxTabMDIParentFrame
+// wxAuiMDIParentFrame
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxTabMDIParentFrame, wxFrame)
+IMPLEMENT_DYNAMIC_CLASS(wxAuiMDIParentFrame, wxFrame)
-BEGIN_EVENT_TABLE(wxTabMDIParentFrame, wxFrame)
+BEGIN_EVENT_TABLE(wxAuiMDIParentFrame, wxFrame)
#if wxUSE_MENUS
- EVT_MENU (wxID_ANY, wxTabMDIParentFrame::DoHandleMenu)
+ EVT_MENU (wxID_ANY, wxAuiMDIParentFrame::DoHandleMenu)
#endif
END_EVENT_TABLE()
-wxTabMDIParentFrame::wxTabMDIParentFrame()
+wxAuiMDIParentFrame::wxAuiMDIParentFrame()
{
Init();
}
-wxTabMDIParentFrame::wxTabMDIParentFrame(wxWindow *parent,
+wxAuiMDIParentFrame::wxAuiMDIParentFrame(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos,
(void)Create(parent, id, title, pos, size, style, name);
}
-wxTabMDIParentFrame::~wxTabMDIParentFrame()
+wxAuiMDIParentFrame::~wxAuiMDIParentFrame()
{
// Make sure the client window is destructed before the menu bars are!
wxDELETE(m_pClientWindow);
#endif // wxUSE_MENUS
}
-bool wxTabMDIParentFrame::Create(wxWindow *parent,
+bool wxAuiMDIParentFrame::Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos,
}
#if wxUSE_MENUS
-void wxTabMDIParentFrame::SetWindowMenu(wxMenu* pMenu)
+void wxAuiMDIParentFrame::SetWindowMenu(wxMenu* pMenu)
{
// Replace the window menu from the currently loaded menu bar.
wxMenuBar *pMenuBar = GetMenuBar();
}
}
-void wxTabMDIParentFrame::SetMenuBar(wxMenuBar* pMenuBar)
+void wxAuiMDIParentFrame::SetMenuBar(wxMenuBar* pMenuBar)
{
// Remove the Window menu from the old menu bar
RemoveWindowMenu(GetMenuBar());
}
#endif // wxUSE_MENUS
-void wxTabMDIParentFrame::SetChildMenuBar(wxTabMDIChildFrame* pChild)
+void wxAuiMDIParentFrame::SetChildMenuBar(wxAuiMDIChildFrame* pChild)
{
#if wxUSE_MENUS
if (!pChild)
#endif // wxUSE_MENUS
}
-bool wxTabMDIParentFrame::ProcessEvent(wxEvent& event)
+bool wxAuiMDIParentFrame::ProcessEvent(wxEvent& event)
{
// Stops the same event being processed repeatedly
static wxEventType inEvent = wxEVT_NULL;
return res;
}
-wxTabMDIChildFrame *wxTabMDIParentFrame::GetActiveChild() const
+wxAuiMDIChildFrame *wxAuiMDIParentFrame::GetActiveChild() const
{
return m_pActiveChild;
}
-void wxTabMDIParentFrame::SetActiveChild(wxTabMDIChildFrame* pChildFrame)
+void wxAuiMDIParentFrame::SetActiveChild(wxAuiMDIChildFrame* pChildFrame)
{
m_pActiveChild = pChildFrame;
}
-wxTabMDIClientWindow *wxTabMDIParentFrame::GetClientWindow() const
+wxAuiTabMDIClientWindow *wxAuiMDIParentFrame::GetClientWindow() const
{
return m_pClientWindow;
}
-wxTabMDIClientWindow *wxTabMDIParentFrame::OnCreateClient()
+wxAuiTabMDIClientWindow *wxAuiMDIParentFrame::OnCreateClient()
{
- m_pClientWindow = new wxTabMDIClientWindow( this );
+ m_pClientWindow = new wxAuiTabMDIClientWindow( this );
return m_pClientWindow;
}
-void wxTabMDIParentFrame::ActivateNext()
+void wxAuiMDIParentFrame::ActivateNext()
{
if (m_pClientWindow && m_pClientWindow->GetSelection() != wxNOT_FOUND)
{
}
}
-void wxTabMDIParentFrame::ActivatePrevious()
+void wxAuiMDIParentFrame::ActivatePrevious()
{
if (m_pClientWindow && m_pClientWindow->GetSelection() != wxNOT_FOUND)
{
}
}
-void wxTabMDIParentFrame::Init()
+void wxAuiMDIParentFrame::Init()
{
m_pClientWindow = NULL;
m_pActiveChild = NULL;
}
#if wxUSE_MENUS
-void wxTabMDIParentFrame::RemoveWindowMenu(wxMenuBar* pMenuBar)
+void wxAuiMDIParentFrame::RemoveWindowMenu(wxMenuBar* pMenuBar)
{
if (pMenuBar && m_pWindowMenu)
{
}
}
-void wxTabMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar)
+void wxAuiMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar)
{
if (pMenuBar && m_pWindowMenu)
{
}
}
-void wxTabMDIParentFrame::DoHandleMenu(wxCommandEvent& event)
+void wxAuiMDIParentFrame::DoHandleMenu(wxCommandEvent& event)
{
switch (event.GetId())
{
}
#endif // wxUSE_MENUS
-void wxTabMDIParentFrame::DoGetClientSize(int* width, int* height) const
+void wxAuiMDIParentFrame::DoGetClientSize(int* width, int* height) const
{
wxFrame::DoGetClientSize(width, height);
}
//-----------------------------------------------------------------------------
-// wxTabMDIChildFrame
+// wxAuiMDIChildFrame
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxTabMDIChildFrame, wxPanel)
+IMPLEMENT_DYNAMIC_CLASS(wxAuiMDIChildFrame, wxPanel)
-BEGIN_EVENT_TABLE(wxTabMDIChildFrame, wxPanel)
- EVT_MENU_HIGHLIGHT_ALL(wxTabMDIChildFrame::OnMenuHighlight)
- EVT_ACTIVATE(wxTabMDIChildFrame::OnActivate)
- EVT_CLOSE(wxTabMDIChildFrame::OnCloseWindow)
+BEGIN_EVENT_TABLE(wxAuiMDIChildFrame, wxPanel)
+ EVT_MENU_HIGHLIGHT_ALL(wxAuiMDIChildFrame::OnMenuHighlight)
+ EVT_ACTIVATE(wxAuiMDIChildFrame::OnActivate)
+ EVT_CLOSE(wxAuiMDIChildFrame::OnCloseWindow)
END_EVENT_TABLE()
-wxTabMDIChildFrame::wxTabMDIChildFrame()
+wxAuiMDIChildFrame::wxAuiMDIChildFrame()
{
Init();
}
-wxTabMDIChildFrame::wxTabMDIChildFrame(wxTabMDIParentFrame *parent,
+wxAuiMDIChildFrame::wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
wxWindowID id,
const wxString& title,
const wxPoint& WXUNUSED(pos),
Create(parent, id, title, wxDefaultPosition, size, style, name);
}
-wxTabMDIChildFrame::~wxTabMDIChildFrame()
+wxAuiMDIChildFrame::~wxAuiMDIChildFrame()
{
#if wxUSE_MENUS
wxDELETE(m_pMenuBar);
#endif // wxUSE_MENUS
}
-bool wxTabMDIChildFrame::Create(wxTabMDIParentFrame* parent,
+bool wxAuiMDIChildFrame::Create(wxAuiMDIParentFrame* parent,
wxWindowID id,
const wxString& title,
const wxPoint& WXUNUSED(pos),
long style,
const wxString& name)
{
- wxTabMDIClientWindow* pClientWindow = parent->GetClientWindow();
+ wxAuiTabMDIClientWindow* pClientWindow = parent->GetClientWindow();
wxASSERT_MSG((pClientWindow != (wxWindow*) NULL), wxT("Missing MDI client window."));
wxPanel::Create(pClientWindow, id, wxDefaultPosition, size, style|wxNO_BORDER, name);
return true;
}
-bool wxTabMDIChildFrame::Destroy()
+bool wxAuiMDIChildFrame::Destroy()
{
- wxTabMDIParentFrame* pParentFrame = GetMDIParentFrame();
+ wxAuiMDIParentFrame* pParentFrame = GetMDIParentFrame();
wxASSERT_MSG(pParentFrame, wxT("Missing MDI Parent Frame"));
- wxTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
+ wxAuiTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
wxASSERT_MSG(pClientWindow, wxT("Missing MDI Client Window"));
if (pParentFrame->GetActiveChild() == this)
}
#if wxUSE_MENUS
-void wxTabMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar)
+void wxAuiMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar)
{
wxMenuBar *pOldMenuBar = m_pMenuBar;
m_pMenuBar = menu_bar;
if (m_pMenuBar)
{
- wxTabMDIParentFrame* pParentFrame = GetMDIParentFrame();
+ wxAuiMDIParentFrame* pParentFrame = GetMDIParentFrame();
wxASSERT_MSG(pParentFrame, wxT("Missing MDI Parent Frame"));
m_pMenuBar->SetParent(pParentFrame);
}
}
-wxMenuBar *wxTabMDIChildFrame::GetMenuBar() const
+wxMenuBar *wxAuiMDIChildFrame::GetMenuBar() const
{
return m_pMenuBar;
}
#endif // wxUSE_MENUS
-void wxTabMDIChildFrame::SetTitle(const wxString& title)
+void wxAuiMDIChildFrame::SetTitle(const wxString& title)
{
m_title = title;
- wxTabMDIParentFrame* pParentFrame = GetMDIParentFrame();
+ wxAuiMDIParentFrame* pParentFrame = GetMDIParentFrame();
wxASSERT_MSG(pParentFrame, wxT("Missing MDI Parent Frame"));
- wxTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
+ wxAuiTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
if (pClientWindow != NULL)
{
size_t pos;
}
}
-wxString wxTabMDIChildFrame::GetTitle() const
+wxString wxAuiMDIChildFrame::GetTitle() const
{
return m_title;
}
-void wxTabMDIChildFrame::Activate()
+void wxAuiMDIChildFrame::Activate()
{
- wxTabMDIParentFrame* pParentFrame = GetMDIParentFrame();
+ wxAuiMDIParentFrame* pParentFrame = GetMDIParentFrame();
wxASSERT_MSG(pParentFrame, wxT("Missing MDI Parent Frame"));
- wxTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
+ wxAuiTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
if (pClientWindow != NULL)
{
}
}
-void wxTabMDIChildFrame::OnMenuHighlight(wxMenuEvent& event)
+void wxAuiMDIChildFrame::OnMenuHighlight(wxMenuEvent& event)
{
#if wxUSE_STATUSBAR
if (m_pMDIParentFrame)
#endif // wxUSE_STATUSBAR
}
-void wxTabMDIChildFrame::OnActivate(wxActivateEvent& WXUNUSED(event))
+void wxAuiMDIChildFrame::OnActivate(wxActivateEvent& WXUNUSED(event))
{
// do nothing
}
-void wxTabMDIChildFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
+void wxAuiMDIChildFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
{
Destroy();
}
-void wxTabMDIChildFrame::SetMDIParentFrame(wxTabMDIParentFrame* parentFrame)
+void wxAuiMDIChildFrame::SetMDIParentFrame(wxAuiMDIParentFrame* parentFrame)
{
m_pMDIParentFrame = parentFrame;
}
-wxTabMDIParentFrame* wxTabMDIChildFrame::GetMDIParentFrame() const
+wxAuiMDIParentFrame* wxAuiMDIChildFrame::GetMDIParentFrame() const
{
return m_pMDIParentFrame;
}
-void wxTabMDIChildFrame::Init()
+void wxAuiMDIChildFrame::Init()
{
m_pMDIParentFrame = NULL;
#if wxUSE_MENUS
#endif // wxUSE_MENUS
}
-bool wxTabMDIChildFrame::Show(bool WXUNUSED(show))
+bool wxAuiMDIChildFrame::Show(bool WXUNUSED(show))
{
// do nothing
return true;
}
-void wxTabMDIChildFrame::DoShow(bool show)
+void wxAuiMDIChildFrame::DoShow(bool show)
{
wxWindow::Show(show);
}
-void wxTabMDIChildFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags)
+void wxAuiMDIChildFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
m_mdi_newrect = wxRect(x, y, width, height);
#ifdef __WXGTK__
#endif
}
-void wxTabMDIChildFrame::DoMoveWindow(int x, int y, int width, int height)
+void wxAuiMDIChildFrame::DoMoveWindow(int x, int y, int width, int height)
{
m_mdi_newrect = wxRect(x, y, width, height);
}
-void wxTabMDIChildFrame::ApplyMDIChildFrameRect()
+void wxAuiMDIChildFrame::ApplyMDIChildFrameRect()
{
if (m_mdi_currect != m_mdi_newrect)
{
//-----------------------------------------------------------------------------
-// wxTabMDIClientWindow
+// wxAuiTabMDIClientWindow
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxTabMDIClientWindow, wxAuiMultiNotebook)
+IMPLEMENT_DYNAMIC_CLASS(wxAuiTabMDIClientWindow, wxAuiNotebook)
-BEGIN_EVENT_TABLE(wxTabMDIClientWindow, wxAuiMultiNotebook)
- EVT_AUINOTEBOOK_PAGE_CHANGED(wxID_ANY, wxTabMDIClientWindow::OnPageChanged)
- EVT_SIZE(wxTabMDIClientWindow::OnSize)
+BEGIN_EVENT_TABLE(wxAuiTabMDIClientWindow, wxAuiNotebook)
+ EVT_AUINOTEBOOK_PAGE_CHANGED(wxID_ANY, wxAuiTabMDIClientWindow::OnPageChanged)
+ EVT_SIZE(wxAuiTabMDIClientWindow::OnSize)
END_EVENT_TABLE()
-wxTabMDIClientWindow::wxTabMDIClientWindow()
+wxAuiTabMDIClientWindow::wxAuiTabMDIClientWindow()
{
}
-wxTabMDIClientWindow::wxTabMDIClientWindow(wxTabMDIParentFrame* parent, long style)
+wxAuiTabMDIClientWindow::wxAuiTabMDIClientWindow(wxAuiMDIParentFrame* parent, long style)
{
CreateClient(parent, style);
}
-wxTabMDIClientWindow::~wxTabMDIClientWindow()
+wxAuiTabMDIClientWindow::~wxAuiTabMDIClientWindow()
{
DestroyChildren();
}
-bool wxTabMDIClientWindow::CreateClient(wxTabMDIParentFrame* parent, long style)
+bool wxAuiTabMDIClientWindow::CreateClient(wxAuiMDIParentFrame* parent, long style)
{
SetWindowStyleFlag(style);
- if (!wxAuiMultiNotebook::Create(parent,
+ if (!wxAuiNotebook::Create(parent,
wxID_ANY,
wxPoint(0,0),
wxSize(100, 100),
return true;
}
-int wxTabMDIClientWindow::SetSelection(size_t nPage)
+int wxAuiTabMDIClientWindow::SetSelection(size_t nPage)
{
- return wxAuiMultiNotebook::SetSelection(nPage);
+ return wxAuiNotebook::SetSelection(nPage);
}
-void wxTabMDIClientWindow::PageChanged(int old_selection, int new_selection)
+void wxAuiTabMDIClientWindow::PageChanged(int old_selection, int new_selection)
{
// don't do anything if the page doesn't actually change
if (old_selection == new_selection)
// don't do anything if the new page is already active
if (new_selection != -1)
{
- wxTabMDIChildFrame* child = (wxTabMDIChildFrame*)GetPage(new_selection);
+ wxAuiMDIChildFrame* child = (wxAuiMDIChildFrame*)GetPage(new_selection);
if (child->GetMDIParentFrame()->GetActiveChild() == child)
return;
}
// notify old active child that it has been deactivated
if (old_selection != -1)
{
- wxTabMDIChildFrame* old_child = (wxTabMDIChildFrame*)GetPage(old_selection);
- wxASSERT_MSG(old_child, wxT("wxTabMDIClientWindow::PageChanged - null page pointer"));
+ wxAuiMDIChildFrame* old_child = (wxAuiMDIChildFrame*)GetPage(old_selection);
+ wxASSERT_MSG(old_child, wxT("wxAuiTabMDIClientWindow::PageChanged - null page pointer"));
wxActivateEvent event(wxEVT_ACTIVATE, false, old_child->GetId());
event.SetEventObject(old_child);
// notify new active child that it has been activated
if (new_selection != -1)
{
- wxTabMDIChildFrame* active_child = (wxTabMDIChildFrame*)GetPage(new_selection);
- wxASSERT_MSG(active_child, wxT("wxTabMDIClientWindow::PageChanged - null page pointer"));
+ wxAuiMDIChildFrame* active_child = (wxAuiMDIChildFrame*)GetPage(new_selection);
+ wxASSERT_MSG(active_child, wxT("wxAuiTabMDIClientWindow::PageChanged - null page pointer"));
wxActivateEvent event(wxEVT_ACTIVATE, true, active_child->GetId());
event.SetEventObject(active_child);
}
}
-void wxTabMDIClientWindow::OnPageChanged(wxAuiNotebookEvent& evt)
+void wxAuiTabMDIClientWindow::OnPageChanged(wxAuiNotebookEvent& evt)
{
PageChanged(evt.GetOldSelection(), evt.GetSelection());
evt.Skip();
}
-void wxTabMDIClientWindow::OnSize(wxSizeEvent& evt)
+void wxAuiTabMDIClientWindow::OnSize(wxSizeEvent& evt)
{
- wxAuiMultiNotebook::OnSize(evt);
+ wxAuiNotebook::OnSize(evt);
for (size_t pos = 0; pos < GetPageCount(); pos++)
- ((wxTabMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect();
+ ((wxAuiMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect();
}
#endif //wxUSE_AUI