2
// ISelectFolderDialog.cs
5
// Lluis Sanchez <lluis@xamarin.com>
7
// Copyright (c) 2012 Xamarin Inc
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:
16
// The above copyright notice and this permission notice shall be included in
17
// all copies or substantial portions of the Software.
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
28
namespace Xwt.Backends
30
public interface ISelectFolderDialogBackend: IBackend
33
/// Initializes the folder selector dialog. This method can be called multiple times.
35
/// <param name='multiselect'>
36
/// Value indicating whether the user can select multiple folders
38
void Initialize (bool multiselect);
41
/// Gets or sets the title of the dialog
43
string Title { get; set; }
46
/// Gets the path of the folder that the user has selected in the dialog
49
/// The name of the folder, or null if no selection was made
52
/// This property can be invoked at any time after a call to Initialize, and before the call to Close.
54
string Folder { get; }
57
/// Gets the paths of the folders that the user has selected in the dialog
60
/// The paths of the folders
63
/// This property can be invoked at any time after a call to Initialize, and before the call to Close
65
string[] Folders { get; }
68
/// Gets or sets the folder whose contents are shown in the dialog
71
/// The current folder.
74
/// This property can be invoked at any time after a call to Initialize, and before the call to Close
76
string CurrentFolder { get; set; }
79
/// Runs the dialog, allowing the user to select a folder
81
/// <param name='parent'>
82
/// Parent window (the dialog will be modal to this window). It can be null.
85
/// <c>true</c> if the user clicked OK, <c>false</c> otherwise
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.
92
bool Run (IWindowFrameBackend parent);
95
/// Frees native resources
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.