Commit 6a6c0c87 authored by Phillip Castaneda's avatar Phillip Castaneda
Browse files

Removing extra whitespace

parent d44381f7
...@@ -183,7 +183,7 @@ namespace OIS ...@@ -183,7 +183,7 @@ namespace OIS
class _OISExport KeyEvent : public EventArg class _OISExport KeyEvent : public EventArg
{ {
public: public:
KeyEvent( Object* obj, KeyCode kc, unsigned int txt ) : EventArg(obj), key(kc), text(txt) {} KeyEvent(Object* obj, KeyCode kc, unsigned int txt) : EventArg(obj), key(kc), text(txt) {}
virtual ~KeyEvent() {} virtual ~KeyEvent() {}
//! KeyCode of event //! KeyCode of event
...@@ -200,8 +200,8 @@ namespace OIS ...@@ -200,8 +200,8 @@ namespace OIS
{ {
public: public:
virtual ~KeyListener() {} virtual ~KeyListener() {}
virtual bool keyPressed( const KeyEvent &arg ) = 0; virtual bool keyPressed(const KeyEvent &arg) = 0;
virtual bool keyReleased( const KeyEvent &arg ) = 0; virtual bool keyReleased(const KeyEvent &arg) = 0;
}; };
/** /**
...@@ -219,7 +219,7 @@ namespace OIS ...@@ -219,7 +219,7 @@ namespace OIS
@param key @param key
A KeyCode to check A KeyCode to check
*/ */
virtual bool isKeyDown( KeyCode key ) const = 0; virtual bool isKeyDown(KeyCode key) const = 0;
/** /**
@remarks @remarks
...@@ -228,7 +228,7 @@ namespace OIS ...@@ -228,7 +228,7 @@ namespace OIS
@param keyListener @param keyListener
Send a pointer to a class derived from KeyListener or 0 to clear the callback Send a pointer to a class derived from KeyListener or 0 to clear the callback
*/ */
virtual void setEventCallback( KeyListener *keyListener ) { mListener = keyListener;} virtual void setEventCallback(KeyListener *keyListener) { mListener = keyListener;}
/** /**
@remarks @remarks
...@@ -253,7 +253,7 @@ namespace OIS ...@@ -253,7 +253,7 @@ namespace OIS
@param mode @param mode
Off, Unicode, Ascii Off, Unicode, Ascii
*/ */
virtual void setTextTranslation( TextTranslationMode mode ); virtual void setTextTranslation(TextTranslationMode mode);
/** /**
@remarks @remarks
...@@ -271,7 +271,7 @@ namespace OIS ...@@ -271,7 +271,7 @@ namespace OIS
@returns @returns
The string as determined from the current locale The string as determined from the current locale
*/ */
virtual const std::string& getAsString( KeyCode kc ) = 0; virtual const std::string& getAsString(KeyCode kc) = 0;
//! Enum of bit position of modifer //! Enum of bit position of modifer
enum Modifier enum Modifier
...@@ -285,14 +285,14 @@ namespace OIS ...@@ -285,14 +285,14 @@ namespace OIS
@remarks @remarks
Check modifier status Check modifier status
*/ */
bool isModifierDown( Modifier mod ) const; bool isModifierDown(Modifier mod) const;
/** /**
@remarks @remarks
Copies the state of the keys into the sent buffer Copies the state of the keys into the sent buffer
(in the form of 1 is down and 0 is up) (in the form of 1 is down and 0 is up)
*/ */
virtual void copyKeyStates( char keys[256] ) const = 0; virtual void copyKeyStates(char keys[256]) const = 0;
protected: protected:
Keyboard(const std::string &vendor, bool buffered, int devID, InputManager* creator) Keyboard(const std::string &vendor, bool buffered, int devID, InputManager* creator)
......
...@@ -41,17 +41,17 @@ namespace OIS ...@@ -41,17 +41,17 @@ namespace OIS
@param coopSettings @param coopSettings
A combination of DI Flags (see DX Help for info on input device settings) A combination of DI Flags (see DX Help for info on input device settings)
*/ */
Win32Keyboard( InputManager* creator, IDirectInput8* pDI, bool buffered, DWORD coopSettings ); Win32Keyboard(InputManager* creator, IDirectInput8* pDI, bool buffered, DWORD coopSettings);
virtual ~Win32Keyboard(); virtual ~Win32Keyboard();
/** @copydoc Keyboard::isKeyDown */ /** @copydoc Keyboard::isKeyDown */
virtual bool isKeyDown( KeyCode key ) const; virtual bool isKeyDown(KeyCode key) const;
/** @copydoc Keyboard::getAsString */ /** @copydoc Keyboard::getAsString */
virtual const std::string& getAsString( KeyCode kc ); virtual const std::string& getAsString(KeyCode kc);
/** @copydoc Keyboard::copyKeyStates */ /** @copydoc Keyboard::copyKeyStates */
virtual void copyKeyStates( char keys[256] ) const; virtual void copyKeyStates(char keys[256]) const;
/** @copydoc Object::setBuffered */ /** @copydoc Object::setBuffered */
virtual void setBuffered(bool buffered); virtual void setBuffered(bool buffered);
......
...@@ -286,7 +286,7 @@ bool Win32Keyboard::isKeyDown( KeyCode key ) const ...@@ -286,7 +286,7 @@ bool Win32Keyboard::isKeyDown( KeyCode key ) const
} }
//--------------------------------------------------------------------------------------------------// //--------------------------------------------------------------------------------------------------//
const std::string& Win32Keyboard::getAsString( KeyCode kc ) const std::string& Win32Keyboard::getAsString(KeyCode kc)
{ {
char temp[256]; char temp[256];
...@@ -296,16 +296,16 @@ const std::string& Win32Keyboard::getAsString( KeyCode kc ) ...@@ -296,16 +296,16 @@ const std::string& Win32Keyboard::getAsString( KeyCode kc )
prop.diph.dwObj = static_cast<DWORD>(kc); prop.diph.dwObj = static_cast<DWORD>(kc);
prop.diph.dwHow = DIPH_BYOFFSET; prop.diph.dwHow = DIPH_BYOFFSET;
if ( SUCCEEDED( mKeyboard->GetProperty( DIPROP_KEYNAME, &prop.diph ) ) ) if (SUCCEEDED(mKeyboard->GetProperty(DIPROP_KEYNAME, &prop.diph)))
{ {
// convert the WCHAR in "wsz" to multibyte // convert the WCHAR in "wsz" to multibyte
if ( WideCharToMultiByte( CP_ACP, 0, prop.wsz, -1, temp, sizeof(temp), NULL, NULL) ) if (WideCharToMultiByte(CP_ACP, 0, prop.wsz, -1, temp, sizeof(temp), NULL, NULL))
return mGetString.assign( temp ); return mGetString.assign(temp);
} }
std::stringstream ss; std::stringstream ss;
ss << "Key_" << (int)kc; ss << "Key_" << (int)kc;
return mGetString.assign( ss.str() ); return mGetString.assign(ss.str());
} }
//--------------------------------------------------------------------------------------------------// //--------------------------------------------------------------------------------------------------//
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment