diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-16 16:29:47 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-16 16:29:47 +0000 |
commit | 6e0bf19c43e545c5cb558edd69b40614fe71ca59 (patch) | |
tree | 835d05b9a10b94394141a79b8a45a541b96bb3cc /src | |
parent | ed1a5a1f37bf760cccaa133013a5c73f4c8897e3 (diff) | |
download | mana-client-6e0bf19c43e545c5cb558edd69b40614fe71ca59.tar.gz mana-client-6e0bf19c43e545c5cb558edd69b40614fe71ca59.tar.bz2 mana-client-6e0bf19c43e545c5cb558edd69b40614fe71ca59.tar.xz mana-client-6e0bf19c43e545c5cb558edd69b40614fe71ca59.zip |
Doxygen improvements.
Diffstat (limited to 'src')
-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.cpp | 6 | ||||
-rw-r--r-- | src/gui/char_server.h | 12 | ||||
-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.h | 4 | ||||
-rw-r--r-- | src/gui/login.cpp | 10 | ||||
-rw-r--r-- | src/gui/login.h | 6 |
9 files changed, 52 insertions, 26 deletions
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); |