[Scummvm-cvs-logs] SF.net SVN: scummvm: [21426] scummvm/trunk/gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Mar 24 06:17:22 CET 2006
Revision: 21426
Author: fingolfin
Date: 2006-03-24 06:15:45 -0800 (Fri, 24 Mar 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21426&view=rev
Log Message:
-----------
Reduce (indirect) dependencies on gui/eval.h (and thus common/assocarray.h) to a minimum
Modified Paths:
--------------
scummvm/trunk/engines/scumm/dialogs.cpp
scummvm/trunk/gui/ListWidget.cpp
scummvm/trunk/gui/about.cpp
scummvm/trunk/gui/dialog.cpp
scummvm/trunk/gui/eval.cpp
scummvm/trunk/gui/launcher.cpp
scummvm/trunk/gui/module.mk
scummvm/trunk/gui/newgui.cpp
scummvm/trunk/gui/newgui.h
scummvm/trunk/gui/options.cpp
scummvm/trunk/gui/theme.h
scummvm/trunk/gui/widget.cpp
Added Paths:
-----------
scummvm/trunk/gui/theme.cpp
Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/engines/scumm/dialogs.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -29,6 +29,7 @@
#include "gui/about.h"
#include "gui/chooser.h"
+#include "gui/eval.h"
#include "gui/newgui.h"
#include "gui/ListWidget.h"
Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/ListWidget.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -24,6 +24,7 @@
#include "gui/ListWidget.h"
#include "gui/ScrollBarWidget.h"
#include "gui/dialog.h"
+#include "gui/eval.h"
#include "gui/newgui.h"
namespace GUI {
Modified: scummvm/trunk/gui/about.cpp
===================================================================
--- scummvm/trunk/gui/about.cpp 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/about.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "common/util.h"
#include "gui/about.h"
+#include "gui/eval.h"
#include "gui/newgui.h"
#include "gui/widget.h"
Modified: scummvm/trunk/gui/dialog.cpp
===================================================================
--- scummvm/trunk/gui/dialog.cpp 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/dialog.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -45,7 +45,7 @@
_drawingHints = THEME_HINT_FIRST_DRAW | THEME_HINT_SAVE_BACKGROUND;
}
-Dialog::Dialog(String name)
+Dialog::Dialog(Common::String name)
: GuiObject(name),
_mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false), _drawingHints(0) {
_drawingHints = THEME_HINT_FIRST_DRAW | THEME_HINT_SAVE_BACKGROUND;
Modified: scummvm/trunk/gui/eval.cpp
===================================================================
--- scummvm/trunk/gui/eval.cpp 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/eval.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -37,7 +37,8 @@
return false;
}
-Eval::Eval() {
+Eval::Eval()
+ : _aliases(Common::String::emptyString), _vars(0) {
loadConstants();
}
Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/launcher.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -35,6 +35,7 @@
#include "gui/about.h"
#include "gui/browser.h"
#include "gui/chooser.h"
+#include "gui/eval.h"
#include "gui/launcher.h"
#include "gui/message.h"
#include "gui/newgui.h"
Modified: scummvm/trunk/gui/module.mk
===================================================================
--- scummvm/trunk/gui/module.mk 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/module.mk 2006-03-24 14:15:45 UTC (rev 21426)
@@ -18,6 +18,7 @@
ScrollBarWidget.o \
TabWidget.o \
widget.o \
+ theme.o \
ThemeClassic.o \
ThemeNew.o \
theme-config.o
Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/newgui.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -24,6 +24,7 @@
#include "common/util.h"
#include "gui/newgui.h"
#include "gui/dialog.h"
+#include "gui/eval.h"
#include "common/config-manager.h"
@@ -309,4 +310,9 @@
}
}
+WidgetSize NewGui::getWidgetSize() {
+ return (WidgetSize)(_theme->_evaluator->getVar("widgetSize"));
+}
+
+
} // End of namespace GUI
Modified: scummvm/trunk/gui/newgui.h
===================================================================
--- scummvm/trunk/gui/newgui.h 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/newgui.h 2006-03-24 14:15:45 UTC (rev 21426)
@@ -78,9 +78,7 @@
int getStringWidth(const Common::String &str) const { return _theme->getStringWidth(str); }
int getCharWidth(byte c) const { return _theme->getCharWidth(c); }
- WidgetSize getWidgetSize() {
- return (WidgetSize)(_theme->_evaluator->getVar("widgetSize"));
- }
+ WidgetSize getWidgetSize();
protected:
Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/options.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -22,6 +22,7 @@
#include "common/stdafx.h"
#include "gui/browser.h"
#include "gui/chooser.h"
+#include "gui/eval.h"
#include "gui/newgui.h"
#include "gui/options.h"
#include "gui/PopUpWidget.h"
Added: scummvm/trunk/gui/theme.cpp
===================================================================
--- scummvm/trunk/gui/theme.cpp (rev 0)
+++ scummvm/trunk/gui/theme.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -0,0 +1,38 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2006 The ScummVM project
+ *
+ * This program 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 (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id: theme.h 21268 2006-03-14 02:19:38Z sev $
+ */
+
+#include "gui/theme.h"
+#include "gui/eval.h"
+
+namespace GUI {
+
+Theme::Theme() : _drawArea(), _configFile(), _loadedThemeX(0), _loadedThemeY(0) {
+ Common::MemoryReadStream s((const byte *)_defaultConfigINI, strlen(_defaultConfigINI));
+ _defaultConfig.loadFromStream(s);
+
+ _evaluator = new Eval();
+}
+
+Theme::~Theme() {
+ delete _evaluator;
+}
+
+} // End of namespace GUI
Property changes on: scummvm/trunk/gui/theme.cpp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ "Date Rev Author URL Id"
Name: svn:eol-style
+ native
Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/theme.h 2006-03-24 14:15:45 UTC (rev 21426)
@@ -32,10 +32,11 @@
#include "graphics/fontman.h"
#include "gui/widget.h"
-#include "gui/eval.h"
namespace GUI {
+class Eval;
+
// Hints to the theme engine that the widget is used in a non-standard way.
enum {
@@ -61,14 +62,9 @@
class Theme {
typedef Common::String String;
public:
- Theme() : _drawArea(), _configFile(), _loadedThemeX(0), _loadedThemeY(0) {
- Common::MemoryReadStream s((const byte *)_defaultConfigINI, strlen(_defaultConfigINI));
- _defaultConfig.loadFromStream(s);
-
- _evaluator = new Eval();
- }
+ Theme();
- virtual ~Theme() { delete _evaluator;}
+ virtual ~Theme();
enum kTextAlign {
kTextAlignLeft,
Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp 2006-03-24 14:15:32 UTC (rev 21425)
+++ scummvm/trunk/gui/widget.cpp 2006-03-24 14:15:45 UTC (rev 21426)
@@ -24,6 +24,7 @@
#include "graphics/fontman.h"
#include "gui/widget.h"
#include "gui/dialog.h"
+#include "gui/eval.h"
#include "gui/newgui.h"
namespace GUI {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list