[Scummvm-cvs-logs] SF.net SVN: scummvm:[34936] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Nov 8 02:30:32 CET 2008


Revision: 34936
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34936&view=rev
Author:   fingolfin
Date:     2008-11-08 01:30:32 +0000 (Sat, 08 Nov 2008)

Log Message:
-----------
Pushing down some header deps

Modified Paths:
--------------
    scummvm/trunk/base/main.cpp
    scummvm/trunk/engines/dialogs.cpp
    scummvm/trunk/gui/ThemeEngine.cpp
    scummvm/trunk/gui/ThemeEngine.h
    scummvm/trunk/gui/ThemeEval.cpp
    scummvm/trunk/gui/ThemeParser.cpp
    scummvm/trunk/gui/dialog.h
    scummvm/trunk/gui/newgui.cpp
    scummvm/trunk/gui/object.cpp
    scummvm/trunk/gui/themebrowser.cpp
    scummvm/trunk/gui/widget.h

Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/base/main.cpp	2008-11-08 01:30:32 UTC (rev 34936)
@@ -37,6 +37,7 @@
 #include "base/plugins.h"
 #include "base/version.h"
 
+#include "common/archive.h"
 #include "common/config-manager.h"
 #include "common/events.h"
 #include "common/file.h"

Modified: scummvm/trunk/engines/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/dialogs.cpp	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/engines/dialogs.cpp	2008-11-08 01:30:32 UTC (rev 34936)
@@ -36,6 +36,7 @@
 #include "gui/launcher.h"
 #include "gui/ListWidget.h"
 #include "gui/theme.h"
+#include "gui/ThemeEval.h"
 
 #include "engines/dialogs.h"
 #include "engines/engine.h"

Modified: scummvm/trunk/gui/ThemeEngine.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEngine.cpp	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/gui/ThemeEngine.cpp	2008-11-08 01:30:32 UTC (rev 34936)
@@ -361,6 +361,28 @@
 	}
 }
 
