//$Id: font-combo.h,v 1.9 2006/10/06 22:35:47 cactus Exp $ -*- c++ -*- /* Guikachu Copyright (C) 2001-2006 ÉRDI Gergõ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef GUIKACHU_WIDGETS_FONT_COMBO_H #define GUIKACHU_WIDGETS_FONT_COMBO_H #include "widgets/property-editor.h" #include "property.h" #include "property-ops.h" #include #include namespace Guikachu { namespace GUI { namespace PropertyEditors { class FontCombo: public Gtk::ComboBox, public PropertyEditor { typedef Property property_t; typedef PropChangeOpFactory op_factory_t; property_t &property; std::auto_ptr op_factory; Gtk::TreeModelColumn col_num; Gtk::TreeModelColumn col_label; Glib::RefPtr store; public: FontCombo (property_t &property, op_factory_t *op_factory); private: void add_font (const Glib::ustring &label, int font_num); void cell_cb (const Gtk::TreeModel::iterator &iter, Gtk::CellRendererPixbuf *cell); bool update_block; void update (); void changed_cb (); }; } } } #endif /* !GUIKACHU_WIDGETS_FONT_COMBO_H */