using System;
using System.Collections.Generic;
using Core.Common.Controls;
using Core.Common.Controls.Views;
namespace Core.Common.Gui
{
public interface IViewResolver
{
///
/// Default view types registered for data object types.
///
/// DefaultViewTypes[objectType] = viewType;
///
IDictionary DefaultViewTypes { get; }
///
/// List of view info objects used for resolving views
///
IList ViewInfos { get; }
///
/// Opens a view for specified data. Using viewprovider to resolve the correct view.
///
/// Data to open a view for
/// Always present the user with a dialog to choose from
bool OpenViewForData(object data, bool alwaysShowDialog = false);
///
/// Creates a view for the
///
/// The data to create a view for
/// Function to filter the view infos to use
/// A view for data
IView CreateViewForData(object data, Func selectViewInfo = null);
///
/// Check if a view can be created for the and
///
/// The data to check for
///
bool CanOpenViewFor(object data);
///
/// Returns all currently opened views for the same data.
///
///
///
IList GetViewsForData(object data);
///
/// Closes all views for .
///
///
///
void CloseAllViewsFor(object data);
///
/// Gives the default viewtype for the given data object.
///
///
///
Type GetDefaultViewType(object dataObject);
///
/// Gets the view info objects for the
///
/// Data used for searching the view infos
/// The viewType of the view info
/// The matching view infos for data and view type
IEnumerable GetViewInfosFor(object data, Type viewType = null);
string GetViewName(IView view);
}
}