+void ThemeEngine::freeRenderer() {
+	delete _vectorRenderer;
+	_vectorRenderer = 0;
+}
+
+void ThemeEngine::freeBackbuffer() {
+	if (_backBuffer != 0) {
+		_backBuffer->free();
+		delete _backBuffer;
+		_backBuffer = 0;
+	}
+}
+
+void ThemeEngine::freeScreen() {
+	if (_screen != 0) {
+		_screen->free();
+		delete _screen;
+		_screen = 0;
+	}
+}
+
+
 void ThemeEngine::unloadTheme() {
 	if (!_themeOk)
 		return;
@@ -499,7 +521,7 @@
 /**********************************************************
  *	Theme elements management
  *********************************************************/
-void ThemeEngine::addDrawStep(const Common::String &drawDataId, Graphics::DrawStep step) {
+void ThemeEngine::addDrawStep(const Common::String &drawDataId, const Graphics::DrawStep &step) {
 	DrawData id = getDrawDataId(drawDataId);
 
 	assert(_widgets[id] != 0);

Modified: scummvm/trunk/gui/ThemeEngine.h
===================================================================
--- scummvm/trunk/gui/ThemeEngine.h	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/gui/ThemeEngine.h	2008-11-08 01:30:32 UTC (rev 34936)
@@ -23,8 +23,8 @@
  *
  */
 
-#ifndef THEME_ENGINE_H
-#define THEME_ENGINE_H
+#ifndef GUI_THEME_ENGINE_H
+#define GUI_THEME_ENGINE_H
 
 #include "common/scummsys.h"
 #include "graphics/surface.h"
@@ -33,19 +33,27 @@
 #include "graphics/surface.h"
 #include "graphics/fontman.h"
 
-#include "gui/dialog.h"
-#include "gui/ThemeParser.h"
-#include "graphics/VectorRenderer.h"
-#include "gui/ThemeEval.h"
+//#include "gui/dialog.h"
+//#include "gui/ThemeParser.h"
+//#include "graphics/VectorRenderer.h"
+//#include "gui/ThemeEval.h"
+#include "gui/theme.h"
 
+namespace Graphics {
+struct DrawStep;
+class VectorRenderer;
+}
 
 namespace GUI {
 
 struct WidgetDrawData;
 struct DrawDataInfo;
 struct TextDrawData;
+class Dialog;
+class GuiObject;
 class ThemeEval;
 class ThemeItem;
+class ThemeParser;
 
 class ThemeEngine : public Theme {
 protected:
@@ -226,13 +234,13 @@
 		}
 	}
 
-	const Graphics::Font *getFont(FontStyle font) const;
+	const Graphics::Font *getFont(FontStyle font = kFontStyleBold) const;
 
 	int getFontHeight(FontStyle font = kFontStyleBold) const;
 
-	int getStringWidth(const Common::String &str, FontStyle font) const;
+	int getStringWidth(const Common::String &str, FontStyle font = kFontStyleBold) const;
 
-	int getCharWidth(byte c, FontStyle font) const;
+	int getCharWidth(byte c, FontStyle font = kFontStyleBold) const;
 
 
 	/**
@@ -268,13 +276,11 @@
 
 	void drawLineSeparator(const Common::Rect &r, WidgetStateInfo state = kStateEnabled);
 
-	void drawDialogBackground(const Common::Rect &r, DialogBackground type, WidgetStateInfo state);
+	void drawDialogBackground(const Common::Rect &r, DialogBackground type, WidgetStateInfo state = kStateEnabled);
 
-	void drawText(const Common::Rect &r, const Common::String &str,
-		WidgetStateInfo state, TextAlign align, bool inverted, int deltax, bool useEllipsis, FontStyle font);
+	void drawText(const Common::Rect &r, const Common::String &str, WidgetStateInfo state = kStateEnabled, TextAlign align = kTextAlignCenter, bool inverted = false, int deltax = 0, bool useEllipsis = true, FontStyle font = kFontStyleBold);
 
-	void drawChar(const Common::Rect &r, byte ch,
-		const Graphics::Font *font, WidgetStateInfo state);
+	void drawChar(const Common::Rect &r, byte ch, const Graphics::Font *font, WidgetStateInfo state = kStateEnabled);
 
 	/**
 	 *	Actual implementation of a Dirty Rect drawing routine.
@@ -326,7 +332,7 @@
 	 *	@param drawDataId The representing DrawData name, as found on Theme Description XML files.
 	 *	@param step The actual DrawStep struct to be added.
 	 */
-	void addDrawStep(const Common::String &drawDataId, Graphics::DrawStep step);
+	void addDrawStep(const Common::String &drawDataId, const Graphics::DrawStep &step);
 
 	/**
 	 *	Interfacefor the ThemeParser class: Parsed DrawData sets are added via this function.
@@ -393,7 +399,7 @@
 	void startBuffering() { _buffering = true; }
 
 	ThemeEval *getEvaluator() { return _themeEval; }
-	VectorRenderer *renderer() { return _vectorRenderer; }
+	Graphics::VectorRenderer *renderer() { return _vectorRenderer; }
 
 	bool supportsImages() const { return true; }
 	bool ownCursor() const { return _useCursor; }
@@ -440,12 +446,13 @@
 	 */
 	bool isWidgetCached(DrawData type, const Common::Rect &r);
 
-protected:
+public:
 
 	const Common::String &getThemeName() const { return _themeName; }
 	const Common::String &getThemeFileName() const { return _themeFileName; }
 	int getGraphicsMode() const { return _graphicsMode; }
 
+protected:
 	/**
 	 *	Initializes the drawing screen surfaces, _screen and _backBuffer.
 	 *	If the surfaces already exist, they are cleared and re-initialized.
@@ -497,32 +504,17 @@
 	/**
 	 *	Frees the vector renderer.
 	 */
-	void freeRenderer() {
-		delete _vectorRenderer;
-		_vectorRenderer = 0;
-	}
+	void freeRenderer();
 
 	/**
 	 * Frees the Back buffer surface, only if it's available.
 	 */
-	void freeBackbuffer() {
-		if (_backBuffer != 0) {
-			_backBuffer->free();
-			delete _backBuffer;
-			_backBuffer = 0;
-		}
-	}
+	void freeBackbuffer();
 
 	/**
 	 * Frees the main screen drawing surface, only if it's available.
 	 */
-	void freeScreen() {
-		if (_screen != 0) {
-			_screen->free();
-			delete _screen;
-			_screen = 0;
-		}
-	}
+	void freeScreen();
 
 	TextData getTextData(DrawData ddId);
 
@@ -567,12 +559,14 @@
 	void debugWidgetPosition(const char *name, const Common::Rect &r);
 
 
+public:
 	/**
 	 *	Default values from GUI::Theme
 	 */
 	int getTabSpacing() const { return 0; }
 	int getTabPadding() const { return 3; }
 
+protected:
 	OSystem *_system; /** Global system object. */
 
 	/** Vector Renderer object, does the actual drawing on screen */

Modified: scummvm/trunk/gui/ThemeEval.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEval.cpp	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/gui/ThemeEval.cpp	2008-11-08 01:30:32 UTC (rev 34936)
@@ -35,6 +35,8 @@
 #include "gui/ThemeParser.h"
 #include "gui/ThemeEval.h"
 
+#include "gui/widget.h"
+
 namespace GUI {
 
 ThemeEval::~ThemeEval() {

Modified: scummvm/trunk/gui/ThemeParser.cpp
===================================================================
--- scummvm/trunk/gui/ThemeParser.cpp	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/gui/ThemeParser.cpp	2008-11-08 01:30:32 UTC (rev 34936)
@@ -31,6 +31,7 @@
 #include "common/xmlparser.h"
 
 #include "gui/ThemeEngine.h"
+#include "gui/ThemeEval.h"
 #include "gui/ThemeParser.h"
 #include "gui/newgui.h"
 #include "graphics/VectorRenderer.h"

Modified: scummvm/trunk/gui/dialog.h
===================================================================
--- scummvm/trunk/gui/dialog.h	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/gui/dialog.h	2008-11-08 01:30:32 UTC (rev 34936)
@@ -22,8 +22,8 @@
  * $Id$
  */
 
-#ifndef DIALOG_H
-#define DIALOG_H
+#ifndef GUI_DIALOG_H
+#define GUI_DIALOG_H
 
 #include "common/scummsys.h"
 #include "common/str.h"

Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/gui/newgui.cpp	2008-11-08 01:30:32 UTC (rev 34936)
@@ -30,6 +30,7 @@
 #include "gui/newgui.h"
 #include "gui/dialog.h"
 #include "gui/ThemeEngine.h"
+#include "gui/ThemeEval.h"
 
 #include "common/config-manager.h"
 

Modified: scummvm/trunk/gui/object.cpp
===================================================================
--- scummvm/trunk/gui/object.cpp	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/gui/object.cpp	2008-11-08 01:30:32 UTC (rev 34936)
@@ -26,6 +26,7 @@
 #include "gui/object.h"
 #include "gui/widget.h"
 #include "gui/newgui.h"
+#include "gui/ThemeEval.h"
 
 namespace GUI {
 

Modified: scummvm/trunk/gui/themebrowser.cpp
===================================================================
--- scummvm/trunk/gui/themebrowser.cpp	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/gui/themebrowser.cpp	2008-11-08 01:30:32 UTC (rev 34936)
@@ -26,6 +26,7 @@
 #include "gui/ListWidget.h"
 #include "gui/widget.h"
 #include "gui/theme.h"
+#include "common/fs.h"
 
 #ifdef MACOSX
 #include "CoreFoundation/CoreFoundation.h"
@@ -164,7 +165,7 @@
 	}
 
 	if (node.lookupFile(fslist, "THEMERC", false, true, 1)) {
-		for (FSList::const_iterator i = fslist.begin(); i != fslist.end(); ++i) {
+		for (Common::FSList::const_iterator i = fslist.begin(); i != fslist.end(); ++i) {
 			
 			Entry th;
 			if (isTheme(i->getParent(), th)) {

Modified: scummvm/trunk/gui/widget.h
===================================================================
--- scummvm/trunk/gui/widget.h	2008-11-08 00:54:58 UTC (rev 34935)
+++ scummvm/trunk/gui/widget.h	2008-11-08 01:30:32 UTC (rev 34936)
@@ -30,7 +30,7 @@
 #include "common/keyboard.h"
 #include "graphics/surface.h"
 #include "gui/object.h"
-#include "gui/theme.h"
+#include "gui/ThemeEngine.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