+ Creates a new document.
+
+ This function can either create a document corresponding to a new
+ file or to an already existing one depending on whether @c wxDOC_NEW is
+ specified in the @a flags.
+
+ By default, this function asks the user for the type of document to
+ open and the path to its file if it's not specified, i.e. if @a path is
+ empty. Specifying @c wxDOC_SILENT flag suppresses any prompts and means
+ that the @a path must be non-empty and there must be a registered
+ document template handling the extension of this file, otherwise a
+ warning message is logged and the function returns @NULL. Notice that
+ @c wxDOC_SILENT can be combined with @c wxDOC_NEW, however in this case
+ the @a path must still be specified, even if the file with this path
+ typically won't exist.
+
+ Finally notice that if this document manager was configured to allow
+ only a limited number of simultaneously opened documents using
+ SetMaxDocsOpen(), this function will try to close the oldest existing
+ document if this number was reached before creating a new document.
+ And if closing the old document fails (e.g. because it was vetoed by
+ user), this function fails as well.
+
+ @param path
+ Path to a file or an empty string. If the path is empty, the user
+ will be asked to select it (thus, this is incompatible with the use
+ of @c wxDOC_SILENT). The file should exist unless @a flags includes
+ @c wxDOC_NEW.
+ @param flags
+ By default, none. May include @c wxDOC_NEW to indicate that the new
+ document corresponds to a new file and not an existing one and
+ @c wxDOC_SILENT to suppress any dialogs asking the user about the
+ file path and type.
+ @return a new document object or @NULL on failure.
+ */
+ virtual wxDocument* CreateDocument(const wxString& path, long flags = 0);