Laxkit  0.0.7.1
iconslider.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-2010 by Tom Lechner
22 //
23 #ifndef _LAX_ICONSLIDER_H
24 #define _LAX_ICONSLIDER_H
25 
26 
27 #include <lax/itemslider.h>
28 #include <lax/menuinfo.h>
29 #include <sys/times.h>
30 
31 #define ICONSLIDER_ICON_ONLY (0<<20)
32 #define ICONSLIDER_TEXT_ONLY (1<<20)
33 #define ICONSLIDER_TEXT_ICON (2<<20)
34 #define ICONSLIDER_ICON_TEXT (3<<20)
35 #define ICONSLIDER_WHAT_MASK (3<<20)
36 
37 #define ICONSLIDER_M_ICON_ONLY (0<<22)
38 #define ICONSLIDER_M_TEXT_ONLY (1<<22)
39 #define ICONSLIDER_M_TEXT_ICON (2<<22)
40 #define ICONSLIDER_M_ICON_TEXT (3<<22)
41 #define ICONSLIDER_M_WHAT_MASK (3<<22)
42 
43 namespace Laxkit {
44 
45 class IconSlider : public ItemSlider
46 {
47  protected:
48  MenuInfo *items;
49  char iislocal;
50  int lastitem;
51  public:
52  int gap;
53  IconSlider(anXWindow *parnt,const char *nname,const char *ntitle,unsigned long nstyle,
54  int xx,int yy,int ww,int hh,int brder,
55  anXWindow *prev,unsigned long nowner,const char *nsendthis,
56  MenuInfo *nitems,int ilocal);
57  virtual ~IconSlider();
58  virtual int DeleteItem(int id);
59  virtual int AddItem(const char *newitem,int nid);
60  virtual int AddItem(const char *newitem,const char *filename,int nid);
61  virtual void Refresh();
62 };
63 
64 
65 } // namespace Laxkit
66 
67 #endif
68 

Mon Feb 17 2014 11:52:56, Laxkit