libyui-gtk-pkg  2.43.2
 All Classes
ygtktreemodel.h
1 /********************************************************************
2  * YaST2-GTK - http://en.opensuse.org/YaST2-GTK *
3  ********************************************************************/
4 
5 /* Wraps GtkTreeModel as a C++ model.
6 */
7 
8 #ifndef YGTK_TREE_MODEL_H
9 #define YGTK_TREE_MODEL_H
10 
11 #include <gtk/gtk.h>
12 
14 {
15  virtual void getValue (int row, int col, GValue *value) = 0;
16  virtual int rowsNb() = 0;
17  virtual int columnsNb() const = 0;
18  virtual GType columnType (int col) const = 0;
19  // if 'showEmptyEntry' will call getValue(row=-1) for the empty entry
20  virtual bool showEmptyEntry() const = 0;
21 
22  struct Listener {
23  virtual void rowChanged (int row) = 0;
24  virtual void rowInserted (int row) = 0;
25  virtual void rowDeleted (int row) = 0;
26  };
27  Listener *listener;
28 
29  virtual ~YGtkTreeModel() {}
30 };
31 
32 GtkTreeModel *ygtk_tree_model_new (YGtkTreeModel *model);
33 
34 YGtkTreeModel *ygtk_tree_model_get_model (GtkTreeModel *model);
35 
36 #endif /*YGTK_TREE_MODEL_H*/
37