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

/include/GewiButton.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 __gewibutton_h__
00021 #define __gewibutton_h__
00022 
00023 #include "GewiEngine.h"
00024 #include "GewiWidget.h"
00025 
00026 namespace Gewi
00027 {
00028 
00034 enum GButtonType
00035 {
00036     GBT_PRESS,  
00037     GBT_HOVER   
00038 };
00039 
00045 class GButton : public GWidget
00046 {
00047     protected:
00049         bool rPressed;
00051         GButtonType rType;
00053         ResourceID rNormalImage;
00055         ResourceID rPressedImage;
00056 
00057     public:
00064         GButton(GContainer *parent=NULL);
00065 
00078         virtual void Create(float x, float y, float width, float height, ResourceID normalImg, ResourceID pressImg, GButtonType type=GBT_PRESS);
00079 
00090         virtual void Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch);
00091 
00097         virtual void Show();
00098 
00105         bool IsPressed();
00106 
00113         void SetState(bool pressed);
00114 };
00115 
00116 }
00117 
00118 #endif //__gewibutton_h__

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