Use wxBaseArray instead of object arrays in wxAuiManager
This is similar to the previous commit and replaces some object arrays with arrays of objects, as we need to keep providing more or less the same API for accessing these arrays because they can be used from the application code, even if they're not formally part of our public API. Also adjust m_actionPart when removing parts from m_uiParts. This seems to have been always necessary when deleting the part corresponding to the action one, but now is also needed when deleting any previous parts too.
This commit is contained in:
parent
bceace12b5
commit
39706e4db0
2 changed files with 45 additions and 13 deletions
|
|
@ -128,13 +128,11 @@ class wxAuiDockInfo;
|
|||
class wxAuiDockArt;
|
||||
class wxAuiManagerEvent;
|
||||
|
||||
#ifndef SWIG
|
||||
WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockInfo, wxAuiDockInfoArray, WXDLLIMPEXP_AUI);
|
||||
WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockUIPart, wxAuiDockUIPartArray, 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
|
||||
using wxAuiDockUIPartArray = wxBaseArray<wxAuiDockUIPart>;
|
||||
using wxAuiDockInfoArray = wxBaseArray<wxAuiDockInfo>;
|
||||
using wxAuiPaneInfoArray = wxBaseArray<wxAuiPaneInfo>;
|
||||
using wxAuiDockInfoPtrArray = wxBaseArray<wxAuiDockInfo*>;
|
||||
using wxAuiPaneInfoPtrArray = wxBaseArray<wxAuiPaneInfo*>;
|
||||
|
||||
extern WXDLLIMPEXP_AUI wxAuiDockInfo wxAuiNullDockInfo;
|
||||
extern WXDLLIMPEXP_AUI wxAuiPaneInfo wxAuiNullPaneInfo;
|
||||
|
|
@ -615,6 +613,11 @@ protected:
|
|||
|
||||
void* m_reserved;
|
||||
|
||||
private:
|
||||
// Return the index in m_uiParts corresponding to the current value of
|
||||
// m_actionPart. If m_actionPart is null, returns wxNOT_FOUND.
|
||||
int GetActionPartIndex() const;
|
||||
|
||||
#ifndef SWIG
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_CLASS(wxAuiManager);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue