Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gtk/gui_keys.h @ 8914

Last change on this file since 8914 was 8145, checked in by bensch, 18 years ago

trunk: merged the gui back
merged with command:
svn merge -r8114:HEAD https://svn.orxonox.net/orxonox/branches/gui .
→ no conflicts

File size: 1.6 KB
Line 
1/*!
2  \file gui_keys.h
3  \brief File that holds the class that creates the Keyboard-Options.
4*/
5
6#ifndef _GUI_KEYS_H
7#define _GUI_KEYS_H
8
9#include "gui.h"
10#include "gui_element.h"
11#include "gui_gtk.h"
12
13#ifdef HAVE_GTK2
14#include <gdk/gdkkeysyms.h>
15#endif /* HAVE_GTK2 */
16
17//! One KeyOption has one InputKey
18struct InputKey
19{
20  Box* keyBox;           //!< One Box that holds the Keys
21  Button* keyButton;     //!< The Button for changing the Key.
22  OptionLabel* keyOLabel;//!< The Label for displaying the Key-setting.
23};
24
25//! Class that creates the Keys-Options.
26class GuiKeys : public GuiElement
27{
28 public:
29  GuiKeys();
30  virtual ~GuiKeys();
31
32  static Window* inputWindow; //!< A Window that gets keyboard clicks. Static, because only one needed.
33  static Button* inputButton; //!< A Button that gets keyboard clicks. Static, because only one needed.
34  static long keySignal;      //!< A keySignal that handles keyboard clicks. Static, because only one needed.
35};
36
37//! Class to hold infos about a Player
38class PlayerKeys
39{
40 private:
41  Button* openButton;     //!< The OpenButton for this key-settings.
42
43 public:
44  PlayerKeys(char* player);
45
46  Button* getOpenButton();
47};
48
49class MiscKeys
50{
51 private:
52  Button* openButton;     //!< The OpenButton for this key-settings.
53
54 public:
55  MiscKeys();
56
57  Button* getOpenButton();
58};
59
60Widget* addKey(const char* name, const char* defaultValue = NULL);
61#ifdef HAVE_GTK2
62gint inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* widget);
63gint key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey);
64#endif /* HAVE_GTK2 */
65
66
67#endif /* _GUI_KEYS_H */
Note: See TracBrowser for help on using the repository browser.