~ubuntu-branches/ubuntu/precise/gtkmm3.0/precise

« back to all changes in this revision

Viewing changes to gtk/gtkmm/recentchooser.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-06-17 00:12:44 UTC
  • Revision ID: james.westby@ubuntu.com-20110617001244-9hl5an15hiaaahi6
Tags: upstream-3.0.1
ImportĀ upstreamĀ versionĀ 3.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
// Generated by gtkmmproc -- DO NOT MODIFY!
 
3
#ifndef _GTKMM_RECENTCHOOSER_H
 
4
#define _GTKMM_RECENTCHOOSER_H
 
5
 
 
6
 
 
7
#include <glibmm.h>
 
8
 
 
9
/* Copyright (C) 2006 The gtkmm Development Team
 
10
 *
 
11
 * This library is free software; you can redistribute it and/or
 
12
 * modify it under the terms of the GNU Lesser General Public
 
13
 * License as published by the Free Software Foundation; either
 
14
 * version 2.1 of the License, or (at your option) any later version.
 
15
 *
 
16
 * This library is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
19
 * Lesser General Public License for more details.
 
20
 *
 
21
 * You should have received a copy of the GNU Lesser General Public
 
22
 * License along with this library; if not, write to the Free
 
23
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
24
 */
 
25
 
 
26
#include <vector>
 
27
 
 
28
#include <glibmm/interface.h>
 
29
#include <gtkmm/recentinfo.h>
 
30
#include <gtkmm/recentfilter.h>
 
31
#include <gtkmm/recentmanager.h>
 
32
 
 
33
 
 
34
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
35
extern "C"
 
36
{
 
37
typedef struct _GtkRecentChooserIface GtkRecentChooserIface;
 
38
}
 
39
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
40
 
 
41
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
42
typedef struct _GtkRecentChooser GtkRecentChooser;
 
43
typedef struct _GtkRecentChooserClass GtkRecentChooserClass;
 
44
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
45
 
 
46
 
 
47
namespace Gtk
 
48
{ class RecentChooser_Class; } // namespace Gtk
 
49
namespace Gtk
 
50
{
 
51
 
 
52
/** @addtogroup gtkmmEnums gtkmm Enums and Flags */
 
53
 
 
54
/**
 
55
 * @ingroup gtkmmEnums
 
56
 */
 
57
enum RecentSortType
 
58
{
 
59
  RECENT_SORT_NONE,
 
60
  RECENT_SORT_MRU,
 
61
  RECENT_SORT_LRU,
 
62
  RECENT_SORT_CUSTOM
 
63
};
 
64
 
 
65
} // namespace Gtk
 
66
 
 
67
 
 
68
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
69
namespace Glib
 
70
{
 
71
 
 
72
template <>
 
73
class Value<Gtk::RecentSortType> : public Glib::Value_Enum<Gtk::RecentSortType>
 
74
{
 
75
public:
 
76
  static GType value_type() G_GNUC_CONST;
 
77
};
 
78
 
 
79
} // namespace Glib
 
80
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
81
 
 
82
 
 
83
namespace Gtk
 
84
{
 
85
 
 
86
 
 
87
/** Exception class for Gtk::RecentChooser errors.
 
88
 */
 
89
class RecentChooserError : public Glib::Error
 
90
{
 
91
public:
 
92
  enum Code
 
93
  {
 
94
    NOT_FOUND,
 
95
    INVALID_URI
 
96
  };
 
97
 
 
98
  RecentChooserError(Code error_code, const Glib::ustring& error_message);
 
99
  explicit RecentChooserError(GError* gobject);
 
100
  Code code() const;
 
101
 
 
102
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
103
private:
 
104
 
 
105
  static void throw_func(GError* gobject);
 
106
 
 
107
  friend void wrap_init(); // uses throw_func()
 
108
 
 
109
  #endif //DOXYGEN_SHOULD_SKIP_THIS
 
110
};
 
111
 
 
112
} // namespace Gtk
 
113
 
 
114
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
115
namespace Glib
 
116
{
 
117
 
 
118
template <>
 
119
class Value<Gtk::RecentChooserError::Code> : public Glib::Value_Enum<Gtk::RecentChooserError::Code>
 
120
{
 
121
public:
 
122
  static GType value_type() G_GNUC_CONST;
 
123
};
 
124
 
 
125
} // namespace Glib
 
