OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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-2011 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
float GetDelta() const
Definition: input.hh:80
InputEvent(InputDevice dev, InputCommand com, int index, int target, float delta)
Definition: input.hh:71
InputDevice GetDevice() const
Definition: input.hh:76
#define DLLEXPORT_OST_GFX
InputDevice
Definition: input.hh:34
int GetIndex() const
Definition: input.hh:78
InputEvent(InputDevice dev, InputCommand com, float delta)
Definition: input.hh:67
InputCommand GetCommand() const
Definition: input.hh:77
int GetTarget() const
Definition: input.hh:79
TransformTarget
Definition: input.hh:57
InputCommand
Definition: input.hh:39