-void MyFrame::OnLoad( wxCommandEvent& event )
-{
- if ( !wxFileExists( LAYOUT_FILE ) )
- {
- wxMessageBox( "layout data file `layout.dat' not found\n\n store layout first" );
-
- return;
- }
-
- mpLayout->HideBarWindows(); // hide first, to avoid flickered destruction
- mpLayout->DestroyBarWindows();
-
- if ( mpClientWnd )
- {
- mpClientWnd->Destroy();
- delete mpLayout;
-
- mpClientWnd = NULL;
- }
-
- wxIOStreamWrapper stm;
- stm.CreateForInput( LAYOUT_FILE ); // TRUE - create stream for input
-
- wxObjectStorage store( stm );
-
- SerializeMe( store );
-
- mpLayout->Activate();
-}
-
-void MyFrame::OnStore( wxCommandEvent& event )
-{
- wxIOStreamWrapper stm;
- stm.CreateForOutput( LAYOUT_FILE ); // FALSE - create stream for output
-
- wxObjectStorage store( stm );
-
- SerializeMe( store );
-}
-