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

/include/GewiWidget.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 __gewiwidget_h__
00021 #define __gewiwidget_h__
00022 
00023 #include "GewiIncludes.h"
00024 
00025 namespace Gewi
00026 {
00027 
00028 class GewiEngine;
00029 class GContainer;
00030 
00036 class GWidget
00037 {
00038     protected:
00040         GewiEngine *rGewi;
00042         ZE::ZEngine *rZE;
00044         ZE::ZRect rBoundRect;
00046         GContainer *rParent;
00048         float rRelX;
00050         float rRelY;
00052         bool rVisible;
00053 
00054     public:
00061         GWidget(GContainer *parent=NULL);
00062 
00068         virtual ~GWidget();
00069 
00075         void ToggleVisible();
00076 
00083         void FitParent();
00084 
00094         virtual void Create(float x, float y, float width, float height);
00095 
00103         virtual void Move(float x, float y);
00104 
00115         virtual void Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch)=0;
00116 
00122         virtual void Show()=0;
00123 
00130         float X();
00131 
00138         float Y();
00139 
00146         bool Visible();
00147 
00154         bool MouseInWidget();
00155 
00163         bool Contains(Sint16 x, Sint16 y);
00164 };
00165 
00166 }
00167 
00168 #endif //__gewiwidget_h__

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