~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/xwt/Xwt/Xwt.Backends/ISelectFolderDialogBackend.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// 
 
2
// ISelectFolderDialog.cs
 
3
//  
 
4
// Author:
 
5
//       Lluis Sanchez <lluis@xamarin.com>
 
6
// 
 
7
// Copyright (c) 2012 Xamarin Inc
 
8
// 
 
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
 
10
// of this software and associated documentation files (the "Software"), to deal
 
11
// in the Software without restriction, including without limitation the rights
 
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
13
// copies of the Software, and to permit persons to whom the Software is
 
14
// furnished to do so, subject to the following conditions:
 
15
// 
 
16
// The above copyright notice and this permission notice shall be included in
 
17
// all copies or substantial portions of the Software.
 
18
// 
 
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 
25
// THE SOFTWARE.
 
26
using System;
 
27
 
 
28
namespace Xwt.Backends
 
29
{
 
30
        public interface ISelectFolderDialogBackend: IBackend
 
31
        {
 
32
                /// <summary>
 
33
                /// Initializes the folder selector dialog. This method can be called multiple times.
 
34
                /// </summary>
 
35
                /// <param name='multiselect'>
 
36
                /// Value indicating whether the user can select multiple folders
 
37
                /// </param>
 
38
                void Initialize (bool multiselect);
 
39
                
 
40
                /// <summary>
 
41
                /// Gets or sets the title of the dialog
 
42
                /// </summary>
 
43
                string Title { get; set; }
 
44
                        
 
45
                /// <summary>
 
46
                /// Gets the path of the folder that the user has selected in the dialog
 
47
                /// </summary>
 
48
                /// <value>
 
49
                /// The name of the folder, or null if no selection was made
 
50
                /// </value>
 
51
                /// <remarks>
 
52
                /// This property can be invoked at any time after a call to Initialize, and before the call to Close.
 
53
                /// </remarks>
 
54
                string Folder { get; }
 
55
 
 
56
                /// <summary>
 
57
                /// Gets the paths of the folders that the user has selected in the dialog
 
58
                /// </summary>
 
59
                /// <value>
 
60
                /// The paths of the folders
 
61
                /// </value>
 
62
                /// <remarks>
 
63
                /// This property can be invoked at any time after a call to Initialize, and before the call to Close
 
64
                /// </remarks>
 
65
                string[] Folders { get; }
 
66
 
 
67
                /// <summary>
 
68
                /// Gets or sets the folder whose contents are shown in the dialog
 
69
                /// </summary>
 
70
                /// <value>
 
71
                /// The current folder.
 
72
                /// </value>
 
73
                /// <remarks>
 
74
                /// This property can be invoked at any time after a call to Initialize, and before the call to Close
 
75
                /// </remarks>
 
76
                string CurrentFolder { get; set; }
 
77
 
 
78
                /// <summary>
 
79
                /// Runs the dialog, allowing the user to select a folder
 
80
                /// </summary>
 
81
                /// <param name='parent'>
 
82
                /// Parent window (the dialog will be modal to this window). It can be null.
 
83
                /// </param>
 
84
                /// <returns>
 
85
                /// <c>true</c> if the user clicked OK, <c>false</c> otherwise
 
86
                /// </returns>
 
87
                /// <remarks>
 
88
                /// The Run method will always be called once (and only once) after an Initialize call.
 
89
                /// The dialog must be shown in modal mode. The method returns when the user clicks on
 
90
                /// OK or Cancel. The dialog must be already closed when this method returns.
 
91
                /// </remarks>
 
92
                bool Run (IWindowFrameBackend parent);
 
93
                
 
94
                /// <summary>
 
95
                /// Frees native resources
 
96
                /// </summary>
 
97
                /// <remarks>
 
98
                /// This method is called after Run, so that the backend can release
 
99
                /// the native resources. The Initialize method can be called after Cleanup.
 
100
                /// </remarks>
 
101
                void Cleanup ();        
 
102
        }
 
103
}
 
104