Difference between revisions of "Most important events"
From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Line 55: | Line 55: | ||
The Window widget is a important baseclass, all widgets inherit this class. It has lots 'n lots of events, but we are only going to handle a few. | The Window widget is a important baseclass, all widgets inherit this class. It has lots 'n lots of events, but we are only going to handle a few. | ||
− | + | * EventTextChanged Called whenever the text of the window has changed. | |
− | + | * |
Revision as of 11:24, 5 May 2007
This article is going to show you the most important and usefull events of each widget.
Getting started
I'm only going to change the initialiseSample function for each widget + adding some others.
EventGalore.h
<cpp/>
- ifndef _EventGalore_h_
- define _EventGalore_h_
- include "CEGuiSample.h"
- include "CEGUI.h"
class EventGalore : public CEGuiSample { public:
bool initialiseSample() { using namespace CEGUI;
return true; } void cleanupSample(void) { }
};
- endif // _EventGalore_h_
main.cpp
<cpp/>
- if defined( __WIN32__ ) || defined( _WIN32 )
#define WIN32_LEAN_AND_MEAN #define NOMINMAX #include "windows.h"
- endif
- include "EventGalore.h"
- if defined( __WIN32__ ) || defined( _WIN32 )
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,int nCmdShow)
- else
int main(int argc, char *argv[])
- endif
{
EventGalore app; return app.run();
}
Widgets
Window
The Window widget is a important baseclass, all widgets inherit this class. It has lots 'n lots of events, but we are only going to handle a few.
- EventTextChanged Called whenever the text of the window has changed.