Changeset 22 in projects for visualisator/papertape/zoom.h
- Timestamp:
- Oct 8, 2008, 1:12:22 AM (15 years ago)
- Location:
- visualisator/papertape
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
visualisator/papertape/zoom.h
r19 r22 1 #ifndef __GTK_PAPER_TAPE_ZOOM__ 2 #define __GTK_PAPER_TAPE_ZOOM__ 1 #ifndef __PAPER_TAPE_ZOOM__ 2 #define __PAPER_TAPE_ZOOM__ 3 4 /* $Id$ */ 5 6 /* visualisation/papertape/zoom.h 7 * 8 * Copyright (C) 2008 Sven Koeppel 9 * 10 * This library is free software; you can redistribute it and/or 11 * modify it under the terms of the GNU Library General Public 12 * License as published by the Free Software Foundation; either 13 * version 2 of the License, or (at your option) any later version. 14 * 15 * This library is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 * Library General Public License for more details. 19 * 20 * You should have received a copy of the GNU Library General Public 21 * License along with this library; if not, write to the Free 22 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 */ 3 24 4 25 #include <gtkmm/dialog.h> … … 6 27 #include <gtkmm/action.h> 7 28 #include <gtkmm/spinbutton.h> 8 9 29 #include <map> 10 30 31 // uses a bit of old style GTK+ 11 32 #include <gtk/gtk.h> 12 33 34 namespace PaperTape 35 { class Zoom; } 36 #include "view.h" 13 37 14 namespace Gtk 15 { class PaperTapeZoom; } 16 #include "gtkpapertapeview.h" 38 namespace PaperTape { 17 39 18 namespace Gtk { 19 20 21 22 /*enum PaperTapeRotation { 40 enum Rotate { 23 41 ROTATE_90_CW, 24 42 ROTATE_90_CCW, 25 43 NO_ROTATION 26 } */44 } 27 45 28 enum PaperTapeFlip {46 enum Flip { 29 47 FLIP_HOR, 30 48 FLIP_VER, … … 32 50 }; 33 51 34 enum PaperTapeAutoZoomType {52 enum AutoZoomType { 35 53 ZOOM_LOCHSTREIFEN_WIDTH, 36 54 ZOOM_LOCHSTREIFEN_LENGTH 37 55 }; 38 56 39 class PaperTapeZoom : public Cairo::Matrix { 57 /** 58 * The Zoom class is an extension to the Cairo Translation Matrix. 59 * It features a nice Dialog for direct matrix editing, sigc++ signals, 60 * automatic matrix generation from presets (Flipping, Rotation, Offsets) 61 * and a nice clean object oriented interface. 62 * 63 * There's no real relation to PaperTape::View or any other class, so 64 * you could use this class simply on your own. 65 **/ 66 67 class Zoom : public Cairo::Matrix { 40 68 /** 41 69 * The default matrix. This is the return point whenever … … 52 80 **/ 53 81 double rotation; 54 PaperTapeFlip flip;82 Flip flip; 55 83 double zoom_factor; 56 84 … … 79 107 sigc::signal<void> zoom_changed; 80 108 public: 81 PaperTapeZoom(double default_rotation = 0.0, double default_zoom_factor = 1.0, PaperTapeFlip default_flip = NO_FLIP);109 PaperTapeZoom(double default_rotation = 0.0, double default_zoom_factor = 1.0, Flip default_flip = NO_FLIP); 82 110 83 void set_default(double rotation = 0.0, double zoom_factor = 1.0, PaperTapeFlip flip = NO_FLIP);111 void set_default(double rotation = 0.0, double zoom_factor = 1.0, Flip flip = NO_FLIP); 84 112 85 113 /** … … 116 144 }; // class 117 145 118 }; // namespace Gtk146 }; // namespace PaperTape 119 147 120 #endif // __ GTK_PAPER_TAPE_ZOOM__148 #endif // __PAPER_TAPE_ZOOM__
Note: See TracChangeset
for help on using the changeset viewer.