diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 01:42:53 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 01:43:55 +0100 |
commit | 1715d0afe44a282a356ca88e47c92ec556f094dd (patch) | |
tree | 36dcaa69dcf0165c33d7da1c1cc1a9f5fb7e228f /src/gui | |
parent | 511d9ac780e094767e806c9a448ac973279dd4c8 (diff) | |
download | mana-1715d0afe44a282a356ca88e47c92ec556f094dd.tar.gz mana-1715d0afe44a282a356ca88e47c92ec556f094dd.tar.bz2 mana-1715d0afe44a282a356ca88e47c92ec556f094dd.tar.xz mana-1715d0afe44a282a356ca88e47c92ec556f094dd.zip |
Fixed include structure in resource/ directory
There is also a new rule that trivial constructors and destructors
should no longer be trivially "documented", since this just takes up
space with no gain.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/buy.cpp | 31 | ||||
-rw-r--r-- | src/gui/itemcontainer.cpp | 35 | ||||
-rw-r--r-- | src/gui/itemshortcutcontainer.cpp | 38 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 44 | ||||
-rw-r--r-- | src/gui/scrollarea.cpp | 20 | ||||
-rw-r--r-- | src/gui/sell.cpp | 33 | ||||
-rw-r--r-- | src/gui/window.cpp | 2 | ||||
-rw-r--r-- | src/gui/window.h | 4 |
8 files changed, 105 insertions, 102 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index 0b572a23..adf87175 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -19,28 +19,31 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "button.h" -#include "buy.h" -#include "label.h" -#include "scrollarea.h" -#include "shop.h" -#include "shoplistbox.h" -#include "slider.h" +#include "gui/buy.h" -#include "widgets/layout.h" +#include "gui/button.h" +#include "gui/label.h" +#include "gui/scrollarea.h" +#include "gui/shop.h" +#include "gui/shoplistbox.h" +#include "gui/slider.h" -#include "../npc.h" -#include "../units.h" +#include "gui/widgets/layout.h" + +#include "npc.h" +#include "units.h" #ifdef TMWSERV_SUPPORT #include "../net/tmwserv/gameserver/player.h" #else -#include "../net/messageout.h" -#include "../net/ea/protocol.h" +#include "net/messageout.h" +#include "net/ea/protocol.h" #endif -#include "../utils/gettext.h" -#include "../utils/strprintf.h" +#include "resources/iteminfo.h" + +#include "utils/gettext.h" +#include "utils/strprintf.h" #ifdef TMWSERV_SUPPORT BuyDialog::BuyDialog(): diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 38a41e0e..960f58ad 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -19,28 +19,29 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "gui/itemcontainer.h" -#include <guichan/mouseinput.hpp> -#include <guichan/selectionlistener.hpp> +#include "gui/chat.h" +#include "gui/itempopup.h" +#include "gui/palette.h" +#include "gui/sdlinput.h" +#include "gui/viewport.h" -#include "chat.h" -#include "itemcontainer.h" -#include "itempopup.h" -#include "palette.h" -#include "sdlinput.h" -#include "viewport.h" +#include "graphics.h" +#include "inventory.h" +#include "item.h" +#include "itemshortcut.h" +#include "localplayer.h" +#include "log.h" -#include "../graphics.h" -#include "../inventory.h" -#include "../item.h" -#include "../itemshortcut.h" -#include "../localplayer.h" -#include "../log.h" +#include "resources/image.h" +#include "resources/iteminfo.h" +#include "resources/resourcemanager.h" -#include "../resources/image.h" -#include "../resources/resourcemanager.h" +#include "utils/stringutils.h" -#include "../utils/stringutils.h" +#include <guichan/mouseinput.hpp> +#include <guichan/selectionlistener.hpp> // TODO: Add support for adding items to the item shortcut window (global // itemShortcut). diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp index 45a5ffa0..d4de3477 100644 --- a/src/gui/itemshortcutcontainer.cpp +++ b/src/gui/itemshortcutcontainer.cpp @@ -19,24 +19,26 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "inventorywindow.h" -#include "itemshortcutcontainer.h" -#include "itempopup.h" -#include "palette.h" -#include "viewport.h" - -#include "../configuration.h" -#include "../graphics.h" -#include "../inventory.h" -#include "../item.h" -#include "../itemshortcut.h" -#include "../keyboardconfig.h" -#include "../localplayer.h" - -#include "../resources/image.h" -#include "../resources/resourcemanager.h" - -#include "../utils/stringutils.h" +#include "gui/itemshortcutcontainer.h" + +#include "gui/inventorywindow.h" +#include "gui/itempopup.h" +#include "gui/palette.h" +#include "gui/viewport.h" + +#include "configuration.h" +#include "graphics.h" +#include "inventory.h" +#include "item.h" +#include "itemshortcut.h" +#include "keyboardconfig.h" +#include "localplayer.h" + +#include "resources/image.h" +#include "resources/iteminfo.h" +#include "resources/resourcemanager.h" + +#include "utils/stringutils.h" ItemShortcutContainer::ItemShortcutContainer(): ShortcutContainer(), diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index c2796b59..a99a14a1 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -19,32 +19,34 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <cassert> - -#include "browserbox.h" -#include "chat.h" -#include "inventorywindow.h" -#include "item_amount.h" -#include "popupmenu.h" - -#include "../being.h" -#include "../beingmanager.h" -#include "../floor_item.h" -#include "../graphics.h" -#include "../item.h" -#include "../localplayer.h" -#include "../npc.h" -#include "../player_relations.h" +#include "gui/popupmenu.h" + +#include "gui/browserbox.h" +#include "gui/chat.h" +#include "gui/inventorywindow.h" +#include "gui/item_amount.h" + +#include "being.h" +#include "beingmanager.h" +#include "floor_item.h" +#include "graphics.h" +#include "item.h" +#include "localplayer.h" +#include "npc.h" +#include "player_relations.h" #ifdef EATHENA_SUPPORT -#include "../net/messageout.h" -#include "../net/ea/protocol.h" +#include "net/messageout.h" +#include "net/ea/protocol.h" #endif -#include "../resources/itemdb.h" +#include "resources/itemdb.h" +#include "resources/iteminfo.h" -#include "../utils/gettext.h" -#include "../utils/strprintf.h" +#include "utils/gettext.h" +#include "utils/strprintf.h" + +#include <cassert> extern std::string tradePartnerName; diff --git a/src/gui/scrollarea.cpp b/src/gui/scrollarea.cpp index 44ef929b..834a7f3a 100644 --- a/src/gui/scrollarea.cpp +++ b/src/gui/scrollarea.cpp @@ -213,29 +213,21 @@ void ScrollArea::draw(gcn::Graphics *graphics) void ScrollArea::drawFrame(gcn::Graphics *graphics) { - int bs = getFrameSize(); - int w = getWidth() + bs * 2; - int h = getHeight() + bs * 2; - if (mOpaque) { + int bs = getFrameSize(); + int w = getWidth() + bs * 2; + int h = getHeight() + bs * 2; + static_cast<Graphics*>(graphics)-> - drawImageRect(0, 0, w, h, background); + drawImageRect(0, 0, w, h, background); } } void ScrollArea::setOpaque(bool opaque) { mOpaque = opaque; - - if (mOpaque) - { - setFrameSize(2); - } - else - { - setFrameSize(0); - } + setFrameSize(mOpaque ? 2 : 0); } void ScrollArea::drawButton(gcn::Graphics *graphics, BUTTON_DIR dir) diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index 7039f901..be352a66 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -19,28 +19,31 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "button.h" -#include "label.h" -#include "scrollarea.h" -#include "sell.h" -#include "shop.h" -#include "shoplistbox.h" -#include "slider.h" +#include "gui/sell.h" -#include "widgets/layout.h" +#include "gui/button.h" +#include "gui/label.h" +#include "gui/scrollarea.h" +#include "gui/shop.h" +#include "gui/shoplistbox.h" +#include "gui/slider.h" -#include "../npc.h" -#include "../units.h" +#include "gui/widgets/layout.h" -#include "../net/messageout.h" +#include "npc.h" +#include "units.h" + +#include "net/messageout.h" #ifdef TMWSERV_SUPPORT -#include "../net/tmwserv/gameserver/player.h" +#include "net/tmwserv/gameserver/player.h" #else -#include "../net/ea/protocol.h" +#include "net/ea/protocol.h" #endif -#include "../utils/gettext.h" -#include "../utils/strprintf.h" +#include "resources/iteminfo.h" + +#include "utils/gettext.h" +#include "utils/strprintf.h" #ifdef TMWSERV_SUPPORT SellDialog::SellDialog(): diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 0a5c3b13..b3b675e7 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -316,7 +316,7 @@ void Window::setCloseButton(bool flag) mCloseButton = flag; } -bool Window::isResizable() +bool Window::isResizable() const { return mGrip; } diff --git a/src/gui/window.h b/src/gui/window.h index 44128f1d..530caf1f 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -112,7 +112,7 @@ class Window : public gcn::Window, gcn::WidgetListener /** * Returns whether the window can be resized. */ - bool isResizable(); + bool isResizable() const; /** * Sets the minimum width of the window. @@ -227,7 +227,7 @@ class Window : public gcn::Window, gcn::WidgetListener /** * Returns the name of the window. This is not the window title. */ - const std::string &getWindowName() { return mWindowName; } + const std::string &getWindowName() const { return mWindowName; } /** * Reads the position (and the size for resizable windows) in the |