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

« back to all changes in this revision

Viewing changes to gtk/gtkmm/treeiter.h

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-28 09:25:06 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20120928092506-9h63ais5o750a8sk
Tags: 3.5.13-0ubuntu1
* New upstream release
* debian/control:
  - Bump build-depends on libglibmm-2.4-dev, libgtk-3-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#include <glibmm/ustring.h>
10
10
#include <sigc++/sigc++.h>
11
11
 
12
 
/* $Id: treeiter.hg,v 1.14 2005/04/07 08:46:44 murrayc Exp $ */
13
 
 
14
12
/* Copyright(C) 1998-2002 The gtkmm Development Team
15
13
 *
16
14
 * This library is free software, ) you can redistribute it and/or
32
30
#include <gtkmm/treemodelcolumn.h>
33
31
#include <iterator>
34
32
#include <gtk/gtk.h> /* for GtkTreeIter */
 
33
#ifdef GLIBMM_HAVE_SUN_REVERSE_ITERATOR
 
34
#include <cstddef> /* for std::ptrdiff_t */
 
35
#endif
35
36
 
36
37
namespace Gtk
37
38
{
147
148
  /** Please note that this is very slow compared to operator++().
148
149
   */
149
150
  const TreeIter operator--(int);
150
 
  
 
151
 
151
152
  inline reference operator*()  const;
152
153
  inline pointer   operator->() const;
153
154
 
154
155
  bool equal(const TreeIter& other) const;
155
156
 
156
 
  /** This typedef is just to make it more obvious that 
 
157
  /** This typedef is just to make it more obvious that
157
158
   * our operator const void* should be used like operator bool().
158
 
   */ 
 
159
   */
159
160
  typedef const void* BoolExpr;
160
161
 
161
162
  /** Discover whether the iterator is valid, and not equal to end().
331
332
   */
332
333
  TreeIter parent() const;
333
334
 
334
 
  /** This typedef is just to make it more obvious that 
 
335
  /** This typedef is just to make it more obvious that
335
336
   * our operator const void* should be used like operator bool().
336
 
   */ 
 
337
   */
337
338
  typedef const void* BoolExpr;
338
339
 
339
340
  /** Discover whether this is a valid row.
345
346
   */
346
347
  operator BoolExpr() const;
347
348
 
348
 
  /// Provides access to the underlying C GObject.  
 
349
  /// Provides access to the underlying C GObject.
349
350
  GtkTreeIter*       gobj()       { return TreeIter::gobj(); }
350
351
 
351
 
  /// Provides access to the underlying C GObject.  
 
352
  /// Provides access to the underlying C GObject.
352
353
  const GtkTreeIter* gobj() const { return TreeIter::gobj(); }
353
354
 
354
355
private:
376
377
    typedef std::reverse_iterator<iterator> reverse_iterator;
377
378
  #else
378
379
    typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
379
 
                                  int, int&, int*, ptrdiff_t> reverse_iterator;
 
380
                                  int, int&, int*, std::ptrdiff_t> reverse_iterator;
380
381
  #endif
381
382
 
382
383
    typedef Gtk::TreeIter const_iterator; //TODO: Make it a real const_iterator.
385
386
    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
386
387
  #else
387
388
    typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
388
 
                                  int, const int&, const int*, ptrdiff_t> const_reverse_iterator;
 
389
                                  int, const int&, const int*, std::ptrdiff_t> const_reverse_iterator;
389
390
  #endif
390
391
 
391
392
  iterator begin();
405
406
  size_type size() const;
406
407
  bool empty() const;
407
408
 
408
 
  /** This typedef is just to make it more obvious that 
 
409
  /** This typedef is just to make it more obvious that
409
410
   * our operator const void* should be used like operator bool().
410
 
   */ 
 
411
   */
411
412
  typedef const void* BoolExpr;
412
413
 
413
414
  /** Discover whether this is a valid TreeNodeChildren.