126
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
127
 
 
128
 
 
129
namespace Gtk
 
130
{
 
131
 
 
132
 
 
133
/** RecentChooser is an interface that can be implemented by widgets
 
134
 * displaying the list of recently used files.  In GTK+, the main objects
 
135
 * that implement this interface are RecentChooserWidget, RecentChooserDialog
 
136
 * and RecentChooserMenu.
 
137
 *
 
138
 * @newin{2,10}
 
139
 *
 
140
 * @ingroup RecentFiles
 
141
 */
 
142
 
 
143
class RecentChooser : public Glib::Interface
 
144
{
 
145
  
 
146
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
147
 
 
148
public:
 
149
  typedef RecentChooser CppObjectType;
 
150
  typedef RecentChooser_Class CppClassType;
 
151
  typedef GtkRecentChooser BaseObjectType;
 
152
  typedef GtkRecentChooserIface BaseClassType;
 
153
 
 
154
private:
 
155
  friend class RecentChooser_Class;
 
156
  static CppClassType recentchooser_class_;
 
157
 
 
158
  // noncopyable
 
159
  RecentChooser(const RecentChooser&);
 
160
  RecentChooser& operator=(const RecentChooser&);
 
161
 
 
162
protected:
 
163
  RecentChooser(); // you must derive from this class
 
164
 
 
165
  /** Called by constructors of derived classes. Provide the result of 
 
166
   * the Class init() function to ensure that it is properly 
 
167
   * initialized.
 
168
   * 
 
169
   * @param interface_class The Class object for the derived type.
 
170
   */
 
171
  explicit RecentChooser(const Glib::Interface_Class& interface_class);
 
172
 
 
173
public:
 
174
  // This is public so that C++ wrapper instances can be
 
175
  // created for C instances of unwrapped types.
 
176
  // For instance, if an unexpected C type implements the C interface. 
 
177
  explicit RecentChooser(GtkRecentChooser* castitem);
 
178
 
 
179
protected:
 
180
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
181
 
 
182
public:
 
183
  virtual ~RecentChooser();
 
184
 
 
185
  static void add_interface(GType gtype_implementer);
 
186
 
 
187
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
188
  static GType get_type()      G_GNUC_CONST;
 
189
  static GType get_base_type() G_GNUC_CONST;
 
190
#endif
 
191
 
 
192
  ///Provides access to the underlying C GObject.
 
193
  GtkRecentChooser*       gobj()       { return reinterpret_cast<GtkRecentChooser*>(gobject_); }
 
194
 
 
195
  ///Provides access to the underlying C GObject.  
 
196
  const GtkRecentChooser* gobj() const { return reinterpret_cast<GtkRecentChooser*>(gobject_); }
 
197
 
 
198
private:
 
199
 
 
200
public:
 
201
 
 
202
  
 
203
  /** Whether to show recently used resources marked registered as private.
 
204
   * 
 
205
   * @newin{2,10}
 
206
   * @param show_private <tt>true</tt> to show private items, <tt>false</tt> otherwise.
 
207
   */
 
208
  void set_show_private(bool show_private = true);
 
209
  
 
210
  /** Returns whether @a chooser should display recently used resources
 
211
   * registered as private.
 
212
   * 
 
213
   * @newin{2,10}
 
214
   * @return <tt>true</tt> if the recent chooser should show private items,
 
215
   * <tt>false</tt> otherwise.
 
216
   */
 
217
  bool get_show_private() const;
 
218
  
 
219
  /** Sets whether @a chooser should display the recently used resources that
 
220
   * it didn't find.  This only applies to local resources.
 
221
   * 
 
222
   * @newin{2,10}
 
223
   * @param show_not_found Whether to show the local items we didn't find.
 
224
   */
 
225
  void set_show_not_found(bool show_not_found = true);
 
226
  
 
227
  /** Retrieves whether @a chooser should show the recently used resources that
 
228
   * were not found.
 
229
   * 
 
230
   * @newin{2,10}
 
231
   * @return <tt>true</tt> if the resources not found should be displayed, and
 
232
   * <tt>false</tt> otheriwse.
 
233
   */
 
234
  bool get_show_not_found() const;
 
235
  
 
236
  /** Sets whether @a chooser can select multiple items.
 
237
   * 
 
238
   * @newin{2,10}
 
239
   * @param select_multiple <tt>true</tt> if @a chooser can select more than one item.
 
240
   */
 
241
  void set_select_multiple(bool select_multiple = true);
 
242
  
 
243
  /** Gets whether @a chooser can select multiple items.
 
244
   * 
 
245
   * @newin{2,10}
 
246
   * @return <tt>true</tt> if @a chooser can select more than one item.
 
247
   */
 
248
  bool get_select_multiple() const;
 
249
  
 
250
  /** Sets the number of items that should be returned by
 
251
   * get_items() and get_uris().
 
252
   * 
 
253
   * @newin{2,10}
 
254
   * @param limit A positive integer, or -1 for all items.
 
255
   */
 
256
  void set_limit(int limit);
 
257
  void unset_limit();
 
258
  
 
259
  /** Gets the number of items returned by get_items()
 
260
   * and get_uris().
 
261
   * 
 
262
   * @newin{2,10}
 
263
   * @return A positive integer, or -1 meaning that all items are
 
264
   * returned.
 
265
   */
 
266
  int get_limit() const;
 
267
  
 
268
  /** Sets whether only local resources, that is resources using the file:// URI
 
269
   * scheme, should be shown in the recently used resources selector.  If
 
270
   *  @a local_only is <tt>true</tt> (the default) then the shown resources are guaranteed
 
271
   * to be accessible through the operating system native file system.
 
272
   * 
 
273
   * @newin{2,10}
 
274
   * @param local_only <tt>true</tt> if only local files can be shown.
 
275
   */
 
276
  void set_local_only(bool local_only = true);
 
277
  
 
278
  /** Gets whether only local resources should be shown in the recently used
 
279
   * resources selector.  See set_local_only()
 
280
   * 
 
281
   * @newin{2,10}
 
282
   * @return <tt>true</tt> if only local resources should be shown.
 
283
   */
 
284
  bool get_local_only() const;
 
285
  
 
286
  /** Sets whether to show a tooltips containing the full path of each
 
287
   * recently used resource in a Gtk::RecentChooser widget.
 
288
   * 
 
289
   * @newin{2,10}
 
290
   * @param show_tips <tt>true</tt> if tooltips should be shown.
 
291
   */
 
292
  void set_show_tips(bool show_tips = true);
 
293
  
 
294
  /** Gets whether @a chooser should display tooltips containing the full path
 
295
   * of a recently user resource.
 
296
   * 
 
297
   * @newin{2,10}
 
298
   * @return <tt>true</tt> if the recent chooser should show tooltips,
 
299
   * <tt>false</tt> otherwise.
 
300
   */
 
301
  bool get_show_tips() const;
 
302
 
 
303
  // Deprecated in GTK+ 2.12. murrayc:
 
304
  
 
305
 
 
306
  /** Sets whether @a chooser should show an icon near the resource when
 
307
   * displaying it.
 
308
   * 
 
309
   * @newin{2,10}
 
310
   * @param show_icons Whether to show an icon near the resource.
 
311
   */
 
312
  void set_show_icons(bool show_icons = true);
 
313
  
 
314
  /** Retrieves whether @a chooser should show an icon near the resource.
 
315
   * 
 
316
   * @newin{2,10}
 
317
   * @return <tt>true</tt> if the icons should be displayed, <tt>false</tt> otherwise.
 
318
   */
 
319
  bool get_show_icons() const;
 
320
  
 
321
  /** Changes the sorting order of the recently used resources list displayed by
 
322
   *  @a chooser.
 
323
   * 
 
324
   * @newin{2,10}
 
325
   * @param sort_type Sort order that the chooser should use.
 
326
   */
 
327
  void set_sort_type(RecentSortType sort_type);
 
328
  
 
329
  /** Gets the value set by set_sort_type().
 
330
   * 
 
331
   * @newin{2,10}
 
332
   * @return The sorting order of the @a chooser.
 
333
   */
 
334
  RecentSortType get_sort_type() const;
 
335
 
 
336
 
 
337
  /** This callback should return -1 if b compares before a, 0 if they compare
 
338
   * equal and 1 if a compares after b.
 
339
   * For instance, int on_sort_compare(const Glib::RefPtr<Gtk::RecentInfo>& a, const Gtk::RecentInfo& b);
 
340
   */
 
341
  typedef sigc::slot<int, const Glib::RefPtr<RecentInfo>&, const Glib::RefPtr<RecentInfo>&> SlotCompare;
 
342
  
 
343
 
 
344
  /** Sets the comparison function used when sorting the list of recently
 
345
   * used resources and the sort type is #RECENT_SORT_CUSTOM.
 
346
   */
 
347
  void set_sort_func(const SlotCompare& slot);
 
348
 
 
349
  // TODO: Return type should be void since it will never return false but
 
350
  // throwing RecentChooserError instead
 
351
  
 
352
  /** Sets @a uri as the current URI for @a chooser.
 
353
   * 
 
354
   * @newin{2,10}
 
355
   * @param uri A URI.
 
356
   * @return <tt>true</tt> if the URI was found.
 
357
   */
 
358
  bool set_current_uri(const Glib::ustring& uri);
 
359
  
 
360
  /** Gets the URI currently selected by @a chooser.
 
361
   * 
 
362
   * @newin{2,10}
 
363
   * @return A newly allocated string holding a URI.
 
364
   */
 
365
  Glib::ustring get_current_uri() const;
 
366
  
 
367
  /** Gets the Gtk::RecentInfo currently selected by @a chooser.
 
368
   * 
 
369
   * @newin{2,10}
 
370
   * @return A Gtk::RecentInfo.  Use Gtk::RecentInfo::unref() when
 
371
   * when you have finished using it.
 
372
   */
 
373
  Glib::RefPtr<RecentInfo> get_current_item();
 
374
  
 
375
  /** Gets the Gtk::RecentInfo currently selected by @a chooser.
 
376
   * 
 
377
   * @newin{2,10}
 
378
   * @return A Gtk::RecentInfo.  Use Gtk::RecentInfo::unref() when
 
379
   * when you have finished using it.
 
380
   */
 
381
  Glib::RefPtr<const RecentInfo> get_current_item() const;
 
382
  // TODO: Same here
 
383
  
 
384
  /** Selects @a uri inside @a chooser.
 
385
   * 
 
386
   * @newin{2,10}
 
387
   * @param uri A URI.
 
388
   * @return <tt>true</tt> if @a uri was found.
 
389
   */
 
390
  bool select_uri(const Glib::ustring& uri);
 
391
  
 
392
  /** Unselects @a uri inside @a chooser.
 
393
   * 
 
394
   * @newin{2,10}
 
395
   * @param uri A URI.
 
396
   */
 
397
  void unselect_uri(const Glib::ustring& uri);
 
398
  
 
399
  /** Selects all the items inside @a chooser, if the @a chooser supports
 
400
   * multiple selection.
 
401
   * 
 
402
   * @newin{2,10}
 
403
   */
 
404
  void select_all();
 
405
  
 
406
  /** Unselects all the items inside @a chooser.
 
407
   * 
 
408
   * @newin{2,10}
 
409
   */
 
410
  void unselect_all();
 
411
 
 
412
  //typedef Glib::ListHandle<RecentInfo, RecentInfoTraits> ListHandle_RecentInfos;
 
413
 
 
414
 
 
415
  /** Gets the list of recently used resources in form of Gtk::RecentInfo objects.
 
416
   * 
 
417
   * The return value of this function is affected by the "sort-type" and
 
418
   * "limit" properties of @a chooser.
 
419
   * 
 
420
   * @newin{2,10}
 
421
   * @return A newly allocated
 
422
   * list of Gtk::RecentInfo objects.  You should
 
423
   * use Gtk::RecentInfo::unref() on every item of the list, and then free
 
424
   * the list itself using Glib::list_free().
 
425
   */
 
426
  std::vector<Glib::RefPtr<RecentInfo> > get_items() const;
 
427
 
 
428
  /** Gets the URI of the recently used resources.
 
429
   *
 
430
   * The return value of this function is affected by the "sort-type" and
 
431
   * "limit" properties of the recent chooser.
 
432
   */
 
433
  std::vector<Glib::ustring> get_uris() const;
 
434
  
 
435
 
 
436
  /** Adds @a filter to the list of Gtk::RecentFilter objects held by @a chooser.
 
437
   * 
 
438
   * If no previous filter objects were defined, this function will call
 
439
   * set_filter().
 
440
   * 
 
441
   * @newin{2,10}
 
442
   * @param filter A Gtk::RecentFilter.
 
443
   */
 
444
  void add_filter(const Glib::RefPtr<RecentFilter>& filter);
 
445
  
 
446
  /** Removes @a filter from the list of Gtk::RecentFilter objects held by @a chooser.
 
447
   * 
 
448
   * @newin{2,10}
 
449
   * @param filter A Gtk::RecentFilter.
 
450
   */
 
451
  void remove_filter(const Glib::RefPtr<RecentFilter>& filter);
 
452
 
 
453
 
 
454
  /** Gets the Gtk::RecentFilter objects held by @a chooser.
 
455
   * 
 
456
   * @newin{2,10}
 
457
   * @return A singly linked list
 
458
   * of Gtk::RecentFilter objects.  You
 
459
   * should just free the returned list using Glib::slist_free().
 
460
   */
 
461
  std::vector< Glib::RefPtr<RecentFilter> > list_filters();
 
462
 
 
463
 
 
464
  /** Gets the Gtk::RecentFilter objects held by @a chooser.
 
465
   * 
 
466
   * @newin{2,10}
 
467
   * @return A singly linked list
 
468
   * of Gtk::RecentFilter objects.  You
 
469
   * should just free the returned list using Glib::slist_free().
 
470
   */
 
471
  std::vector< Glib::RefPtr<const RecentFilter> > list_filters() const;
 
472
 
 
473
  
 
474
  /** Sets @a filter as the current Gtk::RecentFilter object used by @a chooser
 
475
   * to affect the displayed recently used resources.
 
476
   * 
 
477
   * @newin{2,10}
 
478
   * @param filter A Gtk::RecentFilter.
 
479
   */
 
480
  void set_filter(const Glib::RefPtr<RecentFilter>& filter);
 
481
  
 
482
  /** Gets the Gtk::RecentFilter object currently used by @a chooser to affect
 
483
   * the display of the recently used resources.
 
484
   * 
 
485
   * @newin{2,10}
 
486
   * @return A Gtk::RecentFilter object.
 
487
   */
 
488
  Glib::RefPtr<RecentFilter> get_filter();
 
489
  
 
490
  /** Gets the Gtk::RecentFilter object currently used by @a chooser to affect
 
491
   * the display of the recently used resources.
 
492
   * 
 
493
   * @newin{2,10}
 
494
   * @return A Gtk::RecentFilter object.
 
495
   */
 
496
  Glib::RefPtr<const RecentFilter> get_filter() const;
 
497
 
 
498
  /** This signal is emitted when there is a change in the set of
 
499
   * selected recently used resources.  This can happen when a user
 
500
   * modifies the selection with the mouse or the keyboard, or when
 
501
   * explicitely calling functions to change the selection.
 
502
   *
 
503
   * @par Prototype:
 
504
   * <tt>void on_my_%selection_changed()</tt>
 
505
   */
 
506
 
 
507
  Glib::SignalProxy0< void > signal_selection_changed();
 
508
 
 
509
 
 
510
  /** This signal is emitted when the user "activates" a recent item
 
511
   * in the recent chooser.  This can happen by double-clicking on an item
 
512
   * in the recently used resources list, or by pressing
 
513
   * <keycap>Enter</keycap>.
 
514
   *
 
515
   * @par Prototype:
 
516
   * <tt>void on_my_%item_activated()</tt>
 
517
   */
 
518
 
 
519
  Glib::SignalProxy0< void > signal_item_activated();
 
520
 
 
521
 
 
522
  //Not wrapped because it's write-only and construct-only: _WRAP_PROPERTY("recent-manager", Glib::RefPtr<RecentManager>)
 
523
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
524
/** Whether the private items should be displayed.
 
525
   *
 
526
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
527
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
528
   * the value of the property changes.
 
529
   */
 
530
  Glib::PropertyProxy<bool> property_show_private() ;
 
531
#endif //#GLIBMM_PROPERTIES_ENABLED
 
532
 
 
533
#ifdef GLIBMM_PROPERTIES_ENABLED
 
534
/** Whether the private items should be displayed.
 
535
   *
 
536
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
537
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
538
   * the value of the property changes.
 
539
   */
 
540
  Glib::PropertyProxy_ReadOnly<bool> property_show_private() const;
 
541
#endif //#GLIBMM_PROPERTIES_ENABLED
 
542
 
 
543
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
544
/** Whether there should be a tooltip on the item.
 
545
   *
 
546
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
547
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
548
   * the value of the property changes.
 
549
   */
 
550
  Glib::PropertyProxy<bool> property_show_tips() ;
 
551
#endif //#GLIBMM_PROPERTIES_ENABLED
 
552
 
 
553
#ifdef GLIBMM_PROPERTIES_ENABLED
 
554
/** Whether there should be a tooltip on the item.
 
555
   *
 
556
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
557
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
558
   * the value of the property changes.
 
559
   */
 
560
  Glib::PropertyProxy_ReadOnly<bool> property_show_tips() const;
 
561
#endif //#GLIBMM_PROPERTIES_ENABLED
 
562
 
 
563
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
564
/** Whether there should be an icon near the item.
 
565
   *
 
566
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
567
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
568
   * the value of the property changes.
 
569
   */
 
570
  Glib::PropertyProxy<bool> property_show_icons() ;
 
571
#endif //#GLIBMM_PROPERTIES_ENABLED
 
572
 
 
573
#ifdef GLIBMM_PROPERTIES_ENABLED
 
574
/** Whether there should be an icon near the item.
 
575
   *
 
576
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
577
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
578
   * the value of the property changes.
 
579
   */
 
580
  Glib::PropertyProxy_ReadOnly<bool> property_show_icons() const;
 
581
#endif //#GLIBMM_PROPERTIES_ENABLED
 
582
 
 
583
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
584
/** Whether the items pointing to unavailable resources should be displayed.
 
585
   *
 
586
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
587
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
588
   * the value of the property changes.
 
589
   */
 
590
  Glib::PropertyProxy<bool> property_show_not_found() ;
 
591
#endif //#GLIBMM_PROPERTIES_ENABLED
 
592
 
 
593
#ifdef GLIBMM_PROPERTIES_ENABLED
 
594
/** Whether the items pointing to unavailable resources should be displayed.
 
595
   *
 
596
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
597
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
598
   * the value of the property changes.
 
599
   */
 
600
  Glib::PropertyProxy_ReadOnly<bool> property_show_not_found() const;
 
601
#endif //#GLIBMM_PROPERTIES_ENABLED
 
602
 
 
603
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
604
/** Whether to allow multiple items to be selected.
 
605
   *
 
606
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
607
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
608
   * the value of the property changes.
 
609
   */
 
610
  Glib::PropertyProxy<bool> property_select_multiple() ;
 
611
#endif //#GLIBMM_PROPERTIES_ENABLED
 
612
 
 
613
#ifdef GLIBMM_PROPERTIES_ENABLED
 
614
/** Whether to allow multiple items to be selected.
 
615
   *
 
616
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
617
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
618
   * the value of the property changes.
 
619
   */
 
620
  Glib::PropertyProxy_ReadOnly<bool> property_select_multiple() const;
 
621
#endif //#GLIBMM_PROPERTIES_ENABLED
 
622
 
 
623
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
624
/** Whether the selected resource(s) should be limited to local file: URIs.
 
625
   *
 
626
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
627
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
628
   * the value of the property changes.
 
629
   */
 
630
  Glib::PropertyProxy<bool> property_local_only() ;
 
631
#endif //#GLIBMM_PROPERTIES_ENABLED
 
632
 
 
633
#ifdef GLIBMM_PROPERTIES_ENABLED
 
634
/** Whether the selected resource(s) should be limited to local file: URIs.
 
635
   *
 
636
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
637
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
638
   * the value of the property changes.
 
639
   */
 
640
  Glib::PropertyProxy_ReadOnly<bool> property_local_only() const;
 
641
#endif //#GLIBMM_PROPERTIES_ENABLED
 
642
 
 
643
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
644
/** The maximum number of items to be displayed.
 
645
   *
 
646
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
647
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
648
   * the value of the property changes.
 
649
   */
 
650
  Glib::PropertyProxy<int> property_limit() ;
 
651
#endif //#GLIBMM_PROPERTIES_ENABLED
 
652
 
 
653
#ifdef GLIBMM_PROPERTIES_ENABLED
 
654
/** The maximum number of items to be displayed.
 
655
   *
 
656
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
657
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
658
   * the value of the property changes.
 
659
   */
 
660
  Glib::PropertyProxy_ReadOnly<int> property_limit() const;
 
661
#endif //#GLIBMM_PROPERTIES_ENABLED
 
662
 
 
663
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
664
/** The sorting order of the items displayed.
 
665
   *
 
666
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
667
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
668
   * the value of the property changes.
 
669
   */
 
670
  Glib::PropertyProxy<RecentSortType> property_sort_type() ;
 
671
#endif //#GLIBMM_PROPERTIES_ENABLED
 
672
 
 
673
#ifdef GLIBMM_PROPERTIES_ENABLED
 
674
/** The sorting order of the items displayed.
 
675
   *
 
676
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
677
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
678
   * the value of the property changes.
 
679
   */
 
680
  Glib::PropertyProxy_ReadOnly<RecentSortType> property_sort_type() const;
 
681
#endif //#GLIBMM_PROPERTIES_ENABLED
 
682
 
 
683
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
684
/** The current filter for selecting which resources are displayed.
 
685
   *
 
686
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
687
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
688
   * the value of the property changes.
 
689
   */
 
690
  Glib::PropertyProxy< Glib::RefPtr<RecentFilter> > property_filter() ;
 
691
#endif //#GLIBMM_PROPERTIES_ENABLED
 
692
 
 
693
#ifdef GLIBMM_PROPERTIES_ENABLED
 
694
/** The current filter for selecting which resources are displayed.
 
695
   *
 
696
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
697
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
698
   * the value of the property changes.
 
699
   */
 
700
  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<RecentFilter> > property_filter() const;
 
701
#endif //#GLIBMM_PROPERTIES_ENABLED
 
702
 
 
703
 
 
704
protected:
 
705
 
 
706
 
 
707
  // TODO: How to wrap those vfuncs?
 
708
  // TODO: Also: use vectorutils.
 
709
 
 
710
  //__CONVERSION(`ListHandle_RecentInfos', `GList*', `($3).data()')
 
711
  //__CONVERSION(`Glib::SListHandle<RecentFilter*>', `GSList*', `($3).data()')
 
712
 
 
713
  //_WRAP_VFUNC(bool set_current_uri(const Glib::ustring& uri), "set_current_uri", errthrow)
 
714
    virtual Glib::ustring get_current_uri_vfunc() const;
 
715
 
 
716
 
 
717
  //_WRAP_VFUNC(bool select_uri(const Glib::ustring& uri), "select_uri", errthrow)
 
718
    virtual void unselect_uri_vfunc(const Glib::ustring& uri);
 
719
 
 
720
    virtual void select_all_vfunc();
 
721
 
 
722
    virtual void unselect_all_vfunc();
 
723
 
 
724
  //_WRAP_VFUNC(ArrayHandle_RecentInfos get_items() const, "get_items")
 
725
    virtual Glib::RefPtr<RecentManager> get_recent_manager_vfunc();
 
726
 
 
727
 
 
728
    virtual void add_filter_vfunc(const Glib::RefPtr<RecentFilter>& filter);
 
729
 
 
730
    virtual void remove_filter_vfunc(const Glib::RefPtr<RecentFilter>& filter);
 
731
 
 
732
  //_WRAP_VFUNC(Glib::SListHandle<RecentFilter*> list_filters(), "list_filters")
 
733
  //_WRAP_VFUNC(void set_sort_func(const SlotCompare& slot), "set_sort_func")
 
734
 
 
735
 
 
736
public:
 
737
 
 
738
public:
 
739
  //C++ methods used to invoke GTK+ virtual functions:
 
740
 
 
741
protected:
 
742
  //GTK+ Virtual Functions (override these to change behaviour):
 
743
 
 
744
  //Default Signal Handlers::
 
745
  virtual void on_selection_changed();
 
746
  virtual void on_item_activated();
 
747
 
 
748
 
 
749
};
 
750
 
 
751
} // namespace Gtk
 
752
 
 
753
 
 
754
namespace Glib
 
755
{
 
756
  /** A Glib::wrap() method for this object.
 
757
   * 
 
758
   * @param object The C instance.
 
759
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
760
   * @result A C++ instance that wraps this C instance.
 
761
   *
 
762
   * @relates Gtk::RecentChooser
 
763
   */
 
764
  Glib::RefPtr<Gtk::RecentChooser> wrap(GtkRecentChooser* object, bool take_copy = false);
 
765
 
 
766
} // namespace Glib
 
767
 
 
768
 
 
769
#endif /* _GTKMM_RECENTCHOOSER_H */
 
770