comparison Chronosv2/source/Presentation/Core/VirtualDesktops/IVirtualDesktopManager.cs @ 10:443821e55f06

Initial cleaned up add from Codeplex files
author stevenh7776 stevenhollidge@hotmail.com
date Tue, 21 Feb 2012 17:25:44 +0700
parents
children
comparison
equal deleted inserted replaced
9:904a9faadf8b 10:443821e55f06
1 /*
2 The MIT License
3
4 Copyright (c) 2009-2010. Carlos Guzmán Álvarez. http://chronoswpf.codeplex.com/
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE SOFTWARE.
23 */
24
25 using System;
26 using System.Collections.ObjectModel;
27 using System.Windows;
28 using Chronos.Presentation.Core.ViewModel;
29 using Chronos.Presentation.Core.Windows;
30
31 namespace Chronos.Presentation.Core.VirtualDesktops
32 {
33 /// <summary>
34 /// Interface for virtual desktop manager implementations
35 /// </summary>
36 public interface IVirtualDesktopManager
37 {
38 #region · Properties ·
39
40 /// <summary>
41 /// Gets the active desktop windows.
42 /// </summary>
43 /// <value>The active desktop windows.</value>
44 ReadOnlyObservableCollection<INavigationViewModel> ActiveDesktopWindows
45 {
46 get;
47 }
48
49 /// <summary>
50 /// Gets a value indicating whether there is an active virtual desktop.
51 /// </summary>
52 /// <value>
53 /// <c>true</c> if there are an active virtual desktop; otherwise, <c>false</c>.
54 /// </value>
55 bool HasDesktopActive
56 {
57 get;
58 }
59
60 #endregion
61
62 #region · Methods ·
63
64 /// <summary>
65 /// Activates the default desktop
66 /// </summary>
67 void ActivateDefaultDesktop();
68
69 /// <summary>
70 /// Switches the active desktop
71 /// </summary>
72 void SwitchDesktop();
73
74 /// <summary>
75 /// Shows the desktop
76 /// </summary>
77 void ShowDesktop();
78
79 /// <summary>
80 /// Saves all the desktops to disk
81 /// </summary>
82 void SaveAllDesktops();
83
84 /// <summary>
85 /// Saves the active desktop to disk.
86 /// </summary>
87 void SaveCurrentDesktop();
88
89 /// <summary>
90 /// Creates a new shortcut with the given title and target
91 /// </summary>
92 /// <param name="title"></param>
93 /// <param name="target"></param>
94 void CreateShortcut<T>(string title, string target) where T : IShortcutViewModel, new();
95
96 /// <summary>
97 /// Creates a new shortcut with the given title, target and position
98 /// </summary>
99 /// <param name="title"></param>
100 /// <param name="target"></param>
101 void CreateShortcut<T>(string title, string target, Point position) where T : IShortcutViewModel, new();
102
103 /// <summary>
104 /// Shows a new instance of the specified type in the active desktop.
105 /// </summary>
106 void Show<T>() where T : IDesktopElement, new();
107
108 /// <summary>
109 /// Shows a new instance of the specified type in the active desktop.
110 /// </summary>
111 /// <param name="position">The position.</param>
112 void Show<T>(Point position) where T : IDesktopElement, new();
113
114 /// <summary>
115 /// Shows the given <see cref="IDesktopElement"/>
116 /// </summary>
117 /// <param name="instance"></param>
118 void Show(IDesktopElement instance);
119
120 /// <summary>
121 /// Shows the given <see cref="IClosableViewModel"/>
122 /// </summary>
123 /// <param name="instance"></param>
124 void Show(IDesktopElement instance, Point position);
125
126 /// <summary>
127 /// Shows the given <see cref="IWindow"/> as a normal Window
128 /// </summary>
129 /// <param name="window"></param>
130 void Show(IWindow element);
131
132 /// <summary>
133 /// Shows the given <see cref="IModalVindow"/> instance
134 /// </summary>
135 /// <param name="window"></param>
136 DialogResult ShowDialog(IModalVindow element);
137
138 /// <summary>
139 /// Closes the object with the given identifier
140 /// </summary>
141 /// <param name="id">The element identifier.</param>
142 void Close(Guid id);
143
144 /// <summary>
145 /// Closes all the elements
146 /// </summary>
147 void CloseAll();
148
149 /// <summary>
150 /// Closes the current dialog
151 /// </summary>
152 void CloseDialog();
153
154 /// <summary>
155 /// Restores the window with the given identifier
156 /// </summary>
157 /// <param name="id">The element identifier.</param>
158 void Restore(Guid id);
159
160 /// <summary>
161 /// Registers the given desktop instance
162 /// </summary>
163 /// <param name="d"></param>
164 void RegisterDesktop(DependencyObject d);
165
166 /// <summary>
167 /// Registers the given modal container instance
168 /// </summary>
169 /// <param name="d"></param>
170 void RegisterModalContainer(DependencyObject d);
171
172 #endregion
173 }
174 }