... Now new project windows are opened when .aup3 files are opened; but
behavior chages only in that case.
Wherever opening of other files invoked import code, we still do or do
not make a new project in exactly the same cases as before; such as, when
opening multiple files with File > Open, be sure each imported file still opens
in its own separate window.
This means the decision whether to open a new project must be lowered into
ProjectFileManager, where the type of the file is discovered, and we pass it a
function object so it avoids a dependency cycle with ProjectManager.
It also means the checking for errors and closing of new projects in case of
failure must be replicated at all places where ProjectFileManager::OpenProject
is called directly.
The class ProjectManager::ProjectChooser simplifies this.
Recently introduced calls to SafeToOpenProjectInto(), before
ProjectManager::OpenProject(), are now lowered into that class, delaying the
safety check so it might also be called where ProjectFileManager is used
directly.
... It is false in exactly the cases where there is now also a check first for
the safety of opening a project file.
Those are the cases where a new project was made for imports, but this was not
necessary for safety. Yet old behavior will be preserved in such cases.
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.
That's all that this sweeping commit does.
... handling the callbacks from the selection toolbars.
Next ProjectFileManager will be split out of ProjectManager, and
ProjectSelectionManager will be used by it during file opening, so separating
files for it avoids a cycle.