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

Gewi::GWindow Class Reference

#include <GewiWindow.h>

Inherits Gewi::GContainer.

List of all members.


Detailed Description

GWindow, basic window class, derived from GContainer.


Public Member Functions

 GWindow (GContainer *parent=NULL)
 Simple constructor for GWindow.

virtual void Create (float x, float y, float width, float height, ResourceID backgroundImg)
 GButton's create function, must be called to set up actual button.

virtual void Message (SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch)
 Overload of Message, used to recieve messages.

virtual void Show ()
 Draws window & children to the screen.


Protected Attributes

bool rDrag
 Holds internal state of if mouse is dragging the window or not.

float rDragX
 X value of drag coordinate used for drag calculation.

float rDragY
 Y value of drag coordinate used for drag calculation.

ResourceID rBackground
 Image used for window.


Constructor & Destructor Documentation

Gewi::GWindow::GWindow GContainer parent = NULL  ) 
 

Default constructor for GWindow, can take a parent.

Parameters:
parent Pointer to GContainer derived class to be the parent. Default value is NULL which means no parent.


Member Function Documentation

void Gewi::GWindow::Create float  x,
float  y,
float  width,
float  height,
ResourceID  backgroundImg
[virtual]
 

Every widget has a create function which must be called to define the button's appearance and settings.

Parameters:
x X position of widget within it's container (entire screen if no parent)
y Y position of widget within it's container (entire screen if no parent)
width Width of widget.
height Height of widget.
backgroundImg Image for window.

void Gewi::GWindow::Message SDL_Event *  rawEvent,
GewiEvent  event,
Uint16  mouseX,
Uint16  mouseY,
char  ch
[virtual]
 

Recieves and processes a message, required overload for all widgets.

Parameters:
rawEvent SDL_Event of original message, may be needed if more information is available on event. (May be NULL).
event GewiEvent enum, description of event recieved.
mouseX Mouse x position in event, if not mouse event may be incorrect.
mouseY Mouse y position in event, if not mouse event may be incorrect.
ch Character pressed in event, may be 0 if not a keypress event.

Reimplemented from Gewi::GContainer.

void Gewi::GWindow::Show  )  [virtual]
 

Draws window & children to the screen, required overload for all widgets.

Reimplemented from Gewi::GContainer.


The documentation for this class was generated from the following files:
Generated on Fri Aug 1 17:17:30 2003 for Gewi by doxygen1.3