git-svn-id: https://scorched3d.svn.sourceforge.net/svnroot/scorched3d/trunk/scorched...
[scorched3d/parasti.git] / src / client / GLW / GLWScrollPanel.h
blob30b6fecdccaea8d1ce1037645fdee62ea050ecb6
1 ////////////////////////////////////////////////////////////////////////////////
2 // Scorched3D (c) 2000-2009
3 //
4 // This file is part of Scorched3D.
5 //
6 // Scorched3D is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // Scorched3D 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
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with Scorched3D; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ////////////////////////////////////////////////////////////////////////////////
21 #if !defined(AFX_GLWSCROLLPANEL_H__53CDEDBB_3EC0_480E_8E9C_E40645155DD0__INCLUDED_)
22 #define AFX_GLWSCROLLPANEL_H__53CDEDBB_3EC0_480E_8E9C_E40645155DD0__INCLUDED_
24 #include <GLW/GLWPanel.h>
25 #include <GLW/GLWScrollW.h>
27 class GLWScrollPanel : public GLWPanel,
28 public GLWScrollWI
30 public:
31 GLWScrollPanel(float x = 0.0f, float y = 0.0f,
32 float w = 0.0f, float h = 0.0f);
33 virtual ~GLWScrollPanel();
35 virtual void draw();
36 virtual void simulate(float frameTime);
37 virtual void mouseDown(int button, float x, float y, bool &skipRest);
38 virtual void mouseUp(int button, float x, float y, bool &skipRest);
39 virtual void mouseDrag(int button, float mx, float my, float x, float y, bool &skipRest);
40 virtual void mouseWheel(float x, float y, float z, bool &skipRest);
42 virtual void positionChange(unsigned int id, int current, int movement);
43 virtual void clear();
45 virtual void setH(float h);
47 void calculateVisible();
48 bool &getDrawScrollBar() { return drawScrollBar_; }
49 GLWScrollW &getScrollBar() { return scrollW_; }
51 REGISTER_CLASS_HEADER(GLWScrollPanel);
52 protected:
53 GLWScrollW scrollW_;
54 bool drawScrollBar_;
55 int maxSee_;
56 float widgetHeight_;
60 #endif // !defined(AFX_GLWSCROLLPANEL_H__53CDEDBB_3EC0_480E_8E9C_E40645155DD0__INCLUDED_)