forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIController.cs
139 lines (91 loc) · 3.16 KB
/
IController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// 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
{
/// <summary>
/// Types of content which can be created and added to a project.
/// </summary>
IEnumerable<ContentItemTemplate> Templates { get; }
List<IProjectItem> SelectedItems { get; }
IProjectItem SelectedItem { get; }
PipelineProject ProjectItem { get; }
/// <summary>
/// True if there is a project.
/// </summary>
bool ProjectOpen { get; }
/// <summary>
/// True if the project has unsaved changes.
/// </summary>
bool ProjectDirty { get; }
/// <summary>
/// True if the project is actively building.
/// </summary>
bool ProjectBuilding { get; }
/// <summary>
/// Passes /launchdebugger option when launching MGCB.
/// </summary>
bool LaunchDebugger { get; set; }
/// <summary>
/// The view this controller is attached to.
/// </summary>
IView View { get; }
/// <summary>
/// Triggered when the project starts loading.
/// </summary>
event Action OnProjectLoading;
/// <summary>
/// Triggered when the project finishes loading.
/// </summary>
event Action OnProjectLoaded;
/// <summary>
/// Notify controller that a property of Project or its contents has been modified.
/// </summary>
void OnProjectModified();
/// <summary>
/// Notify controller that Project.References has been modified.
/// </summary>
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(IProjectItem[] items);
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 Move(string[] paths, string[] newpaths, FileType[] types);
void AddAction(IProjectAction action);
void SelectionChanged(List<IProjectItem> items);
IProjectItem GetItem(string originalPath);
#endregion
#region Undo, Redo
bool CanRedo { get; }
bool CanUndo { get; }
void Undo();
void Redo();
#endregion
string GetFullPath(string filePath);
string GetRelativePath(string filePath);
}
}