wxaui big class rename

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams
2006-11-01 18:51:44 +00:00
parent 37106ab28e
commit a3a5df9d92
11 changed files with 788 additions and 788 deletions

View File

@@ -55,12 +55,12 @@ enum wxAuiNotebookOption
// 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;
@@ -98,13 +98,13 @@ public:
};
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);
@@ -233,8 +233,8 @@ public:
wxAuiTabContainer();
virtual ~wxAuiTabContainer();
void SetArtProvider(wxTabArt* art);
wxTabArt* GetArtProvider();
void SetArtProvider(wxAuiTabArt* art);
wxAuiTabArt* GetArtProvider();
void SetFlags(unsigned int flags);
unsigned int GetFlags() const;
@@ -273,7 +273,7 @@ protected:
private:
wxTabArt* m_art;
wxAuiTabArt* m_art;
wxAuiNotebookPageArray m_pages;
wxAuiTabContainerButtonArray m_buttons;
wxRect m_rect;
@@ -323,20 +323,20 @@ protected:
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,
@@ -364,8 +364,8 @@ public:
size_t GetPageCount() const;
wxWindow* GetPage(size_t page_idx) const;
void SetArtProvider(wxTabArt* art);
wxTabArt* GetArtProvider();
void SetArtProvider(wxAuiTabArt* art);
wxAuiTabArt* GetArtProvider();
protected:
@@ -381,7 +381,7 @@ 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);
@@ -392,7 +392,7 @@ protected:
protected:
wxFrameManager m_mgr;
wxAuiManager m_mgr;
wxAuiTabContainer m_tabs;
int m_curpage;
int m_tab_id_counter;

View File

@@ -29,12 +29,12 @@
// 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;
@@ -59,36 +59,36 @@ public:
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);
@@ -111,24 +111,24 @@ public:
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:

View File

@@ -24,24 +24,24 @@
#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();
@@ -65,12 +65,12 @@ private:
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
};

View File

