summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/SOURCE/tmw.doxcfg4
-rw-r--r--file.list4
-rw-r--r--src/gui/button.cpp (renamed from src/gui/mw_button.cpp)16
-rw-r--r--src/gui/button.h (renamed from src/gui/mw_button.h)9
-rw-r--r--src/gui/char_server.cpp6
-rw-r--r--src/gui/char_server.h12
-rw-r--r--src/gui/checkbox.cpp (renamed from src/gui/mw_checkbox.cpp)6
-rw-r--r--src/gui/checkbox.h (renamed from src/gui/mw_checkbox.h)9
-rw-r--r--src/gui/gui.h4
-rw-r--r--src/gui/login.cpp10
-rw-r--r--src/gui/login.h6
11 files changed, 56 insertions, 30 deletions
diff --git a/docs/SOURCE/tmw.doxcfg b/docs/SOURCE/tmw.doxcfg
index cb786e42..fe5039fb 100644
--- a/docs/SOURCE/tmw.doxcfg
+++ b/docs/SOURCE/tmw.doxcfg
@@ -137,7 +137,7 @@ SHORT_NAMES = NO
# comments will behave just like the Qt-style comments (thus requiring an
# explicit @brief command for a brief description.
-JAVADOC_AUTOBRIEF = NO
+JAVADOC_AUTOBRIEF = YES
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
# treat a multi-line C++ special comment block (i.e. a block of //! or ///
@@ -170,7 +170,7 @@ DISTRIBUTE_GROUP_DOC = NO
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
-TAB_SIZE = 2
+TAB_SIZE = 4
# This tag can be used to specify a number of aliases that acts
# as commands in the documentation. An alias has the form "name=value".
diff --git a/file.list b/file.list
index 7add2732..46aee9ad 100644
--- a/file.list
+++ b/file.list
@@ -9,8 +9,8 @@ MODULES = src/sound/sound.cpp \
src/gui/setup.cpp \
src/gui/gui.cpp \
src/gui/login.cpp \
- src/gui/mw_button.cpp \
- src/gui/mw_checkbox.cpp \
+ src/gui/button.cpp \
+ src/gui/checkbox.cpp \
src/gui/char_server.cpp \
src/gui/char_select.cpp \
src/gui/inventory.cpp \
diff --git a/src/gui/mw_button.cpp b/src/gui/button.cpp
index f7a01176..02a77984 100644
--- a/src/gui/mw_button.cpp
+++ b/src/gui/button.cpp
@@ -19,16 +19,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "mw_button.h"
+#include "button.h"
-MWButton::MWButton(const std::string& caption):
+Button::Button(const std::string& caption):
gcn::Button(caption)
{
mouseDown = false;
keyDown = false;
}
-void MWButton::draw(gcn::Graphics* graphics) {
+void Button::draw(gcn::Graphics* graphics) {
int x, y;
int mode;
int offset = 0;
@@ -59,24 +59,24 @@ void MWButton::draw(gcn::Graphics* graphics) {
alfont_text_mode(rtm);
}
-void MWButton::lostFocus() {
+void Button::lostFocus() {
mouseDown = false;
keyDown = false;
}
-void MWButton::mousePress(int x, int y, int button) {
+void Button::mousePress(int x, int y, int button) {
if (button == gcn::MouseInput::LEFT && hasMouse()) {
mouseDown = true;
}
}
-void MWButton::mouseRelease(int x, int y, int button) {
+void Button::mouseRelease(int x, int y, int button) {
if (button == gcn::MouseInput::LEFT) {
mouseDown = false;
}
}
-void MWButton::keyPress(const gcn::Key& key) {
+void Button::keyPress(const gcn::Key& key) {
if (key.getValue() == gcn::Key::ENTER ||
key.getValue() == gcn::Key::SPACE)
{
@@ -85,7 +85,7 @@ void MWButton::keyPress(const gcn::Key& key) {
mouseDown = false;
}
-void MWButton::keyRelease(const gcn::Key& key) {
+void Button::keyRelease(const gcn::Key& key) {
if ((key.getValue() == gcn::Key::ENTER ||
key.getValue() == gcn::Key::SPACE) && keyDown)
{
diff --git a/src/gui/mw_button.h b/src/gui/button.h
index 31c7bd44..d7026951 100644
--- a/src/gui/mw_button.h
+++ b/src/gui/button.h
@@ -24,9 +24,14 @@
#include "gui.h"
-class MWButton : public gcn::Button {
+/**
+ * Button widget. Same as the Guichan button but with custom look.
+ *
+ * \ingroup GUI
+ */
+class Button : public gcn::Button {
public:
- MWButton(const std::string& caption);
+ Button(const std::string& caption);
// Inherited from Widget
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp
index bd02f51a..0bd431a5 100644
--- a/src/gui/char_server.cpp
+++ b/src/gui/char_server.cpp
@@ -23,7 +23,7 @@
#include "char_server.h"
#include "../graphic/graphic.h"
-#include "mw_button.h"
+#include "button.h"
char server[30];
int showServerList = 1;
@@ -65,8 +65,8 @@ void char_server() {
dialog = new gcn::Container();
serverList = new gcn::ListBox(serverListModel);
scrollArea = new gcn::ScrollArea(serverList);
- okButton = new MWButton("OK");
- cancelButton = new MWButton("Cancel");
+ okButton = new Button("OK");
+ cancelButton = new Button("Cancel");
dialog->setDimension(gcn::Rectangle(300, 200, 200, 100));
scrollArea->setDimension(gcn::Rectangle(4, 4, 192, 55));
diff --git a/src/gui/char_server.h b/src/gui/char_server.h
index 521aa4c9..2d694ef4 100644
--- a/src/gui/char_server.h
+++ b/src/gui/char_server.h
@@ -32,13 +32,21 @@
#include "../net/network.h"
#include "gui.h"
-// The action listener for the server select dialog
+/**
+ * The action listener for the server select dialog.
+ *
+ * \ingroup GUI
+ */
class ServerSelectListener : public gcn::ActionListener {
public:
void action(const std::string& eventId);
};
-// The list model for the server list
+/**
+ * The list model for the server list.
+ *
+ * \ingroup GUI
+ */
class ServerListModel : public gcn::ListModel {
public:
int getNumberOfElements();
diff --git a/src/gui/mw_checkbox.cpp b/src/gui/checkbox.cpp
index a2b02e6e..9105ae69 100644
--- a/src/gui/mw_checkbox.cpp
+++ b/src/gui/checkbox.cpp
@@ -19,14 +19,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "mw_checkbox.h"
+#include "checkbox.h"
-MWCheckBox::MWCheckBox(const std::string& caption, bool marked):
+CheckBox::CheckBox(const std::string& caption, bool marked):
gcn::CheckBox(caption, marked)
{
}
-void MWCheckBox::draw(gcn::Graphics* graphics) {
+void CheckBox::draw(gcn::Graphics* graphics) {
BITMAP *box = NULL;
int x, y;
int tx, ty;
diff --git a/src/gui/mw_checkbox.h b/src/gui/checkbox.h
index 427d943a..c4240a40 100644
--- a/src/gui/mw_checkbox.h
+++ b/src/gui/checkbox.h
@@ -24,9 +24,14 @@
#include "gui.h"
-class MWCheckBox : public gcn::CheckBox {
+/**
+ * Check box widget. Same as the Guichan check box but with custom look.
+ *
+ * \ingroup GUI
+ */
+class CheckBox : public gcn::CheckBox {
public:
- MWCheckBox(const std::string& caption, bool marked = false);
+ CheckBox(const std::string& caption, bool marked = false);
// Inherited from Widget
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 99d302db..0028cb77 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -32,6 +32,10 @@
#include <alfont.h>
#include <string.h>
+/**
+ * \defgroup GUI GUI related classes
+ */
+
typedef struct {
BITMAP *grid[9];
} LexSkinnedRect;
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index bae87745..f0697513 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -23,8 +23,8 @@
#include "login.h"
#include "gui.h"
-#include "mw_button.h"
-#include "mw_checkbox.h"
+#include "button.h"
+#include "checkbox.h"
#include "../graphic/graphic.h"
// Dialog parts
@@ -75,9 +75,9 @@ void login() {
passLabel = new gcn::Label("Password:");
userField = new gcn::TextField("player");
passField = new gcn::TextField();
- keepCheck = new MWCheckBox("Keep", false);
- okButton = new MWButton("OK");
- cancelButton = new MWButton("Cancel");
+ keepCheck = new CheckBox("Keep", false);
+ okButton = new Button("OK");
+ cancelButton = new Button("Cancel");
dialog->setDimension(gcn::Rectangle(300, 250, 200, 80));
userLabel->setPosition(4, 14);
diff --git a/src/gui/login.h b/src/gui/login.h
index e823381d..7cafb47f 100644
--- a/src/gui/login.h
+++ b/src/gui/login.h
@@ -35,7 +35,11 @@
#include <winalleg.h>
#endif
-// The action listener for the login dialog
+/**
+ * The action listener for the login dialog.
+ *
+ * \ingroup GUI
+ */
class LoginActionListener : public gcn::ActionListener {
public:
void action(const std::string& eventId);