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 __gewiwidgetlist_h__ 00021 #define __gewiwidgetlist_h__ 00022 00023 #include "GewiIncludes.h" 00024 00025 namespace Gewi 00026 { 00027 00028 class GWidget; 00029 00035 class WidgetNode 00036 { 00037 public: 00043 WidgetNode(); 00044 00046 GWidget *widget; 00048 WidgetNode *prev; 00050 WidgetNode *next; 00051 }; 00052 00053 00060 class WidgetList 00061 { 00062 private: 00064 WidgetNode *mWidgetList; 00066 WidgetNode *mClick; 00067 00074 void DeleteWidgetMem(WidgetNode *node); 00075 public: 00081 WidgetList(); 00082 00089 void AddWidget(WidgetNode *node); 00090 00097 void DeleteWidget(GWidget *widget); 00098 00104 void DeleteWidgets(); 00105 00116 void Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch); 00117 00123 void FitParent(); 00124 00130 void ShowWidgets(); 00131 }; 00132 00133 } 00134 00135 #endif //__gewiwidgetlist_h__