Laxkit  0.0.7.1
checkbox.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) 2004-2007,2010 by Tom Lechner
22 //
23 #ifndef _LAX_CHECKBOX_H
24 #define _LAX_CHECKBOX_H
25 
26 #include <lax/button.h>
27 #include <lax/rectangles.h>
28 
29 namespace Laxkit {
30 
31  // circle and squares automatically set Toggle, overriding style passed to constructor
32 #define CHECK_SQUARE_CHECK (1<<18)
33 #define CHECK_SQUARE_BUT (1<<19)
34 #define CHECK_SQUARE_X (1<<20)
35 #define CHECK_CIRCLE (1<<21)
36 
37 #define CHECK_LEFT (1<<22)
38 #define CHECK_RIGHT (1<<23)
39 #define CHECK_CENTER (1<<24)
40 #define CHECK_CENTERL (1<<25)
41 #define CHECK_CENTERR (1<<26)
42 
43 
44 class CheckBox : public Button
45 {
46  protected:
47  IntRectangle grect,trect;
48  unsigned long pitcolor;
49  public:
50  CheckBox(anXWindow *parnt,const char *nname,const char *ntitle,unsigned long nstyle,
51  int xx,int yy,int ww,int hh,int brder,
52  anXWindow *prev,unsigned long nowner,const char *nsendmes,
53  const char *nnme=NULL,int npadx=0,int npady=0);
54  virtual ~CheckBox();
55  virtual const char *Label(const char *nlabel);
56  virtual void draw();
57  virtual void setPlacement();
58  virtual void drawgraphic();
59 };
60 
61 } // namespace Laxkit
62 
63 #endif
64 

Mon Feb 17 2014 11:52:56, Laxkit