Ardour  9.0-pre0-384-ga76afae0e9
treemodelcolumn.h
Go to the documentation of this file.
1 #ifndef _GTKMM_TREEMODELCOLUMN_H
2 #define _GTKMM_TREEMODELCOLUMN_H
3 
4 /* Copyright (c) 2002 The gtkmm Development Team
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or(at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free
18  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  */
20 
21 #include <gtkmmconfig.h>
22 #include <glibmm/value.h>
23 #include <glib-object.h>
24 #include <vector>
25 
26 namespace Gtk
27 {
28 
29 class TreeModelColumnBase;
30 
31 
71 {
72 public:
75 
81  void add(TreeModelColumnBase& column);
82 
83  unsigned int size() const;
84  const GType* types() const;
85 
86 private:
87  std::vector<GType> column_types_;
88 
89  // noncopyable
92 };
93 
94 
99 {
100 public:
101  GType type() const { return type_; }
102  int index() const { return index_; }
103 
104 protected:
105  explicit TreeModelColumnBase(GType type);
106 
107 private:
108  GType type_;
109  int index_;
110 
112 };
113 
115 inline bool operator==(const TreeModelColumnBase& lhs, const TreeModelColumnBase& rhs)
116  { return (lhs.index() == rhs.index()); }
117 
119 inline bool operator!=(const TreeModelColumnBase& lhs, const TreeModelColumnBase& rhs)
120  { return (lhs.index() != rhs.index()); }
121 
122 
127 template <class T>
129 {
130 public:
131  typedef T ElementType;
132  typedef Glib::Value<T> ValueType;
133 
135 };
136 
137 } // namespace Gtk
138 
139 
140 #endif /* _GTKMM_TREEMODELCOLUMN_H */
141 
bool operator==(const TreeModelColumnBase &lhs, const TreeModelColumnBase &rhs)
TreeModelColumnBase(GType type)
bool operator!=(const TreeModelColumnBase &lhs, const TreeModelColumnBase &rhs)
TreeModelColumnRecord(const TreeModelColumnRecord &)
unsigned int size() const
void add(TreeModelColumnBase &column)
TreeModelColumnRecord & operator=(const TreeModelColumnRecord &)
std::vector< GType > column_types_
const GType * types() const
Glib::Value< T > ValueType
Definition: ardour_ui.h:187