SoXt  1.4.1
Coin3D GUI toolkit binding
Loading...
Searching...
No Matches
SoXtMouse.h
1#ifndef SOXT_MOUSE_H
2#define SOXT_MOUSE_H
3
4//
5
6/**************************************************************************\
7 * Copyright (c) Kongsberg Oil & Gas Technologies AS
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are
12 * met:
13 *
14 * Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
16 *
17 * Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 *
21 * Neither the name of the copyright holder nor the names of its
22 * contributors may be used to endorse or promote products derived from
23 * this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36\**************************************************************************/
37
38#include <Inventor/Xt/devices/SoXtDevice.h>
39
40class SoMouseButtonEvent;
41class SoLocation2Event;
42
43// *************************************************************************
44
45class SOXT_DLL_API SoXtMouse : public SoXtDevice {
46 SOXT_OBJECT_HEADER(SoXtMouse, SoXtDevice);
47
48public:
49 enum Events {
50 BUTTON_PRESS = 0x01,
51 BUTTON_RELEASE = 0x02,
52 POINTER_MOTION = 0x04,
53 BUTTON_MOTION = 0x08,
54
55 ALL_EVENTS = BUTTON_PRESS | BUTTON_RELEASE | POINTER_MOTION | BUTTON_MOTION
56 };
57
58 SoXtMouse(int eventmask = ALL_EVENTS);
59 virtual ~SoXtMouse(void);
60
61 virtual void enable(Widget widget, SoXtEventHandler * handler, void * closure);
62 virtual void disable(Widget widget, SoXtEventHandler * handler, void * closure);
63
64 virtual const SoEvent * translateEvent(XAnyEvent* event);
65
66private:
67 class SoXtMouseP * pimpl;
68 friend class SoXtMouseP;
69 friend class SoGuiMouseP;
70};
71
72// *************************************************************************
73
74#endif // ! SOXT_MOUSE_H
The SoXtDevice class is the base class for the translation devices.
Definition SoXtDevice.h:77
virtual const SoEvent * translateEvent(XAnyEvent *event)=0
virtual void disable(Widget w, SoXtEventHandler *handler, void *closure)=0
virtual void enable(Widget w, SoXtEventHandler *handler, void *closure)=0
The SoXtMouse class is the mouse input device abstraction.
Definition SoXtMouse.h:45
Events
Definition SoXtMouse.h:49