Laxkit  0.0.7.1
xymesbar.h
1 //
2 //
3 // The Laxkit, a windowing toolkit
4 // Copyright (C) 2004-2006 by Tom Lechner
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Library General Public
8 // License as published by the Free Software Foundation; either
9 // version 2 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Library General Public License for more details.
15 //
16 // You should have received a copy of the GNU Library General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // Please consult http://laxkit.sourceforge.net about where to send any
21 // correspondence about this software.
22 //
23 #ifndef _LAX_XYMESBAR_H
24 #define _LAX_XYMESBAR_H
25 
26 #include <lax/messagebar.h>
27 
28 namespace Laxkit {
29 
30 #define XYMB_COMMA (1)
31 #define XYMB_X (2)
32 
33 #define XYMB_BOTHUNITS (1<<28)
34 #define XYMB_UNITS (1<<29)
35 #define XYMB_TRAILZEROS (1<<30)
36 #define XYMB_SCIENTIFIC (1<<31)
37 
38 class XYMesBar : public MessageBar
39 {
40  protected:
41  char *prestuff,*middlestuff,*poststuff,*xunits,*yunits;
42  char *curx,*cury;
43  int precision;
44  public:
45  XYMesBar(anXWindow *pwindow,const char *nname,const char *ntitle,unsigned long nwstyle,
46  int nx,int ny,int nw,int nh,int brder,
47  int initialx,int initialy,int formathints);
48  virtual ~XYMesBar();
49  virtual void SetFormat(const char *pres,const char *mids,const char *posts,const char *xun=NULL,const char *yun=NULL);
50  virtual void SetXY(const char *x,const char *y);
51  virtual void SetXY(int x,int y);
52  virtual void SetXY(double x,double y);
53  virtual int SetPrecision(int p);
54  virtual const char *whattype() { return "XYMesBar"; }
55 };
56 
57 } // namespace Laxkit
58 
59 #endif
60 

Mon Feb 17 2014 11:52:57, Laxkit