1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Doc/View classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
17 #if wxUSE_DOC_VIEW_ARCHITECTURE
20 #include "wx/string.h"
23 #if wxUSE_PRINTING_ARCHITECTURE
27 class WXDLLIMPEXP_FWD_CORE wxWindow
;
28 class WXDLLIMPEXP_FWD_CORE wxDocument
;
29 class WXDLLIMPEXP_FWD_CORE wxView
;
30 class WXDLLIMPEXP_FWD_CORE wxDocTemplate
;
31 class WXDLLIMPEXP_FWD_CORE wxDocManager
;
32 class WXDLLIMPEXP_FWD_CORE wxPrintInfo
;
33 class WXDLLIMPEXP_FWD_CORE wxCommandProcessor
;
34 class WXDLLIMPEXP_FWD_CORE wxFileHistory
;
35 class WXDLLIMPEXP_FWD_BASE wxConfigBase
;
37 #if wxUSE_STD_IOSTREAM
38 #include "wx/iosfwrap.h"
40 #include "wx/stream.h"
43 // Flags for wxDocManager (can be combined).
50 // Document template flags
53 wxTEMPLATE_VISIBLE
= 1,
55 wxDEFAULT_TEMPLATE_FLAGS
= wxTEMPLATE_VISIBLE
58 #define wxMAX_FILE_HISTORY 9
60 class WXDLLIMPEXP_CORE wxDocument
: public wxEvtHandler
63 wxDocument(wxDocument
*parent
= NULL
);
64 virtual ~wxDocument();
67 void SetFilename(const wxString
& filename
, bool notifyViews
= false);
68 wxString
GetFilename() const { return m_documentFile
; }
70 void SetTitle(const wxString
& title
) { m_documentTitle
= title
; }
71 wxString
GetTitle() const { return m_documentTitle
; }
73 void SetDocumentName(const wxString
& name
) { m_documentTypeName
= name
; }
74 wxString
GetDocumentName() const { return m_documentTypeName
; }
76 // access the flag indicating whether this document had been already saved,
77 // SetDocumentSaved() is only used internally, don't call it
78 bool GetDocumentSaved() const { return m_savedYet
; }
79 void SetDocumentSaved(bool saved
= true) { m_savedYet
= saved
; }
81 // return true if the document hasn't been modified since the last time it
82 // was saved (implying that it returns false if it was never saved, even if
83 // the document is not modified)
84 bool AlreadySaved() const { return !IsModified() && GetDocumentSaved(); }
88 virtual bool SaveAs();
89 virtual bool Revert();
91 #if wxUSE_STD_IOSTREAM
92 virtual wxSTD ostream
& SaveObject(wxSTD ostream
& stream
);
93 virtual wxSTD istream
& LoadObject(wxSTD istream
& stream
);
95 virtual wxOutputStream
& SaveObject(wxOutputStream
& stream
);
96 virtual wxInputStream
& LoadObject(wxInputStream
& stream
);
99 // Called by wxWidgets
100 virtual bool OnSaveDocument(const wxString
& filename
);
101 virtual bool OnOpenDocument(const wxString
& filename
);
102 virtual bool OnNewDocument();
103 virtual bool OnCloseDocument();
105 // Prompts for saving if about to close a modified document. Returns true
106 // if ok to close the document (may have saved in the meantime, or set
107 // modified to false)
108 virtual bool OnSaveModified();
110 // if you override, remember to call the default
111 // implementation (wxDocument::OnChangeFilename)
112 virtual void OnChangeFilename(bool notifyViews
);
114 // Called by framework if created automatically by the default document
115 // manager: gives document a chance to initialise and (usually) create a
117 virtual bool OnCreate(const wxString
& path
, long flags
);
119 // By default, creates a base wxCommandProcessor.
120 virtual wxCommandProcessor
*OnCreateCommandProcessor();
121 virtual wxCommandProcessor
*GetCommandProcessor() const { return m_commandProcessor
; }
122 virtual void SetCommandProcessor(wxCommandProcessor
*proc
) { m_commandProcessor
= proc
; }
124 // Called after a view is added or removed. The default implementation
125 // deletes the document if this is there are no more views.
126 virtual void OnChangedViewList();
128 virtual bool DeleteContents();
130 virtual bool Draw(wxDC
&);
131 virtual bool IsModified() const { return m_documentModified
; }
132 virtual void Modify(bool mod
) { m_documentModified
= mod
; }
134 virtual bool AddView(wxView
*view
);
135 virtual bool RemoveView(wxView
*view
);
136 wxList
& GetViews() { return m_documentViews
; }
137 const wxList
& GetViews() const { return m_documentViews
; }
138 wxView
*GetFirstView() const;
140 virtual void UpdateAllViews(wxView
*sender
= NULL
, wxObject
*hint
= NULL
);
141 virtual void NotifyClosing();
143 // Remove all views (because we're closing the document)
144 virtual bool DeleteAllViews();
147 virtual wxDocManager
*GetDocumentManager() const;
148 virtual wxDocTemplate
*GetDocumentTemplate() const { return m_documentTemplate
; }
149 virtual void SetDocumentTemplate(wxDocTemplate
*temp
) { m_documentTemplate
= temp
; }
151 // Get the document name to be shown to the user: the title if there is
152 // any, otherwise the filename if the document was saved and, finally,
153 // "unnamed" otherwise
154 virtual wxString
GetUserReadableName() const;
156 #if WXWIN_COMPATIBILITY_2_8
157 // use GetUserReadableName() instead
158 wxDEPRECATED_BUT_USED_INTERNALLY(
159 virtual bool GetPrintableName(wxString
& buf
) const
161 #endif // WXWIN_COMPATIBILITY_2_8
163 // Returns a window that can be used as a parent for document-related
164 // dialogs. Override if necessary.
165 virtual wxWindow
*GetDocumentWindow() const;
168 wxList m_documentViews
;
169 wxString m_documentFile
;
170 wxString m_documentTitle
;
171 wxString m_documentTypeName
;
172 wxDocTemplate
* m_documentTemplate
;
173 bool m_documentModified
;
174 wxDocument
* m_documentParent
;
175 wxCommandProcessor
* m_commandProcessor
;
178 // Called by OnSaveDocument and OnOpenDocument to implement standard
179 // Save/Load behavior. Re-implement in derived class for custom
181 virtual bool DoSaveDocument(const wxString
& file
);
182 virtual bool DoOpenDocument(const wxString
& file
);
184 // the default implementation of GetUserReadableName()
185 wxString
DoGetUserReadableName() const;
188 DECLARE_ABSTRACT_CLASS(wxDocument
)
189 DECLARE_NO_COPY_CLASS(wxDocument
)
192 class WXDLLIMPEXP_CORE wxView
: public wxEvtHandler
198 wxDocument
*GetDocument() const { return m_viewDocument
; }
199 virtual void SetDocument(wxDocument
*doc
);
201 wxString
GetViewName() const { return m_viewTypeName
; }
202 void SetViewName(const wxString
& name
) { m_viewTypeName
= name
; }
204 wxWindow
*GetFrame() const { return m_viewFrame
; }
205 void SetFrame(wxWindow
*frame
) { m_viewFrame
= frame
; }
207 virtual void OnActivateView(bool activate
, wxView
*activeView
, wxView
*deactiveView
);
208 virtual void OnDraw(wxDC
*dc
) = 0;
209 virtual void OnPrint(wxDC
*dc
, wxObject
*info
);
210 virtual void OnUpdate(wxView
*sender
, wxObject
*hint
= NULL
);
211 virtual void OnClosingDocument() {}
212 virtual void OnChangeFilename();
214 // Called by framework if created automatically by the default document
215 // manager class: gives view a chance to initialise
216 virtual bool OnCreate(wxDocument
*WXUNUSED(doc
), long WXUNUSED(flags
))
219 // Checks if the view is the last one for the document; if so, asks user
220 // to confirm save data (if modified). If ok, deletes itself and returns
222 virtual bool Close(bool deleteWindow
= true);
224 // Override to do cleanup/veto close
225 virtual bool OnClose(bool deleteWindow
);
227 // A view's window can call this to notify the view it is (in)active.
228 // The function then notifies the document manager.
229 virtual void Activate(bool activate
);
231 wxDocManager
*GetDocumentManager() const
232 { return m_viewDocument
->GetDocumentManager(); }
234 #if wxUSE_PRINTING_ARCHITECTURE
235 virtual wxPrintout
*OnCreatePrintout();
239 // hook the document into event handlers chain here
240 virtual bool TryValidator(wxEvent
& event
);
242 wxDocument
* m_viewDocument
;
243 wxString m_viewTypeName
;
244 wxWindow
* m_viewFrame
;
247 DECLARE_ABSTRACT_CLASS(wxView
)
248 DECLARE_NO_COPY_CLASS(wxView
)
251 // Represents user interface (and other) properties of documents and views
252 class WXDLLIMPEXP_CORE wxDocTemplate
: public wxObject
255 friend class WXDLLIMPEXP_FWD_CORE wxDocManager
;
258 // Associate document and view types. They're for identifying what view is
259 // associated with what template/document type
260 wxDocTemplate(wxDocManager
*manager
,
261 const wxString
& descr
,
262 const wxString
& filter
,
265 const wxString
& docTypeName
,
266 const wxString
& viewTypeName
,
267 wxClassInfo
*docClassInfo
= NULL
,
268 wxClassInfo
*viewClassInfo
= NULL
,
269 long flags
= wxDEFAULT_TEMPLATE_FLAGS
);
271 virtual ~wxDocTemplate();
273 // By default, these two member functions dynamically creates document and
274 // view using dynamic instance construction. Override these if you need a
275 // different method of construction.
276 virtual wxDocument
*CreateDocument(const wxString
& path
, long flags
= 0);
277 virtual wxView
*CreateView(wxDocument
*doc
, long flags
= 0);
279 // Helper method for CreateDocument; also allows you to do your own document
281 virtual bool InitDocument(wxDocument
* doc
, const wxString
& path
, long flags
= 0);
283 wxString
GetDefaultExtension() const { return m_defaultExt
; }
284 wxString
GetDescription() const { return m_description
; }
285 wxString
GetDirectory() const { return m_directory
; }
286 wxDocManager
*GetDocumentManager() const { return m_documentManager
; }
287 void SetDocumentManager(wxDocManager
*manager
) { m_documentManager
= manager
; }
288 wxString
GetFileFilter() const { return m_fileFilter
; }
289 long GetFlags() const { return m_flags
; }
290 virtual wxString
GetViewName() const { return m_viewTypeName
; }
291 virtual wxString
GetDocumentName() const { return m_docTypeName
; }
293 void SetFileFilter(const wxString
& filter
) { m_fileFilter
= filter
; }
294 void SetDirectory(const wxString
& dir
) { m_directory
= dir
; }
295 void SetDescription(const wxString
& descr
) { m_description
= descr
; }
296 void SetDefaultExtension(const wxString
& ext
) { m_defaultExt
= ext
; }
297 void SetFlags(long flags
) { m_flags
= flags
; }
299 bool IsVisible() const { return ((m_flags
& wxTEMPLATE_VISIBLE
) == wxTEMPLATE_VISIBLE
); }
301 wxClassInfo
* GetDocClassInfo() const { return m_docClassInfo
; }
302 wxClassInfo
* GetViewClassInfo() const { return m_viewClassInfo
; }
304 virtual bool FileMatchesTemplate(const wxString
& path
);
308 wxString m_fileFilter
;
309 wxString m_directory
;
310 wxString m_description
;
311 wxString m_defaultExt
;
312 wxString m_docTypeName
;
313 wxString m_viewTypeName
;
314 wxDocManager
* m_documentManager
;
316 // For dynamic creation of appropriate instances.
317 wxClassInfo
* m_docClassInfo
;
318 wxClassInfo
* m_viewClassInfo
;
320 // Called by CreateDocument and CreateView to create the actual document/view object.
321 // By default uses the ClassInfo provided to the constructor. Override these functions
322 // to provide a different method of creation.
323 virtual wxDocument
*DoCreateDocument();
324 virtual wxView
*DoCreateView();
327 DECLARE_CLASS(wxDocTemplate
)
328 DECLARE_NO_COPY_CLASS(wxDocTemplate
)
331 // One object of this class may be created in an application, to manage all
332 // the templates and documents.
333 class WXDLLIMPEXP_CORE wxDocManager
: public wxEvtHandler
336 // NB: flags are unused, don't pass wxDOC_XXX to this ctor
337 wxDocManager(long flags
= 0, bool initialize
= true);
338 virtual ~wxDocManager();
340 virtual bool Initialize();
342 // Handlers for common user commands
343 void OnFileClose(wxCommandEvent
& event
);
344 void OnFileCloseAll(wxCommandEvent
& event
);
345 void OnFileNew(wxCommandEvent
& event
);
346 void OnFileOpen(wxCommandEvent
& event
);
347 void OnFileRevert(wxCommandEvent
& event
);
348 void OnFileSave(wxCommandEvent
& event
);
349 void OnFileSaveAs(wxCommandEvent
& event
);
350 void OnPrint(wxCommandEvent
& event
);
351 void OnPreview(wxCommandEvent
& event
);
352 void OnUndo(wxCommandEvent
& event
);
353 void OnRedo(wxCommandEvent
& event
);
355 // Handlers for UI update commands
356 void OnUpdateFileOpen(wxUpdateUIEvent
& event
);
357 void OnUpdateDisableIfNoDoc(wxUpdateUIEvent
& event
);
358 void OnUpdateFileNew(wxUpdateUIEvent
& event
);
359 void OnUpdateFileSave(wxUpdateUIEvent
& event
);
360 void OnUpdateUndo(wxUpdateUIEvent
& event
);
361 void OnUpdateRedo(wxUpdateUIEvent
& event
);
363 // called when file format detection didn't work, can be overridden to do
364 // something in this case
365 virtual void OnOpenFileFailure() { }
367 virtual wxDocument
*CreateDocument(const wxString
& path
, long flags
= 0);
369 // wrapper around CreateDocument() with a more clear name
370 wxDocument
*CreateNewDocument()
371 { return CreateDocument(wxString(), wxDOC_NEW
); }
373 virtual wxView
*CreateView(wxDocument
*doc
, long flags
= 0);
374 virtual void DeleteTemplate(wxDocTemplate
*temp
, long flags
= 0);
375 virtual bool FlushDoc(wxDocument
*doc
);
376 virtual wxDocTemplate
*MatchTemplate(const wxString
& path
);
377 virtual wxDocTemplate
*SelectDocumentPath(wxDocTemplate
**templates
,
378 int noTemplates
, wxString
& path
, long flags
, bool save
= false);
379 virtual wxDocTemplate
*SelectDocumentType(wxDocTemplate
**templates
,
380 int noTemplates
, bool sort
= false);
381 virtual wxDocTemplate
*SelectViewType(wxDocTemplate
**templates
,
382 int noTemplates
, bool sort
= false);
383 virtual wxDocTemplate
*FindTemplateForPath(const wxString
& path
);
385 void AssociateTemplate(wxDocTemplate
*temp
);
386 void DisassociateTemplate(wxDocTemplate
*temp
);
388 wxDocument
*GetCurrentDocument() const;
390 void SetMaxDocsOpen(int n
) { m_maxDocsOpen
= n
; }
391 int GetMaxDocsOpen() const { return m_maxDocsOpen
; }
393 // Add and remove a document from the manager's list
394 void AddDocument(wxDocument
*doc
);
395 void RemoveDocument(wxDocument
*doc
);
397 // closes all currently open documents
398 bool CloseDocuments(bool force
= true);
400 // closes the specified document
401 bool CloseDocument(wxDocument
* doc
, bool force
= false);
403 // Clear remaining documents and templates
404 bool Clear(bool force
= true);
406 // Views or windows should inform the document manager
407 // when a view is going in or out of focus
408 virtual void ActivateView(wxView
*view
, bool activate
= true);
409 virtual wxView
*GetCurrentView() const;
411 wxList
& GetDocuments() { return m_docs
; }
412 wxList
& GetTemplates() { return m_templates
; }
414 // Return the default name for a new document (by default returns strings
415 // in the form "unnamed <counter>" but can be overridden)
416 virtual wxString
MakeNewDocumentName();
418 // Make a frame title (override this to do something different)
419 virtual wxString
MakeFrameTitle(wxDocument
* doc
);
421 virtual wxFileHistory
*OnCreateFileHistory();
422 virtual wxFileHistory
*GetFileHistory() const { return m_fileHistory
; }
424 // File history management
425 virtual void AddFileToHistory(const wxString
& file
);
426 virtual void RemoveFileFromHistory(size_t i
);
427 virtual size_t GetHistoryFilesCount() const;
428 virtual wxString
GetHistoryFile(size_t i
) const;
429 virtual void FileHistoryUseMenu(wxMenu
*menu
);
430 virtual void FileHistoryRemoveMenu(wxMenu
*menu
);
432 virtual void FileHistoryLoad(const wxConfigBase
& config
);
433 virtual void FileHistorySave(wxConfigBase
& config
);
434 #endif // wxUSE_CONFIG
436 virtual void FileHistoryAddFilesToMenu();
437 virtual void FileHistoryAddFilesToMenu(wxMenu
* menu
);
439 wxString
GetLastDirectory() const;
440 void SetLastDirectory(const wxString
& dir
) { m_lastDirectory
= dir
; }
442 // Get the current document manager
443 static wxDocManager
* GetDocumentManager() { return sm_docManager
; }
445 #if WXWIN_COMPATIBILITY_2_8
446 // deprecated, override GetDefaultName() instead
447 wxDEPRECATED_BUT_USED_INTERNALLY(
448 virtual bool MakeDefaultName(wxString
& buf
)
452 #if WXWIN_COMPATIBILITY_2_6
453 // deprecated, use GetHistoryFilesCount() instead
454 wxDEPRECATED( size_t GetNoHistoryFiles() const );
455 #endif // WXWIN_COMPATIBILITY_2_6
458 // hook the currently active view into event handlers chain here
459 virtual bool TryValidator(wxEvent
& event
);
461 int m_defaultDocumentNameCounter
;
465 wxView
* m_currentView
;
466 wxFileHistory
* m_fileHistory
;
467 wxString m_lastDirectory
;
468 static wxDocManager
* sm_docManager
;
470 DECLARE_EVENT_TABLE()
471 DECLARE_DYNAMIC_CLASS(wxDocManager
)
472 DECLARE_NO_COPY_CLASS(wxDocManager
)
475 #if WXWIN_COMPATIBILITY_2_6
476 inline size_t wxDocManager::GetNoHistoryFiles() const
478 return GetHistoryFilesCount();
480 #endif // WXWIN_COMPATIBILITY_2_6
482 // ----------------------------------------------------------------------------
483 // A default child frame
484 // ----------------------------------------------------------------------------
486 class WXDLLIMPEXP_CORE wxDocChildFrame
: public wxFrame
489 wxDocChildFrame(wxDocument
*doc
,
493 const wxString
& title
,
494 const wxPoint
& pos
= wxDefaultPosition
,
495 const wxSize
& size
= wxDefaultSize
,
496 long type
= wxDEFAULT_FRAME_STYLE
,
497 const wxString
& name
= wxFrameNameStr
);
498 virtual ~wxDocChildFrame(){}
500 void OnActivate(wxActivateEvent
& event
);
501 void OnCloseWindow(wxCloseEvent
& event
);
503 wxDocument
*GetDocument() const { return m_childDocument
; }
504 wxView
*GetView() const { return m_childView
; }
505 void SetDocument(wxDocument
*doc
) { m_childDocument
= doc
; }
506 void SetView(wxView
*view
) { m_childView
= view
; }
507 bool Destroy() { m_childView
= NULL
; return wxFrame::Destroy(); }
510 // hook the child view into event handlers chain here
511 virtual bool TryValidator(wxEvent
& event
);
513 wxDocument
* m_childDocument
;
517 DECLARE_CLASS(wxDocChildFrame
)
518 DECLARE_EVENT_TABLE()
519 DECLARE_NO_COPY_CLASS(wxDocChildFrame
)
522 // ----------------------------------------------------------------------------
523 // A default parent frame
524 // ----------------------------------------------------------------------------
526 class WXDLLIMPEXP_CORE wxDocParentFrame
: public wxFrame
530 wxDocParentFrame(wxDocManager
*manager
,
533 const wxString
& title
,
534 const wxPoint
& pos
= wxDefaultPosition
,
535 const wxSize
& size
= wxDefaultSize
,
536 long style
= wxDEFAULT_FRAME_STYLE
,
537 const wxString
& name
= wxFrameNameStr
);
539 bool Create(wxDocManager
*manager
,
542 const wxString
& title
,
543 const wxPoint
& pos
= wxDefaultPosition
,
544 const wxSize
& size
= wxDefaultSize
,
545 long style
= wxDEFAULT_FRAME_STYLE
,
546 const wxString
& name
= wxFrameNameStr
);
548 wxDocManager
*GetDocumentManager() const { return m_docManager
; }
550 void OnExit(wxCommandEvent
& event
);
551 void OnMRUFile(wxCommandEvent
& event
);
552 void OnCloseWindow(wxCloseEvent
& event
);
555 // hook the document manager into event handling chain here
556 virtual bool TryValidator(wxEvent
& event
);
558 wxDocManager
*m_docManager
;
561 typedef wxFrame base_type
;
562 DECLARE_CLASS(wxDocParentFrame
)
563 DECLARE_EVENT_TABLE()
564 DECLARE_NO_COPY_CLASS(wxDocParentFrame
)
567 // ----------------------------------------------------------------------------
568 // Provide simple default printing facilities
569 // ----------------------------------------------------------------------------
571 #if wxUSE_PRINTING_ARCHITECTURE
572 class WXDLLIMPEXP_CORE wxDocPrintout
: public wxPrintout
575 wxDocPrintout(wxView
*view
= NULL
, const wxString
& title
= wxT("Printout"));
576 bool OnPrintPage(int page
);
577 bool HasPage(int page
);
578 bool OnBeginDocument(int startPage
, int endPage
);
579 void GetPageInfo(int *minPage
, int *maxPage
, int *selPageFrom
, int *selPageTo
);
581 virtual wxView
*GetView() { return m_printoutView
; }
584 wxView
* m_printoutView
;
587 DECLARE_DYNAMIC_CLASS(wxDocPrintout
)
588 DECLARE_NO_COPY_CLASS(wxDocPrintout
)
590 #endif // wxUSE_PRINTING_ARCHITECTURE
592 // ----------------------------------------------------------------------------
593 // File history management
594 // ----------------------------------------------------------------------------
596 class WXDLLIMPEXP_CORE wxFileHistory
: public wxObject
599 wxFileHistory(size_t maxFiles
= 9, wxWindowID idBase
= wxID_FILE1
);
602 virtual void AddFileToHistory(const wxString
& file
);
603 virtual void RemoveFileFromHistory(size_t i
);
604 virtual int GetMaxFiles() const { return (int)m_fileMaxFiles
; }
605 virtual void UseMenu(wxMenu
*menu
);
607 // Remove menu from the list (MDI child may be closing)
608 virtual void RemoveMenu(wxMenu
*menu
);
611 virtual void Load(const wxConfigBase
& config
);
612 virtual void Save(wxConfigBase
& config
);
613 #endif // wxUSE_CONFIG
615 virtual void AddFilesToMenu();
616 virtual void AddFilesToMenu(wxMenu
* menu
); // Single menu
619 virtual wxString
GetHistoryFile(size_t i
) const { return m_fileHistory
[i
]; }
620 virtual size_t GetCount() const { return m_fileHistory
.GetCount(); }
622 const wxList
& GetMenus() const { return m_fileMenus
; }
625 void SetBaseId(wxWindowID baseId
) { m_idBase
= baseId
; }
626 wxWindowID
GetBaseId() const { return m_idBase
; }
628 #if WXWIN_COMPATIBILITY_2_6
629 // deprecated, use GetCount() instead
630 wxDEPRECATED( size_t GetNoHistoryFiles() const );
631 #endif // WXWIN_COMPATIBILITY_2_6
635 wxArrayString m_fileHistory
;
637 // Menus to maintain (may need several for an MDI app)
640 // Max files to maintain
641 size_t m_fileMaxFiles
;
644 // The ID of the first history menu item (Doesn't have to be wxID_FILE1)
647 DECLARE_DYNAMIC_CLASS(wxFileHistory
)
648 DECLARE_NO_COPY_CLASS(wxFileHistory
)
651 #if WXWIN_COMPATIBILITY_2_6
652 inline size_t wxFileHistory::GetNoHistoryFiles() const
654 return m_fileHistory
.GetCount();
656 #endif // WXWIN_COMPATIBILITY_2_6
658 #if wxUSE_STD_IOSTREAM
659 // For compatibility with existing file formats:
660 // converts from/to a stream to/from a temporary file.
661 bool WXDLLIMPEXP_CORE
wxTransferFileToStream(const wxString
& filename
, wxSTD ostream
& stream
);
662 bool WXDLLIMPEXP_CORE
wxTransferStreamToFile(wxSTD istream
& stream
, const wxString
& filename
);
664 // For compatibility with existing file formats:
665 // converts from/to a stream to/from a temporary file.
666 bool WXDLLIMPEXP_CORE
wxTransferFileToStream(const wxString
& filename
, wxOutputStream
& stream
);
667 bool WXDLLIMPEXP_CORE
wxTransferStreamToFile(wxInputStream
& stream
, const wxString
& filename
);
668 #endif // wxUSE_STD_IOSTREAM
671 // these flags are not used anywhere by wxWidgets and kept only for an unlikely
672 // case of existing user code using them for its own purposes
673 #ifdef WXWIN_COMPATIBILITY_2_8
678 wxDEFAULT_DOCMAN_FLAGS
= wxDOC_SDI
680 #endif // WXWIN_COMPATIBILITY_2_8
682 #endif // wxUSE_DOC_VIEW_ARCHITECTURE