@@ -26,7 +26,7 @@
#include "wx/timer.h"
#include "wx/sizer.h"
enum wxFrameManagerDock
enum wxAuiManagerDock
{
wxAUI_DOCK_NONE = 0,
wxAUI_DOCK_TOP = 1,
@@ -37,7 +37,7 @@ enum wxFrameManagerDock
wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER
};
enum wxFrameManagerOption
enum wxAuiManagerOption
{
wxAUI_MGR_ALLOW_FLOATING = 1 << 0,
wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1,
@@ -55,7 +55,7 @@ enum wxFrameManagerOption
};
enum wxPaneDockArtSetting
enum wxAuiPaneDockArtSetting
{
wxAUI_ART_SASH_SIZE = 0,
wxAUI_ART_CAPTION_SIZE = 1,
@@ -76,14 +76,14 @@ enum wxPaneDockArtSetting
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,
@@ -108,7 +108,7 @@ enum wxAuiButtonId
wxAUI_BUTTON_CUSTOM3 = 203
};
enum wxPaneInsertLevel
enum wxAuiPaneInsertLevel
{
wxAUI_INSERT_PANE = 0,
wxAUI_INSERT_ROW = 1,
@@ -119,32 +119,32 @@ enum wxPaneInsertLevel
// 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;
@@ -163,10 +163,10 @@ public:
DefaultPane();
}
~wxPaneInfo() {}
~wxAuiPaneInfo() {}
#ifndef SWIG
wxPaneInfo(const wxPaneInfo& c)
wxAuiPaneInfo(const wxAuiPaneInfo& c)
{
name = c.name;
caption = c.caption;
@@ -187,7 +187,7 @@ public:
rect = c.rect;
}
wxPaneInfo& operator=(const wxPaneInfo& c)
wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c)
{
name = c.name;
caption = c.caption;
@@ -212,7 +212,7 @@ public:
// 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"
@@ -248,64 +248,64 @@ public:
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); }
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); }
wxPaneInfo& SaveHidden() { return SetFlag(optionSavedHidden, HasFlag(optionHidden)); }
wxPaneInfo& RestoreHidden() { return SetFlag(optionHidden, HasFlag(optionSavedHidden)); }
wxAuiPaneInfo& SaveHidden() { return SetFlag(optionSavedHidden, HasFlag(optionHidden)); }
wxAuiPaneInfo& RestoreHidden() { return SetFlag(optionHidden, HasFlag(optionSavedHidden)); }
wxPaneInfo& Dockable(bool b = true)
wxAuiPaneInfo& Dockable(bool b = true)
{
return TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b);
}
wxPaneInfo& DefaultPane()
wxAuiPaneInfo& DefaultPane()
{
state |= optionTopDockable | optionBottomDockable |
optionLeftDockable | optionRightDockable |
@@ -314,14 +314,14 @@ public:
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);
@@ -331,7 +331,7 @@ public:
return *this;
}
wxPaneInfo& SetFlag(unsigned int flag, bool option_state)
wxAuiPaneInfo& SetFlag(unsigned int flag, bool option_state)
{
if (option_state)
state |= flag;
@@ -346,12 +346,12 @@ public:
}
#ifdef SWIG
%typemap(out) wxPaneInfo& ;
%typemap(out) wxAuiPaneInfo& ;
#endif
public:
enum wxPaneState
enum wxAuiPaneState
{
optionFloating = 1 << 0,
optionHidden = 1 << 1,
@@ -403,24 +403,24 @@ public:
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);
@@ -430,20 +430,20 @@ public:
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,
@@ -451,18 +451,18 @@ public:
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();
@@ -473,7 +473,7 @@ public:
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,
@@ -496,35 +496,35 @@ protected:
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);
@@ -533,10 +533,10 @@ protected:
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);
@@ -544,8 +544,8 @@ protected:
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:
@@ -576,23 +576,23 @@ 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)
@@ -610,10 +610,10 @@ protected:
// 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;
@@ -622,7 +622,7 @@ public:
dc = NULL;
}
#ifndef SWIG
wxFrameManagerEvent(const wxFrameManagerEvent& c) : wxEvent(c)
wxAuiManagerEvent(const wxAuiManagerEvent& c) : wxEvent(c)
{
pane = c.pane;
button = c.button;
@@ -631,13 +631,13 @@ public:
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; }
@@ -647,7 +647,7 @@ public:
bool CanVeto() const { return canveto_flag && veto_flag; }
public:
wxPaneInfo* pane;
wxAuiPaneInfo* pane;
int button;
bool veto_flag;
bool canveto_flag;
@@ -655,15 +655,15 @@ public:
#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;
@@ -676,7 +676,7 @@ public:
}
#ifndef SWIG
wxDockInfo(const wxDockInfo& c)
wxAuiDockInfo(const wxAuiDockInfo& c)
{
dock_direction = c.dock_direction;
dock_layer = c.dock_layer;
@@ -690,7 +690,7 @@ public:
rect = c.rect;
}
wxDockInfo& operator=(const wxDockInfo& c)
wxAuiDockInfo& operator=(const wxAuiDockInfo& c)
{
dock_direction = c.dock_direction;
dock_layer = c.dock_layer;
@@ -713,7 +713,7 @@ public:
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)
@@ -727,7 +727,7 @@ public:
};
class WXDLLIMPEXP_AUI wxDockUIPart
class WXDLLIMPEXP_AUI wxAuiDockUIPart
{
public:
enum
@@ -745,16 +745,16 @@ public:
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)
@@ -773,21 +773,21 @@ BEGIN_DECLARE_EVENT_TYPES()
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

View File

@@ -27,19 +27,19 @@
// 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,
@@ -47,7 +47,7 @@ public:
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
const wxString& name = wxFrameNameStr);
~wxTabMDIParentFrame();
~wxAuiMDIParentFrame();
bool Create(wxWindow *parent,
wxWindowID winid,
@@ -64,15 +64,15 @@ public:
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) { }
@@ -81,8 +81,8 @@ public:
virtual void ActivatePrevious();
protected:
wxTabMDIClientWindow *m_pClientWindow;
wxTabMDIChildFrame *m_pActiveChild;
wxAuiTabMDIClientWindow *m_pClientWindow;
wxAuiMDIChildFrame *m_pActiveChild;
#if wxUSE_MENUS
wxMenu *m_pWindowMenu;
@@ -103,18 +103,18 @@ protected:
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,
@@ -122,8 +122,8 @@ public:
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,
@@ -190,11 +190,11 @@ public:
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;
@@ -218,24 +218,24 @@ public:
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);
@@ -247,7 +247,7 @@ protected:
void OnSize(wxSizeEvent& evt);
private:
DECLARE_DYNAMIC_CLASS(wxTabMDIClientWindow)
DECLARE_DYNAMIC_CLASS(wxAuiTabMDIClientWindow)
DECLARE_EVENT_TABLE()
};
#endif // wxUSE_AUI

