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 // Called by framework if created automatically by the default document
111 // manager: gives document a chance to initialise and (usually) create a
113 virtual bool OnCreate(const wxString
& path
, long flags
);
115 // By default, creates a base wxCommandProcessor.
116 virtual wxCommandProcessor
*OnCreateCommandProcessor();
117 virtual wxCommandProcessor
*GetCommandProcessor() const { return m_commandProcessor
; }
118 virtual void SetCommandProcessor(wxCommandProcessor
*proc
) { m_commandProcessor
= proc
; }
120 // Called after a view is added or removed. The default implementation
121 // deletes the document if this is there are no more views.
122 virtual void OnChangedViewList();
124 virtual bool DeleteContents();
126 virtual bool Draw(wxDC
&);
127 virtual bool IsModified() const { return m_documentModified
; }
128 virtual void Modify(bool mod
) { m_documentModified
= mod
; }
130 virtual bool AddView(wxView
*view
);
131 virtual bool RemoveView(wxView
*view
);
132 wxList
& GetViews() { return m_documentViews
; }
133 const wxList
& GetViews() const { return m_documentViews
; }
134 wxView
*GetFirstView() const;
136 virtual void UpdateAllViews(wxView
*sender
= NULL
, wxObject
*hint
= NULL
);
137 virtual void NotifyClosing();
139 // Remove all views (because we're closing the document)
140 virtual bool DeleteAllViews();
143 virtual wxDocManager
*GetDocumentManager() const;
144 virtual wxDocTemplate
*GetDocumentTemplate() const { return m_documentTemplate
; }
145 virtual void SetDocumentTemplate(wxDocTemplate
*temp
) { m_documentTemplate
= temp
; }
147 // Get the document name to be shown to the user: the title if there is
148 // any, otherwise the filename if the document was saved and, finally,
149 // "unnamed" otherwise
150 virtual wxString
GetUserReadableName() const;
152 #if WXWIN_COMPATIBILITY_2_8
153 // use GetUserReadableName() instead
154 wxDEPRECATED_BUT_USED_INTERNALLY(
155 virtual bool GetPrintableName(wxString
& buf
) const
157 #endif // WXWIN_COMPATIBILITY_2_8
159 // Returns a window that can be used as a parent for document-related
160 // dialogs. Override if necessary.
161 virtual wxWindow
*GetDocumentWindow() const;
164 wxList m_documentViews
;
165 wxString m_documentFile
;
166 wxString m_documentTitle
;
167 wxString m_documentTypeName
;
168 wxDocTemplate
* m_documentTemplate
;
169 bool m_documentModified
;
170 wxDocument
* m_documentParent
;
171 wxCommandProcessor
* m_commandProcessor
;
174 // Called by OnSaveDocument and OnOpenDocument to implement standard
175 // Save/Load behavior. Re-implement in derived class for custom
177 virtual bool DoSaveDocument(const wxString
& file
);
178 virtual bool DoOpenDocument(const wxString
& file
);
180 // the default implementation of GetUserReadableName()
181 wxString
DoGetUserReadableName() const;
184 DECLARE_ABSTRACT_CLASS(wxDocument
)
185 DECLARE_NO_COPY_CLASS(wxDocument
)
188 class WXDLLIMPEXP_CORE wxView
: public wxEvtHandler
194 wxDocument
*GetDocument() const { return m_viewDocument
; }
195 virtual void SetDocument(wxDocument
*doc
);
197 wxString
GetViewName() const { return m_viewTypeName
; }
198 void SetViewName(const wxString
& name
) { m_viewTypeName
= name
; }
200 wxWindow
*GetFrame() const { return m_viewFrame
; }
201 void SetFrame(wxWindow
*frame
) { m_viewFrame
= frame
; }
203 virtual void OnActivateView(bool activate
, wxView
*activeView
, wxView
*deactiveView
);
204 virtual void OnDraw(wxDC
*dc
) = 0;
205 virtual void OnPrint(wxDC
*dc
, wxObject
*info
);
206 virtual void OnUpdate(wxView
*sender
, wxObject
*hint
= NULL
);
207 virtual void OnClosingDocument() {}
208 virtual void OnChangeFilename();
210 // Called by framework if created automatically by the default document
211 // manager class: gives view a chance to initialise
212 virtual bool OnCreate(wxDocument
*WXUNUSED(doc
), long WXUNUSED(flags
))
215 // Checks if the view is the last one for the document; if so, asks user
216 // to confirm save data (if modified). If ok, deletes itself and returns
218 virtual bool Close(bool deleteWindow
= true);
220 // Override to do cleanup/veto close
221 virtual bool OnClose(bool deleteWindow
);
223 // A view's window can call this to notify the view it is (in)active.
224 // The function then notifies the document manager.
225 virtual void Activate(bool activate
);
227 wxDocManager
*GetDocumentManager() const
228 { return m_viewDocument
->GetDocumentManager(); }
230 #if wxUSE_PRINTING_ARCHITECTURE
231 virtual wxPrintout
*OnCreatePrintout();
235 // hook the document into event handlers chain here
236 virtual bool TryValidator(wxEvent
& event
);
238 wxDocument
* m_viewDocument
;
239 wxString m_viewTypeName
;
240 wxWindow
* m_viewFrame
;
243 DECLARE_ABSTRACT_CLASS(wxView
)
244 DECLARE_NO_COPY_CLASS(wxView
)
247 // Represents user interface (and other) properties of documents and views
248 class WXDLLIMPEXP_CORE wxDocTemplate
: public wxObject
251 friend class WXDLLIMPEXP_FWD_CORE wxDocManager
;
254 // Associate document and view types. They're for identifying what view is
255 // associated with what template/document type
256 wxDocTemplate(wxDocManager
*manager
,
257 const wxString
& descr
,
258 const wxString
& filter
,
261 const wxString
& docTypeName
,
262 const wxString
& viewTypeName
,
263 wxClassInfo
*docClassInfo
= NULL
,
264 wxClassInfo
*viewClassInfo
= NULL
,
265 long flags
= wxDEFAULT_TEMPLATE_FLAGS
);
267 virtual ~wxDocTemplate();
269 // By default, these two member functions dynamically creates document and
270 // view using dynamic instance construction. Override these if you need a
271 // different method of construction.
272 virtual wxDocument
*CreateDocument(const wxString
& path
, long flags
= 0);
273 virtual wxView
*CreateView(wxDocument
*doc
, long flags
= 0);
275 // Helper method for CreateDocument; also allows you to do your own document
277 virtual bool InitDocument(wxDocument
* doc
, const wxString
& path
, long flags
= 0);
279 wxString
GetDefaultExtension() const { return m_defaultExt
; }
280 wxString
GetDescription() const { return m_description
; }
281 wxString
GetDirectory() const { return m_directory
; }
282 wxDocManager
*GetDocumentManager() const { return m_documentManager
; }
283 void SetDocumentManager(wxDocManager
*manager
) { m_documentManager
= manager
; }
284 wxString
GetFileFilter() const { return m_fileFilter
; }
285 long GetFlags() const { return m_flags
; }
286 virtual wxString
GetViewName() const { return m_viewTypeName
; }
287 virtual wxString
GetDocumentName() const { return m_docTypeName
; }
289 void SetFileFilter(const wxString
& filter
) { m_fileFilter
= filter
; }
290 void SetDirectory(const wxString
& dir
) { m_directory
= dir
; }
291 void SetDescription(const wxString
& descr
) { m_description
= descr
; }
292 void SetDefaultExtension(const wxString
& ext
) { m_defaultExt
= ext
; }
293 void SetFlags(long flags
) { m_flags
= flags
; }
295 bool IsVisible() const { return ((m_flags
& wxTEMPLATE_VISIBLE
) == wxTEMPLATE_VISIBLE
); }
297 wxClassInfo
* GetDocClassInfo() const { return m_docClassInfo
; }
298 wxClassInfo
* GetViewClassInfo() const { return m_viewClassInfo
; }
300 virtual bool FileMatchesTemplate(const wxString
& path
);
304 wxString m_fileFilter
;
305 wxString m_directory
;
306 wxString m_description
;
307 wxString m_defaultExt
;
308 wxString m_docTypeName
;
309 wxString m_viewTypeName
;
310 wxDocManager
* m_documentManager
;
312 // For dynamic creation of appropriate instances.
313 wxClassInfo
* m_docClassInfo
;
314 wxClassInfo
* m_viewClassInfo
;
316 // Called by CreateDocument and CreateView to create the actual document/view object.
317 // By default uses the ClassInfo provided to the constructor. Override these functions
318 // to provide a different method of creation.
319 virtual wxDocument
*DoCreateDocument();
320 virtual wxView
*DoCreateView();
323 DECLARE_CLASS(wxDocTemplate
)
324 DECLARE_NO_COPY_CLASS(wxDocTemplate
)
327 // One object of this class may be created in an application, to manage all
328 // the templates and documents.
329 class WXDLLIMPEXP_CORE wxDocManager
: public wxEvtHandler
332 // NB: flags are unused, don't pass wxDOC_XXX to this ctor
333 wxDocManager(long flags
= 0, bool initialize
= true);
334 virtual ~wxDocManager();
336 virtual bool Initialize();
338 // Handlers for common user commands
339 void OnFileClose(wxCommandEvent
& event
);
340 void OnFileCloseAll(wxCommandEvent
& event
);
341 void OnFileNew(wxCommandEvent
& event
);
342 void OnFileOpen(wxCommandEvent
& event
);
343 void OnFileRevert(wxCommandEvent
& event
);
344 void OnFileSave(wxCommandEvent
& event
);
345 void OnFileSaveAs(wxCommandEvent
& event
);
346 void OnPrint(wxCommandEvent
& event
);
347 void OnPreview(wxCommandEvent
& event
);
348 void OnUndo(wxCommandEvent
& event
);
349 void OnRedo(wxCommandEvent
& event
);
351 // Handlers for UI update commands
352 void OnUpdateFileOpen(wxUpdateUIEvent
& event
);
353 void OnUpdateDisableIfNoDoc(wxUpdateUIEvent
& event
);
354 void OnUpdateFileNew(wxUpdateUIEvent
& event
);
355 void OnUpdateFileSave(wxUpdateUIEvent
& event
);
356 void OnUpdateUndo(wxUpdateUIEvent
& event
);
357 void OnUpdateRedo(wxUpdateUIEvent
& event
);
359 // called when file format detection didn't work, can be overridden to do
360 // something in this case
361 virtual void OnOpenFileFailure() { }
363 virtual wxDocument
*CreateDocument(const wxString
& path
, long flags
= 0);
365 // wrapper around CreateDocument() with a more clear name
366 wxDocument
*CreateNewDocument()
367 { return CreateDocument(wxString(), wxDOC_NEW
); }
369 virtual wxView
*CreateView(wxDocument
*doc
, long flags
= 0);
370 virtual void DeleteTemplate(wxDocTemplate
*temp
, long flags
= 0);
371 virtual bool FlushDoc(wxDocument
*doc
);
372 virtual wxDocTemplate
*MatchTemplate(const wxString
& path
);
373 virtual wxDocTemplate
*SelectDocumentPath(wxDocTemplate
**templates
,
374 int noTemplates
, wxString
& path
, long flags
, bool save
= false);
375 virtual wxDocTemplate
*SelectDocumentType(wxDocTemplate
**templates
,
376 int noTemplates
, bool sort
= false);
377 virtual wxDocTemplate
*SelectViewType(wxDocTemplate
**templates
,
378 int noTemplates
, bool sort
= false);
379 virtual wxDocTemplate
*FindTemplateForPath(const wxString
& path
);
381 void AssociateTemplate(wxDocTemplate
*temp
);
382 void DisassociateTemplate(wxDocTemplate
*temp
);
384 wxDocument
*GetCurrentDocument() const;
386 void SetMaxDocsOpen(int n
) { m_maxDocsOpen
= n
; }
387 int GetMaxDocsOpen() const { return m_maxDocsOpen
; }
389 // Add and remove a document from the manager's list
390 void AddDocument(wxDocument
*doc
);
391 void RemoveDocument(wxDocument
*doc
);
393 // closes all currently open documents
394 bool CloseDocuments(bool force
= true);
396 // closes the specified document
397 bool CloseDocument(wxDocument
* doc
, bool force
= false);
399 // Clear remaining documents and templates
400 bool Clear(bool force
= true);
402 // Views or windows should inform the document manager
403 // when a view is going in or out of focus
404 virtual void ActivateView(wxView
*view
, bool activate
= true);
405 virtual wxView
*GetCurrentView() const;
407 wxList
& GetDocuments() { return m_docs
; }
408 wxList
& GetTemplates() { return m_templates
; }
410 // Return the default name for a new document (by default returns strings
411 // in the form "unnamed <counter>" but can be overridden)
412 virtual wxString
MakeNewDocumentName();
414 // Make a frame title (override this to do something different)
415 virtual wxString
MakeFrameTitle(wxDocument
* doc
);
417 virtual wxFileHistory
*OnCreateFileHistory();
418 virtual wxFileHistory
*GetFileHistory() const { return m_fileHistory
; }
420 // File history management
421 virtual void AddFileToHistory(const wxString
& file
);
422 virtual void RemoveFileFromHistory(size_t i
);
423 virtual size_t GetHistoryFilesCount() const;
424 virtual wxString
GetHistoryFile(size_t i
) const;
425 virtual void FileHistoryUseMenu(wxMenu
*menu
);
426 virtual void FileHistoryRemoveMenu(wxMenu
*menu
);
428 virtual void FileHistoryLoad(const wxConfigBase
& config
);
429 virtual void FileHistorySave(wxConfigBase
& config
);
430 #endif // wxUSE_CONFIG
432 virtual void FileHistoryAddFilesToMenu();
433 virtual void FileHistoryAddFilesToMenu(wxMenu
* menu
);
435 wxString
GetLastDirectory() const { return m_lastDirectory
; }
436 void SetLastDirectory(const wxString
& dir
) { m_lastDirectory
= dir
; }
438 // Get the current document manager
439 static wxDocManager
* GetDocumentManager() { return sm_docManager
; }
441 #if WXWIN_COMPATIBILITY_2_8
442 // deprecated, override GetDefaultName() instead
443 wxDEPRECATED_BUT_USED_INTERNALLY(
444 virtual bool MakeDefaultName(wxString
& buf
)
448 #if WXWIN_COMPATIBILITY_2_6
449 // deprecated, use GetHistoryFilesCount() instead
450 wxDEPRECATED( size_t GetNoHistoryFiles() const );
451 #endif // WXWIN_COMPATIBILITY_2_6
454 // hook the currently active view into event handlers chain here
455 virtual bool TryValidator(wxEvent
& event
);
457 int m_defaultDocumentNameCounter
;
461 wxView
* m_currentView
;
462 wxFileHistory
* m_fileHistory
;
463 wxString m_lastDirectory
;
464 static wxDocManager
* sm_docManager
;
466 DECLARE_EVENT_TABLE()
467 DECLARE_DYNAMIC_CLASS(wxDocManager
)
468 DECLARE_NO_COPY_CLASS(wxDocManager
)
471 #if WXWIN_COMPATIBILITY_2_6
472 inline size_t wxDocManager::GetNoHistoryFiles() const
474 return GetHistoryFilesCount();
476 #endif // WXWIN_COMPATIBILITY_2_6
478 // ----------------------------------------------------------------------------
479 // A default child frame
480 // ----------------------------------------------------------------------------
482 class WXDLLIMPEXP_CORE wxDocChildFrame
: public wxFrame
485 wxDocChildFrame(wxDocument
*doc
,
489 const wxString
& title
,
490 const wxPoint
& pos
= wxDefaultPosition
,
491 const wxSize
& size
= wxDefaultSize
,
492 long type
= wxDEFAULT_FRAME_STYLE
,
493 const wxString
& name
= wxT("frame"));
494 virtual ~wxDocChildFrame(){}
496 void OnActivate(wxActivateEvent
& event
);
497 void OnCloseWindow(wxCloseEvent
& event
);
499 wxDocument
*GetDocument() const { return m_childDocument
; }
500 wxView
*GetView() const { return m_childView
; }
501 void SetDocument(wxDocument
*doc
) { m_childDocument
= doc
; }
502 void SetView(wxView
*view
) { m_childView
= view
; }
503 bool Destroy() { m_childView
= NULL
; return wxFrame::Destroy(); }
506 // hook the child view into event handlers chain here
507 virtual bool TryValidator(wxEvent
& event
);
509 wxDocument
* m_childDocument
;
513 DECLARE_CLASS(wxDocChildFrame
)
514 DECLARE_EVENT_TABLE()
515 DECLARE_NO_COPY_CLASS(wxDocChildFrame
)
518 // ----------------------------------------------------------------------------
519 // A default parent frame
520 // ----------------------------------------------------------------------------
522 class WXDLLIMPEXP_CORE wxDocParentFrame
: public wxFrame
526 wxDocParentFrame(wxDocManager
*manager
,
529 const wxString
& title
,
530 const wxPoint
& pos
= wxDefaultPosition
,
531 const wxSize
& size
= wxDefaultSize
,
532 long style
= wxDEFAULT_FRAME_STYLE
,
533 const wxString
& name
= wxFrameNameStr
);
535 bool Create(wxDocManager
*manager
,
538 const wxString
& title
,
539 const wxPoint
& pos
= wxDefaultPosition
,
540 const wxSize
& size
= wxDefaultSize
,
541 long style
= wxDEFAULT_FRAME_STYLE
,
542 const wxString
& name
= wxFrameNameStr
);
544 wxDocManager
*GetDocumentManager() const { return m_docManager
; }
546 void OnExit(wxCommandEvent
& event
);
547 void OnMRUFile(wxCommandEvent
& event
);
548 void OnCloseWindow(wxCloseEvent
& event
);
551 // hook the document manager into event handling chain here
552 virtual bool TryValidator(wxEvent
& event
);
554 wxDocManager
*m_docManager
;
557 typedef wxFrame base_type
;
558 DECLARE_CLASS(wxDocParentFrame
)
559 DECLARE_EVENT_TABLE()
560 DECLARE_NO_COPY_CLASS(wxDocParentFrame
)
563 // ----------------------------------------------------------------------------
564 // Provide simple default printing facilities
565 // ----------------------------------------------------------------------------
567 #if wxUSE_PRINTING_ARCHITECTURE
568 class WXDLLIMPEXP_CORE wxDocPrintout
: public wxPrintout
571 wxDocPrintout(wxView
*view
= NULL
, const wxString
& title
= wxT("Printout"));
572 bool OnPrintPage(int page
);
573 bool HasPage(int page
);
574 bool OnBeginDocument(int startPage
, int endPage
);
575 void GetPageInfo(int *minPage
, int *maxPage
, int *selPageFrom
, int *selPageTo
);
577 virtual wxView
*GetView() { return m_printoutView
; }
580 wxView
* m_printoutView
;
583 DECLARE_DYNAMIC_CLASS(wxDocPrintout
)
584 DECLARE_NO_COPY_CLASS(wxDocPrintout
)
586 #endif // wxUSE_PRINTING_ARCHITECTURE
588 // ----------------------------------------------------------------------------
589 // File history management
590 // ----------------------------------------------------------------------------
592 class WXDLLIMPEXP_CORE wxFileHistory
: public wxObject
595 wxFileHistory(size_t maxFiles
= 9, wxWindowID idBase
= wxID_FILE1
);
598 virtual void AddFileToHistory(const wxString
& file
);
599 virtual void RemoveFileFromHistory(size_t i
);
600 virtual int GetMaxFiles() const { return (int)m_fileMaxFiles
; }
601 virtual void UseMenu(wxMenu
*menu
);
603 // Remove menu from the list (MDI child may be closing)
604 virtual void RemoveMenu(wxMenu
*menu
);
607 virtual void Load(const wxConfigBase
& config
);
608 virtual void Save(wxConfigBase
& config
);
609 #endif // wxUSE_CONFIG
611 virtual void AddFilesToMenu();
612 virtual void AddFilesToMenu(wxMenu
* menu
); // Single menu
615 virtual wxString
GetHistoryFile(size_t i
) const { return m_fileHistory
[i
]; }
616 virtual size_t GetCount() const { return m_fileHistory
.GetCount(); }
618 const wxList
& GetMenus() const { return m_fileMenus
; }
621 void SetBaseId(wxWindowID baseId
) { m_idBase
= baseId
; }
622 wxWindowID
GetBaseId() const { return m_idBase
; }
624 #if WXWIN_COMPATIBILITY_2_6
625 // deprecated, use GetCount() instead
626 wxDEPRECATED( size_t GetNoHistoryFiles() const );
627 #endif // WXWIN_COMPATIBILITY_2_6
631 wxArrayString m_fileHistory
;
633 // Menus to maintain (may need several for an MDI app)
636 // Max files to maintain
637 size_t m_fileMaxFiles
;
640 // The ID of the first history menu item (Doesn't have to be wxID_FILE1)
643 DECLARE_DYNAMIC_CLASS(wxFileHistory
)
644 DECLARE_NO_COPY_CLASS(wxFileHistory
)
647 #if WXWIN_COMPATIBILITY_2_6
648 inline size_t wxFileHistory::GetNoHistoryFiles() const
650 return m_fileHistory
.GetCount();
652 #endif // WXWIN_COMPATIBILITY_2_6
654 #if wxUSE_STD_IOSTREAM
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
, wxSTD ostream
& stream
);
658 bool WXDLLIMPEXP_CORE
wxTransferStreamToFile(wxSTD istream
& stream
, const wxString
& filename
);
660 // For compatibility with existing file formats:
661 // converts from/to a stream to/from a temporary file.
662 bool WXDLLIMPEXP_CORE
wxTransferFileToStream(const wxString
& filename
, wxOutputStream
& stream
);
663 bool WXDLLIMPEXP_CORE
wxTransferStreamToFile(wxInputStream
& stream
, const wxString
& filename
);
664 #endif // wxUSE_STD_IOSTREAM
667 // these flags are not used anywhere by wxWidgets and kept only for an unlikely
668 // case of existing user code using them for its own purposes
669 #ifdef WXWIN_COMPATIBILITY_2_8
674 wxDEFAULT_DOCMAN_FLAGS
= wxDOC_SDI
676 #endif // WXWIN_COMPATIBILITY_2_8
678 #endif // wxUSE_DOC_VIEW_ARCHITECTURE