OpenStructure
input.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_INPUT_HH
20 #define OST_INPUT_HH
21 
22 /*
23  constants and other things for input events;
24  providing communication between the GUI and the
25  GFX module
26 
27  Author: Ansgar Philippsen
28 */
29 
30 #include <ost/gfx/module_config.hh>
31 
32 namespace ost { namespace gfx {
33 
37 };
38 
55 };
56 
63 };
64 
66 public:
67  InputEvent(InputDevice dev, InputCommand com, float delta):
68  dev_(dev), com_(com), index_(0), target_(0), delta_(delta)
69  {}
70 
71  InputEvent(InputDevice dev, InputCommand com, int index,
72  int target, float delta):
73  dev_(dev), com_(com), index_(index), target_(target), delta_(delta)
74  {}
75 
76  InputDevice GetDevice() const {return dev_;}
77  InputCommand GetCommand() const {return com_;}
78  int GetIndex() const {return index_;}
79  int GetTarget() const {return target_;}
80  float GetDelta() const {return delta_;}
81 private:
82  InputDevice dev_;
83  InputCommand com_;
84  int index_;
85  int target_;
86  float delta_;
87 };
88 
89 }} // ns
90 
91 #endif
int GetTarget() const
Definition: input.hh:79
InputEvent(InputDevice dev, InputCommand com, float delta)
Definition: input.hh:67
InputCommand GetCommand() const
Definition: input.hh:77
float GetDelta() const
Definition: input.hh:80
InputDevice GetDevice() const
Definition: input.hh:76
InputEvent(InputDevice dev, InputCommand com, int index, int target, float delta)
Definition: input.hh:71
int GetIndex() const
Definition: input.hh:78
#define DLLEXPORT_OST_GFX
InputDevice
Definition: input.hh:34
@ INPUT_DEVICE_MOUSE
Definition: input.hh:36
@ INPUT_DEVICE_DUMMY
Definition: input.hh:35
TransformTarget
Definition: input.hh:57
@ TRANSFORM_ROTAMER
Definition: input.hh:62
@ TRANSFORM_VIEW
Definition: input.hh:58
@ TRANSFORM_RIGID
Definition: input.hh:59
@ TRANSFORM_TORSION
Definition: input.hh:60
@ TRANSFORM_ANGLE
Definition: input.hh:61
InputCommand
Definition: input.hh:39
@ INPUT_COMMAND_TRANSZ
Definition: input.hh:46
@ INPUT_COMMAND_TRANSX
Definition: input.hh:44
@ INPUT_COMMAND_TRANSY
Definition: input.hh:45
@ INPUT_COMMAND_REBUILD
Definition: input.hh:54
@ INPUT_COMMAND_ROTX
Definition: input.hh:41
@ INPUT_COMMAND_CUSTOM3
Definition: input.hh:53
@ INPUT_COMMAND_AUTOSLAB
Definition: input.hh:49
@ INPUT_COMMAND_ROTZ
Definition: input.hh:43
@ INPUT_COMMAND_SLABF
Definition: input.hh:48
@ INPUT_COMMAND_SLABN
Definition: input.hh:47
@ INPUT_COMMAND_NONE
Definition: input.hh:40
@ INPUT_COMMAND_CUSTOM2
Definition: input.hh:52
@ INPUT_COMMAND_CUSTOM1
Definition: input.hh:51
@ INPUT_COMMAND_ROTY
Definition: input.hh:42
@ INPUT_COMMAND_TOGGLE_FOG
Definition: input.hh:50
Definition: base.dox:1