diff options
Diffstat (limited to 'chrome/common/gtk_tree_util.h')
-rw-r--r-- | chrome/common/gtk_tree_util.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/chrome/common/gtk_tree_util.h b/chrome/common/gtk_tree_util.h new file mode 100644 index 0000000..abd9ee6 --- /dev/null +++ b/chrome/common/gtk_tree_util.h @@ -0,0 +1,29 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_COMMON_GTK_TREE_UTIL_H_ +#define CHROME_COMMON_GTK_TREE_UTIL_H_ + +#include <gtk/gtk.h> + +#include "base/basictypes.h" + +class GtkTreeUtil { + public: + // Get the row number corresponding to |path|. + static gint GetRowNumForPath(GtkTreePath* path); + + // Get the row number corresponding to |iter|. + static gint GetRowNumForIter(GtkTreeModel* model, GtkTreeIter* iter); + + // Get the row number in the child tree model corresponding to |sort_path| in + // the parent tree model. + static gint GetTreeSortChildRowNumForPath(GtkTreeModel* sort_model, + GtkTreePath* sort_path); + + private: + DISALLOW_IMPLICIT_CONSTRUCTORS(GtkTreeUtil); +}; + +#endif // CHROME_COMMON_GTK_TREE_UTIL_H_ |