Laxkit  0.0.7.1
stackframe.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,2010 by Tom Lechner
22 //
23 #ifndef _LAX_STACKFRAME_H
24 #define _LAX_STACKFRAME_H
25 
26 #include <lax/boxarrange.h>
27 #include <lax/anxapp.h>
28 #include <lax/winframebox.h>
29 #include <lax/buttondowninfo.h>
30 
31 namespace Laxkit {
32 
33 //-------------------------------- StackFrame -------------------------
34 
35 #define STACKF_VERTICAL (1<<16)
36 #define STACKF_NOT_SIZEABLE (1<<17)
37 #define STACKF_ALLOW_SWAP (1<<18)
38 #define STACKF_BEVEL (1<<19)
39 
40 
41 class StackFrame : public anXWindow, public ListBox
42 {
43  double *pos;
44  protected:
45  int lastx,lasty, whichbar;
46  int gap;
47  ButtonDownInfo buttondown;
48  public:
49  StackFrame(anXWindow *parnt,const char *nname,const char *ntitle,unsigned long nstyle,
50  int xx,int yy,int ww,int hh,int brder,
51  anXWindow *prev,unsigned long nowner,const char *nsend,
52  int ngap);
53  virtual ~StackFrame();
54  virtual const char *whattype() { return "StackFrame"; }
55  virtual int init();
56  virtual void Refresh();
57  virtual int LBDown(int x,int y,unsigned int state,int count,const LaxMouse *d);
58  virtual int LBUp(int x,int y,unsigned int state,const LaxMouse *d);
59  virtual int MBDown(int x,int y,unsigned int state,int count,const LaxMouse *d);
60  virtual int MBUp(int x,int y,unsigned int state,const LaxMouse *d);
61  virtual int RBDown(int x,int y,unsigned int state,int count,const LaxMouse *d);
62  virtual int RBUp(int x,int y,unsigned int state,const LaxMouse *d);
63  virtual int MouseMove(int x,int y,unsigned int state,const LaxMouse *d);
64  virtual int MoveResize(int nx,int ny,int nw,int nh);
65  virtual int Resize(int nw,int nh);
66 
67  virtual int WrapToExtent();
68  virtual anXWindow *childWindow(int index);
69  virtual int findWhichBar(int x,int y);
70  virtual int MoveBar(int index, int pixelamount, int shift);
71  virtual int Sync(int add);
72  virtual int UpdatePos(int useactual=0);
73  virtual int Gap() { return gap; }
74  virtual int Gap(int ngap);
75  virtual int ReplaceWin(anXWindow *win, int absorbcount, int index);
76  virtual int AddWin(WinFrameBox *box,char islocal=1,int where=-1);
77  virtual int AddWin(anXWindow *win,int absorbcount,int where=-1); // adds with what is w/h in window, no stretch
78  virtual int AddWin(anXWindow *win,int absorbcount,
79  int npw,int nws,int nwg,int nhalign,int nhgap,
80  int nph,int nhs,int nhg,int nvalign,int nvgap,
81  int where=-1);
82 };
83 
84 
85 
86 
87 
88 } //namespace Laxkit
89 
90 
91 #endif
92 
93 

Mon Feb 17 2014 11:52:57, Laxkit