diff --git a/include/GewiContainer.h b/include/GewiContainer.h
index fc93dad..18a4db8 100755
--- a/include/GewiContainer.h
+++ b/include/GewiContainer.h
@@ -13,7 +13,7 @@
\brief Definition file for GContainer.
Definition file for GContainer, a barebones widget that can contain child widgets.
-
$Id: GewiContainer.h,v 1.3 2003/05/19 23:56:05 cozman Exp $
+
$Id: GewiContainer.h,v 1.4 2003/05/21 02:47:56 cozman Exp $
\author James Turk
**/
@@ -41,9 +41,11 @@ class GContainer : public GWidget
void InsertWidget(WidgetNode *node);
public:
GContainer(GContainer *parent=NULL);
- void Move(float x, float y);
- void Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch);
- void Show();
+
+ virtual void Kill();
+ virtual void Move(float x, float y);
+ virtual void Message(SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch);
+ virtual void Show();
};
}
diff --git a/include/GewiTextField.h b/include/GewiTextField.h
index ed0cf90..9f900b9 100755
--- a/include/GewiTextField.h
+++ b/include/GewiTextField.h
@@ -13,7 +13,7 @@
\brief Definition file for GTextField.
Definition file for GTextField, text input area widget.
-
$Id: GewiTextField.h,v 1.3 2003/05/19 23:56:05 cozman Exp $
+
$Id: GewiTextField.h,v 1.4 2003/05/21 02:47:56 cozman Exp $
\author James Turk
**/
@@ -38,8 +38,7 @@ class GTextField : public GWidget
GTextField(GContainer *parent=NULL);
~GTextField();
- void Kill();
-
+ virtual void Kill();
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();
diff --git a/src/GewiContainer.cpp b/src/GewiContainer.cpp
index 6e3cbfb..b18ab13 100755
--- a/src/GewiContainer.cpp
+++ b/src/GewiContainer.cpp
@@ -13,7 +13,7 @@
\brief Implementation of GContainer.
Implementation of GContainer, a barebones widget that can contain child widgets.
-
$Id: GewiContainer.cpp,v 1.3 2003/05/20 00:08:55 cozman Exp $
+
$Id: GewiContainer.cpp,v 1.4 2003/05/21 02:47:56 cozman Exp $
\author James Turk
**/
@@ -43,6 +43,12 @@ GContainer::GContainer(GContainer *parent)
{
}
+void GContainer::Kill()
+{
+ rChildList.DeleteWidgets();
+ GWidget::Kill();
+}
+
void GContainer::Move(float x, float y)
{
GWidget::Move(x,y);
diff --git a/src/GewiWidget.cpp b/src/GewiWidget.cpp
index bf5fd20..65ff8fd 100755
--- a/src/GewiWidget.cpp
+++ b/src/GewiWidget.cpp
@@ -13,7 +13,7 @@
\brief Implementation of GWidget.
Implementation of GWidget, virtual widget base class.
-
$Id: GewiWidget.cpp,v 1.3 2003/05/20 00:08:55 cozman Exp $
+
$Id: GewiWidget.cpp,v 1.4 2003/05/21 02:47:56 cozman Exp $
\author James Turk
**/
@@ -66,7 +66,6 @@ void GWidget::Kill()
else
rGewi->DeleteWidget(this);
- //rChildList.DeleteWidgets();
rAlive = rVisible = false;
}
diff --git a/test/gewiTest00.cpp b/test/gewiTest00.cpp
index 0432a4c..498df94 100755
--- a/test/gewiTest00.cpp
+++ b/test/gewiTest00.cpp
@@ -13,13 +13,14 @@
#include "ZEngine.h"
#include "GewiEngine.h"
-#include "GButton.h"
-#include "GTextButton.h"
-#include "GWindow.h"
-#include "GTextField.h"
-#include "GSlider.h"
-#include "GStaticText.h"
+#include "GewiButton.h"
+#include "GewiTextButton.h"
+#include "GewiWindow.h"
+#include "GewiTextField.h"
+#include "GewiSlider.h"
+#include "GewiStaticText.h"
using namespace ZE;
+using namespace Gewi;
void Init()
{
@@ -43,8 +44,8 @@ void Init()
void Test1()
{
ZEngine *ze = ZEngine::GetInstance();
- Gewi *gewi = Gewi::GetInstance();
- ZImage bg("rainbow.bmp"),buf;
+ GewiEngine *gewi = GewiEngine::GetInstance();
+ ZImage bg("data/rainbow.bmp"),buf;
ResourceID id1,id2,id3,id4,id5,id6,id7,id8,id9;
GWindow w1;
GTextButton tb1;
@@ -59,14 +60,14 @@ void Test1()
ZImage *temp,*temp2,*temp3,*temp4,*temp5,*temp6,*temp7,*temp8;
ZFont *font;
- temp = new ZImage("b1.bmp");
- temp2 = new ZImage("b2.bmp");
- temp3 = new ZImage("skin1.bmp");
- temp4 = new ZImage("text.bmp");
- temp5 = new ZImage("bg3.bmp");
- temp6 = new ZImage("slider.bmp");
- temp7 = new ZImage("bg4.bmp");
- temp8 = new ZImage("slider2.bmp");
+ temp = new ZImage("data/b1.bmp");
+ temp2 = new ZImage("data/b2.bmp");
+ temp3 = new ZImage("data/skin1.bmp");
+ temp4 = new ZImage("data/text.bmp");
+ temp5 = new ZImage("data/bg3.bmp");
+ temp6 = new ZImage("data/slider.bmp");
+ temp7 = new ZImage("data/bg4.bmp");
+ temp8 = new ZImage("data/slider2.bmp");
font = new ZFont("c:\\windows\\fonts\\arial.ttf",20);
temp->SetColorKey(255,0,255);
temp2->SetColorKey(255,0,255);
@@ -92,7 +93,7 @@ void Test1()
s1.Create(100,500,200,50,id6,id7,0,3,1);
s2.Create(700,200,50,200,id8,id9,0,200,5);
hb1.Create(70,40,100,100,id1,id2,G_HOVER);
- st1.Create(100,100,100,100,id4,Gewi::InvalidID,"static",GJ_CENTER);
+ st1.Create(100,100,100,100,id4,Gewi::GewiEngine::InvalidID,"static",GJ_CENTER);
do
{
@@ -131,7 +132,7 @@ void Test1()
} while(!ze->QuitRequested());
- Gewi::ReleaseInstance();
+ GewiEngine::ReleaseInstance();
}
int main(int argc, char *argv[])
diff --git a/vc7/gewitest.vcproj b/vc7/gewitest.vcproj
index b555229..2eb7180 100755
--- a/vc7/gewitest.vcproj
+++ b/vc7/gewitest.vcproj
@@ -21,6 +21,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories="../include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="2"
@@ -41,9 +42,10 @@ SDL_net.lib
SDL_image.lib
SDL_ttf.lib
ZEngineS.lib
-c:\home\src\gewi\Release\gewi.lib"
- OutputFile="$(OutDir)/gewitest.exe"
+gewi.lib"
+ OutputFile="../test/bin/GewiTest00.exe"
LinkIncremental="1"
+ AdditionalLibraryDirectories="../lib"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
@@ -69,6 +71,9 @@ c:\home\src\gewi\Release\gewi.lib"
+
+