zengine-gewi/include/GewiTextField.h

53 lines
1.6 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
*******************************************************************************/
/*!
2003-05-19 23:53:53 +00:00
\file GewiTextField.h
\brief Definition file for GTextField.
2003-05-19 22:58:01 +00:00
2003-05-19 23:53:53 +00:00
Definition file for GTextField, text input area widget.
2003-05-21 02:47:56 +00:00
<br>$Id: GewiTextField.h,v 1.4 2003/05/21 02:47:56 cozman Exp $<br>
2003-05-19 22:58:01 +00:00
\author James Turk
**/
#ifndef __gewitextfield_h__
#define __gewitextfield_h__
#include "GewiEngine.h"
#include "GewiWidget.h"
namespace Gewi
{
class GTextField : public GWidget
{
protected:
string rText;
ZImage rBuffer;
ResourceID rFont;
ResourceID rBackground;
int rMaxChars,rLeftPadding;
public:
GTextField(GContainer *parent=NULL);
~GTextField();
2003-05-21 02:47:56 +00:00
virtual void Kill();
2003-05-19 22:58:01 +00:00
virtual void Create(float x, float y, float width, float height, ResourceID font, ResourceID backgroundImg, int maxChars=256, int leftPad=0);
virtual void Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch);
virtual void Show();
void SetText(string text);
string GetText();
};
}
#endif //__gewiewitextfield_h__