comparison Chronosv2/source/Presentation/Core/VirtualDesktops/IVirtualDesktop.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 implementations
35 /// </summary>
36 public interface IVirtualDesktop
37 {
38 #region · Properties ·
39
40 /// <summary>
41 /// Gets the desktop identifier
42 /// </summary>
43 Guid Id
44 {
45 get;
46 }
47
48 /// <summary>
49 /// Gets the list of active Windows
50 /// </summary>
51 ReadOnlyObservableCollection<INavigationViewModel> ActiveWindows
52 {
53 get;
54 }
55
56 #endregion
57
58 #region · Methods ·
59
60 /// <summary>
61 /// Activates the desktop instance
62 /// </summary>
63 void Activate();
64
65 /// <summary>
66 /// Deactivates the desktop instance
67 /// </summary>
68 void Deactivate();
69
70 /// <summary>
71 /// Shows the desktop
72 /// </summary>
73 void ShowDesktop();
74
75 /// <summary>
76 /// Saves the desktop to disk
77 /// </summary>
78 void Save();
79
80 /// <summary>
81 /// Creates a new shortcut with the given title and target
82 /// </summary>
83 /// <param name="title"></param>
84 /// <param name="target"></param>
85 void CreateShortcut<T>(string title, string target) where T : IShortcutViewModel, new();
86
87 /// <summary>
88 /// Creates a new shortcut with the given title, target and position
89 /// </summary>
90 /// <param name="title"></param>
91 /// <param name="target"></param>
92 void CreateShortcut<T>(string title, string target, Point position) where T : IShortcutViewModel, new();
93
94 /// <summary>
95 /// Shows a new instance of the given element type
96 /// </summary>
97 void Show<T>() where T: IDesktopElement, new();
98
99 /// <summary>
100 /// Shows a new instance of the given element type
101 /// </summary>
102 void Show<T>(Point position) where T : IDesktopElement, new();
103
104 /// <summary>
105 /// Shows the given <see cref="IDesktopElement"/> instance
106 /// </summary>
107 /// <param name="instance"></param>
108 void Show(IDesktopElement instance);
109
110 /// <summary>
111 /// Shows the given <see cref="IDesktopElement"/> instance
112 /// </summary>
113 /// <param name="instance"></param>
114 void Show(IDesktopElement instance, Point position);
115
116 /// <summary>
117 /// Shows the given <see cref="IWindow"/> instance
118 /// </summary>
119 /// <param name="window">A <see cref="IWindow"/> instance</param>
120 void Show(IWindow window);
121
122 /// <summary>
123 /// Closes the element with given identifier
124 /// </summary>
125 /// <param name="id"></param>
126 void Close(Guid id);
127
128 /// <summary>
129 /// Closes all the elements
130 /// </summary>
131 /// <param name="id">The identifier.</param>
132 void CloseAll();
133
134 /// <summary>
135 /// Restores the window with the given identifier
136 /// </summary>
137 /// <param name="id">The identifier.</param>
138 void Restore(Guid id);
139
140 #endregion
141 }
142 }