papyrus logo

markercombobox.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the papyrus library.                             *
00006  *                                                                         *
00007  *   papyrus is free software; you can redistribute it and/or modify       *
00008  *   it under the terms of the GNU Lesser General Public License           *
00009  *   version 3.0 as published by the Free Software Foundation.             *
00010  *                                                                         *
00011  *   papyrus is distributed in the hope that it will be useful,            *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Lesser General Public License version 3.0 for more details.       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with the papyrus library. If not, see                   *
00018  *   <http://www.gnu.org/licenses/>.                                       *
00019  ***************************************************************************/
00020 #ifndef PAPYRUSGTKMARKERCOMBOBOX_H
00021 #define PAPYRUSGTKMARKERCOMBOBOX_H
00022 
00023 #include <gtkmm.h>
00024 
00025 #include <papyrus.h>
00026 
00027 namespace Papyrus
00028 {
00029   namespace Gtk
00030   {
00031 
00032     extern const char* marker_string[];
00033 
00044     class MarkerComboBox : public ::Gtk::HBox
00045     {
00046       public:
00047         MarkerComboBox ( Papyrus::Marker::Facing facing=Papyrus::Marker::RIGHT, int active = 0 );
00048 
00049         ~MarkerComboBox();
00050 
00051         Papyrus::Marker::Facing facing();
00052         void set_facing ( Papyrus::Marker::Facing facing );
00053 
00054         Papyrus::Marker::Style style();
00055         void set_style ( Papyrus::Marker::Style style );
00056 
00057         Glib::SignalProxy0<void>  signal_changed ();
00058 
00059       protected:
00060         ::Gtk::ComboBox m_combobox;
00061         ::Gtk::ToggleButton m_left, m_right;
00062         ::Gtk::Tooltips m_tips;
00063         Papyrus::Marker::Facing m_facing;
00064 
00065       class ModelColumns: public ::Gtk::TreeModelColumnRecord
00066         {
00067           public:
00068             ModelColumns()
00069             {
00070               add ( picture );
00071               add ( name );
00072             }
00073 
00074             ::Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > picture;
00075             ::Gtk::TreeModelColumn<Glib::ustring> name;
00076         };
00077 
00078         Glib::RefPtr< ::Gtk::ListStore> m_store;
00079         ModelColumns m_columns;
00080         std::vector<Glib::RefPtr<Gdk::Pixbuf> > m_pixbuf;
00081 
00082         void load_pixbufs();
00083 
00084     };
00085 
00086   }
00087 
00088 }
00089 
00090 #endif

Generated on Fri Apr 16 12:40:10 2010 for papyrus by doxygen 1.6.1