1
#ifndef _GTKMM_CELLRENDERER_GENERATION_H
2
#define _GTKMM_CELLRENDERER_GENERATION_H
5
/* cellrenderer_generation.h
7
* Copyright(C) 2003 The gtkmm Development Team
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 2.1 of the License, or(at your option) any later version.
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free
21
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
#include <gtkmm/cellrenderertext.h>
25
#include <gtkmm/cellrendererpixbuf.h>
26
#include <gtkmm/cellrenderertoggle.h>
27
#include <gtkmm/cellrendereraccel.h>
32
#ifndef DOXYGEN_SHOULD_SKIP_THIS
33
namespace CellRenderer_Generation
36
template<class T_ModelColumnType> //e.g. bool or Glib::ustring.
37
CellRenderer* generate_cellrenderer(bool editable = false)
39
CellRendererText* pCellRenderer = new CellRendererText(); //the default - template specializations will use other renderers.
40
//CellRendererText can render both strings and numerical values.
42
pCellRenderer->property_editable() = editable;
47
#if !defined(__GNUC__) || __GNUC__ > 2
48
// gcc 2.95.x fails in TreeView::append_column_editable if the
49
// following specializations are declared in the header.
51
CellRenderer* generate_cellrenderer<bool>(bool editable);
54
CellRenderer* generate_cellrenderer< Glib::RefPtr<Gdk::Pixbuf> >(bool editable);
57
CellRenderer* generate_cellrenderer<AccelKey>(bool editable);
61
} //CellRenderer_Generation
62
#endif //DOXYGEN_SHOULD_SKIP_THIS
67
#endif /* _GTKMM_CELLRENDERER_GENERATION_H */