Laxkit  0.0.7.1
measureinterface.h
1 //
2 //
3 // The Laxkit, a windowing toolkit
4 // Please consult http://laxkit.sourceforge.net about where to send any
5 // correspondence about this software.
6 //
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Library General Public
9 // License as published by the Free Software Foundation; either
10 // version 2 of the License, or (at your option) any later version.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // Library General Public License for more details.
16 //
17 // You should have received a copy of the GNU Library General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 //
21 // Copyright (C) 2009 by Tom Lechner
22 //
23 #ifndef _LAX_MEASUREINTERFACE_H
24 #define _LAX_MEASUREINTERFACE_H
25 
26 #include <lax/interfaces/aninterface.h>
27 #include <lax/interfaces/coordinate.h>
28 #include <lax/interfaces/somedata.h>
29 
30 namespace LaxInterfaces {
31 
32 
33 
34 //--------------------------------- MeasureInterface ----------------------------
35 
36 
38 {
39  protected:
40  int mx,my,draggingmode;
41  Coordinate *curpoint;
42  Coordinate *points;
43  double extra[6];
44  LineStyle linestyle;
45  public:
46  unsigned long controlcolor;
47  int target,mode,showdecs;
48 
49  MeasureInterface(int nid,Laxkit::Displayer *ndp);
50  virtual ~MeasureInterface();
51  virtual anInterface *duplicate(anInterface *dup);
52  virtual int scan(int x,int y);
53  virtual int LBDown(int x,int y,unsigned int state,int count);
54  virtual int LBUp(int x,int y,unsigned int state);
55  virtual int MouseMove(int x,int y,unsigned int state);
56  virtual int CharInput(unsigned int ch,const char *buffer,int len,unsigned int state);
57  virtual int Refresh();
58  //virtual int DrawData(Laxkit::anObject *ndata,Laxkit::anObject *a1=NULL,Laxkit::anObject *a2=NULL,int info=0);
59  virtual void deletedata();
60  virtual int InterfaceOn();
61  virtual int InterfaceOff();
62  virtual const char *whattype() { return "MeasureInterface"; }
63  virtual const char *whatdatatype() { return "None"; }
64 };
65 
66 } // namespace LaxInterfaces;
67 
68 #endif
69 

Mon Feb 17 2014 11:52:57, Laxkit