Laxkit  0.0.7.1
tabframe.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_TABFRAME_H
24 #define _LAX_TABFRAME_H
25 
26 
27 #include <lax/iconselector.h>
28 
29 namespace Laxkit {
30 
31 //------------------------------ TabBox --------------------------------
32 class TabBox : public IconBox
33 {
34  public:
35  anXWindow *win;
36  int winislocal; // *** just assume not? no to do floatables??-- what does that mean??*** assuming not local
37  TabBox() { win=NULL; }
38  TabBox(anXWindow *nwin,const char *nlabel,LaxImage *img,int nid);
39  virtual ~TabBox();
40  //virtual void sync();
41 };
42 
43 //------------------------------ TabFrame --------------------------------
44 
45 enum TabFrameStyle {
46  TabFrame_Top =(1<<16),
47  TabFrame_Bottom =(1<<17),
48  TabFrame_Right =(1<<18),
49  TabFrame_Left =(1<<19),
50  TabFrame_Stretch=(1<<20),
51  TabFrame_Pile =(1<<21)
52 };
53 
54 class TabFrame : public IconSelector
55 {
56  protected:
57  int curtab;
58  virtual int mapWindow(int which,int mapit=1); //mapit=1
59  public:
60  TabFrame(anXWindow *parnt,const char *nname,const char *ntitle,unsigned long nstyle,
61  int xx,int yy,int ww,int hh,int brder,
62  anXWindow *prev,unsigned long nowner,const char *nsendmes,
63  int npad=0,int npadg=5);
64  virtual ~TabFrame();
65  virtual const char *whattype() { return "TabFrame"; }
66  virtual int init();
67  virtual void Refresh();
68 
69  virtual int AddWin(anXWindow *nwin,int absorbcount,const char *nlabel,const char *iconfilename, int makebw);
70  virtual int SelectN(int which);
71  virtual int CharInput(unsigned int ch,const char *buffer,int len,unsigned int state,const LaxKeyboard *d);
72  virtual int WheelUp(int x,int y,unsigned int state,int count,const LaxMouse *d);
73  virtual int WheelDown(int x,int y,unsigned int state,int count,const LaxMouse *d);
74 };
75 
76 } // namespace Laxkit
77 
78 #endif
79 

Mon Feb 17 2014 11:52:57, Laxkit