pleyo.com

/src/trunk2/BAL/Implementations/Events/Common/BCKeyboardEvent.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2007 Pleyo.  All rights reserved.
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions
00006  * are met:
00007  *
00008  * 1.  Redistributions of source code must retain the above copyright
00009  *     notice, this list of conditions and the following disclaimer.
00010  * 2.  Redistributions in binary form must reproduce the above copyright
00011  *     notice, this list of conditions and the following disclaimer in the
00012  *     documentation and/or other materials provided with the distribution.
00013  * 3.  Neither the name of Pleyo nor the names of
00014  *     its contributors may be used to endorse or promote products derived
00015  *     from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
00018  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00019  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00020  * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
00021  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00022  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00023  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00024  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00026  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  */
00028 
00043 #include "config.h"
00044 #include "PlatformString.h"
00045 
00046 #include "BIKeyboardEvent.h"
00047 #include "../Common/BCCommonInputEventData.h"
00048 
00049 namespace BC
00050 {
00051 
00059 class BCKeyboardEvent : public BAL::BIKeyboardEvent, public BCCommonInputEventData {
00060 public:
00061   BCKeyboardEvent(const WebCore::String& aText,
00062                     const WebCore::String& aUnmodifiedText,
00063                     const WebCore::String& aKeyIdentifier,
00064                     bool bIsKeyUp,
00065                     bool bShiftKey,
00066                     bool bCtrlKey,
00067                     bool bAltKey,
00068                     bool bMetaKey,
00069                     bool bIsAutoRepeat,
00070                     int aVKey);
00071 
00072   virtual WebCore::String text() const;
00073   virtual WebCore::String unmodifiedText() const;
00074   virtual WebCore::String keyIdentifier() const;
00075   virtual bool isKeyUp() const;
00076   virtual bool isAutoRepeat() const;
00077   virtual void setIsAutoRepeat(bool);
00078   virtual int WindowsKeyCode() const;
00079   virtual int setWindowsKeyCode(int code) const;
00080   virtual int virtualKeyCode() const;
00081   virtual bool isKeypad() const;
00082 
00083   virtual BIEvent* clone() const;
00084 
00085   virtual bool shiftKey() const { return BCCommonInputEventData::shiftKey(); }
00086   virtual bool ctrlKey() const { return BCCommonInputEventData::ctrlKey(); }
00087   virtual bool altKey() const { return BCCommonInputEventData::altKey(); }
00088   virtual bool metaKey() const { return BCCommonInputEventData::metaKey(); }
00089 
00090 protected:
00091   WebCore::String m_text;
00092   WebCore::String m_unmodifiedText;
00093   WebCore::String m_keyIdentifier;
00094   bool m_isKeyUp;
00095   bool m_autoRepeat;
00096   int m_BALVirtualKeyCode;
00097   bool m_isKeypad;
00098 
00099 };
00100 
00101 }

Generated on Wed Nov 21 20:04:15 2007 for Origyn Web Browser by Doxygen 1.5.3

pleyo.com
pleyo.com