Fix crash on startup if an LV2 plugin has a bad .ttl file.
[ardour.git] / libs / glibmm2 / gio / src / filenamecompleter.hg
1 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
3 /* Copyright (C) 2007 The gtkmm Development Team
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free
17  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19
20 //#include <giomm/file.h>
21 #include <glibmm/object.h>
22
23 _DEFS(giomm,gio)
24 _PINCLUDE(glibmm/private/object_p.h)
25 _PINCLUDE(gio/gio.h)
26
27 namespace Gio
28 {
29
30 class File;
31
32 /** Completes partial file and directory names given a partial string by looking in the file system for clues. 
33  * Can return a list of possible completion strings for widget implementation.
34  *
35  * @newin2p16
36  */
37 class FilenameCompleter : public Glib::Object
38 {
39   _CLASS_GOBJECT(FilenameCompleter, GFilenameCompleter, G_FILENAME_COMPLETER, Glib::Object, GObject)
40 protected:
41   _CTOR_DEFAULT
42   _IGNORE(g_filename_completer_new)
43 public:
44   _WRAP_CREATE()
45
46   _WRAP_METHOD(std::string get_completion_suffix(const std::string& initial_text) const, g_filename_completer_get_completion_suffix)
47   _WRAP_METHOD(Glib::StringArrayHandle get_completions(const std::string& initial_text) const, g_filename_completer_get_completions)
48   _WRAP_METHOD(void set_dirs_only(bool dirs_only = true), g_filename_completer_set_dirs_only)
49
50   _WRAP_SIGNAL(void got_completion_data(), got_completion_data)
51 };
52
53 } // namespace Gio
54