Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/input/src/core/CorePrereqs.h @ 1637

Last change on this file since 1637 was 1637, checked in by rgrieder, 16 years ago

Finally! The InputManager is now working like I imagined it to. And it's even easier to use it as well.
A little explanation: Every time you change something about the input distribution, it is a change of 'state' represented by the class 'InputState'.
That can be for instance: "console", "game", "gui", etc. Every state has a name and a priority which describes who comes first. Now if one state doesn't handle mouse input or instance, then the one with the next lower priority gets it. To prevent that, you can add the 'EmptyHandler' to the state with setMouseHandler.
InputState is just an abstract base class. There are two classes implementing it: SimpleInputState and ExtendedInputState. The latter allows for multiple input handlers for one single device.

Basically, what you need to know is what you see in Orxonox.cc, InGameConsole.cc and Shell.cc.

  • Property svn:eol-style set to native
File size: 4.2 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Reto Grieder
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30  @file
31  @brief Contains all the necessary forward declarations for all classes and structs.
32*/
33
34#ifndef _CorePrereqs_H__
35#define _CorePrereqs_H__
36
37#include "util/OrxonoxPlatform.h"
38
39#include <string>
40
41//-----------------------------------------------------------------------
42// Shared library settings
43//-----------------------------------------------------------------------
44#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( CORE_STATIC_BUILD )
45#  ifdef CORE_SHARED_BUILD
46#    define _CoreExport __declspec(dllexport)
47#  else
48#    if defined( __MINGW32__ )
49#      define _CoreExport
50#    else
51#      define _CoreExport __declspec(dllimport)
52#    endif
53#  endif
54#elif defined ( ORXONOX_GCC_VISIBILITY )
55#  define _CoreExport  __attribute__ ((visibility("default")))
56#else
57#  define _CoreExport
58#endif
59
60
61//-----------------------------------------------------------------------
62// Forward declarations
63//-----------------------------------------------------------------------
64class SignalHandler;
65
66namespace orxonox
67{
68  namespace XMLPort
69  {
70    enum Mode
71    {
72      LoadObject,
73      SaveObject
74    };
75  }
76
77  namespace KeybindMode
78  {
79    enum Enum
80    {
81      OnPress,
82      OnHold,
83      OnRelease,
84      None
85    };
86  };
87
88  typedef std::string LanguageEntryLabel;
89
90  class ArgumentCompleter;
91  class ArgumentCompletionListElement;
92  class BaseFactory;
93  class BaseMetaObjectListElement;
94  class BaseObject;
95  template <class T>
96  class ClassFactory;
97  template <class T>
98  class ClassIdentifier;
99  class ClassTreeMask;
100  class ClassTreeMaskIterator;
101  class ClassTreeMaskNode;
102  class CommandEvaluation;
103  class CommandExecutor;
104  class ConfigFile;
105  class ConfigFileEntry;
106  class ConfigFileEntryComment;
107  class ConfigFileEntryValue;
108  class ConfigFileManager;
109  class ConfigFileSection;
110  class ConfigValueContainer;
111  class ConsoleCommand;
112  class Core;
113  class Error;
114  class Executor;
115  template <class T>
116  class ExecutorMember;
117  class ExecutorStatic;
118  class Factory;
119  class Functor;
120  template <class T>
121  class FunctorMember;
122  class FunctorStatic;
123  class Identifier;
124  class IRC;
125  template <class T>
126  class Iterator;
127  class Language;
128  class LanguageEntry;
129  class Level;
130  class Loader;
131  class MetaObjectList;
132  template <class T>
133  class MetaObjectListElement;
134  class Namespace;
135  class NamespaceNode;
136  template <class T>
137  class ObjectList;
138  template <class T>
139  class ObjectListElement;
140  class OrxonoxClass;
141  class OutputBuffer;
142  class OutputBufferListener;
143  class OutputHandler;
144  class Shell;
145  class ShellListener;
146  template <class T>
147  class SubclassIdentifier;
148  class TclBind;
149  struct TclInterpreterBundle;
150  class TclThreadManager;
151  class Tickable;
152  template <class T, class O>
153  class XMLPortClassObjectContainer;
154  template <class T>
155  class XMLPortClassParamContainer;
156  class XMLPortObjectContainer;
157  class XMLPortParamContainer;
158
159  // input
160  class BaseCommand;
161  class BufferedParamCommand;
162  class Button;
163  class CalibratorCallback;
164  class ExtendedInputState;
165  class HalfAxis;
166  class InputBuffer;
167  class InputManager;
168  class InputState;
169  class JoyStickHandler;
170  class MouseHandler;
171  class KeyBinder;
172  class KeyDetector;
173  class KeyHandler;
174  class ParamCommand;
175  class SimpleCommand;
176  class SimpleInputState;
177}
178
179#endif /* _CorePrereqs_H__ */
Note: See TracBrowser for help on using the repository browser.