SpectMorph

gui/smzoomcontroller.hh

00001 /*
00002  * Copyright (C) 2010 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_ZOOMCONTROLLER_HH
00019 #define SPECTMORPH_ZOOMCONTROLLER_HH
00020 
00021 #include <gtkmm.h>
00022 
00023 namespace SpectMorph {
00024 
00025 class ZoomController : public Gtk::VBox
00026 {
00027   Gtk::Adjustment     hzoom_adjustment;
00028   Gtk::HScale         hzoom_scale;
00029   Gtk::Label          hzoom_label;
00030   Gtk::HBox           hzoom_hbox;
00031   Gtk::Adjustment     vzoom_adjustment;
00032   Gtk::HScale         vzoom_scale;
00033   Gtk::Label          vzoom_label;
00034   Gtk::HBox           vzoom_hbox;
00035 
00036   void init();
00037 public:
00038   ZoomController (double hzoom_max = 1000.0, double vzoom_max = 1000.0);
00039   ZoomController (double hzoom_min, double hzoom_max, double vzoom_min, double vzoom_max);
00040 
00041   void on_hzoom_changed();
00042   void on_vzoom_changed();
00043 
00044   double get_hzoom();
00045   double get_vzoom();
00046 
00047   sigc::signal<void> signal_zoom_changed;
00048 };
00049 
00050 }
00051 
00052 #endif
 All Classes Functions Variables Enumerations Enumerator