View File

@@ -97,7 +97,7 @@ public:
~MyFrame();
wxDockArt* GetDockArt();
wxAuiDockArt* GetDockArt();
void DoUpdate();
private:
@@ -107,7 +107,7 @@ private:
wxSizeReportCtrl* CreateSizeReportCtrl(int width = 80, int height = 80);
wxPoint GetStartPosition();
wxHtmlWindow* CreateHTMLCtrl(wxWindow* parent = NULL);
wxAuiMultiNotebook* CreateNotebook();
wxAuiNotebook* CreateNotebook();
wxString GetIntroText();
@@ -134,11 +134,11 @@ private:
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;
@@ -156,7 +156,7 @@ public:
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;
@@ -186,7 +186,7 @@ private:
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);
@@ -217,7 +217,7 @@ private:
}
private:
wxFrameManager* m_mgr;
wxAuiManager* m_mgr;
DECLARE_EVENT_TABLE()
};
@@ -597,7 +597,7 @@ MyFrame::MyFrame(wxWindow* parent,
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
@@ -664,7 +664,7 @@ MyFrame::MyFrame(wxWindow* parent,
// 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));
@@ -743,112 +743,112 @@ MyFrame::MyFrame(wxWindow* parent,
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));
@@ -857,7 +857,7 @@ MyFrame::MyFrame(wxWindow* parent,
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();
@@ -871,7 +871,7 @@ MyFrame::MyFrame(wxWindow* parent,
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();
}
@@ -880,7 +880,7 @@ MyFrame::~MyFrame()
m_mgr.UnInit();
}
wxDockArt* MyFrame::GetDockArt()
wxAuiDockArt* MyFrame::GetDockArt()
{
return m_mgr.GetArtProvider();
}
@@ -903,7 +903,7 @@ void MyFrame::OnSize(wxSizeEvent& event)
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());
@@ -1018,7 +1018,7 @@ void MyFrame::OnUpdateUI(wxUpdateUIEvent& event)
}
}
void MyFrame::OnPaneClose(wxFrameManagerEvent& evt)
void MyFrame::OnPaneClose(wxAuiManagerEvent& evt)
{
if (evt.pane->name == wxT("test10"))
{
@@ -1078,7 +1078,7 @@ wxPoint MyFrame::GetStartPosition()
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)));
@@ -1087,7 +1087,7 @@ void MyFrame::OnCreateTree(wxCommandEvent& WXUNUSED(event))
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)));
@@ -1096,7 +1096,7 @@ void MyFrame::OnCreateGrid(wxCommandEvent& WXUNUSED(event))
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)));
@@ -1105,7 +1105,7 @@ void MyFrame::OnCreateHTML(wxCommandEvent& WXUNUSED(event))
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)));
@@ -1114,7 +1114,7 @@ void MyFrame::OnCreateNotebook(wxCommandEvent& WXUNUSED(event))
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();
@@ -1122,7 +1122,7 @@ void MyFrame::OnCreateText(wxCommandEvent& WXUNUSED(event))
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));
@@ -1235,9 +1235,9 @@ wxHtmlWindow* MyFrame::CreateHTMLCtrl(wxWindow* parent)
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 );

View File

