Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Mezzanine::EventGameWindow Class Reference

Convey the message that Something happened to a game window. More...

#include <eventgamewindow.h>

+ Inheritance diagram for Mezzanine::EventGameWindow:
+ Collaboration diagram for Mezzanine::EventGameWindow:

Public Types

enum  GameWindowEventID {
  GAME_WINDOW_NONE =0, GAME_WINDOW_FIRST = GAME_WINDOW_NONE, GAME_WINDOW_SHOWN = 1, GAME_WINDOW_HIDDEN = 2,
  GAME_WINDOW_EXPOSED = 3, GAME_WINDOW_MOVED = 4, GAME_WINDOW_RESIZED = 5, GAME_WINDOW_SIZE_CHANGED = 6,
  GAME_WINDOW_MINIMIZED = 7, GAME_WINDOW_MAXIMIZED = 8, GAME_WINDOW_RESTORED = 9, GAME_WINDOW_ENTER = 10,
  GAME_WINDOW_LEAVE = 11, GAME_WINDOW_FOCUS_GAINED = 12, GAME_WINDOW_FOCUS_LOST = 13, GAME_WINDOW_CLOSE = 14,
  GAME_WINDOW_LAST = GAME_WINDOW_CLOSE
}
 Used to identify the kind of change that has happened to the game window. More...
 
- Public Types inherited from Mezzanine::EventBase
enum  EventType { GameWindow, QuitMessage, UserInput, Other }
 A listing of values that can be used to identify Events. More...
 

Public Member Functions

 EventGameWindow (RawEvent Raw_)
 Creates an EventGameWindow from a Rawevent. More...
 
 EventGameWindow (GameWindowEventID GWEventID=GAME_WINDOW_NONE, int First=0, int Second=0)
 Creates an EventGameWindow from manually assigned values. More...
 
 EventGameWindow (const EventGameWindow &Other)
 Copy constructor. More...
 
virtual ~EventGameWindow ()
 Deconstructs this EventGameWindow.
 
GameWindowEventID GetEventID () const
 What just happened, what kind of event was it. More...
 
int GetFirstEventData () const
 Where or how much happened, Get the first event dependent data. More...
 
int GetSecondEventData () const
 Where or how much happened, Get the second event dependent data. More...
 
virtual EventType GetType () const
 This returns EventType::GameWindow. More...
 
Boole IsEventIDValid () const
 Used to help determine if this Event is valid by checking the contents of the GameWindowEventID. More...
 
void operator= (const EventGameWindow &Other)
 Assignment of a this EventGameWindowData. More...
 
Boole operator== (const EventGameWindow &Other) const
 Equality comparison of two EventGameWindowData. More...
 
Boole operator== (const GameWindowEventID &Other) const
 Equality comparison of this EventGameWindowData and a GameWindowEventID. More...
 
- Public Member Functions inherited from Mezzanine::EventBase
virtual ~EventBase ()
 Virtual Deconstructor.
 

Static Public Member Functions

static String GameWindowEventIDToString (EventGameWindow::GameWindowEventID GWEventID)
 Converts GameWindowEventID To Strings. More...
 

Protected Attributes

EventGameWindowDataData
 Holds all internal data. More...
 

Detailed Description

Convey the message that Something happened to a game window.

Definition at line 61 of file eventgamewindow.h.

Member Enumeration Documentation

Used to identify the kind of change that has happened to the game window.

Enumerator
GAME_WINDOW_NONE 

Never used

GAME_WINDOW_FIRST 

Used only as the lower bounds of this enumeration

GAME_WINDOW_SHOWN 

Window has been shown

GAME_WINDOW_HIDDEN 

Window has been hidden

GAME_WINDOW_EXPOSED 

Window has been exposed and should be redrawn

GAME_WINDOW_MOVED 

Window has been moved to data1, data2

GAME_WINDOW_RESIZED 

Window has been resized to data1xdata2

GAME_WINDOW_SIZE_CHANGED 

The window size has changed, either as a result of an API call or through the system or user changing the window size.

GAME_WINDOW_MINIMIZED 

Window has been minimized

GAME_WINDOW_MAXIMIZED 

Window has been maximized

GAME_WINDOW_RESTORED 

Window has been restored to normal size and position

GAME_WINDOW_ENTER 

Window has gained mouse focus

GAME_WINDOW_LEAVE 

Window has lost mouse focus

GAME_WINDOW_FOCUS_GAINED 

Window has gained keyboard focus

GAME_WINDOW_FOCUS_LOST 

Window has lost keyboard focus

GAME_WINDOW_CLOSE 

