mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-29 10:25:27 +08:00
Allow wxAuiDeserializer::CreatePaneWindow() to modify pane info
wxAuiPaneInfo fields such as "caption" or "icon" wouldn't normally be serialized and so CreatePaneWindow() should be allowed to fill them in.
This commit is contained in:
@@ -89,7 +89,11 @@ public:
|
||||
// layout and allows to create windows on the fly.
|
||||
//
|
||||
// If this function returns nullptr, the pane is not added to the manager.
|
||||
virtual wxWindow* CreatePaneWindow(const wxAuiPaneInfo& WXUNUSED(pane))
|
||||
//
|
||||
// Note that the pane may (and usually will, if a window is created) be
|
||||
// modified, to set fields such as caption or icon that wouldn't normally
|
||||
// be serialized.
|
||||
virtual wxWindow* CreatePaneWindow(wxAuiPaneInfo& WXUNUSED(pane))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -175,8 +175,13 @@ public:
|
||||
|
||||
If this function returns @NULL, as it does by default, the pane is not
|
||||
added to the manager.
|
||||
|
||||
If the function does create a new window, it should typically modify @a
|
||||
pane parameter to fill in the fields such as `caption` or `icon` that
|
||||
wouldn't normally be serialized and so wouldn't be restored by
|
||||
LoadPanes().
|
||||
*/
|
||||
virtual wxWindow* CreatePaneWindow(const wxAuiPaneInfo& pane);
|
||||
virtual wxWindow* CreatePaneWindow(wxAuiPaneInfo& pane);
|
||||
|
||||
/**
|
||||
Load information about all the docks previously saved with SaveDock().
|
||||
|
||||
@@ -1724,7 +1724,7 @@ public:
|
||||
return panes;
|
||||
}
|
||||
|
||||
virtual wxWindow* CreatePaneWindow(const wxAuiPaneInfo& pane) override
|
||||
virtual wxWindow* CreatePaneWindow(wxAuiPaneInfo& pane) override
|
||||
{
|
||||
wxLogWarning("Unknown pane \"%s\"", pane.name);
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user