Archive / / / / / / ComboBoxModel.h
2008-10-06 11:18:27 UTC
previous next
/* Echo Media Player * Copyright (C) 2008 Shane O'Connell * * [ The original file includes a copyright header in this location describing * the file as being released under the terms of the GNU General Public * License. It has been removed in order to display the file as part of the * archive. ] */ #ifndef COMBOBOXMODEL_H_ #define COMBOBOXMODEL_H_ #include <gtkmm.h> class ComboBoxModel : public Gtk::ListStore { // ----------------------- Constructor ----------------------- public: static Glib::RefPtr<ComboBoxModel> create() { return Glib::RefPtr<ComboBoxModel>(new ComboBoxModel()); } protected: ComboBoxModel(); virtual ~ComboBoxModel() {} // ----------------------- Column information ----------------------- public: class Columns : public Gtk::TreeModelColumnRecord { public: Gtk::TreeModelColumn<Glib::ustring> icon; Gtk::TreeModelColumn<Glib::ustring> name; Columns() { add(icon); add(name); } }; const Columns& get_columns() const { return m_columns; } protected: Columns m_columns; }; #endif /* COMBOBOXMODEL_H_ */