3
* Copyright (C) 2001-2004 Murray Cumming
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License as
7
* published by the Free Software Foundation; either version 2 of the
8
* License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
15
* You should have received a copy of the GNU General Public
16
* License along with this program; if not, write to the
17
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
* Boston, MA 02111-1307, USA.
21
#ifndef GLOM_MODE_DESIGN_COMBO_TEXTGLADE_HH
22
#define GLOM_MODE_DESIGN_COMBO_TEXTGLADE_HH
24
#include <gtkmm/combobox.h>
26
#include <gtkmm/liststore.h>
28
/** This class should just derive from Gtk::ComboBoxText and provide a
29
* constuctor suitable for libglade's get_widget_derived() template.
30
* However, I have reimplemented Gtk::ComboBoxText here temporarily,
31
* until the fixes in gtkmm 2.4.3 are widely available.
33
class ComboText : public Gtk::ComboBox
39
void append_text(const Glib::ustring& text);
40
void insert_text(int position, const Glib::ustring& text);
41
void prepend_text(const Glib::ustring& text);
42
Glib::ustring get_active_text() const;
44
//This is not part of ComboBoxText:
46
void set_active_text(const Glib::ustring& text);
51
//These columns are used by the model that is created by the default constructor
52
class TextModelColumns : public Gtk::TreeModel::ColumnRecord
58
Gtk::TreeModelColumn<Glib::ustring> m_column;
61
TextModelColumns m_text_columns;
62
Glib::RefPtr<Gtk::ListStore> m_model;
66
#endif //GLOM_MODE_DESIGN_COMBO_TEXTGLADE_HH