QCodeEdit 2.2
lib/qeditorinputbindinginterface.h
00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
00004 **
00005 ** This file is part of the Edyuk project <http://edyuk.org>
00006 ** 
00007 ** This file may be used under the terms of the GNU General Public License
00008 ** version 3 as published by the Free Software Foundation and appearing in the
00009 ** file GPL.txt included in the packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ****************************************************************************/
00015 
00016 #ifndef _QEDITOR_INPUT_BINDING_INTERFACE_H_
00017 #define _QEDITOR_INPUT_BINDING_INTERFACE_H_
00018 
00019 #include "qce-config.h"
00020 
00021 class QEditor;
00022 
00023 class QString;
00024 class QKeyEvent;
00025 class QMouseEvent;
00026 class QInputMethodEvent;
00027 class QContextMenuEvent;
00028 
00029 class QEditorInputBindingInterface
00030 {
00031     public:
00032         virtual ~QEditorInputBindingInterface() {}
00033         
00034         virtual QString id() const = 0;
00035         virtual QString name() const = 0;
00036         
00037         virtual bool isExclusive() const = 0;
00038         
00039         virtual bool keyPressEvent(QKeyEvent *event, QEditor *editor) = 0;
00040         virtual void postKeyPressEvent(QKeyEvent *event, QEditor *editor) = 0;
00041         
00042         virtual bool inputMethodEvent(QInputMethodEvent* event, QEditor *editor) = 0;
00043         virtual void postInputMethodEvent(QInputMethodEvent *event, QEditor *editor) = 0;
00044         
00045         virtual bool mouseMoveEvent(QMouseEvent *event, QEditor *editor) = 0;
00046         virtual void postMouseMoveEvent(QMouseEvent *event, QEditor *editor) = 0;
00047         
00048         virtual bool mousePressEvent(QMouseEvent *event, QEditor *editor) = 0;
00049         virtual void postMousePressEvent(QMouseEvent *event, QEditor *editor) = 0;
00050         
00051         virtual bool mouseReleaseEvent(QMouseEvent *event, QEditor *editor) = 0;
00052         virtual void postMouseReleaseEvent(QMouseEvent *event, QEditor *editor) = 0;
00053         
00054         virtual bool mouseDoubleClickEvent(QMouseEvent *event, QEditor *editor) = 0;
00055         virtual void postMouseDoubleClickEvent(QMouseEvent *event, QEditor *editor) = 0;
00056         
00057         virtual bool contextMenuEvent(QContextMenuEvent *event, QEditor *editor) = 0;
00058 };
00059 
00060 #endif // _QEDITOR_INPUT_BINDING_INTERFACE_H_