surface.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 __SURFACE_H
00029 #define __SURFACE_H
00030 
00031 #include "meldungen.h"
00032 #include "xsmtypes.h"
00033 #include "view.h"
00034 #include "mem2d.h"
00035 #include "xsmmath.h"
00036 #include "scan.h"
00037 #include "xsm.h"
00038 
00039 #ifndef __XSMHARD_H
00040 #include "xsmhard.h"
00041 #endif
00042 
00043 // moved to PI
00044 //#include "xsm_mkicons.h"
00045 
00046 /*
00047  * XSM Surface Scan Object Controller
00048  * Steuert Channelmechanismus
00049  * ============================================================
00050  */
00051 
00052 
00053 
00054 #define MAXSCANS (2*MAX_SRCS_CHANNELS)
00055 
00056 class ProfileControl;
00057 class Surface : public Xsm{
00058 public:
00059   Surface ();
00060   virtual ~Surface();
00061 
00062   void hide();
00063   int draw();
00064   int load(const char *rname=NULL);
00065   int save(int auto, char *rname=NULL, int chidx=-1, int forceOverwrite=FALSE);
00066   int gnuimport(const char *rname=NULL);
00067   int gnuexport(const char *rname=NULL);
00068   int  SetSDir(int Channel, int choice);
00069   int  SetView(int Channel, int choice);
00070   int  SetMode(int Channel, int choice, int force=FALSE);
00071   //  void SetRedraw(int flg=TRUE){ if(redrawflg=flg) SetVM(); };
00072   void SetRedraw(int flg=TRUE){ redrawflg=flg; };
00073   int  SetVM(int mode=0);
00074   Scan* NewScan(int vtype, int vflg, int ChNo, SCAN_DATA *vd);
00075   int  ActivateFreeChannel();
00076   int  ActivateChannel(int ActiveChannel);
00077   int  FindChan(int fid);
00078 
00079   void AutoDisplay(double hi=0., double lo=0.);
00080 
00081   void CleanupProfiles();
00082   int AddProfile(gchar *filename);
00083   int AddProfile(ProfileControl *pc);
00084   static void remove_profile(ProfileControl *pc, gpointer data);
00085   int RemoveProfile(ProfileControl *pc);
00086   void RemoveAllProfiles();
00087 
00088 // moved to PI
00089 //  void MkIcons(MkIconsData *mid);
00090 
00091   /* Surface Data Operations */
00092   void MathOperationNoDest(gboolean (*Op)(MATHOPPARAMSNODEST));
00093   void MathOperation(gboolean (*Op)(MATHOPPARAMS));
00094   void MathOperationX(gboolean (*Op)(MATH2OPPARAMS), int IdScr2, gboolean size_matching=TRUE);
00095 
00096   Scan* GetActiveScan();
00097 
00098   /* Data */
00099 
00100   int  ActiveChannel;
00101   int  ChannelMode[MAX_CHANNELS];
00102   int  ChannelScanMode[MAX_CHANNELS];
00103   int  ChannelView[MAX_CHANNELS];
00104   Scan *scan[MAX_CHANNELS];
00105   Scan *ActiveScan;
00106 
00107   GSList *ScanList;    /* List of Scan Objects */
00108   GSList *ProfileList; /* List of ProfileControl Objects */
00109   GSList *DelProfileList; /* List of ProfileControl Objects */
00110 
00111   int  StopScanFlg;
00112 
00113 private:  
00114   int redrawflg;
00115 };
00116 
00117 #endif
00118 

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