• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ev_Mouse.h

Go to the documentation of this file.
00001 /* AbiSource Program Utilities
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 
00021 
00022 
00023 #ifndef EV_MOUSE_H
00024 #define EV_MOUSE_H
00025 
00026 #include <vector>
00027 #include "ut_types.h"
00028 #include "ev_EditBits.h"
00029 
00030 class EV_EditEventMapper;
00031 class EV_EditMethod;
00032 class AV_View;
00033 class EV_MouseListener;
00034 
00035 class ABI_EXPORT EV_Mouse
00036 {
00037 public:
00038     EV_Mouse(EV_EditEventMapper * pEEM);
00039     ~EV_Mouse();
00040 
00041     bool invokeMouseMethod(AV_View * pView,
00042                               EV_EditMethod * pEM,
00043                               UT_sint32 xPos,
00044                               UT_sint32 yPos);
00045     void setEditEventMap(EV_EditEventMapper * pEEM);
00046     void clearMouseContext(void);
00047 
00048     // mouse listeners
00049     void signal(EV_EditBits eb, UT_sint32 xPos, UT_sint32 yPos);
00050     UT_sint32 registerListener(EV_MouseListener* pListener);
00051     void unregisterListener(UT_sint32 iListenerId);
00052     void removeListeners();
00053 protected:
00054     EV_EditEventMapper *    m_pEEM;
00055     UT_uint32           m_clickState;   /* {NoClick,SingleClick,DoubleClick} */
00056     EV_EditMouseContext m_contextState; /* mouse context of click */
00057 private:
00058     std::vector<EV_MouseListener*> m_listeners;
00059 };
00060 
00061 #endif /* EV_MOUSE_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1