// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
using System;
using System.Collections.Generic;
namespace MonoGame.Tools.Pipeline
{
public interface IContentItemObserver
{
void OnItemModified(ContentItem item);
}
public interface IController : IContentItemObserver
{
///
/// Types of content which can be created and added to a project.
///
IEnumerable Templates { get; }
List SelectedItems { get; }
IProjectItem SelectedItem { get; }
PipelineProject ProjectItem { get; }
///
/// True if there is a project.
///
bool ProjectOpen { get; }
///
/// True if the project has unsaved changes.
///
bool ProjectDirty { get; }
///
/// True if the project is actively building.
///
bool ProjectBuilding { get; }
///
/// The view this controller is attached to.
///
IView View { get; }
///
/// Triggered when the project starts loading.
///
event Action OnProjectLoading;
///
/// Triggered when the project finishes loading.
///
event Action OnProjectLoaded;
///
/// Notify controller that a property of Project or its contents has been modified.
///
void OnProjectModified();
///
/// Notify controller that Project.References has been modified.
///
void OnReferencesModified();
void NewProject();
void ImportProject();
void OpenProject();
void OpenProject(string projectFilePath);
void ClearRecentList();
void CloseProject();
bool SaveProject(bool saveAs);
void Build(bool rebuild);
void RebuildItems();
void Clean();
void CancelBuild();
bool Exit();
#region ContentItem
void DragDrop(string initialDirectory, string[] folders, string[] files);
void Include();
void IncludeFolder();
void Exclude(bool delete);
void NewItem();
void NewFolder();
void Rename();
void AddAction(IProjectAction action);
void SelectionChanged(List items);
IProjectItem GetItem(string originalPath);
void CopyAssetPath();
#endregion
#region Undo, Redo
bool CanRedo { get; }
bool CanUndo { get; }
void Undo();
void Redo();
#endregion
string GetFullPath(string filePath);
string GetRelativePath(string filePath);
}
}