@@ -103,9 +103,9 @@ static void DrawButtonS(wxDC& dc,
// -- wxDefaultTabArt class implementation --
// -- wxAuiDefaultTabArt class implementation --
wxDefaultTabArt::wxDefaultTabArt()
wxAuiDefaultTabArt::wxAuiDefaultTabArt()
{
m_normal_font = *wxNORMAL_FONT;
m_selected_font = *wxNORMAL_FONT;
@@ -162,11 +162,11 @@ wxDefaultTabArt::wxDefaultTabArt()
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
@@ -189,7 +189,7 @@ void wxDefaultTabArt::DrawBackground(wxDC* dc,
// 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,
@@ -305,7 +305,7 @@ void wxDefaultTabArt::DrawTab(wxDC* dc,
}
wxSize wxDefaultTabArt::GetTabSize(wxDC* dc,
wxSize wxAuiDefaultTabArt::GetTabSize(wxDC* dc,
const wxString& caption,
bool WXUNUSED(active),
bool with_close_button,
@@ -328,7 +328,7 @@ wxSize wxDefaultTabArt::GetTabSize(wxDC* dc,
}
void wxDefaultTabArt::DrawButton(
void wxAuiDefaultTabArt::DrawButton(
wxDC* dc,
const wxRect& in_rect,
int bitmap_id,
@@ -396,7 +396,7 @@ void wxDefaultTabArt::DrawButton(
int wxDefaultTabArt::GetBestTabCtrlSize(wxWindow* wnd)
int wxAuiDefaultTabArt::GetBestTabCtrlSize(wxWindow* wnd)
{
wxClientDC dc(wnd);
dc.SetFont(m_measuring_font);
@@ -405,17 +405,17 @@ int wxDefaultTabArt::GetBestTabCtrlSize(wxWindow* wnd)
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;
}
@@ -442,7 +442,7 @@ wxAuiTabContainer::wxAuiTabContainer()
{
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);
@@ -454,13 +454,13 @@ wxAuiTabContainer::~wxAuiTabContainer()
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;
}
@@ -974,13 +974,13 @@ bool wxAuiTabContainer::ButtonHitTest(int x, int y,
// 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
@@ -1303,9 +1303,9 @@ public:
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();
}
}
@@ -1336,31 +1336,31 @@ public:
// -- 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;
@@ -1368,7 +1368,7 @@ wxAuiMultiNotebook::wxAuiMultiNotebook()
m_tab_ctrl_height = 20;
}
wxAuiMultiNotebook::wxAuiMultiNotebook(wxWindow *parent,
wxAuiNotebook::wxAuiNotebook(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
@@ -1377,7 +1377,7 @@ wxAuiMultiNotebook::wxAuiMultiNotebook(wxWindow *parent,
InitNotebook(style);
}
bool wxAuiMultiNotebook::Create(wxWindow* parent,
bool wxAuiNotebook::Create(wxWindow* parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
@@ -1393,7 +1393,7 @@ bool wxAuiMultiNotebook::Create(wxWindow* parent,
// 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;
@@ -1415,27 +1415,27 @@ void wxAuiMultiNotebook::InitNotebook(long style)
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)
@@ -1443,7 +1443,7 @@ bool wxAuiMultiNotebook::AddPage(wxWindow* page,
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,
@@ -1474,7 +1474,7 @@ bool wxAuiMultiNotebook::InsertPage(size_t page_idx,
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);
}
@@ -1485,7 +1485,7 @@ bool wxAuiMultiNotebook::InsertPage(size_t page_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;
@@ -1529,7 +1529,7 @@ bool wxAuiMultiNotebook::DeletePage(size_t page_idx)
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
@@ -1557,7 +1557,7 @@ bool wxAuiMultiNotebook::DeletePage(size_t page_idx)
// 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);
@@ -1577,7 +1577,7 @@ bool wxAuiMultiNotebook::RemovePage(size_t 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;
@@ -1601,13 +1601,13 @@ bool wxAuiMultiNotebook::SetPageText(size_t page_idx, const wxString& text)
}
// 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)
@@ -1640,11 +1640,11 @@ size_t wxAuiMultiNotebook::SetSelection(size_t new_page)
// 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;
@@ -1666,14 +1666,14 @@ size_t wxAuiMultiNotebook::SetSelection(size_t new_page)
// 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());
@@ -1681,9 +1681,9 @@ wxWindow* wxAuiMultiNotebook::GetPage(size_t page_idx) const
}
// 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)
{
@@ -1697,7 +1697,7 @@ void wxAuiMultiNotebook::DoSizing()
// 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())
{
@@ -1713,7 +1713,7 @@ wxAuiTabCtrl* wxAuiMultiNotebook::GetActiveTabCtrl()
}
// 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)
{
@@ -1734,7 +1734,7 @@ wxAuiTabCtrl* wxAuiMultiNotebook::GetActiveTabCtrl()
wxNO_BORDER);
tabframe->m_tabs->SetFlags(m_flags);
m_mgr.AddPane(tabframe,
wxPaneInfo().Center().CaptionVisible(false));
wxAuiPaneInfo().Center().CaptionVisible(false));
m_mgr.Update();
@@ -1744,9 +1744,9 @@ wxAuiTabCtrl* wxAuiMultiNotebook::GetActiveTabCtrl()
// 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)
{
@@ -1768,15 +1768,15 @@ bool wxAuiMultiNotebook::FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx)
}
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;
@@ -1792,12 +1792,12 @@ void wxAuiMultiNotebook::OnTabClicked(wxCommandEvent& 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);
@@ -1856,7 +1856,7 @@ void wxAuiMultiNotebook::OnTabDragMotion(wxCommandEvent& evt)
void wxAuiMultiNotebook::OnTabEndDrag(wxCommandEvent& command_evt)
void wxAuiNotebook::OnTabEndDrag(wxCommandEvent& command_evt)
{
wxAuiNotebookEvent& evt = (wxAuiNotebookEvent&)command_evt;
@@ -1906,7 +1906,7 @@ void wxAuiMultiNotebook::OnTabEndDrag(wxCommandEvent& 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;
@@ -1944,11 +1944,11 @@ void wxAuiMultiNotebook::OnTabEndDrag(wxCommandEvent& command_evt)
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)
{
@@ -1963,11 +1963,11 @@ wxAuiTabCtrl* wxAuiMultiNotebook::GetTabCtrlFromPoint(const wxPoint& pt)
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)
{
@@ -1984,11 +1984,11 @@ wxWindow* wxAuiMultiNotebook::GetTabFrameFromTabCtrl(wxWindow* tab_ctrl)
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)
{
@@ -2013,7 +2013,7 @@ void wxAuiMultiNotebook::RemoveEmptyTabFrames()
// 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;
@@ -2035,7 +2035,7 @@ void wxAuiMultiNotebook::RemoveEmptyTabFrames()
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)
@@ -2045,7 +2045,7 @@ void wxAuiMultiNotebook::OnChildFocus(wxChildFocusEvent& evt)
}
void wxAuiMultiNotebook::OnTabButton(wxCommandEvent& command_evt)
void wxAuiNotebook::OnTabButton(wxCommandEvent& command_evt)
{
wxAuiNotebookEvent& evt = (wxAuiNotebookEvent&)command_evt;
wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject();
@@ -2060,7 +2060,7 @@ void wxAuiMultiNotebook::OnTabButton(wxCommandEvent& command_evt)
{
wxWindow* close_wnd = tabs->GetWindowFromIdx(selection);
if (close_wnd->IsKindOf(CLASSINFO(wxTabMDIChildFrame)))
if (close_wnd->IsKindOf(CLASSINFO(wxAuiMDIChildFrame)))
{
close_wnd->Close();
}

View File

@@ -46,14 +46,14 @@
#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
@@ -126,7 +126,7 @@ static void DrawGradientRectangle(wxDC& dc,
}
wxDefaultDockArt::wxDefaultDockArt()
wxAuiDefaultDockArt::wxAuiDefaultDockArt()
{
#ifdef __WXMAC__
wxBrush toolbarbrush;
@@ -246,7 +246,7 @@ wxDefaultDockArt::wxDefaultDockArt()
m_gradient_type = wxAUI_GRADIENT_VERTICAL;
}
int wxDefaultDockArt::GetMetric(int id)
int wxAuiDefaultDockArt::GetMetric(int id)
{
switch (id)
{
@@ -262,7 +262,7 @@ int wxDefaultDockArt::GetMetric(int id)
return 0;
}
void wxDefaultDockArt::SetMetric(int id, int new_val)
void wxAuiDefaultDockArt::SetMetric(int id, int new_val)
{
switch (id)
{
@@ -276,7 +276,7 @@ void wxDefaultDockArt::SetMetric(int id, int new_val)
}
}
wxColour wxDefaultDockArt::GetColour(int id)
wxColour wxAuiDefaultDockArt::GetColour(int id)
{
switch (id)
{
@@ -296,7 +296,7 @@ wxColour wxDefaultDockArt::GetColour(int id)
return wxColour();
}
void wxDefaultDockArt::SetColour(int id, const wxColor& colour)
void wxAuiDefaultDockArt::SetColour(int id, const wxColor& colour)
{
switch (id)
{
@@ -318,20 +318,20 @@ void wxDefaultDockArt::SetColour(int id, const wxColor& colour)
}
}
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 );
@@ -406,7 +406,7 @@ void wxDefaultDockArt::DrawSash(wxDC& dc, wxWindow *window, int orientation, con
}
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__
@@ -419,8 +419,8 @@ void wxDefaultDockArt::DrawBackground(wxDC& dc, wxWindow *WXUNUSED(window), int,
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);
@@ -454,7 +454,7 @@ void wxDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const wx
}
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)
{
@@ -501,18 +501,18 @@ void wxDefaultDockArt::DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool
}
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);
@@ -526,9 +526,9 @@ void wxDefaultDockArt::DrawCaption(wxDC& dc, wxWindow *WXUNUSED(window),
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);
@@ -577,11 +577,11 @@ void wxDefaultDockArt::DrawGripper(wxDC& dc, wxWindow *WXUNUSED(window),
}
}
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;
@@ -594,7 +594,7 @@ void wxDefaultDockArt::DrawPaneButton(wxDC& dc, wxWindow *WXUNUSED(window),
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)));
@@ -615,25 +615,25 @@ void wxDefaultDockArt::DrawPaneButton(wxDC& dc, wxWindow *WXUNUSED(window),
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;

View File

@@ -36,17 +36,17 @@
#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) |
@@ -70,7 +70,7 @@ wxFloatingPane::wxFloatingPane(wxWindow* parent,
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) {
@@ -79,12 +79,12 @@ wxFloatingPane::~wxFloatingPane()
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).
@@ -131,19 +131,19 @@ void wxFloatingPane::SetPaneWindow(const wxPaneInfo& pane)
}
}
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)
{
@@ -230,7 +230,7 @@ void wxFloatingPane::OnMoveEvent(wxMoveEvent& event)
OnMoving(event.GetRect(), dir);
}
void wxFloatingPane::OnIdle(wxIdleEvent& event)
void wxAuiFloatingPane::OnIdle(wxIdleEvent& event)
{
if (m_moving)
{
@@ -246,26 +246,26 @@ void wxFloatingPane::OnIdle(wxIdleEvent& event)
}
}
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())
{
@@ -277,19 +277,19 @@ void wxFloatingPane::OnActivate(wxActivateEvent& event)
// (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()

File diff suppressed because it is too large Load Diff

View File

@@ -48,23 +48,23 @@ enum MDI_MENU_ID
};
//-----------------------------------------------------------------------------
// 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,
@@ -76,7 +76,7 @@ wxTabMDIParentFrame::wxTabMDIParentFrame(wxWindow *parent,
(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);
@@ -87,7 +87,7 @@ wxTabMDIParentFrame::~wxTabMDIParentFrame()
#endif // wxUSE_MENUS
}
bool wxTabMDIParentFrame::Create(wxWindow *parent,
bool wxAuiMDIParentFrame::Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos,
@@ -115,7 +115,7 @@ bool wxTabMDIParentFrame::Create(wxWindow *parent,
}
#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();
@@ -133,7 +133,7 @@ void wxTabMDIParentFrame::SetWindowMenu(wxMenu* pMenu)
}
}
void wxTabMDIParentFrame::SetMenuBar(wxMenuBar* pMenuBar)
void wxAuiMDIParentFrame::SetMenuBar(wxMenuBar* pMenuBar)
{
// Remove the Window menu from the old menu bar
RemoveWindowMenu(GetMenuBar());
@@ -146,7 +146,7 @@ void wxTabMDIParentFrame::SetMenuBar(wxMenuBar* pMenuBar)
}
#endif // wxUSE_MENUS
void wxTabMDIParentFrame::SetChildMenuBar(wxTabMDIChildFrame* pChild)
void wxAuiMDIParentFrame::SetChildMenuBar(wxAuiMDIChildFrame* pChild)
{
#if wxUSE_MENUS
if (!pChild)
@@ -171,7 +171,7 @@ void wxTabMDIParentFrame::SetChildMenuBar(wxTabMDIChildFrame* 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;
@@ -208,28 +208,28 @@ bool wxTabMDIParentFrame::ProcessEvent(wxEvent& event)
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)
{
@@ -241,7 +241,7 @@ void wxTabMDIParentFrame::ActivateNext()
}
}
void wxTabMDIParentFrame::ActivatePrevious()
void wxAuiMDIParentFrame::ActivatePrevious()
{
if (m_pClientWindow && m_pClientWindow->GetSelection() != wxNOT_FOUND)
{
@@ -253,7 +253,7 @@ void wxTabMDIParentFrame::ActivatePrevious()
}
}
void wxTabMDIParentFrame::Init()
void wxAuiMDIParentFrame::Init()
{
m_pClientWindow = NULL;
m_pActiveChild = NULL;
@@ -264,7 +264,7 @@ void wxTabMDIParentFrame::Init()
}
#if wxUSE_MENUS
void wxTabMDIParentFrame::RemoveWindowMenu(wxMenuBar* pMenuBar)
void wxAuiMDIParentFrame::RemoveWindowMenu(wxMenuBar* pMenuBar)
{
if (pMenuBar && m_pWindowMenu)
{
@@ -279,7 +279,7 @@ void wxTabMDIParentFrame::RemoveWindowMenu(wxMenuBar* pMenuBar)
}
}
void wxTabMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar)
void wxAuiMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar)
{
if (pMenuBar && m_pWindowMenu)
{
@@ -291,7 +291,7 @@ void wxTabMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar)
}
}
void wxTabMDIParentFrame::DoHandleMenu(wxCommandEvent& event)
void wxAuiMDIParentFrame::DoHandleMenu(wxCommandEvent& event)
{
switch (event.GetId())
{
@@ -325,29 +325,29 @@ void wxTabMDIParentFrame::DoHandleMenu(wxCommandEvent& event)
}
#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),
@@ -359,14 +359,14 @@ wxTabMDIChildFrame::wxTabMDIChildFrame(wxTabMDIParentFrame *parent,
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),
@@ -374,7 +374,7 @@ bool wxTabMDIChildFrame::Create(wxTabMDIParentFrame* parent,
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);
@@ -392,12 +392,12 @@ bool wxTabMDIChildFrame::Create(wxTabMDIParentFrame* parent,
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)
@@ -417,14 +417,14 @@ bool wxTabMDIChildFrame::Destroy()
}
#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);
@@ -438,20 +438,20 @@ void wxTabMDIChildFrame::SetMenuBar(wxMenuBar *menu_bar)
}
}
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;
@@ -466,17 +466,17 @@ void wxTabMDIChildFrame::SetTitle(const wxString& title)
}
}
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)
{
@@ -492,7 +492,7 @@ void wxTabMDIChildFrame::Activate()
}
}
void wxTabMDIChildFrame::OnMenuHighlight(wxMenuEvent& event)
void wxAuiMDIChildFrame::OnMenuHighlight(wxMenuEvent& event)
{
#if wxUSE_STATUSBAR
if (m_pMDIParentFrame)
@@ -506,27 +506,27 @@ void wxTabMDIChildFrame::OnMenuHighlight(wxMenuEvent& event)
#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
@@ -534,18 +534,18 @@ void wxTabMDIChildFrame::Init()
#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__
@@ -555,12 +555,12 @@ void wxTabMDIChildFrame::DoSetSize(int x, int y, int width, int height, int size
#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)
{
@@ -572,35 +572,35 @@ void wxTabMDIChildFrame::ApplyMDIChildFrameRect()
//-----------------------------------------------------------------------------
// 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),
@@ -617,12 +617,12 @@ bool wxTabMDIClientWindow::CreateClient(wxTabMDIParentFrame* parent, long style)
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)
@@ -631,7 +631,7 @@ void wxTabMDIClientWindow::PageChanged(int old_selection, int 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;
}
@@ -639,8 +639,8 @@ void wxTabMDIClientWindow::PageChanged(int old_selection, int new_selection)
// 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);
@@ -650,8 +650,8 @@ void wxTabMDIClientWindow::PageChanged(int old_selection, int new_selection)
// 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);
@@ -665,18 +665,18 @@ void wxTabMDIClientWindow::PageChanged(int old_selection, int new_selection)
}
}
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