/usr/include/ossim/base/ossimMouseEvent.h is in libossim-dev 1.8.16-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | //*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// Author: Garrett Potts (gpotts@imagelinks.com)
//
//*************************************************************************
// $Id: ossimMouseEvent.h 9968 2006-11-29 14:01:53Z gpotts $
#ifndef ossimMouseEvent_HEADER
#define ossimMouseEvent_HEADER
#include <ossim/base/ossimEvent.h>
#include <ossim/base/ossimIpt.h>
class OSSIMDLLEXPORT ossimMouseEvent : public ossimEvent
{
public:
ossimMouseEvent(const ossimDpt& scenePoint=ossimDpt(0,0),
const ossimDpt& relViewPoint=ossimDpt(0,0),
ossimObject* object = NULL,
long id = OSSIM_MOUSE_EVENT_ID,
long mouseType = 0)
:ossimEvent(object, id),
theScenePoint(scenePoint),
theRelViewPoint(relViewPoint),
theMouseType(mouseType)
{
}
virtual ossimObject* dup()const{return new ossimMouseEvent(*this);}
bool controlDown() const { return theControlKeyDown; }
bool altDown() const { return theAltKeyDown; }
bool shiftDown() const { return theShiftKeyDown; }
// Find which event was just generated
bool leftDown() const{ return (theMouseType == OSSIM_MOUSE_EVENT_LEFT_DOWN_ID); }
bool middleDown() const{ return (theMouseType == OSSIM_MOUSE_EVENT_MIDDLE_DOWN_ID); }
bool rightDown() const{ return (theMouseType == OSSIM_MOUSE_EVENT_RIGHT_DOWN_ID); }
bool leftUp() const{ return (theMouseType == OSSIM_MOUSE_EVENT_LEFT_UP_ID); }
bool middleUp() const{ return (theMouseType == OSSIM_MOUSE_EVENT_MIDDLE_UP_ID); }
bool rightUp() const{ return (theMouseType == OSSIM_MOUSE_EVENT_RIGHT_UP_ID); }
bool leftDClick() const { return (theMouseType == OSSIM_MOUSE_EVENT_LEFT_DCLICK_ID); }
bool middleDClick() const { return (theMouseType == OSSIM_MOUSE_EVENT_MIDDLE_DCLICK_ID); }
bool rightDClick() const { return (theMouseType == OSSIM_MOUSE_EVENT_RIGHT_DCLICK_ID); }
// Find the current state of the mouse buttons (regardless
// of current event type)
bool leftIsDown() const { return theLeftDown; }
bool middleIsDown() const { return theMiddleDown; }
bool rightIsDown() const { return theRightDown; }
// True if a button is down and the mouse is moving
bool dragging() const
{
return (moving() &&
(leftIsDown() || middleIsDown() || rightIsDown()));
}
// True if the mouse is moving, and no button is down
bool moving() const { return (theMouseType == OSSIM_MOUSE_EVENT_MOTION_ID); }
// True if the mouse is just entering the window
bool entering() const { return (theMouseType == OSSIM_MOUSE_EVENT_ENTER_WINDOW_ID); }
// True if the mouse is just leaving the window
bool leaving() const { return (theMouseType == OSSIM_MOUSE_EVENT_LEAVE_WINDOW_ID); }
ossimDpt theScenePoint;
ossimDpt theRelViewPoint;
int theMouseType;
bool theAltKeyDown;
bool theControlKeyDown;
bool theShiftKeyDown;
bool theLeftDown;
bool theRightDown;
bool theMiddleDown;
TYPE_DATA
};
#endif
|