SpectMorph

gui/smmorphoperatorview.hh

00001 /*
00002  * Copyright (C) 2011 Stefan Westerfeld
00003  *
00004  * This library is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License as published by the
00006  * Free Software Foundation; either version 3 of the License, or (at your
00007  * option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
00012  * for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #ifndef SPECTMORPH_MORPH_OPERATOR_VIEW_HH
00019 #define SPECTMORPH_MORPH_OPERATOR_VIEW_HH
00020 
00021 #include <gtkmm.h>
00022 #include "smmorphplanwindow.hh"
00023 
00024 namespace SpectMorph
00025 {
00026 
00027 class MorphOperator;
00028 class MorphOperatorView : public Gtk::EventBox
00029 {
00030 protected:
00031   bool              in_move;
00032 
00033   Gtk::VBox         vbox;
00034   Gtk::Frame        frame;
00035   MorphPlanWindow  *morph_plan_window;
00036   MorphOperator    *m_op;
00037 
00038   Gdk::Cursor    move_cursor;
00039 
00040   void on_operators_changed();
00041 public:
00042   MorphOperatorView (MorphOperator *op, MorphPlanWindow *morph_plan_window);
00043 
00044   MorphOperator *op();
00045 
00046   bool on_button_press_event (GdkEventButton *event);
00047   bool on_motion_notify_event (GdkEventMotion *event);
00048   bool on_button_release_event (GdkEventButton *event);
00049 
00050   sigc::signal<void, MorphOperator *> signal_move_indication;
00051 
00052   static MorphOperatorView *create (MorphOperator *op, MorphPlanWindow *window);
00053 };
00054 
00055 }
00056 
00057 #endif
 All Classes Functions Variables Enumerations Enumerator