SpectMorph

gui/smmorphplanwindow.hh

00001 /*
00002  * Copyright (C) 2010-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_PLAN_WINDOW_HH
00019 #define SPECTMORPH_MORPH_PLAN_WINDOW_HH
00020 
00021 #include <gtkmm.h>
00022 #include <assert.h>
00023 #include <sys/time.h>
00024 
00025 #include <vector>
00026 #include <string>
00027 
00028 #include "smmain.hh"
00029 #include "smmorphplan.hh"
00030 #include "smmorphsource.hh"
00031 #include "smmorphplanview.hh"
00032 #include "smmorphoperator.hh"
00033 
00034 namespace SpectMorph
00035 {
00036 
00037 class MorphPlanWindow : public Gtk::Window
00038 {
00039   Gtk::VBox     window_vbox;
00040   Gtk::VBox     plan_vbox;
00041   MorphPlanPtr  m_morph_plan;
00042   MorphPlanView morph_plan_view;
00043 
00044   Glib::RefPtr<Gtk::UIManager>    ref_ui_manager;
00045   Glib::RefPtr<Gtk::ActionGroup>  ref_action_group;
00046 
00047   Gtk::Menu                      *popup_menu;
00048   MorphOperator                  *popup_op;
00049 public:
00050   MorphPlanWindow (MorphPlanPtr morph_plan, const std::string& title);
00051 
00052   MorphPlanPtr morph_plan();
00053 
00054   void on_load_index_clicked();
00055   void on_file_import_clicked();
00056   void on_file_export_clicked();
00057 
00058   void on_context_rename();
00059   void on_context_remove();
00060 
00061   MorphOperator *where (MorphOperator *op, double x, double y);
00062 
00063   void show_popup (GdkEventButton *event, MorphOperator *op);
00064   void add_operator (const std::string& type);
00065 };
00066 
00067 }
00068 
00069 #endif
 All Classes Functions Variables Enumerations Enumerator