zengine-gewi/include/GewiButton.h

50 lines
1.5 KiB
C
Raw Normal View History

2003-05-19 22:58:01 +00:00
/*******************************************************************************
This file is Part of the Gewi GUI Library for ZEngine.
Gewi and ZEngine Copyright (C) 2002, 2003 James Turk
Licensed under a BSD-style license. (see licensing.txt)
The maintainer of this library is James Turk (james@conceptofzero.net)
this library is found at the home of ZEngine http://zengine.sourceforge.net
*******************************************************************************/
/*!
\file GewiButton.h
\brief Definition file for GewiButton.
Definition file for GewiButton, a simple button class.
<br>$ id: ZE_ZConfigFile.h,v 1.9 2003/02/10 04:40:16 cozman Exp $<br>
\author James Turk
**/
#ifndef __gewibutton_h__
#define __gewibutton_h__
#include "GewiEngine.h"
#include "GewiWidget.h"
namespace Gewi
{
class GButton : public GWidget
{
protected:
bool rPressed;
GButtonType rType;
ResourceID rNormalImage;
ResourceID rPressedImage;
public:
GButton(GContainer *parent=NULL);
virtual void Create(float x, float y, float width, float height, ResourceID normalImg, ResourceID pressImg, GButtonType type=G_PRESS);
virtual void Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch);
virtual void Show();
bool IsPressed();
void SetState(bool state);
};
}
#endif //__gewibutton_h__