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
; }
83 virtual bool SaveAs();
84 virtual bool Revert();
86 #if wxUSE_STD_IOSTREAM
87 virtual wxSTD ostream
& SaveObject(wxSTD ostream
& stream
);
88 virtual wxSTD istream
& LoadObject(wxSTD istream
& stream
);
90 virtual wxOutputStream
& SaveObject(wxOutputStream
& stream
);
91 virtual wxInputStream
& LoadObject(wxInputStream
& stream
);
94 // Called by wxWidgets
95 virtual bool OnSaveDocument(const wxString
& filename
);
96 virtual bool OnOpenDocument(const wxString
& filename
);
97 virtual bool OnNewDocument();
98 virtual bool OnCloseDocument();
100 // Prompts for saving if about to close a modified document. Returns true
101 // if ok to close the document (may have saved in the meantime, or set
102 // modified to false)
103 virtual bool OnSaveModified();
105 // Called by framework if created automatically by the default document
106 // manager: gives document a chance to initialise and (usually) create a
108 virtual bool OnCreate(const wxString
& path
, long flags
);
110 // By default, creates a base wxCommandProcessor.
111 virtual wxCommandProcessor
*OnCreateCommandProcessor();
112 virtual wxCommandProcessor
*GetCommandProcessor() const { return m_commandProcessor
; }
113 virtual void SetCommandProcessor(wxCommandProcessor
*proc
) { m_commandProcessor
= proc
; }
115 // Called after a view is added or removed. The default implementation
116 // deletes the document if this is there are no more views.
117 virtual void OnChangedViewList();
119 virtual bool DeleteContents();
121 virtual bool Draw(wxDC
&);
122 virtual bool IsModified() const { return m_documentModified
; }
123 virtual void Modify(bool mod
) { m_documentModified
= mod
; }
125 virtual bool AddView(wxView
*view
);
126 virtual bool RemoveView(wxView
*view
);
127 wxList
& GetViews() { return m_documentViews
; }
128 const wxList
& GetViews() const { return m_documentViews
; }
129 wxView
*GetFirstView() const;
131 virtual void UpdateAllViews(wxView
*sender
= NULL
, wxObject
*hint
= NULL
);
132 virtual void NotifyClosing();
134 // Remove all views (because we're closing the document)
135 virtual bool DeleteAllViews();
138 virtual wxDocManager
*GetDocumentManager() const;
139 virtual wxDocTemplate
*GetDocumentTemplate() const { return m_documentTemplate
; }
140 virtual void SetDocumentTemplate(wxDocTemplate
*temp
) { m_documentTemplate
= temp
; }
142 // Get the document name to be shown to the user: the title if there is
143 // any, otherwise the filename if the document was saved and, finally,
144 // "unnamed" otherwise
145 virtual wxString
GetUserReadableName() const;
147 #if WXWIN_COMPATIBILITY_2_8
148 // use GetUserReadableName() instead
149 wxDEPRECATED_BUT_USED_INTERNALLY(
150 virtual bool GetPrintableName(wxString
& buf
) const
152 #endif // WXWIN_COMPATIBILITY_2_8
154 // Returns a window that can be used as a parent for document-related
155 // dialogs. Override if necessary.
156 virtual wxWindow
*GetDocumentWindow() const;
159 wxList m_documentViews
;
160 wxString m_documentFile
;
161 wxString m_documentTitle
;
162 wxString m_documentTypeName
;
163 wxDocTemplate
* m_documentTemplate
;
164 bool m_documentModified
;
165 wxDocument
* m_documentParent
;
166 wxCommandProcessor
* m_commandProcessor
;
169 // Called by OnSaveDocument and OnOpenDocument to implement standard
170 // Save/Load behavior. Re-implement in derived class for custom
172 virtual bool DoSaveDocument(const wxString
& file
);
173 virtual bool DoOpenDocument(const wxString
& file
);
175 // the default implementation of GetUserReadableName()
176 wxString
DoGetUserReadableName() const;
179 DECLARE_ABSTRACT_CLASS(wxDocument
)
180 DECLARE_NO_COPY_CLASS(wxDocument
)
183 class WXDLLIMPEXP_CORE wxView
: public wxEvtHandler
189 wxDocument
*GetDocument() const { return m_viewDocument
; }
190 virtual void SetDocument(wxDocument
*doc
);
192 wxString
GetViewName() const { return m_viewTypeName
; }
193 void SetViewName(const wxString
& name
) { m_viewTypeName
= name
; }
195 wxWindow
*GetFrame() const { return m_viewFrame
; }
196 void SetFrame(wxWindow
*frame
) { m_viewFrame
= frame
; }
198 virtual void OnActivateView(bool activate
, wxView
*activeView
, wxView
*deactiveView
);
199 virtual void OnDraw(wxDC
*dc
) = 0;
200 virtual void OnPrint(wxDC
*dc
, wxObject
*info
);
201 virtual void OnUpdate(wxView
*sender
, wxObject
*hint
= NULL
);
202 virtual void OnClosingDocument() {}
203 virtual void OnChangeFilename();
205 // Called by framework if created automatically by the default document
206 // manager class: gives view a chance to initialise
207 virtual bool OnCreate(wxDocument
*WXUNUSED(doc
), long WXUNUSED(flags
))
210 // Checks if the view is the last one for the document; if so, asks user
211 // to confirm save data (if modified). If ok, deletes itself and returns
213 virtual bool Close(bool deleteWindow
= true);
215 // Override to do cleanup/veto close
216 virtual bool OnClose(bool deleteWindow
);
218 // A view's window can call this to notify the view it is (in)active.
219 // The function then notifies the document manager.
220 virtual void Activate(bool activate
);
222 wxDocManager
*GetDocumentManager() const
223 { return m_viewDocument
->GetDocumentManager(); }
225 #if wxUSE_PRINTING_ARCHITECTURE
226 virtual wxPrintout
*OnCreatePrintout();
230 // hook the document into event handlers chain here
231 virtual bool TryValidator(wxEvent
& event
);
233 wxDocument
* m_viewDocument
;
234 wxString m_viewTypeName
;
235 wxWindow
* m_viewFrame
;
238 DECLARE_ABSTRACT_CLASS(wxView
)
239 DECLARE_NO_COPY_CLASS(wxView
)
242 // Represents user interface (and other) properties of documents and views
243 class WXDLLIMPEXP_CORE wxDocTemplate
: public wxObject
246 friend class WXDLLIMPEXP_FWD_CORE wxDocManager
;
249 // Associate document and view types. They're for identifying what view is
250 // associated with what template/document type
251 wxDocTemplate(wxDocManager
*manager
,
252 const wxString
& descr
,
253 const wxString
& filter
,
256 const wxString
& docTypeName
,
257 const wxString
& viewTypeName
,
258 wxClassInfo
*docClassInfo
= NULL
,
259 wxClassInfo
*viewClassInfo
= NULL
,
260 long flags
= wxDEFAULT_TEMPLATE_FLAGS
);
262 virtual ~wxDocTemplate();
264 // By default, these two member functions dynamically creates document and
265 // view using dynamic instance construction. Override these if you need a
266 // different method of construction.
267 virtual wxDocument
*CreateDocument(const wxString
& path
, long flags
= 0);
268 virtual wxView
*CreateView(wxDocument
*doc
, long flags
= 0);
270 // Helper method for CreateDocument; also allows you to do your own document
272 virtual bool InitDocument(wxDocument
* doc
, const wxString
& path
, long flags
= 0);
274 wxString
GetDefaultExtension() const { return m_defaultExt
; }
275 wxString
GetDescription() const { return m_description
; }
276 wxString
GetDirectory() const { return m_directory
; }
277 wxDocManager
*GetDocumentManager() const { return m_documentManager
; }
278 void SetDocumentManager(wxDocManager
*manager
) { m_documentManager
= manager
; }
279 wxString
GetFileFilter() const { return m_fileFilter
; }
280 long GetFlags() const { return m_flags
; }
281 virtual wxString
GetViewName() const { return m_viewTypeName
; }
282 virtual wxString
GetDocumentName() const { return m_docTypeName
; }
284 void SetFileFilter(const wxString
& filter
) { m_fileFilter
= filter
; }
285 void SetDirectory(const wxString
& dir
) { m_directory
= dir
; }
286 void SetDescription(const wxString
& descr
) { m_description
= descr
; }
287 void SetDefaultExtension(const wxString
& ext
) { m_defaultExt
= ext
; }
288 void SetFlags(long flags
) { m_flags
= flags
; }
290 bool IsVisible() const { return ((m_flags
& wxTEMPLATE_VISIBLE
) == wxTEMPLATE_VISIBLE
); }
292 wxClassInfo
* GetDocClassInfo() const { return m_docClassInfo
; }
293 wxClassInfo
* GetViewClassInfo() const { return m_viewClassInfo
; }
295 virtual bool FileMatchesTemplate(const wxString
& path
);
299 wxString m_fileFilter
;
300 wxString m_directory
;
301 wxString m_description
;
302 wxString m_defaultExt
;
303 wxString m_docTypeName
;
304 wxString m_viewTypeName
;
305 wxDocManager
* m_documentManager
;
307 // For dynamic creation of appropriate instances.
308 wxClassInfo
* m_docClassInfo
;
309 wxClassInfo
* m_viewClassInfo
;
311 // Called by CreateDocument and CreateView to create the actual document/view object.
312 // By default uses the ClassInfo provided to the constructor. Override these functions
313 // to provide a different method of creation.
314 virtual wxDocument
*DoCreateDocument();
315 virtual wxView
*DoCreateView();
318 DECLARE_CLASS(wxDocTemplate
)
319 DECLARE_NO_COPY_CLASS(wxDocTemplate
)
322 // One object of this class may be created in an application, to manage all
323 // the templates and documents.
324 class WXDLLIMPEXP_CORE wxDocManager
: public wxEvtHandler
327 // NB: flags are unused, don't pass wxDOC_XXX to this ctor
328 wxDocManager(long flags
= 0, bool initialize
= true);
329 virtual ~wxDocManager();
331 virtual bool Initialize();
333 // Handlers for common user commands
334 void OnFileClose(wxCommandEvent
& event
);
335 void OnFileCloseAll(wxCommandEvent
& event
);
336 void OnFileNew(wxCommandEvent
& event
);
337 void OnFileOpen(wxCommandEvent
& event
);
338 void OnFileRevert(wxCommandEvent
& event
);
339 void OnFileSave(wxCommandEvent
& event
);
340 void OnFileSaveAs(wxCommandEvent
& event
);
341 void OnPrint(wxCommandEvent
& event
);
342 void OnPreview(wxCommandEvent
& event
);
343 void OnUndo(wxCommandEvent
& event
);
344 void OnRedo(wxCommandEvent
& event
);
346 // Handlers for UI update commands
347 void OnUpdateFileOpen(wxUpdateUIEvent
& event
);
348 void OnUpdateDisableIfNoDoc(wxUpdateUIEvent
& event
);
349 void OnUpdateFileNew(wxUpdateUIEvent
& event
);
350 void OnUpdateFileSave(wxUpdateUIEvent
& event
);
351 void OnUpdateUndo(wxUpdateUIEvent
& event
);
352 void OnUpdateRedo(wxUpdateUIEvent
& event
);
354 // called when file format detection didn't work, can be overridden to do
355 // something in this case
356 virtual void OnOpenFileFailure() { }
358 virtual wxDocument
*CreateDocument(const wxString
& path
, long flags
= 0);
360 // wrapper around CreateDocument() with a more clear name
361 wxDocument
*CreateNewDocument()
362 { return CreateDocument(wxString(), wxDOC_NEW
); }
364 virtual wxView
*CreateView(wxDocument
*doc
, long flags
= 0);
365 virtual void DeleteTemplate(wxDocTemplate
*temp
, long flags
= 0);
366 virtual bool FlushDoc(wxDocument
*doc
);
367 virtual wxDocTemplate
*MatchTemplate(const wxString
& path
);
368 virtual wxDocTemplate
*SelectDocumentPath(wxDocTemplate
**templates
,
369 int noTemplates
, wxString
& path
, long flags
, bool save
= false);
370 virtual wxDocTemplate
*SelectDocumentType(wxDocTemplate
**templates
,
371 int noTemplates
, bool sort
= false);
372 virtual wxDocTemplate
*SelectViewType(wxDocTemplate
**templates
,
373 int noTemplates
, bool sort
= false);
374 virtual wxDocTemplate
*FindTemplateForPath(const wxString
& path
);
376 void AssociateTemplate(wxDocTemplate
*temp
);
377 void DisassociateTemplate(wxDocTemplate
*temp
);
379 wxDocument
*GetCurrentDocument() const;
381 void SetMaxDocsOpen(int n
) { m_maxDocsOpen
= n
; }
382 int GetMaxDocsOpen() const { return m_maxDocsOpen
; }
384 // Add and remove a document from the manager's list
385 void AddDocument(wxDocument
*doc
);
386 void RemoveDocument(wxDocument
*doc
);
388 // closes all currently open documents
389 bool CloseDocuments(bool force
= true);
391 // closes the specified document
392 bool CloseDocument(wxDocument
* doc
, bool force
= false);
394 // Clear remaining documents and templates
395 bool Clear(bool force
= true);
397 // Views or windows should inform the document manager
398 // when a view is going in or out of focus
399 virtual void ActivateView(wxView
*view
, bool activate
= true);
400 virtual wxView
*GetCurrentView() const;
402 wxList
& GetDocuments() { return m_docs
; }
403 wxList
& GetTemplates() { return m_templates
; }
405 // Return the default name for a new document (by default returns strings
406 // in the form "unnamed <counter>" but can be overridden)
407 virtual wxString
MakeNewDocumentName();
409 // Make a frame title (override this to do something different)
410 virtual wxString
MakeFrameTitle(wxDocument
* doc
);
412 virtual wxFileHistory
*OnCreateFileHistory();
413 virtual wxFileHistory
*GetFileHistory() const { return m_fileHistory
; }
415 // File history management
416 virtual void AddFileToHistory(const wxString
& file
);
417 virtual void RemoveFileFromHistory(size_t i
);
418 virtual size_t GetHistoryFilesCount() const;
419 virtual wxString
GetHistoryFile(size_t i
) const;
420 virtual void FileHistoryUseMenu(wxMenu
*menu
);
421 virtual void FileHistoryRemoveMenu(wxMenu
*menu
);
423 virtual void FileHistoryLoad(const wxConfigBase
& config
);
424 virtual void FileHistorySave(wxConfigBase
& config
);
425 #endif // wxUSE_CONFIG
427 virtual void FileHistoryAddFilesToMenu();
428 virtual void FileHistoryAddFilesToMenu(wxMenu
* menu
);
430 wxString
GetLastDirectory() const { return m_lastDirectory
; }
431 void SetLastDirectory(const wxString
& dir
) { m_lastDirectory
= dir
; }
433 // Get the current document manager
434 static wxDocManager
* GetDocumentManager() { return sm_docManager
; }
436 #if WXWIN_COMPATIBILITY_2_8
437 // deprecated, override GetDefaultName() instead
438 wxDEPRECATED_BUT_USED_INTERNALLY(
439 virtual bool MakeDefaultName(wxString
& buf
)
443 #if WXWIN_COMPATIBILITY_2_6
444 // deprecated, use GetHistoryFilesCount() instead
445 wxDEPRECATED( size_t GetNoHistoryFiles() const );
446 #endif // WXWIN_COMPATIBILITY_2_6
449 // hook the currently active view into event handlers chain here
450 virtual bool TryValidator(wxEvent
& event
);
452 int m_defaultDocumentNameCounter
;
456 wxView
* m_currentView
;
457 wxFileHistory
* m_fileHistory
;
458 wxString m_lastDirectory
;
459 static wxDocManager
* sm_docManager
;
461 DECLARE_EVENT_TABLE()
462 DECLARE_DYNAMIC_CLASS(wxDocManager
)
463 DECLARE_NO_COPY_CLASS(wxDocManager
)
466 #if WXWIN_COMPATIBILITY_2_6
467 inline size_t wxDocManager::GetNoHistoryFiles() const
469 return GetHistoryFilesCount();
471 #endif // WXWIN_COMPATIBILITY_2_6
473 // ----------------------------------------------------------------------------
474 // A default child frame
475 // ----------------------------------------------------------------------------
477 class WXDLLIMPEXP_CORE wxDocChildFrame
: public wxFrame
480 wxDocChildFrame(wxDocument
*doc
,
484 const wxString
& title
,
485 const wxPoint
& pos
= wxDefaultPosition
,
486 const wxSize
& size
= wxDefaultSize
,
487 long type
= wxDEFAULT_FRAME_STYLE
,
488 const wxString
& name
= wxT("frame"));
489 virtual ~wxDocChildFrame(){}
491 void OnActivate(wxActivateEvent
& event
);
492 void OnCloseWindow(wxCloseEvent
& event
);
494 wxDocument
*GetDocument() const { return m_childDocument
; }
495 wxView
*GetView() const { return m_childView
; }
496 void SetDocument(wxDocument
*doc
) { m_childDocument
= doc
; }
497 void SetView(wxView
*view
) { m_childView
= view
; }
498 bool Destroy() { m_childView
= NULL
; return wxFrame::Destroy(); }
501 // hook the child view into event handlers chain here
502 virtual bool TryValidator(wxEvent
& event
);
504 wxDocument
* m_childDocument
;
508 DECLARE_CLASS(wxDocChildFrame
)
509 DECLARE_EVENT_TABLE()
510 DECLARE_NO_COPY_CLASS(wxDocChildFrame
)
513 // ----------------------------------------------------------------------------
514 // A default parent frame
515 // ----------------------------------------------------------------------------
517 class WXDLLIMPEXP_CORE wxDocParentFrame
: public wxFrame
521 wxDocParentFrame(wxDocManager
*manager
,
524 const wxString
& title
,
525 const wxPoint
& pos
= wxDefaultPosition
,
526 const wxSize
& size
= wxDefaultSize
,
527 long style
= wxDEFAULT_FRAME_STYLE
,
528 const wxString
& name
= wxFrameNameStr
);
530 bool Create(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 wxDocManager
*GetDocumentManager() const { return m_docManager
; }
541 void OnExit(wxCommandEvent
& event
);
542 void OnMRUFile(wxCommandEvent
& event
);
543 void OnCloseWindow(wxCloseEvent
& event
);
546 // hook the document manager into event handling chain here
547 virtual bool TryValidator(wxEvent
& event
);
549 wxDocManager
*m_docManager
;
552 typedef wxFrame base_type
;
553 DECLARE_CLASS(wxDocParentFrame
)
554 DECLARE_EVENT_TABLE()
555 DECLARE_NO_COPY_CLASS(wxDocParentFrame
)
558 // ----------------------------------------------------------------------------
559 // Provide simple default printing facilities
560 // ----------------------------------------------------------------------------
562 #if wxUSE_PRINTING_ARCHITECTURE
563 class WXDLLIMPEXP_CORE wxDocPrintout
: public wxPrintout
566 wxDocPrintout(wxView
*view
= NULL
, const wxString
& title
= wxT("Printout"));
567 bool OnPrintPage(int page
);
568 bool HasPage(int page
);
569 bool OnBeginDocument(int startPage
, int endPage
);
570 void GetPageInfo(int *minPage
, int *maxPage
, int *selPageFrom
, int *selPageTo
);
572 virtual wxView
*GetView() { return m_printoutView
; }
575 wxView
* m_printoutView
;
578 DECLARE_DYNAMIC_CLASS(wxDocPrintout
)
579 DECLARE_NO_COPY_CLASS(wxDocPrintout
)
581 #endif // wxUSE_PRINTING_ARCHITECTURE
583 // ----------------------------------------------------------------------------
584 // File history management
585 // ----------------------------------------------------------------------------
587 class WXDLLIMPEXP_CORE wxFileHistory
: public wxObject
590 wxFileHistory(size_t maxFiles
= 9, wxWindowID idBase
= wxID_FILE1
);
593 virtual void AddFileToHistory(const wxString
& file
);
594 virtual void RemoveFileFromHistory(size_t i
);
595 virtual int GetMaxFiles() const { return (int)m_fileMaxFiles
; }
596 virtual void UseMenu(wxMenu
*menu
);
598 // Remove menu from the list (MDI child may be closing)
599 virtual void RemoveMenu(wxMenu
*menu
);
602 virtual void Load(const wxConfigBase
& config
);
603 virtual void Save(wxConfigBase
& config
);
604 #endif // wxUSE_CONFIG
606 virtual void AddFilesToMenu();
607 virtual void AddFilesToMenu(wxMenu
* menu
); // Single menu
610 virtual wxString
GetHistoryFile(size_t i
) const { return m_fileHistory
[i
]; }
611 virtual size_t GetCount() const { return m_fileHistory
.GetCount(); }
613 const wxList
& GetMenus() const { return m_fileMenus
; }
616 void SetBaseId(wxWindowID baseId
) { m_idBase
= baseId
; }
617 wxWindowID
GetBaseId() const { return m_idBase
; }
619 #if WXWIN_COMPATIBILITY_2_6
620 // deprecated, use GetCount() instead
621 wxDEPRECATED( size_t GetNoHistoryFiles() const );
622 #endif // WXWIN_COMPATIBILITY_2_6
626 wxArrayString m_fileHistory
;
628 // Menus to maintain (may need several for an MDI app)
631 // Max files to maintain
632 size_t m_fileMaxFiles
;
635 // The ID of the first history menu item (Doesn't have to be wxID_FILE1)
638 DECLARE_DYNAMIC_CLASS(wxFileHistory
)
639 DECLARE_NO_COPY_CLASS(wxFileHistory
)
642 #if WXWIN_COMPATIBILITY_2_6
643 inline size_t wxFileHistory::GetNoHistoryFiles() const
645 return m_fileHistory
.GetCount();
647 #endif // WXWIN_COMPATIBILITY_2_6
649 #if wxUSE_STD_IOSTREAM
650 // For compatibility with existing file formats:
651 // converts from/to a stream to/from a temporary file.
652 bool WXDLLIMPEXP_CORE
wxTransferFileToStream(const wxString
& filename
, wxSTD ostream
& stream
);
653 bool WXDLLIMPEXP_CORE
wxTransferStreamToFile(wxSTD istream
& stream
, const wxString
& filename
);
655 // For compatibility with existing file formats:
656 // converts from/to a stream to/from a temporary file.
657 bool WXDLLIMPEXP_CORE
wxTransferFileToStream(const wxString
& filename
, wxOutputStream
& stream
);
658 bool WXDLLIMPEXP_CORE
wxTransferStreamToFile(wxInputStream
& stream
, const wxString
& filename
);
659 #endif // wxUSE_STD_IOSTREAM
662 // these flags are not used anywhere by wxWidgets and kept only for an unlikely
663 // case of existing user code using them for its own purposes
664 #ifdef WXWIN_COMPATIBILITY_2_8
669 wxDEFAULT_DOCMAN_FLAGS
= wxDOC_SDI
671 #endif // WXWIN_COMPATIBILITY_2_8
673 #endif // wxUSE_DOC_VIEW_ARCHITECTURE