summaryrefslogtreecommitdiff
path: root/src/gui/setup_keyboard.h
diff options
context:
space:
mode:
authorJoshua Langley <joshlangley[at]optusnet.com.au>2007-07-16 15:23:34 +0000
committerJoshua Langley <joshlangley[at]optusnet.com.au>2007-07-16 15:23:34 +0000
commit71532a23200b246f63ed1e0dc3d563bd1184b593 (patch)
tree2ce28dd04573bb40b31e367d7d980b32f113edab /src/gui/setup_keyboard.h
parentbb5f430e6f7e1471aefc1de22e423e6015d0236c (diff)
downloadmana-71532a23200b246f63ed1e0dc3d563bd1184b593.tar.gz
mana-71532a23200b246f63ed1e0dc3d563bd1184b593.tar.bz2
mana-71532a23200b246f63ed1e0dc3d563bd1184b593.tar.xz
mana-71532a23200b246f63ed1e0dc3d563bd1184b593.zip
Diffstat (limited to 'src/gui/setup_keyboard.h')
-rw-r--r--src/gui/setup_keyboard.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/gui/setup_keyboard.h b/src/gui/setup_keyboard.h
new file mode 100644
index 00000000..0430b040
--- /dev/null
+++ b/src/gui/setup_keyboard.h
@@ -0,0 +1,74 @@
+/*
+ * The Mana World
+ * Copyright 2007 The Mana World Development Team
+ *
+ * This file is part of The Mana World.
+ *
+ * The Mana World is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * The Mana World is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with The Mana World; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef _TMW_GUI_SETUP_KEYBOARD_H
+#define _TMW_GUI_SETUP_KEYBOARD_H
+
+#include "setuptab.h"
+#include "button.h"
+#include "../guichanfwd.h"
+
+#include <guichan/actionlistener.hpp>
+
+
+#include <string>
+
+class Setup_Keyboard : public SetupTab, public gcn::ActionListener
+{
+ public:
+ Setup_Keyboard();
+ ~Setup_Keyboard();
+
+ void apply();
+ void cancel();
+
+ void action(const gcn::ActionEvent &event);
+
+ /**
+ * easy way to disable/enable all the set buttons.
+ */
+ void enableButtons(bool bValue);
+
+ /**
+ * get an update on the assigned key.
+ */
+ void refreshAssignedKey(const int index);
+
+ /**
+ * the callback function when a new key has been pressed.
+ */
+ void newKeyCallback(const int index);
+
+ /**
+ * shorthand method to update all the keys.
+ */
+ void refreshKeys();
+
+ private:
+ gcn::Label *mKeyLabel;
+
+ Button *mKeyButton;
+
+ gcn::Button *mMakeDefaultButton;
+};
+
+#endif