The window manager requests that the window be closed

GAME_WINDOW_LAST 

Used only as the Upper bounds of this enumeration

Definition at line 65 of file eventgamewindow.h.

Constructor & Destructor Documentation

Mezzanine::EventGameWindow::EventGameWindow ( RawEvent  Raw_)
explicit

Creates an EventGameWindow from a Rawevent.

Parameters
Raw_The RawEvent to decompose to use for the values of this EventGameWindow

Definition at line 75 of file eventgamewindow.cpp.

Mezzanine::EventGameWindow::EventGameWindow ( EventGameWindow::GameWindowEventID  GWEventID = GAME_WINDOW_NONE,
int  First = 0,
int  Second = 0 
)
explicit

Creates an EventGameWindow from manually assigned values.

Parameters
GWEventIDWhat kind of change happened
FirstA parameter that is dependant on the kind of change to the game window
SecondA parameter that is dependant on the kind of change to the game window

Definition at line 78 of file eventgamewindow.cpp.

Mezzanine::EventGameWindow::EventGameWindow ( const EventGameWindow Other)

Copy constructor.

Parameters
OtherThe Other EventGameWindow to use in the creation on this

Definition at line 81 of file eventgamewindow.cpp.

Member Function Documentation

String Mezzanine::EventGameWindow::GameWindowEventIDToString ( EventGameWindow::GameWindowEventID  GWEventID)
static

Converts GameWindowEventID To Strings.

Parameters
GWEventIDthe GameWindowEventID to get as a string
Returns
This returns a string containg the GameWindowEventID in a string as a developer would have typed it.

Definition at line 114 of file eventgamewindow.cpp.

EventGameWindow::GameWindowEventID Mezzanine::EventGameWindow::GetEventID ( ) const

What just happened, what kind of event was it.

Returns
A GameWindowEventID indicating what happened.

Definition at line 96 of file eventgamewindow.cpp.

int Mezzanine::EventGameWindow::GetFirstEventData ( ) const

Where or how much happened, Get the first event dependent data.

Returns
An int with some details about the the event that happened.

Currently this provides the x values for the new window locations in the event that a window moves, or it is resized. If moved it has the new location, if resized it has the new size. This may be used in places in the future.

Definition at line 102 of file eventgamewindow.cpp.

int Mezzanine::EventGameWindow::GetSecondEventData ( ) const

Where or how much happened, Get the second event dependent data.

Currently this provides the y values for the new window locations in the event that a window moves, or it is resized. If moved it has the new location, if resized it has the new size. This may be used in places in the future.

Returns
An int with some details about the the event that happened.

Definition at line 108 of file eventgamewindow.cpp.

EventBase::EventType Mezzanine::EventGameWindow::GetType ( ) const
virtual

This returns EventType::GameWindow.

This returns the kind of message this is, specifcally EventType::GameWindow . If this functions returns EventType::GameWindow, then and event pointer can safely be cast to Mezzanine::EventGameWindow . This method is inherited from Mezzanine::Event .

Implements Mezzanine::EventBase.

Definition at line 88 of file eventgamewindow.cpp.

Boole Mezzanine::EventGameWindow::IsEventIDValid ( ) const

Used to help determine if this Event is valid by checking the contents of the GameWindowEventID.

Returns
True if the event if is between GAME_WINDOW_FIRST and GAME_WINDOW_LAST, false otherwise

Definition at line 153 of file eventgamewindow.cpp.

void Mezzanine::EventGameWindow::operator= ( const EventGameWindow Other)

Assignment of a this EventGameWindowData.

Parameters
Otherthe other EventGameWindow to overwite this one.

Definition at line 156 of file eventgamewindow.cpp.

Boole Mezzanine::EventGameWindow::operator== ( const EventGameWindow Other) const

Equality comparison of two EventGameWindowData.

Parameters
Otherthe other EventGameWindow to compare to this one
Returns
True if identical, false if otherwise.

Definition at line 165 of file eventgamewindow.cpp.

Boole Mezzanine::EventGameWindow::operator== ( const GameWindowEventID Other) const

Equality comparison of this EventGameWindowData and a GameWindowEventID.

Parameters
Otherthe other GameWindowEventID to compare to the one stored in this.
Returns
True if the GameWindowEventID in this event matches the Other, false if otherwise.

Definition at line 171 of file eventgamewindow.cpp.

Member Data Documentation

EventGameWindowData* Mezzanine::EventGameWindow::Data
protected

Holds all internal data.

Definition at line 157 of file eventgamewindow.h.


The documentation for this class was generated from the following files: