wxAUI: Support serialization of individual PaneInfo structures

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Alex Bligh
2006-07-25 11:41:46 +00:00
parent 7947a48ab7
commit 75c8d68f1d
2 changed files with 131 additions and 94 deletions

View File

@@ -191,7 +191,20 @@ public:
return *this;
}
#endif // SWIG
// Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
// used on loading perspectives etc.
void SafeSet(wxPaneInfo source)
{
// note source is not passed by reference so we can overwrite, to keep the
// unsafe bits of "dest"
source.window = window;
source.frame = frame;
source.buttons = buttons;
// now assign
*this = source;
}
bool IsOk() const { return (window != NULL) ? true : false; }
bool IsFixed() const { return !HasFlag(optionResizable); }
bool IsResizable() const { return HasFlag(optionResizable); }
@@ -415,6 +428,9 @@ public:
bool DetachPane(wxWindow* window);
wxString SavePaneInfo(wxPaneInfo& pane);
wxString LoadPaneInfo(wxString pane_part, wxPaneInfo &pane);
wxString SavePerspective();
bool LoadPerspective(const wxString& perspective,