using System;
using System.Collections.Generic;
using Core.Common.Base.IO;
namespace Core.Common.Gui
{
///
/// Handles all common high-level commands in the graphical user interface invoked via menu / toolbar.
///
public interface IGuiCommandHandler : IDisposable
{
///
/// Saves the project to a new file.
///
/// Returns if the project was succesfully saved.
bool SaveProjectAs();
///
/// Creates a new project.
///
///
/// The creation action might be cancelled (due to user interaction).
///
void CreateNewProject();
///
/// Opens an existing project.
///
///
/// The opening action might be cancelled (due to user interaction).
///
/// Whether or not an existing project was correctly opened.
bool OpenExistingProject();
///
/// Opens an existing project from file.
///
/// The path to the existing project file.
///
/// The opening action might be cancelled (due to user interaction).
///
/// Whether or not an existing project was correctly opened.
bool OpenExistingProject(string filePath);
///
/// Closes the current project.
///
void CloseProject();
///
/// Presents the user with a dialog to choose an editor for the selected dataitem
///
void OpenSelectViewDialog();
void OpenViewForSelection();
void OpenView(object dataObject);
void RemoveAllViewsForItem(object dataObject);
///
/// Presents the user with a dialog from which items can be selected and then created. The items are retrieved
/// using the DataItemInfo objects of plugins. The item is NOT added to the project or wrapped in a DataItem.
///
///
/// The predicate which must evaluate to true for an item type to be included in the list
object AddNewChildItem(object parent, IEnumerable childItemTypes);
void AddNewItem(object parent);
///
///
///
/// true if there is a default view for the current selection
bool CanOpenViewFor(object obj);
///
///
/// true if there are more supported views for the current selection
bool CanOpenSelectViewDialog();
void AddItemToProject(object item);
///
/// Activates the propertyGrid toolbox
///
///
void ShowPropertiesFor(object obj);
///
/// Indicates if there are importers for the current Gui.Selection
///
///
bool CanImportOn(object obj);
///
/// Indicates if there are exporters for the current Gui.Selection
///
///
bool CanExportFrom(object obj);
///
/// Indicates if there is a property view object for the current .
///
///
/// true if a property view is defined, false otherwise.
bool CanShowPropertiesFor(object obj);
object GetDataOfActiveView();
void OpenLogFileExternal();
void ExportFrom(object data, IFileExporter exporter = null);
void ImportOn(object target, IFileImporter importer = null);
}
}