app_vinfo.h

Go to the documentation of this file.
00001 /* Gxsm - Gnome X Scanning Microscopy
00002  * universal STM/AFM/SARLS/SPALEED/... controlling and
00003  * data analysis software
00004  * 
00005  * Copyright (C) 1999,2000,2001,2002,2003 Percy Zahl
00006  *
00007  * Authors: Percy Zahl <zahl@users.sf.net>
00008  * additional features: Andreas Klust <klust@users.sf.net>
00009  * WWW Home: http://gxsm.sf.net
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00024  */
00025 
00026 /* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
00027 
00028 #ifndef APP_VINFO_H
00029 #define APP_VINFO_H
00030 
00031 #include <config.h>
00032 #include <libgnome/libgnome.h>
00033 
00034 #include <gdk/gdk.h>
00035 
00036 #include "xsmtypes.h"
00037 #include "gapp_service.h"
00038 #include "scan.h"
00039 
00040 #include "gxsm_app.h"
00041 
00042 class ViewInfo{
00043 public:
00044   ViewInfo(Scan *Sc, int qf, int zf);
00045   virtual ~ViewInfo(){};
00046   
00047   void SetQfZf(int qf, int zf){
00048     Qfac = qf; Zfac=zf;
00049   };
00050   
00051   void SetPixelUnit(int flag=TRUE){ pixelmode=flag; };
00052   void SetCoordMode(SCAN_COORD_MODE scm=SCAN_COORD_ABSOLUTE){ sc_mode=scm; };
00053   void ChangeXYUnit(UnitObj *u){ uy=ux=u; };
00054   void ChangeXUnit(UnitObj *u){ ux=u; };
00055   void ChangeYUnit(UnitObj *u){ uy=u; };
00056   void ChangeZUnit(UnitObj *u){ uz=u; };
00057 
00058   gchar *makeXinfo(double x); // X only
00059   gchar *makeDXYinfo(double xy1[2], double xy2[2], Point2D *p1=NULL, Point2D *p2=NULL); // Delta X, w clipping
00060   gchar *makeDnXYinfo(double *xy, int n); // length of polyline, n nodes
00061   gchar *makeA2info(double xy1[2], double xy2[2]); // Area XY1-XY2
00062   gchar *makeXYinfo(double x, double y, Point2D *p=NULL); // X,Y
00063   gchar *makedXdYinfo(double xy1[2], double xy2[2]); // dX, dY
00064   gchar *makeXYZinfo(double x, double y, Point2D *p=NULL); // Point: X,Y,Z
00065 
00066   void Angstroem2W(double &x, double &y);
00067   void W2Angstroem(double &x, double &y);
00068 
00069   int GetQfac() { return Qfac; };
00070   int GetZfac() { return Zfac; };
00071 
00072   UnitObj *Ux();
00073   UnitObj *Uy();
00074   UnitObj *Uz();
00075 
00076   Scan *sc;
00077 private:
00078   UnitObj *ux;
00079   UnitObj *uy;
00080   UnitObj *uz;
00081   int Qfac, Zfac;
00082   int pixelmode;
00083   SCAN_COORD_MODE sc_mode;
00084 };
00085 
00086 #endif

Generated on Sat Apr 1 09:03:51 2006 for GXSM by  doxygen 1.4.6