papyrus logo

animatorbouncewidget.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 PAPYRUSGTKANIMATORBOUNCEWIDGET_H
00021 #define PAPYRUSGTKANIMATORBOUNCEWIDGET_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 namespace Papyrus
00033 {
00034   namespace Gtk
00035   {
00036 
00040     class AnimatorBounceWidget : public ::Gtk::HBox
00041     {
00042       public:
00043         typedef std::set<Papyrus::Animator::pointer> Animators;
00044 
00045         AnimatorBounceWidget();
00046 
00047         ~AnimatorBounceWidget();
00048 
00049         ::Gtk::Label& label();
00050 
00051         ::Gtk::SpinButton& spinbutton();
00052 
00053         ::Gtk::Adjustment& spinadjustment();
00054 
00055         void add ( Papyrus::Animator::pointer animator );
00056 
00057         void remove ( Papyrus::Animator::pointer animator );
00058 
00059         const Animators& animators() const;
00060 
00061       protected:
00062         Animators m_animators;
00063         ::Gtk::Label m_label;
00064         ::Gtk::Adjustment m_spinadjustment;
00065         ::Gtk::SpinButton m_spinbutton;
00066 
00067 
00068         typedef enum Direction { REVERSE, STOP, FORWARD } Direction;
00069         ::Gtk::ToggleButton m_direction[3];
00070 
00071         void on_spinbutton_value_changed();
00072 
00073         void on_direction_changed ( int direction );
00074 
00075     };
00076 
00077   }
00078 
00079 }
00080 
00081 #endif

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