00001 /* 00002 GLICT - Graphics Library Interface Creation Toolkit 00003 Copyright (C) 2006-2007 OBJECT Networks 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 00021 #ifndef __GLICT_SCROLLBAR_H 00022 #define __GLICT_SCROLLBAR_H 00023 #include <string> 00024 #include <GLICT/container.h> 00025 #include <GLICT/types.h> 00026 00028 class glictScrollbar : public glictContainer { 00029 public: 00030 glictScrollbar(); 00031 virtual ~glictScrollbar(); 00032 00033 void SetBGColor(float r, float g, float b, float a); 00034 void SetValue(int val); 00035 int GetValue(); 00036 void SetStep (unsigned int newstep); 00037 unsigned int GetStep(); 00038 void SetMin (int newmin); 00039 int GetMin(); 00040 void SetMax (int newmax); 00041 int GetMax(); 00042 // redefined functions 00043 virtual void Paint(); 00044 bool CastEvent(glictEvents evt, void* wparam, long lparam, void* returnvalue); 00045 private: 00046 glictColor bgcolor; 00047 00048 // upper and lower "button" highlighted? 00049 bool highlightup; 00050 bool highlightdn; 00051 00052 int min, max, value; 00053 unsigned int step; 00054 friend class glictContainer; 00055 }; 00056 #endif 00057