Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

/include/GewiSlider.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002             This file is Part of the Gewi GUI Library for ZEngine.
00003              Gewi and ZEngine Copyright (C) 2002, 2003 James Turk
00004 
00005             Licensed under a BSD-style license. (see licensing.txt)
00006 
00007     The maintainer of this library is James Turk (james@conceptofzero.net) 
00008   this library is found at the home of ZEngine http://zengine.sourceforge.net
00009 *******************************************************************************/
00010 
00020 #ifndef __gewislider_h__
00021 #define __gewislider_h__
00022 
00023 #include "GewiEngine.h"
00024 #include "GewiWidget.h"
00025 
00026 namespace Gewi
00027 {
00028 
00034 class GSlider : public GWidget
00035 {
00036     protected:
00038         bool rPressed;
00040         ResourceID rBackground;
00042         ResourceID rSlider;
00044         float rMin;
00046         float rMax;
00048         float rPos;
00050         int rIncrement;
00051 
00052     public:
00059         GSlider(GContainer *parent=NULL);
00060 
00075         virtual void Create(float x, float y, float width, float height, ResourceID backgroundImg, ResourceID sliderImg, 
00076             float min, float max, int increment);
00077 
00084         void SetPos(float pos);
00085 
00092         float GetPos();
00093 };
00094 
00100 class GHorizSlider : public GSlider
00101 {
00102     public:
00113         virtual void Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch);
00114 
00120         virtual void Show();
00121 };
00122 
00128 class GVertSlider : public GSlider
00129 {
00130     public:
00141         virtual void Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch);
00142 
00148         virtual void Show();
00149 };
00150 
00151 }
00152 
00153 #endif //__gewislider_h__

Generated on Fri Aug 1 17:17:29 2003 for Gewi by doxygen1.3