papyrus logo

animatorframeratewidget.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 PAPYRUSGTKANIMATORFRAMERATEWIDGET_H
00021 #define PAPYRUSGTKANIMATORFRAMERATEWIDGET_H
00022 
00023 #include <set>
00024 
00025 #include <gtkmm/adjustment.h>
00026 #include <gtkmm/box.h>
00027 #include <gtkmm/spinbutton.h>
00028 #include <gtkmm/label.h>
00029 
00030 #include <papyrus/animator.h>
00031 
00032 
00033 namespace Papyrus
00034 {
00035   namespace Gtk
00036   {
00037 
00041     class AnimatorFrameRateWidget : public ::Gtk::HBox
00042     {
00043       public:
00044         typedef std::set<Papyrus::Animator::pointer> Animators;
00045 
00046         AnimatorFrameRateWidget();
00047 
00048         ~AnimatorFrameRateWidget();
00049 
00050         ::Gtk::Label& label();
00051 
00052         ::Gtk::SpinButton& spinbutton();
00053 
00054         ::Gtk::Adjustment& spinadjustment();
00055 
00056         void add ( Papyrus::Animator::pointer animator );
00057 
00058         void remove ( Papyrus::Animator::pointer animator );
00059 
00060         const Animators& animators() const;
00061 
00062       protected:
00063         Animators m_animators;
00064         ::Gtk::Label m_label;
00065         ::Gtk::Adjustment m_spinadjustment;
00066         ::Gtk::SpinButton m_spinbutton;
00067 
00068         void on_spinbutton_value_changed();
00069     };
00070 
00071   }
00072 
00073 }
00074 
00075 #endif

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