40 #ifndef _inputmouse_cpp
41 #define _inputmouse_cpp
43 #include "Input/mouse.h"
44 #include "Graphics/viewport.h"
45 #include "Graphics/gamewindow.h"
53 #include "../src/video/SDL_sysvideo.h"
60 CurrentViewport(NULL),
83 SDL_Window* Focus = SDL_GetMouseFocus();
86 for(
Whole X = 0 ; X < DeltaCodes.size() ; ++X )
88 const MetaCode& CurrCode = DeltaCodes[X];
115 }
else if( Input::MOUSEWHEELVERTICAL == ICode ) {
117 }
else if( Input::MOUSEWHEELHORIZONTAL == ICode ) {
122 if( Input::MOUSEABSOLUTEVERTICAL == ICode ) {
124 }
else if( Input::MOUSEABSOLUTEHORIZONTAL == ICode ) {
135 if( NULL != Focus ) {
166 if( !MCIt->IsMouseEvent() )
173 for(
UInt32 Index = 0 ; Index < this->
Buttons.size() ; ++Index )
182 return (Input::MOUSEBUTTON_1 <= Code && Input::MOUSEBUTTON_2 >= Code);
226 {
return this->
Delta; }
235 {
return std::numeric_limits<UInt16>::max(); }
238 {
return this->
Buttons.at( Button - 1 ); }
253 { SDL_ShowCursor(Visible); }
256 {
return 0 != SDL_ShowCursor(-1); }
259 {
return 0 == SDL_SetRelativeMouseMode( (Enable?SDL_TRUE:SDL_FALSE) ); }
262 {
return SDL_GetRelativeMouseMode(); }
int32_t Int32
An 32-bit integer.
Whole GetActualTop() const
Gets the top position of the viewport in pixels.
bool Boole
Generally acts a single bit, true or false.
Real GetTop() const
Gets the relative top position of the viewport.
Boole IsStopped()
Gets whether or not this Timer is currently running.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
Thrown when we just have not coded a thing yet, but we knew what the API should look like...
Whole GetActualWidth() const
Gets the width of the viewport in pixels.
This implements the exception hiearchy for Mezzanine.
ReverseViewportIterator ReverseBeginViewport()
Gets an iterator to the last viewport in this window.
ViewportContainer::reverse_iterator ReverseViewportIterator
Reverse Iterator type for Viewport instances stored by this class.
float Real
A Datatype used to represent a real floating point number.
ReverseViewportIterator ReverseEndViewport()
Gets an iterator to one before the first viewport in this window.
uint16_t UInt16
An 16-bit unsigned integer.
This class is for creating and managing viewports within a game window.
Real Y
Coordinate on the Y vector.
Real GetLeft() const
Gets the relative left position of the viewport.
GameWindow * GetParentWindow() const
Gets the game window this viewport belongs to.
Real X
Coordinate on the X vector.
uint32_t UInt32
An 32-bit unsigned integer.
This is used to represent a point on a 2 dimentional area, such as a screen.
void Start()
Activates the Timer.
void SetIdentity()
Sets the values of this vector2 to identity values(0,0).
Whole GetActualHeight() const
Gets the height of the viewport in pixels.
void SetCountMode(const Mezzanine::CountMode Mode)
Sets the mode the timer should use to increment time.
void SetCurrentTimeInMilliseconds(const Whole Current)
Sets the current time in Milliseconds. The time that resetting sets the Timer to. ...
void Reset(const Whole StartTime=0)
Sets the current time to an initial value and stops the Timer if it is running.
Thrown when parameters are checked at runtime and found invalid.
Input::MetaCode::ConstMetaCodeIterator ConstMetaCodeIterator
Const Iterator type for convenient MetaCode storage.
Input::MetaCode::MetaCodeContainer MetaCodeContainer
Convenience datatype for storage of MetaCodes.
The timer counts down, meaning the Timer current time is showing remaining time.
Whole GetActualLeft() const
Gets the left position of the viewport in pixels.
A basic timer class to assist in timed operations.
SDL_Window * _GetSDLWindowPointer()
This will get a pointer to the SDL Window.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
This class is for creating and managing game windows.