[Scummvm-cvs-logs] SF.net SVN: scummvm: [28031] scummex/branches/gsoc2007-gameresbrowser
zbychs at users.sourceforge.net
zbychs at users.sourceforge.net
Wed Jul 11 16:15:53 CEST 2007
Revision: 28031
http://scummvm.svn.sourceforge.net/scummvm/?rev=28031&view=rev
Author: zbychs
Date: 2007-07-11 07:15:52 -0700 (Wed, 11 Jul 2007)
Log Message:
-----------
Changing the project structure.
The building is broken at the moment.
Last good version is 28025.
Modified Paths:
--------------
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/scummsys.h
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/simplefile.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/simplefile.h
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/stream.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/stream.h
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/wx2scstream.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/wx2scstream.h
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/xorstream.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/xorstream.h
scummex/branches/gsoc2007-gameresbrowser/vc8/Browser/Browser.vcproj
scummex/branches/gsoc2007-gameresbrowser/vc8/vc8.sln
Added Paths:
-----------
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/streams_stdafx.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Browser.layout
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.rc
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.wxform
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Test1.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Test2.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/gui_stdafx.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/gui_stdafx.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/guicon.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/guicon.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/AuxInterfaces.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/AuxInterfaces.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/BMPParser.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/BMPParser.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/BitmapPanel.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/BitmapPanel.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/CoreFileTypes.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/CoreFileTypes.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/DirectoryPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/DirectoryPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/DiskFileProvider.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/DiskFileProvider.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/FileInfoPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/FileInfoPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/HtmlPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/HtmlPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/ImagePresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/ImagePresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/TextPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/TextPresenter.h
Removed Paths:
-------------
scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/common_stdafx.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BitmapPanel.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BitmapPanel.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Browser.layout
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.rc
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/DirectoryPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/DirectoryPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ExplorationTree.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ExplorationTree.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/FileInfoPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/FileInfoPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/HtmlPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/HtmlPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ImagePresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ImagePresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.wxform
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/PanelProvider.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Test1.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Test2.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/TextPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/TextPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/VirtualNode.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/gui_stdafx.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/gui_stdafx.h
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/guicon.cpp
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/guicon.h
scummex/branches/gsoc2007-gameresbrowser/src/gui/
scummex/branches/gsoc2007-gameresbrowser/src/plugins/AuxInterfaces.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/AuxInterfaces.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/BitmapPanel.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/BitmapPanel.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/CoreFileTypes.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/CoreFileTypes.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/DirectoryPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/DirectoryPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/DiskFileProvider.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/DiskFileProvider.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/FileInfoPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/FileInfoPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/HtmlPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/HtmlPresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/ImagePresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/ImagePresenter.h
scummex/branches/gsoc2007-gameresbrowser/src/plugins/TextPresenter.cpp
scummex/branches/gsoc2007-gameresbrowser/src/plugins/TextPresenter.h
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/common_stdafx.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/common_stdafx.h 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/common_stdafx.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,120 +0,0 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001 Ludvig Strigeus
- * Copyright (C) 2001-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: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/common/stdafx.h $
- * $Id: stdafx.h 26061 2007-03-10 15:00:56Z sev $
- *
- */
-
-#ifndef COMMON_STDAFX_H
-#define COMMON_STDAFX_H
-
-#if defined(_WIN32_WCE) && _WIN32_WCE < 300
- #define NONSTANDARD_PORT
-#endif
-
-#if defined(NONSTANDARD_PORT)
-
- // Ports which need to perform #includes and #defines visible in
- // virtually all the source of ScummVM should do so by providing a
- // wxT("portdefs.h") header file (and not by directly modifying this
- // header file).
- #include <portdefs.h>
-
-#else // defined(NONSTANDARD_PORT)
-
- #if defined(WIN32)
-
- #ifdef _MSC_VER
- #pragma once
- #pragma warning( disable : 4068 ) // turn off wxT("unknown pragma") warning
- #pragma warning( disable : 4100 ) // turn off wxT("unreferenced formal parameter") warning
- #pragma warning( disable : 4127 ) // turn off wxT("conditional expression is constant") warning
- #pragma warning( disable : 4201 ) // turn off wxT("nonstandard extension used : nameless struct/union") warning
- #pragma warning( disable : 4244 ) // turn off wxT("conversion type") warning
- #pragma warning( disable : 4310 ) // turn off wxT("cast truncates constant value") warning
- #pragma warning( disable : 4355 ) // turn off wxT("base member init") warning
- #pragma warning( disable : 4390 ) // turn off wxT("empty statement") warning for BS2 code
- #pragma warning( disable : 4250 ) // turn off wxT("inherits via dominance") warning
- #pragma warning( disable : 4103 ) // turn off wxT("alignement changed after including header") warning. We use pack-start.h file
- #pragma warning( disable : 4121 ) // turn off wxT("alignment of a member was sensitive to packing") warning
- #pragma warning( disable : 4511 ) // turn off wxT("copy constructor could not be generated") warning
- #pragma warning( disable : 4512 ) // turn off wxT("assignment operator could not be generated") warning
- #pragma warning( disable : 4351 ) // turn off wxT("new behavior ... will be default initialized") warning
- #pragma warning( disable : 4505 ) // turn off wxT("unreferenced local function has been removed")
- #pragma warning( disable : 4510 ) // turn off wxT("default constructor could not be generated")
- #pragma warning( disable : 4610 ) // turn off wxT("struct can never be instantiated - user defined constructor required")
-
- // FIXME: 4702 & 4706 - may be enabled
- #pragma warning( disable : 4702 ) // turn off wxT("unreachable code") warning
- #pragma warning( disable : 4706 ) // turn off wxT("assignment within conditional expression") warning
-
- #define vsnprintf _vsnprintf
- #endif
-
- #if !defined(_WIN32_WCE)
-
- #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
- #define NOGDICAPMASKS
- #define OEMRESOURCE
- #define NONLS
- #define NOICONS
- #define NOMCX
- #define NOPROFILER
- #define NOKANJI
- #define NOSERVICE
- #define NOMETAFILE
- #define NOCOMM
- #define NOCRYPT
- #define NOIME
- #define NOATOM
- #define NOCTLMGR
- #define NOCLIPBOARD
- #define NOMEMMGR
- #define NOSYSMETRICS
- #define NOMENUS
- #define NOOPENFILE
- #define NOWH
- #define NOSOUND
- #define NODRAWTEXT
-
- #endif
-
- #if defined(ARRAYSIZE)
- // VS2005beta2 introduces new stuff in winnt.h
- #undef ARRAYSIZE
- #endif
-
- #endif
-
- #if defined(__QNXNTO__)
- #include <strings.h> /* For strcasecmp */
- #endif
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <stdarg.h>
- #include <assert.h>
- #include <ctype.h>
- #include <time.h>
- #include <math.h>
-
-#endif
-
-#endif
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/scummsys.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/scummsys.h 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/scummsys.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/common/scummsys.h $
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/streams/scummsys.h $
* $Id: scummsys.h 26044 2007-03-09 23:46:45Z fingolfin $
*
*/
@@ -73,8 +73,8 @@
// By default we try to use pragma push/pop to ensure various structs we use
// are wxT("packed"). If your compiler doesn't support this pragma, you are in for
// a problem. If you are lucky, there is a compiler switch, or another pragma,
-// doing the same thing -- in that case, try to modify common/pack-begin.h and
-// common/pack-end.h accordingly. Or maybe your port simply *always* packs
+// doing the same thing -- in that case, try to modify streams/pack-begin.h and
+// streams/pack-end.h accordingly. Or maybe your port simply *always* packs
// everything, in which case you could #undefine SCUMMVM_USE_PRAGMA_PACK.
//
// If neither is possible, tough luck. Try to contact the team, maybe we can
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/simplefile.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/simplefile.cpp 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/simplefile.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -15,15 +15,15 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/common/file.cpp $
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/streams/file.cpp $
* $Id: file.cpp 26394 2007-04-06 18:34:53Z agent-q $
*
*/
-#include "core_stdafx.h"
-#include "common/common_stdafx.h"
+#include "browser_stdafx.h"
+#include "streams/streams_stdafx.h.h"
-#include "common/simplefile.h"
+#include "streams/simplefile.h"
#include <iostream>
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/simplefile.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/simplefile.h 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/simplefile.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/common/file.h $
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/streams/file.h $
* $Id: file.h 26017 2007-03-08 16:46:02Z fingolfin $
*
*/
@@ -23,8 +23,8 @@
#ifndef COMMON_SIMPLEFILE_H
#define COMMON_SIMPLEFILE_H
-#include "common/common_stdafx.h"
-#include "common/stream.h"
+#include "streams/streams_stdafx.h.h"
+#include "streams/stream.h"
namespace Common {
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/stream.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/stream.cpp 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/stream.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -15,18 +15,18 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/common/stream.cpp $
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/streams/stream.cpp $
* $Id: stream.cpp 25754 2007-02-20 21:41:01Z fingolfin $
*
*/
-#include "core_stdafx.h"
-#include "common/common_stdafx.h"
+#include "browser_stdafx.h"
+#include "streams/streams_stdafx.h.h"
-//#include "common/stdafx.h"
-#include "common/stream.h"
-//#include "common/str.h"
-//#include "common/util.h"
+//#include "streams/stdafx.h"
+#include "streams/stream.h"
+//#include "streams/str.h"
+//#include "streams/util.h"
#ifdef MIN
#undef MIN
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/stream.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/stream.h 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/stream.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/common/stream.h $
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/streams/stream.h $
* $Id: stream.h 25980 2007-03-04 16:25:27Z fingolfin $
*
*/
@@ -25,8 +25,8 @@
#ifndef COMMON_STREAM_H
#define COMMON_STREAM_H
-#include "common/common_stdafx.h"
-#include "common/scummsys.h"
+#include "streams/streams_stdafx.h.h"
+#include "streams/scummsys.h"
namespace Common {
Copied: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/streams_stdafx.h (from rev 28030, scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/common_stdafx.h)
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/streams_stdafx.h (rev 0)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/streams_stdafx.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -0,0 +1,120 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001 Ludvig Strigeus
+ * Copyright (C) 2001-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: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/streams/stdafx.h $
+ * $Id: stdafx.h 26061 2007-03-10 15:00:56Z sev $
+ *
+ */
+
+#ifndef COMMON_STDAFX_H
+#define COMMON_STDAFX_H
+
+#if defined(_WIN32_WCE) && _WIN32_WCE < 300
+ #define NONSTANDARD_PORT
+#endif
+
+#if defined(NONSTANDARD_PORT)
+
+ // Ports which need to perform #includes and #defines visible in
+ // virtually all the source of ScummVM should do so by providing a
+ // wxT("portdefs.h") header file (and not by directly modifying this
+ // header file).
+ #include <portdefs.h>
+
+#else // defined(NONSTANDARD_PORT)
+
+ #if defined(WIN32)
+
+ #ifdef _MSC_VER
+ #pragma once
+ #pragma warning( disable : 4068 ) // turn off wxT("unknown pragma") warning
+ #pragma warning( disable : 4100 ) // turn off wxT("unreferenced formal parameter") warning
+ #pragma warning( disable : 4127 ) // turn off wxT("conditional expression is constant") warning
+ #pragma warning( disable : 4201 ) // turn off wxT("nonstandard extension used : nameless struct/union") warning
+ #pragma warning( disable : 4244 ) // turn off wxT("conversion type") warning
+ #pragma warning( disable : 4310 ) // turn off wxT("cast truncates constant value") warning
+ #pragma warning( disable : 4355 ) // turn off wxT("base member init") warning
+ #pragma warning( disable : 4390 ) // turn off wxT("empty statement") warning for BS2 code
+ #pragma warning( disable : 4250 ) // turn off wxT("inherits via dominance") warning
+ #pragma warning( disable : 4103 ) // turn off wxT("alignement changed after including header") warning. We use pack-start.h file
+ #pragma warning( disable : 4121 ) // turn off wxT("alignment of a member was sensitive to packing") warning
+ #pragma warning( disable : 4511 ) // turn off wxT("copy constructor could not be generated") warning
+ #pragma warning( disable : 4512 ) // turn off wxT("assignment operator could not be generated") warning
+ #pragma warning( disable : 4351 ) // turn off wxT("new behavior ... will be default initialized") warning
+ #pragma warning( disable : 4505 ) // turn off wxT("unreferenced local function has been removed")
+ #pragma warning( disable : 4510 ) // turn off wxT("default constructor could not be generated")
+ #pragma warning( disable : 4610 ) // turn off wxT("struct can never be instantiated - user defined constructor required")
+
+ // FIXME: 4702 & 4706 - may be enabled
+ #pragma warning( disable : 4702 ) // turn off wxT("unreachable code") warning
+ #pragma warning( disable : 4706 ) // turn off wxT("assignment within conditional expression") warning
+
+ #define vsnprintf _vsnprintf
+ #endif
+
+ #if !defined(_WIN32_WCE)
+
+ #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+ #define NOGDICAPMASKS
+ #define OEMRESOURCE
+ #define NONLS
+ #define NOICONS
+ #define NOMCX
+ #define NOPROFILER
+ #define NOKANJI
+ #define NOSERVICE
+ #define NOMETAFILE
+ #define NOCOMM
+ #define NOCRYPT
+ #define NOIME
+ #define NOATOM
+ #define NOCTLMGR
+ #define NOCLIPBOARD
+ #define NOMEMMGR
+ #define NOSYSMETRICS
+ #define NOMENUS
+ #define NOOPENFILE
+ #define NOWH
+ #define NOSOUND
+ #define NODRAWTEXT
+
+ #endif
+
+ #if defined(ARRAYSIZE)
+ // VS2005beta2 introduces new stuff in winnt.h
+ #undef ARRAYSIZE
+ #endif
+
+ #endif
+
+ #if defined(__QNXNTO__)
+ #include <strings.h> /* For strcasecmp */
+ #endif
+
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdarg.h>
+ #include <assert.h>
+ #include <ctype.h>
+ #include <time.h>
+ #include <math.h>
+
+#endif
+
+#endif
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/wx2scstream.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/wx2scstream.cpp 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/wx2scstream.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: src/common/mstream.cpp
+// Name: src/streams/mstream.cpp
// Purpose: wxT("Memory stream") classes
// Author: Guilhem Lavaux
// Modified by: VZ (23.11.00): general code review
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/wx2scstream.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/wx2scstream.h 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/wx2scstream.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -15,7 +15,7 @@
//#include "wx/defs.h"
#include <wx/stream.h>
-#include "common/stream.h"
+#include "streams/stream.h"
namespace Browser {
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/xorstream.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/xorstream.cpp 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/xorstream.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -15,15 +15,15 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/common/file.cpp $
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/streams/file.cpp $
* $Id: file.cpp 26394 2007-04-06 18:34:53Z agent-q $
*
*/
-#include "core_stdafx.h"
-#include "common/common_stdafx.h"
+#include "browser_stdafx.h"
+#include "streams/streams_stdafx.h.h"
-#include "common/xorstream.h"
+#include "streams/xorstream.h"
#include <iostream>
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/xorstream.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/xorstream.h 2007-07-11 14:07:33 UTC (rev 28030)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browser/streams/xorstream.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/common/file.h $
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/streams/file.h $
* $Id: file.h 26017 2007-03-08 16:46:02Z fingolfin $
*
*/
@@ -23,7 +23,7 @@
#ifndef COMMON_XORSTREAM_H
#define COMMON_XORSTREAM_H
-#include "common/stream.h"
+#include "streams/stream.h"
namespace Common {
Copied: scummex/branches/gsoc2007-gameresbrowser/src/browserapp (from rev 28002, scummex/branches/gsoc2007-gameresbrowser/src/gui)
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BitmapPanel.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/BitmapPanel.cpp 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BitmapPanel.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,37 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// BitmapPanel.cpp
-
-// For compilers that support precompilation, includes wxT("wx/wx.h").
-#include "gui_stdafx.h"
-
-#include "BitmapPanel.h"
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-BEGIN_EVENT_TABLE(BitmapPanel, wxPanel)
- EVT_PAINT(BitmapPanel::OnPaint)
- //EVT_ERASE_BACKGROUND(BitmapPanel::OnEraseBackground)
- //EVT_LEFT_DCLICK(BitmapPanel::OnSave)
-END_EVENT_TABLE()
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-BitmapPanel::BitmapPanel(wxPanel *parent, const wxBitmap& bitmap)
- : wxPanel(parent), _bitmap(bitmap) {
- SetClientSize(bitmap.GetWidth(), bitmap.GetHeight());
-}
-
-void BitmapPanel::OnPaint(wxPaintEvent& WXUNUSED(event)) {
- wxPaintDC dc( this );
- dc.DrawBitmap( _bitmap, 0, 0, true /* use mask */ );
-}
-
-//TODO: draw a checkboard
-/*void BitmapPanel::OnEraseBackground(wxEraseEvent& WXUNUSED(event)) {
-// do nothing here to be able to see how transparent images are shown
-}*/
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BitmapPanel.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/BitmapPanel.h 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BitmapPanel.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,34 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// BitmapPanel.h
-
-#ifndef _BITMAP_PANEL_H_
-#define _BITMAP_PANEL_H_
-
-// For compilers that support precompilation, includes wxT("wx/wx.h").
-#include "gui_stdafx.h"
-
-#include <wx/panel.h>
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-class BitmapPanel : public wxPanel
-{
-public:
- BitmapPanel(wxPanel *parent, const wxBitmap& bitmap);
-
- void OnPaint(wxPaintEvent& event);
-
- //TODO: draw a checkboard
- //void OnEraseBackground(wxEraseEvent& event);
-
-private:
- wxBitmap _bitmap;
-
- DECLARE_EVENT_TABLE()
-};
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-#endif // _BITMAP_PANEL_H_
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Browser.layout
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/Browser.layout 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Browser.layout 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,30 +0,0 @@
-[Editor_0]
-CursorCol=1
-CursorRow=1
-TopLine=1
-LeftChar=1
-[Editor_1]
-CursorCol=1
-CursorRow=1
-TopLine=1
-LeftChar=1
-[Editor_2]
-CursorCol=1
-CursorRow=1
-TopLine=1
-LeftChar=1
-[Editor_4]
-CursorCol=1
-CursorRow=1
-TopLine=1
-LeftChar=1
-[Editor_3]
-CursorCol=1
-CursorRow=1
-TopLine=1
-LeftChar=1
-[Editor_5]
-CursorCol=1
-CursorRow=1
-TopLine=1
-LeftChar=1
Copied: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Browser.layout (from rev 28030, scummex/branches/gsoc2007-gameresbrowser/src/gui/Browser.layout)
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Browser.layout (rev 0)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Browser.layout 2007-07-11 14:15:52 UTC (rev 28031)
@@ -0,0 +1,30 @@
+[Editor_0]
+CursorCol=1
+CursorRow=1
+TopLine=1
+LeftChar=1
+[Editor_1]
+CursorCol=1
+CursorRow=1
+TopLine=1
+LeftChar=1
+[Editor_2]
+CursorCol=1
+CursorRow=1
+TopLine=1
+LeftChar=1
+[Editor_4]
+CursorCol=1
+CursorRow=1
+TopLine=1
+LeftChar=1
+[Editor_3]
+CursorCol=1
+CursorRow=1
+TopLine=1
+LeftChar=1
+[Editor_5]
+CursorCol=1
+CursorRow=1
+TopLine=1
+LeftChar=1
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/BrowserApp.cpp 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,32 +0,0 @@
-//---------------------------------------------------------------------------
-//
-// Name: BrowserApp.cpp
-// Author: RootBoot
-// Created: 2007-06-25 17:22:35
-// Description:
-//
-//---------------------------------------------------------------------------
-
-#include "gui_stdafx.h"
-
-#include "BrowserApp.h"
-//#include "BrowserDlg.h"
-#include "MainForm.h"
-#include "guicon.h"
-
-IMPLEMENT_APP(BrowserDlgApp)
-
-bool BrowserDlgApp::OnInit() {
- RedirectIOToConsole();
- /*BrowserDlg* dialog = new BrowserDlg(NULL);
- SetTopWindow(dialog);
- dialog->Show(true);*/
- MainForm* mainForm = new MainForm(NULL);
- SetTopWindow(mainForm);
- mainForm->Show(true);
- return true;
-}
-
-int BrowserDlgApp::OnExit() {
- return 0;
-}
Copied: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.cpp (from rev 28030, scummex/branches/gsoc2007-gameresbrowser/src/gui/BrowserApp.cpp)
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.cpp (rev 0)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -0,0 +1,32 @@
+//---------------------------------------------------------------------------
+//
+// Name: BrowserApp.cpp
+// Author: RootBoot
+// Created: 2007-06-25 17:22:35
+// Description:
+//
+//---------------------------------------------------------------------------
+
+#include "gui_stdafx.h"
+
+#include "BrowserApp.h"
+//#include "BrowserDlg.h"
+#include "MainForm.h"
+#include "guicon.h"
+
+IMPLEMENT_APP(BrowserDlgApp)
+
+bool BrowserDlgApp::OnInit() {
+ RedirectIOToConsole();
+ /*BrowserDlg* dialog = new BrowserDlg(NULL);
+ SetTopWindow(dialog);
+ dialog->Show(true);*/
+ MainForm* mainForm = new MainForm(NULL);
+ SetTopWindow(mainForm);
+ mainForm->Show(true);
+ return true;
+}
+
+int BrowserDlgApp::OnExit() {
+ return 0;
+}
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/BrowserApp.h 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,22 +0,0 @@
-//---------------------------------------------------------------------------
-//
-// Name: BrowserApp.h
-// Author: RootBoot
-// Created: 2007-06-25 17:22:35
-// Description:
-//
-//---------------------------------------------------------------------------
-
-#ifndef __BROWSERDLGApp_h__
-#define __BROWSERDLGApp_h__
-
-#include "gui_stdafx.h"
-
-class BrowserDlgApp : public wxApp
-{
- public:
- bool OnInit();
- int OnExit();
-};
-
-#endif
Copied: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.h (from rev 28030, scummex/branches/gsoc2007-gameresbrowser/src/gui/BrowserApp.h)
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.h (rev 0)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -0,0 +1,22 @@
+//---------------------------------------------------------------------------
+//
+// Name: BrowserApp.h
+// Author: RootBoot
+// Created: 2007-06-25 17:22:35
+// Description:
+//
+//---------------------------------------------------------------------------
+
+#ifndef __BROWSERDLGApp_h__
+#define __BROWSERDLGApp_h__
+
+#include "gui_stdafx.h"
+
+class BrowserDlgApp : public wxApp
+{
+ public:
+ bool OnInit();
+ int OnExit();
+};
+
+#endif
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.rc
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/BrowserApp.rc 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.rc 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,10 +0,0 @@
-//---------------------------------------------------------------------------
-//
-// Name: BrowserApp.rc
-// Author: RootBoot
-// Created: 2007-06-25 17:22:35
-// Description:
-//
-//---------------------------------------------------------------------------
-
-#include <wx/msw/wx.rc>
Copied: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.rc (from rev 28030, scummex/branches/gsoc2007-gameresbrowser/src/gui/BrowserApp.rc)
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.rc (rev 0)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/BrowserApp.rc 2007-07-11 14:15:52 UTC (rev 28031)
@@ -0,0 +1,10 @@
+//---------------------------------------------------------------------------
+//
+// Name: BrowserApp.rc
+// Author: RootBoot
+// Created: 2007-06-25 17:22:35
+// Description:
+//
+//---------------------------------------------------------------------------
+
+#include <wx/msw/wx.rc>
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/DirectoryPresenter.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/DirectoryPresenter.cpp 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/DirectoryPresenter.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,240 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// DirectoryPresenter.cpp
-
-#include "gui_stdafx.h"
-
-#include "DirectoryPresenter.h"
-#include "ExplorationTree.h"
-//#include "FilePresenter.h"
-#include "oregistry.h"
-#include "ftregistry.h"
-
-#include <iostream>
-
-#include "debugmem.h"
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-SLOT_DESCS_EX(DirectoryPresenter)
- SLOT_DESC(_directorySlot, SLOT_DEFAULT)
- SLOT_DESC(_nodeSlot, SLOT_DEFAULT)
-END_DESCS
-
-bool DirectoryPresenter::doRealize(ObjectChain* ochain) {
- bool res = BObject::doRealize(ochain);
- if (!res)
- return false;
-
- _inodeprovider = _nodeSlot->getInterface();
- if (!_inodeprovider) {
- _realized = false;
- return false;
- }
-
- VirtualNode* node = _inodeprovider->getNode();
- ExplorationTree::get()->registerDirectoryPresenter(node, this);
- //ExplorationTree::get()->setItemHasChildren(node, true);
-
- //WORKAROUND: in wxMSW SetItemHasChildren does not work, so we include a Dummy:
- //wxTreeItemId dummyTreeItem = ExplorationTree::get()->appendItem(
- // node->getTreeItem(), wxT("Dummy"));
-
- _expanded = false;
-
- return true;
-}
-
-void DirectoryPresenter::doUnrealize(ObjectChain* ochain) {
- ASSERT(_inodeprovider && _inodeprovider->getNode());
- infoout << wxT("DirectoryPresenter::unrealize(): ")
- //<< (_inodeprovider ? _inodeprovider->getNode()->getTreeItemName().c_str() : wxT("<error>")) << wxT(" ")
- << (_idirectory ? _idirectory->getName().c_str() : wxT("<not expanded>")) << wxT(" ")
- << std::endl;
-
- ExplorationTree::get()->unregisterDirectoryPresenter(this);
-
- deleteKidChains();
-
- _expanded = false;
- _idirectory = NULL;
- _inodeprovider = NULL;
-
- _directorySlot->releaseInterface();
- _nodeSlot->releaseInterface();
-
- BObject::doUnrealize(ochain);
-}
-
-ObjectChain* DirectoryPresenter::prepareKidChain(const RCPtr<VirtualNode>& virtualNode, guid_list& parsers) {
-
- ObjectChain* kidchain = new ObjectChain();
-
- bool addingOk = true;
-
- addingOk &= kidchain->addObject(virtualNode);
-
- guid_list::iterator i;
- for (i = parsers.begin(); i != parsers.end(); ++i) {
- if (!addingOk)
- break;
- RCPtr<BObject> parser = ObjectRegistry::get()->getObject( *i );
- if (parser.get() == NULL) {
- errout << wxT("ERROR: DirectoryPresenter::prepareKidChain(): can't create parser: ") << (*i) << std::endl;
- addingOk = false;
- break;
- }
- addingOk &= kidchain->addObject( parser );
- }
-
- if (!addingOk) {
- //ASSERT(false); //failure here means we've got a missing plugin
- delete kidchain;
- //virtualNode is deleted automatically
- return NULL;
- }
-
- return kidchain;
-}
-
-void DirectoryPresenter::expand() {
-
- if (_expanded)
- return;
- _expanded = true;
-
- VirtualNode* parent = _inodeprovider->getNode();
- ExplorationTree::get()->deleteChildren(parent->getTreeItem()); //delete the Dummy added by the ExplorationTree
-
- _idirectory = _directorySlot->getInterface();
- if (!_idirectory) {
- errout << wxT("ERROR: DirectoryPresenter::expand(): can't get IDirectory interface.") << std::endl;
- return; //TODO: report error
- }
-
- infoout << wxT("DirectoryPresenter::expand(): ") << _idirectory->getName().c_str() << std::endl;
-
- const std::list<IDirectory*>& subdirs = _idirectory->getSubDirs();
- std::list<IDirectory*>::const_iterator j;
- for (j = subdirs.begin(); j != subdirs.end(); ++j) {
- IDirectory* idirectory = *j;
-
- wxTreeItemId kidTreeItem = ExplorationTree::get()->appendItem(
- parent->getTreeItem(), idirectory->getName());
-
- RCPtr<VirtualNode> virtualDir( new VirtualDirectory(kidTreeItem, idirectory) );
-
- VirtualNodeItemData* itemData = new VirtualNodeItemData(virtualDir.get(), NULL);
- ExplorationTree::get()->setItemData(kidTreeItem, itemData);
-
- guid_list parsers;
- //could omit it - ObjectChain::complete() would find it
- parsers.push_back( DirectoryPresenter::static_GUID() );
-
- ObjectChain* kidchain = prepareKidChain(virtualDir, parsers);
- if (!kidchain) {
- errout << wxT("ERROR: DirectoryPresenter::expand(): can't prepare kid chain for dir: ")
- << idirectory->getName() << std::endl;
- ExplorationTree::get()->deleteItem(kidTreeItem);
- } else {
- itemData->setObjectChain(kidchain);
- _kidChains.push_back(itemData);
- }
- }
-
- const std::list<IFile*>& files = _idirectory->getFiles();
- std::list<IFile*>::const_iterator i;
- for (i = files.begin(); i != files.end(); ++i) {
- IFile* ifile = *i;
-
- wxTreeItemId kidTreeItem = ExplorationTree::get()->appendItem(
- parent->getTreeItem(), ifile->getName());
-
- //CAUTION: Do *not* create BObjects with bare 'new' and expect them to work! you'll get
- // segfaults! You have to wrap them like this: RCPtr<BObject>(new BObject()),
- // or call addReference()/releaseReference() manually - so that proper
- // initialisation take place (initialize()/destroy()).
- VirtualFile* virtualFile = new VirtualFile(kidTreeItem, ifile);
- RCPtr<VirtualNode> virtualNode(virtualFile);
-
- VirtualNodeItemData* itemData = new VirtualNodeItemData(virtualFile, NULL);
- ExplorationTree::get()->setItemData(kidTreeItem, itemData);
-
- //Here we try to figure the fileType and the best parsers for it:
-
- RecognizedFileType outFileType(ifile->getFileType());
- guid_list parsers;
- if (outFileType.isOk())
- parsers = FileTypeRegistry::get()->resolveParsers(outFileType.getFileTypeGUID())._parserGUIDs;
- else {
- parsers = FileTypeRegistry::get()->resolveParsers(virtualFile, outFileType);
- ifile->setFileType(outFileType);
- }
-
- //Ok, we've got the best parsers, so create a dedicated ObjectChain:
-
- ObjectChain* kidchain = prepareKidChain(virtualNode, parsers);
- if (!kidchain) {
- errout << wxT("ERROR: DirectoryPresenter::expand(): can't prepare kid chain for file: ")
- << ifile->getName() << wxT(" file type: ") << outFileType.getFileTypeGUID() << std::endl;
- ExplorationTree::get()->deleteItem(kidTreeItem);
- } else {
- itemData->setObjectChain(kidchain);
- _kidChains.push_back(itemData);
- }
- }
-
- //realize visible items:
- //ExplorationTree::get()->realizeVisible(); done by the tree itself
-
- //now realize those chains:
- /*if (!realizeKidChains()) {
- deleteKidChains();
- errout << wxT("ERROR: DirectoryPresenter::expand(): can't realize kids.") << std::endl;
- return; //TODO: report error
- }*/
-}
-
-void DirectoryPresenter::deleteKidChains() {
- std::list<VirtualNodeItemData*>::const_iterator i;
- for (i = _kidChains.begin(); i != _kidChains.end(); ++i) {
- VirtualNodeItemData* data = *i;
- ObjectChain* kidchain = data->getObjectChain();
- ASSERT(kidchain);
- delete kidchain; //unrealize
- }
- _kidChains.clear();
-
- VirtualNode* node = _inodeprovider->getNode();
- ExplorationTree::get()->deleteChildren(node->getTreeItem());
-}
-
-bool DirectoryPresenter::realizeKidChains() {
- bool res = true;
- /*std::list<ObjectChain*>::const_iterator i;
- for (i = _kidChains.begin(); i != _kidChains.end(); ++i) {
- ObjectChain* kidchain = *i;
- kidchain->complete();
- res &= kidchain->realize();
- }*/
- return res;
-}
-
-void DirectoryPresenter::dumpObjectChains(streamout& os) {
- std::list<VirtualNodeItemData*>::const_iterator i;
- int idx = 0;
- for (i = _kidChains.begin(); i != _kidChains.end(); ++i) {
- VirtualNodeItemData* data = *i;
- ObjectChain* kidchain = data->getObjectChain();
- ASSERT(kidchain);
- kidchain->dumpObjectChain(coreString(wxT("kid")) + toString(idx), os);
- idx++;
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-}
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/DirectoryPresenter.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/DirectoryPresenter.h 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/DirectoryPresenter.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,61 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// DirectoryPresenter.h
-
-#ifndef _DIRECTORY_PRESENTER_H_
-#define _DIRECTORY_PRESENTER_H_
-
-#include "pinslot.h"
-#include "ochain.h"
-#include "CoreInterfaces.h"
-#include "VirtualNode.h"
-#include "FileTypeRecognizer.h"
-
-#include <list>
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-class INodeProvider;
-
-class DirectoryPresenter : public BObject {
- DECLARE_BOBJECT_CLASS(DirectoryPresenter, BObject)
-
-protected:
- Slot<IDirectory>* _directorySlot;
- Slot<INodeProvider>* _nodeSlot;
-
- IDirectory* _idirectory;
- INodeProvider* _inodeprovider;
- std::list<VirtualNodeItemData*> _kidChains;
-
- bool _expanded;
-
-public:
- ASSIGN_DESC(0,wxT("CoreObjects"), 1)
-
- SLOTS_DECL
-
- DirectoryPresenter()
- : _idirectory(NULL), _inodeprovider(NULL), _expanded(false) {}
-
- virtual bool doRealize(ObjectChain* ochain);
- virtual void doUnrealize(ObjectChain* ochain);
-
- virtual bool realizeKidChains();
- virtual void deleteKidChains();
-
- virtual void expand();
- ObjectChain* prepareKidChain(const RCPtr<VirtualNode>& virtualNode, guid_list& parsers);
-
- virtual void dumpObjectChains(streamout& os);
-
-};
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-}
-
-#endif //_DIRECTORY_PRESENTER_H_
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ExplorationTree.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/ExplorationTree.cpp 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ExplorationTree.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,526 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// ExplorationTree.cpp
-
-#include "gui_stdafx.h"
-
-#include "ExplorationTree.h"
-#include "PanelProvider.h"
-#include "DirectoryPresenter.h"
-
-#include "ochain.h"
-
-#include <iostream>
-
-#include <map>
-#include <list>
-
-#include "debugmem.h"
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-// private structs
-
-//information about registered panel
-struct PanelInfo {
- bool _activated;
- wxPanel* _page;
- size_t _pageIdx;
- PanelProvider* _panelProvider;
- PanelInfo(PanelProvider* panelProvider)
- : _panelProvider(panelProvider), _activated(false), _page(NULL), _pageIdx(-1) {}
-};
-
-//collection of registered panels
-struct PanelMap {
- typedef std::multimap<VirtualNode*, PanelInfo*> panel_map;
- panel_map _panelInfos;
-
- ~PanelMap() {
- cleanup();
- }
-
- void cleanup() {
- panel_map::iterator i;
- while (!_panelInfos.empty()) {
- i = _panelInfos.begin();
- PanelInfo* pinfo = i->second;
- if (pinfo->_activated)
- ExplorationTree::get()->pinfoDeactivate(pinfo); //<-- CAUTION: this uses _panelInfos!
- delete pinfo;
- _panelInfos.erase(i);
- }
- }
-
- std::list<PanelInfo*> getPanelsFor(VirtualNode* node) {
- std::list<PanelInfo*> pinfos;
-
- panel_map::iterator i;
- i = _panelInfos.find(node);
- for (; i != _panelInfos.end() && i->first == node; ++i)
- pinfos.push_back(i->second);
-
- return pinfos;
- }
-
- void unregisterPanelProvider(PanelProvider* panelProvider) {
- panel_map::iterator i;
- for (i = _panelInfos.begin(); i != _panelInfos.end(); ++i) {
- PanelInfo* pinfo = i->second;
- if (pinfo->_panelProvider != panelProvider)
- continue;
-
- if (pinfo->_activated)
- ExplorationTree::get()->pinfoDeactivate(pinfo);
-
- delete pinfo;
- _panelInfos.erase(i);
- return;
- }
- }
-
- void registerPanelProvider(VirtualNode* node, PanelProvider* panelProvider) {
- _panelInfos.insert( std::make_pair(node, new PanelInfo(panelProvider)) );
- }
-};
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-//collection of registered directories
-struct DirMap {
- typedef std::map<VirtualNode*, DirectoryPresenter*> dir_map;
- dir_map _dirInfos;
-
- ~DirMap() {
- cleanup();
- }
-
- void cleanup() {
- dir_map::iterator i;
- for (i = _dirInfos.begin(); i != _dirInfos.end(); ++i) {
- DirectoryPresenter* dir = i->second;
- ExplorationTree::get()->dirCollapsed(dir);
- }
- _dirInfos.clear();
- }
-
- DirectoryPresenter* getDirFor(VirtualNode* node) {
- dir_map::iterator i;
- i = _dirInfos.find(node);
- if (i != _dirInfos.end())
- return i->second;
-
- return NULL;
- }
-
- void unregisterDirectoryPresenter(DirectoryPresenter* dirPresenter) {
- dir_map::iterator i;
- for (i = _dirInfos.begin(); i != _dirInfos.end(); ++i) {
- DirectoryPresenter* dir = i->second;
- if (dir != dirPresenter)
- continue;
-
- ExplorationTree::get()->dirCollapsed(dir);
-
- _dirInfos.erase(i);
- return;
- }
- }
-
- void registerDirectoryPresenter(VirtualNode* node, DirectoryPresenter* dirPresenter) {
- _dirInfos.insert( std::make_pair(node, dirPresenter) );
- }
-};
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-ExplorationTree::ExplorationTree()
- : _explorationTree(NULL), _panelNotebook(NULL), _activeNode(NULL) {
- _rootObjectChain = new ObjectChain();
- _panelMap = new PanelMap();
- _dirMap = new DirMap();
- _notCompletedCount = 0;
-}
-
-ExplorationTree::~ExplorationTree() {
- _dirMap->cleanup();
- _panelMap->cleanup();
-
- delete _rootObjectChain; //unrealize
-
- delete _dirMap;
- delete _panelMap;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-ExplorationTree* ExplorationTree::_instance = NULL;
-
-/*static*/ bool ExplorationTree::canGet() {
- return _instance != NULL;
-}
-/*static*/ ExplorationTree* ExplorationTree::get() {
- ASSERT(_instance);
- return _instance;
-}
-/*static*/ void ExplorationTree::initialize(wxTreeCtrl* explorationTree, wxNotebook* panelNotebook) {
- ASSERT(!_instance);
- _instance = new ExplorationTree();
- _instance->_explorationTree = explorationTree;
- _instance->_panelNotebook = panelNotebook;
-}
-/*static*/ void ExplorationTree::release() {
- if (_instance)
- delete _instance;
- _instance = NULL;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-bool ExplorationTree::onIdleRec(const wxTreeItemId& item) {
- ASSERT_VALID_TREE_ITEM(item);
- VirtualNodeItemData* data = VirtualNodeItemData::getForNode(item);
- if (data && !data->getCompleted()) {
- ObjectChain* kidchain = data->getObjectChain();
- ASSERT(kidchain);
-
- infoout << wxT("INFO: ExplorationTree::onIdleRec(): completing") << std::endl;
- kidchain->complete();
- _notCompletedCount--;
- data->setCompleted(true);
-
- //WORKAROUND: in wxMSW SetItemHasChildren does not work, so we include a Dummy:
- if (!kidchain->isContained(DirectoryPresenter::static_GUID())) {
- ExplorationTree::get()->deleteChildren(item); //delete the Dummy added by the ExplorationTree
- }
-
- return true;
- }
- getItemText(item);
-
- wxTreeItemIdValue cookie;
- wxTreeItemId child = _explorationTree->GetFirstChild(item, cookie);
- while (child.IsOk()) {
- if (onIdleRec(child))
- return true;
- child = _explorationTree->GetNextChild(item, cookie);
- }
-
- return false;
-}
-
-bool ExplorationTree::onIdle() {
- if (_notCompletedCount <= 0)
- return false;
-
- infoout << wxT("INFO: ExplorationTree::onIdle(): trying to complete: ") << _notCompletedCount << std::endl;
- return onIdleRec(_explorationTree->GetRootItem());
-}
-
-void ExplorationTree::realizeVisible(bool dirsOnly /*= true*/) {
- wxTreeItemId item = _explorationTree->GetFirstVisibleItem();
- while (item.IsOk() &&
- _explorationTree->IsVisible(item)) { //WORKAROUND: in wxMSW this is necessary
- realizeNode(item, dirsOnly);
- item = _explorationTree->GetNextVisible(item);
- }
-}
-
-bool ExplorationTree::isNodeRealized(const wxTreeItemId& item) {
- ASSERT_VALID_TREE_ITEM(item);
- VirtualNodeItemData* data = VirtualNodeItemData::getForNode(item);
- if (!data)
- return false;
-
- return data->getRealized();
-}
-
-bool ExplorationTree::realizeNode(const wxTreeItemId& item, bool dirsOnly /*= false*/) {
- ASSERT_VALID_TREE_ITEM(item);
- VirtualNodeItemData* data = VirtualNodeItemData::getForNode(item);
- if (!data)
- return false;
-
- if (!data->getRealized()) {
-
- ObjectChain* kidchain = data->getObjectChain();
- ASSERT(kidchain);
-
- if (!data->getCompleted()) {
- kidchain->complete();
- _notCompletedCount--; //FIXME: the counting is not entirely correct
- data->setCompleted(true);
- }
-
- if (dirsOnly) {
- if (kidchain->isContained(DirectoryPresenter::static_GUID()))
- return true;
- //WORKAROUND: in wxMSW SetItemHasChildren does not work, so we include a Dummy:
- ExplorationTree::get()->deleteChildren(item); //delete the Dummy added by the ExplorationTree
- return true;
- }
-
- if (!kidchain->isContained(DirectoryPresenter::static_GUID()))
- ExplorationTree::get()->deleteChildren(item); //delete the Dummy added by the ExplorationTree
-
- wxString name = getItemText(item);
- infoout << wxT("ExplorationTree::realizeNode(): realizing chain for node: ")
- << name << std::endl;
-
- bool res = kidchain->realize();
-
- if (!res) {
- errout << wxT("ERROR: ExplorationTree::realizeNode(): can't realize chain for node: ")
- << name << std::endl;
- wxString outName = name + wxT(".dot");
- errout << wxT("Dumping Object Chain to: ") << outName << std::endl;
- kidchain->dumpObjectChain(outName);
-
- //delete kidchain;
- //deleteItem(item);
-
- return false;
- } else {
- data->setRealized(true);
- }
- }
-
- return true;
-}
-
-VirtualNode* ExplorationTree::getNode(const wxTreeItemId& item) {
- if (!realizeNode(item))
- return NULL;
-
- VirtualNodeItemData* data = VirtualNodeItemData::getForNode(item);
- if (!data)
- return NULL;
-
- return data->getNode();
-}
-
-VirtualNode* ExplorationTree::getSelectedNode() {
- wxTreeItemId item = getSelected();
- if (!item.IsOk())
- return NULL;
- VirtualNode* node = getNode(item);
- return node;
-}
-
-wxTreeItemId ExplorationTree::getSelected() {
- wxTreeItemId item = _explorationTree->GetSelection();
- return item;
-}
-
-wxTreeItemId ExplorationTree::appendItem(const wxTreeItemId& parent, wxString title) {
- ASSERT_VALID_TREE_ITEM(parent);
- wxTreeItemId item = _explorationTree->AppendItem(parent, title, -1, -1, NULL);
- ASSERT_VALID_TREE_ITEM(item);
- //_explorationTree->SetItemHasChildren(item);
- _notCompletedCount++;
- return item;
-}
-
-void ExplorationTree::deleteItem(const wxTreeItemId& item) {
- ASSERT_VALID_TREE_ITEM(item);
- VirtualNodeItemData* data = VirtualNodeItemData::getForNode(item);
- if (data && !data->getCompleted())
- _notCompletedCount--;
- _explorationTree->Delete(item);
-}
-
-void ExplorationTree::deleteChildren(const wxTreeItemId& parent) {
- ASSERT_VALID_TREE_ITEM(parent);
- _explorationTree->DeleteChildren(parent);
- //_recDel(parent, false);
-}
-
-void ExplorationTree::setItemData(const wxTreeItemId& item, wxTreeItemData* data) {
- ASSERT_VALID_TREE_ITEM(item);
- _explorationTree->SetItemData(item, data);
-}
-
-wxTreeItemData* ExplorationTree::getItemData(const wxTreeItemId& item) {
- ASSERT_VALID_TREE_ITEM(item);
- return _explorationTree->GetItemData(item);
-}
-
-wxTreeItemId ExplorationTree::getItemParent(const wxTreeItemId& item) {
- ASSERT_VALID_TREE_ITEM(item);
- wxTreeItemId parent = _explorationTree->GetItemParent(item);
- ASSERT_VALID_TREE_ITEM(parent);
- return parent;
-}
-
-wxString ExplorationTree::getItemText(const wxTreeItemId& item) {
- ASSERT_VALID_TREE_ITEM(item);
- return _explorationTree->GetItemText(item);
-}
-
-
-wxTreeItemId ExplorationTree::addRoot(wxString title) {
- wxTreeItemId item = _explorationTree->AddRoot(title, -1, -1, NULL);
- _notCompletedCount = 1;
- ASSERT_VALID_TREE_ITEM(item);
- _explorationTree->AppendItem(item, wxT("Dummy"), -1, -1, NULL); //WORKAROUND
- return item;
-}
-
-void ExplorationTree::deleteAllItems() {
- _notCompletedCount = 0;
- _explorationTree->DeleteAllItems();
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-ObjectChain* ExplorationTree::getRootObjectChain() {
- return _rootObjectChain;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-void ExplorationTree::pinfoDeactivate(PanelInfo* pinfo) {
- if (!pinfo->_activated)
- return;
-
- //_panelNotebook->GetFirstPage();
-
- pinfo->_panelProvider->panelDeactivate();
- _panelNotebook->DeletePage(pinfo->_pageIdx);
- //WORKAROUND: DeletePage is supposed to have DeletePage(wxWindow*)... but it doesn't.
- std::list<PanelInfo*> pinfos = _panelMap->getPanelsFor(_activeNode);
- std::list<PanelInfo*>::iterator i;
- for (i = pinfos.begin(); i != pinfos.end(); ++i) {
- PanelInfo* pinfo2 = *i;
- if (pinfo2->_pageIdx > pinfo->_pageIdx)
- pinfo2->_pageIdx--;
- }
- pinfo->_activated = false;
- pinfo->_page = NULL;
- pinfo->_pageIdx = -1;
-}
-
-void ExplorationTree::pinfoActivate(PanelInfo* pinfo) {
- if (pinfo->_activated)
- return;
-
- wxPanel* panel = new wxPanel(_panelNotebook);
- _panelNotebook->AddPage(panel, pinfo->_panelProvider->getPanelTitle());
- pinfo->_activated = true;
- pinfo->_page = panel;
- pinfo->_pageIdx = _panelNotebook->GetPageCount() - 1;
- pinfo->_panelProvider->panelActivate(panel);
-}
-
-void ExplorationTree::nodeDeactivate() {
- if (_activeNode == NULL)
- return;
-
- std::list<PanelInfo*> pinfos = _panelMap->getPanelsFor(_activeNode);
- std::list<PanelInfo*>::iterator i;
- for (i = pinfos.begin(); i != pinfos.end(); ++i) {
- pinfoDeactivate(*i);
- }
-
- _activeNode = NULL;
-}
-
-void ExplorationTree::nodeActivated(VirtualNode* activatedNode) {
- if (activatedNode != _activeNode)
- nodeDeactivate();
- _activeNode = activatedNode;
- if (!_activeNode)
- return;
-
- std::list<PanelInfo*> pinfos = _panelMap->getPanelsFor(activatedNode);
- std::list<PanelInfo*>::iterator i;
- for (i = pinfos.begin(); i != pinfos.end(); ++i) {
- pinfoActivate(*i);
- }
-}
-
-void ExplorationTree::itemActivated(wxTreeItemId item) {
- VirtualNode* node = getNode(item);
- if (node)
- nodeActivated(node);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-void ExplorationTree::dirCollapsed(DirectoryPresenter* dirPresenter) {
- //nop
-}
-
-void ExplorationTree::dirExpanded(DirectoryPresenter* dirPresenter) {
- if (!dirPresenter)
- return;
-
- dirPresenter->expand();
-}
-
-void ExplorationTree::nodeExpanded(VirtualNode* expandedNode) {
- if (!expandedNode)
- return;
-
- DirectoryPresenter* dirPresenter = _dirMap->getDirFor(expandedNode);
- dirExpanded(dirPresenter);
-}
-
-void ExplorationTree::itemExpanding(wxTreeItemId item) {
- VirtualNode* node = getNode(item);
- if (node)
- nodeExpanded(node);
-}
-
-void ExplorationTree::itemExpanded(wxTreeItemId item) {
- VirtualNode* node = getNode(item);
- if (node) {
- //realizeVisible();
-
- //TODO: make it nicer
- //WORKAROUND: adding Dummies
- ASSERT_VALID_TREE_ITEM(item);
- wxTreeItemIdValue cookie;
- wxTreeItemId child = _explorationTree->GetFirstChild(item, cookie);
- while (child.IsOk()) {
- if (!isNodeRealized(child)) {
- wxTreeItemIdValue cookie2;
- wxTreeItemId child2 = _explorationTree->GetFirstChild(child, cookie2);
- if (!child2.IsOk())
- _explorationTree->AppendItem(child, wxT("Dummy"), -1, -1, NULL); //WORKAROUND
- }
-
- child = _explorationTree->GetNextChild(item, cookie);
- }
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-void ExplorationTree::registerPanelProvider(VirtualNode* node, PanelProvider* panelProvider) {
- _panelMap->registerPanelProvider(node, panelProvider);
-}
-void ExplorationTree::unregisterPanelProvider(PanelProvider* panelProvider) {
- _panelMap->unregisterPanelProvider(panelProvider);
-}
-
-void ExplorationTree::registerDirectoryPresenter(VirtualNode* node, DirectoryPresenter* dirPresenter) {
- _dirMap->registerDirectoryPresenter(node, dirPresenter);
-}
-void ExplorationTree::unregisterDirectoryPresenter(DirectoryPresenter* dirPresenter) {
- _dirMap->unregisterDirectoryPresenter(dirPresenter);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-}
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ExplorationTree.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/ExplorationTree.h 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ExplorationTree.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,105 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// ExplorationTree.h
-
-#ifndef _EXPLORATION_TREE_H_
-#define _EXPLORATION_TREE_H_
-
-#include <wx/wx.h>
-
-#include <wx/notebook.h>
-#include <wx/treectrl.h>
-#include <wx/panel.h>
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-#define ASSERT_VALID_TREE_ITEM(item) \
- ASSERT(item.IsOk())
-
-struct PanelInfo;
-struct PanelMap;
-struct DirMap;
-class VirtualNode;
-class PanelProvider;
-class DirectoryPresenter;
-class ObjectChain;
-
-//ExplorationTree's items does not hold any objects by reference. They do however hold
-//them via SetItemData( new VirtualNodeItemData(BObject*) ).
-//ExplorationTree holds objects by reference via _rootObjectChain, though.
-class ExplorationTree {
- static ExplorationTree* _instance;
-
- wxTreeCtrl* _explorationTree;
- wxNotebook* _panelNotebook;
-
- ObjectChain* _rootObjectChain;
-
- PanelMap* _panelMap;
- VirtualNode* _activeNode;
- DirMap* _dirMap;
-
- int _notCompletedCount;
-
-private:
- ExplorationTree();
- ~ExplorationTree();
-
-public:
- static bool canGet();
- static ExplorationTree* get();
- static void release();
-
- static void initialize(wxTreeCtrl* explorationTree, wxNotebook* panelNotebook);
-
- //static wxTreeCtrl* _getTree();
- //wxTreeCtrl* getTree();
- bool onIdleRec(const wxTreeItemId& item);
- bool onIdle();
- void realizeVisible(bool dirsOnly = true);
- bool isNodeRealized(const wxTreeItemId& item);
- bool realizeNode(const wxTreeItemId& item, bool dirsOnly = false);
- VirtualNode* getNode(const wxTreeItemId& item);
- VirtualNode* getSelectedNode();
-
- wxTreeItemId getSelected();
- wxTreeItemId appendItem(const wxTreeItemId& parent, wxString title);
- void deleteItem(const wxTreeItemId& item);
- void deleteChildren(const wxTreeItemId& parent);
- void setItemData(const wxTreeItemId& item, wxTreeItemData* data);
- wxTreeItemData* getItemData(const wxTreeItemId& item);
- wxTreeItemId getItemParent(const wxTreeItemId& item);
- wxString getItemText(const wxTreeItemId& item);
- wxTreeItemId addRoot(wxString title);
- void deleteAllItems();
-
- ObjectChain* getRootObjectChain();
-
- void pinfoDeactivate(PanelInfo* pinfo);
- void pinfoActivate(PanelInfo* pinfo);
- void nodeDeactivate();
- void nodeActivated(VirtualNode* activatedNode);
-
- void dirCollapsed(DirectoryPresenter* dirPresenter);
- void dirExpanded(DirectoryPresenter* dirPresenter);
- void nodeExpanded(VirtualNode* expandedNode);
-
- void itemActivated(wxTreeItemId item);
- void itemExpanding(wxTreeItemId item);
- void itemExpanded(wxTreeItemId item);
-
- void registerPanelProvider(VirtualNode* node, PanelProvider* panelProvider);
- void unregisterPanelProvider(PanelProvider* panelProvider);
-
- void registerDirectoryPresenter(VirtualNode* node, DirectoryPresenter* dirPresenter);
- void unregisterDirectoryPresenter(DirectoryPresenter* dirPresenter);
-};
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-}
-
-#endif //_EXPLORATION_TREE_H_
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/FileInfoPresenter.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/FileInfoPresenter.cpp 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/FileInfoPresenter.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,161 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// FileInfoPresenter.cpp
-
-#include "gui_stdafx.h"
-
-#include "FileInfoPresenter.h"
-
-#include <wx/filedlg.h>
-#include <wx/wfstream.h>
-
-#include "wx2scstream.h"
-
-#include <iostream>
-
-wxFrame* getMainForm();
-
-#include "debugmem.h"
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-PIN_DESCS_EX(FileInfoPresenter)
- PIN_DESC_r(_panelRecieverPin, PIN_DEFAULT, getPanelRecieverImpl, IPanelRecieverImpl)
-END_DESCS
-
-SLOT_DESCS_EX(FileInfoPresenter)
- SLOT_DESC(_fileSlot, SLOT_DEFAULT)
-END_DESCS
-
-IPanelRecieverImpl* FileInfoPresenter::getPanelRecieverImpl() {
- //infoout << wxT("TextPresenter::getPanelRecieverImpl(): ") << std::endl;
- return new IPanelRecieverImpl(this);
-}
-
-
-coreString FileInfoPresenter::getPanelTitle() {
- return wxT("File Info");
-}
-
-void FileInfoPresenter::panelActivate(wxPanel* panel) {
- //infoout << wxT("TextPresenter::panelActivate()") << std::endl;
-
- wxString text = getInfo();
-
- wxBoxSizer *panelsizer = new wxBoxSizer( wxVERTICAL );
-
- wxTextCtrl *textCtrl = new wxTextCtrl(panel, wxID_ANY, text, wxPoint(5,5), wxSize(200,200), wxTE_READONLY | wxTE_RICH | wxTE_MULTILINE, wxDefaultValidator, wxT("textCtrl"));
- panelsizer->Add(textCtrl, 1, wxALL|wxEXPAND, 0);
- wxButton *dumpButton = new wxButton(panel, wxID_ANY, wxT("Dump File"), wxPoint(167,450), wxSize(75,25), 0, wxDefaultValidator, wxT("dumpButton"));
- panelsizer->Add(dumpButton, 0, wxALL, 0);
-
- panel->SetAutoLayout(true);
- panel->SetSizer(panelsizer);
-
- panel->Layout();
-
- dumpButton->Connect(dumpButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
- wxCommandEventHandler(DumpFileEvtHandler::dumpButtonClick), NULL, &_evtHelper);
-}
-
-void FileInfoPresenter::panelDeactivate() {
- //infoout << wxT("TextPresenter::panelDeactivate()") << std::endl;
-}
-
-void DumpFileEvtHandler::dumpButtonClick(wxCommandEvent& event) {
- _that->dumpFile();
-}
-
-void FileInfoPresenter::dumpFile() {
- //infoout << wxT("FileInfoPresenter::dumpFile(): ") << std::endl;
-
- IFile* ifile = _fileSlot->getInterface();
- if (!ifile) {
- errout << wxT("FilePresenter::dumpFile(): could not get IFile interface") << std::endl;
- return;
- }
-
- Common::SeekableReadStream* stream = ifile->getStream();
- if (!stream) {
- errout << wxT("FilePresenter::dumpFile(): null stream") << std::endl;
- _fileSlot->releaseInterface();
- return;
- }
-
- wxFileDialog *saveDlg;
- saveDlg = new wxFileDialog(getMainForm(), wxT("Choose a file"), wxT(""), ifile->getName(), wxT("*.*"), wxSAVE | wxOVERWRITE_PROMPT);
- int res = saveDlg->ShowModal();
-
- if (res == wxID_OK) {
- wxString fileName = saveDlg->GetPath();
- wxFileOutputStream out(fileName);
- if (!out.IsOk()) {
- //errout << wxT("FilePresenter::dumpFile(): could not write file") << std::endl;
- wxMessageBox(wxString(wxT("Could not open out stream: ")) + fileName,
- wxT("Dumping File Failed"), wxOK | wxICON_ERROR, getMainForm());
- } else {
- stream->seek(0, SEEK_SET);
- wxInputStream* input = new wxScummInputStream(stream);
- out.Write(*input);
- delete input;
- if (!out.IsOk() /*HACK: see wxScummInputStream::OnSysRead() || stream->ioFailed()*/) {
- wxMessageBox(wxString(wxT("Error writing file: ")) + fileName,
- wxT("Dumping File Failed"), wxOK | wxICON_ERROR, getMainForm());
- }
- }
- }
-
- saveDlg->Destroy();
-
- _fileSlot->releaseInterface();
-}
-
-wxString FileInfoPresenter::getInfo() {
- //infoout << wxT("FileInfoPresenter::getInfo(): ") << std::endl;
- IFile* ifile = _fileSlot->getInterface();
- if (!ifile) {
- errout << wxT("FilePresenter::getInfo(): could not get IFile interface") << std::endl;
- return wxT("ERROR: could not get IFile interface");
- }
-
- wxString text;
-
- text << wxT("File name: ") << ifile->getName() << wxEndl();
- text << wxT("File type: ");
- if (ifile->getFileType().isOk())
- text << toStringEx(ifile->getFileType().getFileTypeGUID().identifier) << wxEndl();
- else
- text << wxT("Unknown") << wxEndl();
- IDirectory* idir = ifile->getParentDirectory();
- if (!idir) {
- text << wxT("No directory info.") << wxEndl();
- } else {
- text << wxT("Parent directory: ") << idir->getName() << wxEndl();
- text << wxT("Directory type: ");
- if (idir->getDirectoryFileType().isOk())
- text << toStringEx(idir->getDirectoryFileType().getFileTypeGUID().identifier) << wxEndl();
- else
- text << wxT("Unknown") << wxEndl();
- }
-
- Common::SeekableReadStream* stream = ifile->getStream();
- if (!stream) {
- text << wxT("ERROR while getting Stream") << wxEndl();
- } else {
- uint32 p = stream->pos();
- uint32 s = stream->size();
- text << wxT("Size: ") << s << wxEndl();
- //text << wxT("Current position in file: ") << p << wxEndl();
- }
-
- _fileSlot->releaseInterface();
-
- return text;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-} // namespace Browser
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/FileInfoPresenter.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/FileInfoPresenter.h 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/FileInfoPresenter.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,60 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// FileInfoPresenter.h
-
-#ifndef _FILE_INFO_PRESENTER_H_
-#define _FILE_INFO_PRESENTER_H_
-
-#include <wx/wx.h>
-
-#include "PanelProvider.h"
-#include "CoreInterfaces.h"
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-class FileInfoPresenter;
-
-struct DumpFileEvtHandler : public wxEvtHandler {
- FileInfoPresenter* _that;
- DumpFileEvtHandler(FileInfoPresenter* that)
- : _that(that) {}
- void dumpButtonClick(wxCommandEvent& event);
-};
-
-class FileInfoPresenter : public BObject, public PanelReciever {
- DECLARE_BOBJECT_CLASS(FileInfoPresenter, BObject)
-
- friend class DumpFileEvtHandler;
-protected:
- Slot<IFile>* _fileSlot;
- Pin<IPanelReciever>* _panelRecieverPin;
-
- DumpFileEvtHandler _evtHelper;
-
-public:
- ASSIGN_DESC(0, wxT("CoreObjects"), 1)
-
- PINS_DECL
- SLOTS_DECL
-
- FileInfoPresenter()
- : _evtHelper(this) {}
-
- virtual coreString getPanelTitle();
- virtual void panelActivate(wxPanel* panel);
- virtual void panelDeactivate();
-
- IPanelRecieverImpl* getPanelRecieverImpl();
-
- void dumpFile();
- wxString getInfo();
-};
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-} // namespace Browser
-
-#endif //_FILE_INFO_PRESENTER_H_
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/HtmlPresenter.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/HtmlPresenter.cpp 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/HtmlPresenter.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,95 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// TextPresenter.cpp
-
-#include "gui_stdafx.h"
-
-#include "HtmlPresenter.h"
-
-#include "CoreInterfaces.h"
-
-#include <wx/html/htmlwin.h>
-
-#include <iostream>
-
-#include "debugmem.h"
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-PIN_DESCS_EX(HtmlPresenter)
- PIN_DESC_r(_panelRecieverPin, PIN_DEFAULT, getPanelRecieverImpl, IPanelRecieverImpl)
-END_DESCS
-
-SLOT_DESCS_EX(HtmlPresenter)
- SLOT_DESC(_urlSlot, SLOT_DEFAULT)
-END_DESCS
-
-bool HtmlPresenter::doRealize(ObjectChain* ochain) {
- bool res = BObject::doRealize(ochain);
- if (!res)
- return false;
-
- return true;
-}
-
-void HtmlPresenter::doUnrealize(ObjectChain* ochain) {
- _iurl = NULL;
- _urlSlot->releaseInterface();
-
- BObject::doUnrealize(ochain);
-}
-
-IPanelRecieverImpl* HtmlPresenter::getPanelRecieverImpl() {
- //infoout << wxT("HtmlPresenter::getPanelRecieverImpl(): ") << std::endl;
- return new IPanelRecieverImpl(this);
-}
-
-
-coreString HtmlPresenter::getPanelTitle() {
- _iurl = _urlSlot->getInterface();
- if (!_iurl) {
- errout << wxT("HtmlPresenter::getPanelTitle(): could not get IText interface") << std::endl;
- return wxT("ERROR");
- }
-
- return _iurl->getTitle();
-}
-
-void HtmlPresenter::panelActivate(wxPanel* panel) {
- //infoout << wxT("HtmlPresenter::panelActivate()") << std::endl;
-
- _iurl = _urlSlot->getInterface();
- if (!_iurl) {
- errout << wxT("HtmlPresenter::panelActivate(): could not get IText interface") << std::endl;
- return;
- }
-
- if (_iurl->isEmpty())
- return;
- const wxString& url = _iurl->getUrl();
- if (url.IsEmpty())
- return;
-
- wxBoxSizer *panelsizer = new wxBoxSizer( wxVERTICAL );
-
- wxHtmlWindow *htmlWindow = new wxHtmlWindow(panel, -1, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO, wxT("htmlWindow"));
- panelsizer->Add(htmlWindow, 1, wxALL|wxEXPAND, 0);
-
- panel->SetAutoLayout(true);
- panel->SetSizer(panelsizer);
-
- panel->Layout();
-
- htmlWindow->LoadPage(url);
-}
-
-void HtmlPresenter::panelDeactivate() {
- //infoout << wxT("HtmlPresenter::panelDeactivate()") << std::endl;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-} // namespace Browser
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/HtmlPresenter.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/HtmlPresenter.h 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/HtmlPresenter.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,50 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// HtmlPresenter.h
-
-#ifndef _HTML_PRESENTER_H_
-#define _HTML_PRESENTER_H_
-
-#include <wx/wx.h>
-
-#include "PanelProvider.h"
-#include "CoreInterfaces.h"
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-class HtmlPresenter : public BObject, public PanelReciever {
- DECLARE_BOBJECT_CLASS(HtmlPresenter, BObject)
-
-protected:
- Slot<IUrl>* _urlSlot;
- Pin<IPanelReciever>* _panelRecieverPin;
-
- IUrl* _iurl;
-
-public:
- ASSIGN_DESC(0, wxT("CoreObjects"), 1)
-
- PINS_DECL
- SLOTS_DECL
-
- HtmlPresenter()
- : _iurl(NULL) {}
-
- virtual bool doRealize(ObjectChain* ochain);
- virtual void doUnrealize(ObjectChain* ochain);
-
- virtual coreString getPanelTitle();
- virtual void panelActivate(wxPanel* panel);
- virtual void panelDeactivate();
-
- IPanelRecieverImpl* getPanelRecieverImpl();
-};
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-} // namespace Browser
-
-#endif //_HTML_PRESENTER_H_
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ImagePresenter.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/ImagePresenter.cpp 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ImagePresenter.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,129 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// ImagePresenter.cpp
-
-#include "gui_stdafx.h"
-
-#include "ImagePresenter.h"
-
-#include "GUIInterfaces.h"
-#include "BitmapPanel.h"
-
-#include <iostream>
-
-wxFrame* getMainForm();
-
-#include "debugmem.h"
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-PIN_DESCS_EX(ImagePresenter)
- PIN_DESC_r(_panelRecieverPin, PIN_DEFAULT, getPanelRecieverImpl, IPanelRecieverImpl)
-END_DESCS
-
-SLOT_DESCS_EX(ImagePresenter)
- SLOT_DESC(_imageSlot, SLOT_DEFAULT)
-END_DESCS
-
-IPanelRecieverImpl* ImagePresenter::getPanelRecieverImpl() {
- //infoout << wxT("ImagePresenter::getPanelRecieverImpl(): ") << std::endl;
- return new IPanelRecieverImpl(this);
-}
-
-
-ImagePresenter::ImagePresenter()
-: _bitmap(NULL), _evtHelper(this) {}
-
-ImagePresenter::~ImagePresenter() {
- if (_bitmap)
- delete _bitmap;
-}
-
-coreString ImagePresenter::getPanelTitle() {
- return wxT("Image");
-}
-
-void ImagePresenter::panelActivate(wxPanel* panel) {
- //infoout << wxT("ImagePresenter::panelActivate()") << std::endl;
-
- create();
- if (!_bitmap)
- return;
-
- wxBoxSizer *panelsizer = new wxBoxSizer( wxVERTICAL );
-
- wxPanel *bmpPanel = new BitmapPanel(panel, *_bitmap);
- panelsizer->Add(bmpPanel, 1, wxALL|wxEXPAND, 0);
- wxButton *dumpButton = new wxButton(panel, wxID_ANY, wxT("Dump Image"), wxPoint(167,450), wxSize(75,25), 0, wxDefaultValidator, wxT("dumpButton"));
- panelsizer->Add(dumpButton, 0, wxALL, 0);
-
- panel->SetAutoLayout(true);
- panel->SetSizer(panelsizer);
-
- panel->Layout();
-
- dumpButton->Connect(dumpButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
- wxCommandEventHandler(DumpImageEvtHandler::dumpButtonClick), NULL, &_evtHelper);
-}
-
-void ImagePresenter::panelDeactivate() {
- //infoout << wxT("ImagePresenter::panelDeactivate()") << std::endl;
-}
-
-void ImagePresenter::create() {
- //infoout << wxT("ImagePresenter::create()") << std::endl;
-
- if (_bitmap)
- return;
-
- IImage* iimage = _imageSlot->getInterface();
- if (!iimage) {
- errout << wxT("ImagePresenter::create(): could not get IImage interface") << std::endl;
- return;
- }
-
- //std::cout << wxT(" -- bitmap: ") << bitmap->getBitmap() << std::endl;
- wxImage* image = iimage->getImage();
- if (!image) {
- errout << wxT("ImagePresenter::create(): could not get wxImage from IImage interface") << std::endl;
- _imageSlot->releaseInterface();
- return;
- }
-
- _bitmap = new wxBitmap(*image);
- _imageSlot->releaseInterface();
-}
-
-void DumpImageEvtHandler::dumpButtonClick(wxCommandEvent& event) {
- _that->dumpImage();
-}
-
-void ImagePresenter::dumpImage() {
- //infoout << wxT("FileInfoPresenter::dumpFile(): ") << std::endl;
-
- create();
- if (!_bitmap)
- return;
-
- wxFileDialog *saveDlg;
- saveDlg = new wxFileDialog(getMainForm(), wxT("Choose a file"), wxT(""), wxT("image.bmp"), wxT("*.bmp"), wxSAVE | wxOVERWRITE_PROMPT);
- int res = saveDlg->ShowModal();
-
- if (res == wxID_OK) {
- wxString fileName = saveDlg->GetPath();
- bool res = _bitmap->SaveFile(fileName, wxBITMAP_TYPE_BMP);
- if (!res) {
- wxMessageBox(wxString(wxT("Error writing file: ")) + fileName,
- wxT("Dumping Image Failed"), wxOK | wxICON_ERROR, getMainForm());
- }
- }
-
- saveDlg->Destroy();
-}
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-} // namespace Browser
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ImagePresenter.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/ImagePresenter.h 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/ImagePresenter.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,60 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// ImagePresenter.h
-
-#ifndef _IMAGE_PRESENTER_H_
-#define _IMAGE_PRESENTER_H_
-
-#include <wx/wx.h>
-
-#include "PanelProvider.h"
-#include "GUIInterfaces.h"
-
-namespace Browser {
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-class ImagePresenter;
-
-struct DumpImageEvtHandler : public wxEvtHandler {
- ImagePresenter* _that;
- DumpImageEvtHandler(ImagePresenter* that)
- : _that(that) {}
- void dumpButtonClick(wxCommandEvent& event);
-};
-
-class ImagePresenter : public BObject, public PanelReciever {
- DECLARE_BOBJECT_CLASS(ImagePresenter, BObject)
-
-protected:
- Slot<IImage>* _imageSlot;
- Pin<IPanelReciever>* _panelRecieverPin;
-
- wxBitmap* _bitmap;
-
- DumpImageEvtHandler _evtHelper;
-
-public:
- ASSIGN_DESC(0,wxT("CoreObjects"), 1)
-
- PINS_DECL
- SLOTS_DECL
-
- ImagePresenter();
- ~ImagePresenter();
-
- virtual coreString getPanelTitle();
- virtual void panelActivate(wxPanel* panel);
- virtual void panelDeactivate();
- virtual void create();
- virtual void dumpImage();
-
- IPanelRecieverImpl* getPanelRecieverImpl();
-};
-
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-
-} // namespace Browser
-
-#endif //_IMAGE_PRESENTER_H_
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/MainForm.cpp 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,194 +0,0 @@
-//---------------------------------------------------------------------------
-//
-// Name: MainForm.cpp
-// Author: Zbyl
-// Created: 2007-07-01 11:17:49
-// Description: MainForm class implementation
-//
-//---------------------------------------------------------------------------
-
-#include "gui_stdafx.h"
-
-#include "MainForm.h"
-
-#include <fstream>
-
-#include "ExplorationTree.h"
-#include "oregistry.h"
-#include "ftregistry.h"
-
-#include "safe_static.h"
-
-#include "debugmem.h"
-
-using namespace Browser;
-
-//Do not add custom headers between
-//Header Include Start and Header Include End
-//wxDev-C++ designer will remove them
-////Header Include Start
-////Header Include End
-
-//----------------------------------------------------------------------------
-// MainForm
-//----------------------------------------------------------------------------
-//Add Custom Events only in the appropriate block.
-//Code added in other places will be removed by wxDev-C++
-////Event Table Start
-BEGIN_EVENT_TABLE(MainForm,wxFrame)
- ////Manual Code Start
- ////Manual Code End
-
- EVT_CLOSE(MainForm::OnClose)
- EVT_IDLE(MainForm::MainFormIdle)
- EVT_MENU(ID_OPEN, MainForm::OnOpen)
- EVT_MENU(wxID_EXIT, MainForm::OnExit)
- EVT_MENU(ID_DUMPROOTOBJECTCHAIN, MainForm::OnDumpRootObjectChain)
- EVT_MENU(ID_DUMPCURRENTOBJECTCHAIN, MainForm::OnDumpCurrentObjectChain)
- EVT_MENU(ID_ACTIVATENODE, MainForm::OnActivateNode)
- EVT_MENU(ID_TEST1, MainForm::OnTest1)
- EVT_MENU(ID_TEST1_CLEANUP, MainForm::OnTest1Cleanup)
- EVT_MENU(ID_TEST0, MainForm::OnTest0)
- EVT_MENU(ID_TEST2, MainForm::OnTest2)
-
- EVT_TREE_ITEM_ACTIVATED(ID_BROWSERTREE,MainForm::browserTreeItemActivated)
- EVT_TREE_ITEM_EXPANDED(ID_BROWSERTREE,MainForm::browserTreeItemExpanded)
- EVT_TREE_ITEM_EXPANDING(ID_BROWSERTREE,MainForm::browserTreeItemExpanding)
-END_EVENT_TABLE()
-////Event Table End
-
-wxFrame* getMainForm() {
- return MainForm::getMainForm();
-}
-
-MainForm* MainForm::_mainForm = NULL;
-/*static*/ MainForm* MainForm::getMainForm() {
- ASSERT(_mainForm);
- return _mainForm;
-}
-
-MainForm::MainForm(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
-: wxFrame(parent, id, title, position, size, style) {
- CreateGUIControls();
- //SetClientSize( wxSize(640, 480) );
- //GetSizer()->SetMinSize(640, 480);
- //mainPanel->SetMinSize( wxSize(400, 300) );
- //mainPanel->SetSize( wxSize(400, 300) );
- //Layout();
- WxSplitterWindow1->SetSashGravity(0.3);
-
- _mainForm = this;
- ExplorationTree::initialize(browserTree, browserNotebook);
- /*_timer = new wxTimer();
- _timer->SetOwner(this, 5);
- this->Connect(5, wxEVT_TIMER, wxTimerEventHandler(MainForm::OnTimer));
- _timer->Start(300);*/
-
- wxChar* leak = new wxChar[5]; // a deliberate memory leak
- leak[0] = 'L'; leak[1] = 'E'; leak[2] = 'A'; leak[3] = 'K'; leak[4] = '\0';
-}
-
-void MainForm::ZCleanup() {
-
- /*_timer->Stop();*/
- /*delete _timer;*/
-
- //this->Disconnect(_timer.GetId(), wxEVT_TIMER, wxTimerEventHandler(MainForm::OnTimer));
- //_timer.SetOwner(NULL);
-
- InitializedObjects::get()->report();
-
- ExplorationTree::release();
- InitializedObjects::get()->report();
-
- FileTypeRegistry::release();
- InitializedObjects::get()->report();
-
- ObjectRegistry::release();
- InitializedObjects::get()->report();
-
- InitializedObjects::release();
-
- set_statics_not_allowed();
- _mainForm = NULL;
-}
-
-MainForm::~MainForm() {
-}
-
-void MainForm::CreateGUIControls() {
- //Do not add custom code between
- //GUI Items Creation Start and GUI Items Creation End
- //wxDev-C++ designer will remove them.
- //Add the custom code before or after the blocks
- ////GUI Items Creation Start
-
- WxBoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
- this->SetSizer(WxBoxSizer1);
- this->SetAutoLayout(true);
-
- WxSplitterWindow1 = new wxSplitterWindow(this, ID_WXSPLITTERWINDOW1, wxPoint(0,0), wxSize(578,392));
- WxSplitterWindow1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
- WxBoxSizer1->Add(WxSplitterWindow1,1,wxEXPAND | wxALL,0);
-
- browserTree = new wxTreeCtrl(WxSplitterWindow1, ID_BROWSERTREE, wxPoint(5,5), wxSize(185,382), wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT);
- browserTree->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
-
- mainPanel = new wxPanel(WxSplitterWindow1, ID_MAINPANEL, wxPoint(200,8), wxSize(363,376));
- mainPanel->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
-
- WxBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
- mainPanel->SetSizer(WxBoxSizer2);
- mainPanel->SetAutoLayout(true);
-
- browserNotebook = new wxNotebook(mainPanel, ID_BROWSERNOTEBOOK, wxPoint(5,5),wxSize(309,337));
- browserNotebook->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
- WxBoxSizer2->Add(browserNotebook,1,wxEXPAND | wxALL,5);
-
- WxMenuBar1 = new wxMenuBar();
- wxMenu *ID_FILE_MENU_Mnu_Obj = new wxMenu(0);
- ID_FILE_MENU_Mnu_Obj->Append(ID_OPEN, wxT("Open..."), wxT(""), wxITEM_NORMAL);
- ID_FILE_MENU_Mnu_Obj->AppendSeparator();
- ID_FILE_MENU_Mnu_Obj->Append(wxID_EXIT, wxT("Exit"), wxT(""), wxITEM_NORMAL);
- WxMenuBar1->Append(ID_FILE_MENU_Mnu_Obj, wxT("File"));
-
- wxMenu *ID_COMMANDS_MENU_Mnu_Obj = new wxMenu(0);
- ID_COMMANDS_MENU_Mnu_Obj->Append(ID_DUMPROOTOBJECTCHAIN, wxT("Dump Root Object Chain"), wxT(""), wxITEM_NORMAL);
- ID_COMMANDS_MENU_Mnu_Obj->Enable(ID_DUMPROOTOBJECTCHAIN,false);
- ID_COMMANDS_MENU_Mnu_Obj->Append(ID_DUMPCURRENTOBJECTCHAIN, wxT("Dump Current Object Chain"), wxT(""), wxITEM_NORMAL);
- ID_COMMANDS_MENU_Mnu_Obj->Append(ID_ACTIVATENODE, wxT("Activate Node"), wxT(""), wxITEM_NORMAL);
- WxMenuBar1->Append(ID_COMMANDS_MENU_Mnu_Obj, wxT("Commands"));
-
- wxMenu *ID_TEST_MENU_Mnu_Obj = new wxMenu(0);
- ID_TEST_MENU_Mnu_Obj->Append(ID_TEST1, wxT("Test1 - No Scumm Plugins"), wxT(""), wxITEM_NORMAL);
- ID_TEST_MENU_Mnu_Obj->Append(ID_TEST1_CLEANUP, wxT("Test Cleanup"), wxT(""), wxITEM_NORMAL);
- ID_TEST_MENU_Mnu_Obj->Append(ID_TEST0, wxT("Test0 - No Scumm Plugins"), wxT(""), wxITEM_NORMAL);
- ID_TEST_MENU_Mnu_Obj->Append(ID_TEST2, wxT("Test2 - With Scumm Plugins"), wxT(""), wxITEM_NORMAL);
- WxMenuBar1->Append(ID_TEST_MENU_Mnu_Obj, wxT("Tests"));
- SetMenuBar(WxMenuBar1);
-
- WxSplitterWindow1->SplitVertically(browserTree,mainPanel,185);
-
- SetTitle(wxT("Game Resource Browser"));
- SetIcon(wxNullIcon);
-
- GetSizer()->Layout();
- GetSizer()->Fit(this);
- GetSizer()->SetSizeHints(this);
- Center();
-
- ////GUI Items Creation End
-}
-
-void MainForm::OnClose(wxCloseEvent& event) {
- ZCleanup();
- Destroy();
-}
-
-/*
- * OnExit
- */
-void MainForm::OnExit(wxCommandEvent& event) {
- Close(true);
-}
-
Copied: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp (from rev 28030, scummex/branches/gsoc2007-gameresbrowser/src/gui/MainForm.cpp)
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp (rev 0)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp 2007-07-11 14:15:52 UTC (rev 28031)
@@ -0,0 +1,194 @@
+//---------------------------------------------------------------------------
+//
+// Name: MainForm.cpp
+// Author: Zbyl
+// Created: 2007-07-01 11:17:49
+// Description: MainForm class implementation
+//
+//---------------------------------------------------------------------------
+
+#include "gui_stdafx.h"
+
+#include "MainForm.h"
+
+#include <fstream>
+
+#include "ExplorationTree.h"
+#include "oregistry.h"
+#include "ftregistry.h"
+
+#include "safe_static.h"
+
+#include "debugmem.h"
+
+using namespace Browser;
+
+//Do not add custom headers between
+//Header Include Start and Header Include End
+//wxDev-C++ designer will remove them
+////Header Include Start
+////Header Include End
+
+//----------------------------------------------------------------------------
+// MainForm
+//----------------------------------------------------------------------------
+//Add Custom Events only in the appropriate block.
+//Code added in other places will be removed by wxDev-C++
+////Event Table Start
+BEGIN_EVENT_TABLE(MainForm,wxFrame)
+ ////Manual Code Start
+ ////Manual Code End
+
+ EVT_CLOSE(MainForm::OnClose)
+ EVT_IDLE(MainForm::MainFormIdle)
+ EVT_MENU(ID_OPEN, MainForm::OnOpen)
+ EVT_MENU(wxID_EXIT, MainForm::OnExit)
+ EVT_MENU(ID_DUMPROOTOBJECTCHAIN, MainForm::OnDumpRootObjectChain)
+ EVT_MENU(ID_DUMPCURRENTOBJECTCHAIN, MainForm::OnDumpCurrentObjectChain)
+ EVT_MENU(ID_ACTIVATENODE, MainForm::OnActivateNode)
+ EVT_MENU(ID_TEST1, MainForm::OnTest1)
+ EVT_MENU(ID_TEST1_CLEANUP, MainForm::OnTest1Cleanup)
+ EVT_MENU(ID_TEST0, MainForm::OnTest0)
+ EVT_MENU(ID_TEST2, MainForm::OnTest2)
+
+ EVT_TREE_ITEM_ACTIVATED(ID_BROWSERTREE,MainForm::browserTreeItemActivated)
+ EVT_TREE_ITEM_EXPANDED(ID_BROWSERTREE,MainForm::browserTreeItemExpanded)
+ EVT_TREE_ITEM_EXPANDING(ID_BROWSERTREE,MainForm::browserTreeItemExpanding)
+END_EVENT_TABLE()
+////Event Table End
+
+wxFrame* getMainForm() {
+ return MainForm::getMainForm();
+}
+
+MainForm* MainForm::_mainForm = NULL;
+/*static*/ MainForm* MainForm::getMainForm() {
+ ASSERT(_mainForm);
+ return _mainForm;
+}
+
+MainForm::MainForm(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
+: wxFrame(parent, id, title, position, size, style) {
+ CreateGUIControls();
+ //SetClientSize( wxSize(640, 480) );
+ //GetSizer()->SetMinSize(640, 480);
+ //mainPanel->SetMinSize( wxSize(400, 300) );
+ //mainPanel->SetSize( wxSize(400, 300) );
+ //Layout();
+ WxSplitterWindow1->SetSashGravity(0.3);
+
+ _mainForm = this;
+ ExplorationTree::initialize(browserTree, browserNotebook);
+ /*_timer = new wxTimer();
+ _timer->SetOwner(this, 5);
+ this->Connect(5, wxEVT_TIMER, wxTimerEventHandler(MainForm::OnTimer));
+ _timer->Start(300);*/
+
+ wxChar* leak = new wxChar[5]; // a deliberate memory leak
+ leak[0] = 'L'; leak[1] = 'E'; leak[2] = 'A'; leak[3] = 'K'; leak[4] = '\0';
+}
+
+void MainForm::ZCleanup() {
+
+ /*_timer->Stop();*/
+ /*delete _timer;*/
+
+ //this->Disconnect(_timer.GetId(), wxEVT_TIMER, wxTimerEventHandler(MainForm::OnTimer));
+ //_timer.SetOwner(NULL);
+
+ InitializedObjects::get()->report();
+
+ ExplorationTree::release();
+ InitializedObjects::get()->report();
+
+ FileTypeRegistry::release();
+ InitializedObjects::get()->report();
+
+ ObjectRegistry::release();
+ InitializedObjects::get()->report();
+
+ InitializedObjects::release();
+
+ set_statics_not_allowed();
+ _mainForm = NULL;
+}
+
+MainForm::~MainForm() {
+}
+
+void MainForm::CreateGUIControls() {
+ //Do not add custom code between
+ //GUI Items Creation Start and GUI Items Creation End
+ //wxDev-C++ designer will remove them.
+ //Add the custom code before or after the blocks
+ ////GUI Items Creation Start
+
+ WxBoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
+ this->SetSizer(WxBoxSizer1);
+ this->SetAutoLayout(true);
+
+ WxSplitterWindow1 = new wxSplitterWindow(this, ID_WXSPLITTERWINDOW1, wxPoint(0,0), wxSize(578,392));
+ WxSplitterWindow1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
+ WxBoxSizer1->Add(WxSplitterWindow1,1,wxEXPAND | wxALL,0);
+
+ browserTree = new wxTreeCtrl(WxSplitterWindow1, ID_BROWSERTREE, wxPoint(5,5), wxSize(185,382), wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT);
+ browserTree->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
+
+ mainPanel = new wxPanel(WxSplitterWindow1, ID_MAINPANEL, wxPoint(200,8), wxSize(363,376));
+ mainPanel->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
+
+ WxBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
+ mainPanel->SetSizer(WxBoxSizer2);
+ mainPanel->SetAutoLayout(true);
+
+ browserNotebook = new wxNotebook(mainPanel, ID_BROWSERNOTEBOOK, wxPoint(5,5),wxSize(309,337));
+ browserNotebook->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
+ WxBoxSizer2->Add(browserNotebook,1,wxEXPAND | wxALL,5);
+
+ WxMenuBar1 = new wxMenuBar();
+ wxMenu *ID_FILE_MENU_Mnu_Obj = new wxMenu(0);
+ ID_FILE_MENU_Mnu_Obj->Append(ID_OPEN, wxT("Open..."), wxT(""), wxITEM_NORMAL);
+ ID_FILE_MENU_Mnu_Obj->AppendSeparator();
+ ID_FILE_MENU_Mnu_Obj->Append(wxID_EXIT, wxT("Exit"), wxT(""), wxITEM_NORMAL);
+ WxMenuBar1->Append(ID_FILE_MENU_Mnu_Obj, wxT("File"));
+
+ wxMenu *ID_COMMANDS_MENU_Mnu_Obj = new wxMenu(0);
+ ID_COMMANDS_MENU_Mnu_Obj->Append(ID_DUMPROOTOBJECTCHAIN, wxT("Dump Root Object Chain"), wxT(""), wxITEM_NORMAL);
+ ID_COMMANDS_MENU_Mnu_Obj->Enable(ID_DUMPROOTOBJECTCHAIN,false);
+ ID_COMMANDS_MENU_Mnu_Obj->Append(ID_DUMPCURRENTOBJECTCHAIN, wxT("Dump Current Object Chain"), wxT(""), wxITEM_NORMAL);
+ ID_COMMANDS_MENU_Mnu_Obj->Append(ID_ACTIVATENODE, wxT("Activate Node"), wxT(""), wxITEM_NORMAL);
+ WxMenuBar1->Append(ID_COMMANDS_MENU_Mnu_Obj, wxT("Commands"));
+
+ wxMenu *ID_TEST_MENU_Mnu_Obj = new wxMenu(0);
+ ID_TEST_MENU_Mnu_Obj->Append(ID_TEST1, wxT("Test1 - No Scumm Plugins"), wxT(""), wxITEM_NORMAL);
+ ID_TEST_MENU_Mnu_Obj->Append(ID_TEST1_CLEANUP, wxT("Test Cleanup"), wxT(""), wxITEM_NORMAL);
+ ID_TEST_MENU_Mnu_Obj->Append(ID_TEST0, wxT("Test0 - No Scumm Plugins"), wxT(""), wxITEM_NORMAL);
+ ID_TEST_MENU_Mnu_Obj->Append(ID_TEST2, wxT("Test2 - With Scumm Plugins"), wxT(""), wxITEM_NORMAL);
+ WxMenuBar1->Append(ID_TEST_MENU_Mnu_Obj, wxT("Tests"));
+ SetMenuBar(WxMenuBar1);
+
+ WxSplitterWindow1->SplitVertically(browserTree,mainPanel,185);
+
+ SetTitle(wxT("Game Resource Browser"));
+ SetIcon(wxNullIcon);
+
+ GetSizer()->Layout();
+ GetSizer()->Fit(this);
+ GetSizer()->SetSizeHints(this);
+ Center();
+
+ ////GUI Items Creation End
+}
+
+void MainForm::OnClose(wxCloseEvent& event) {
+ ZCleanup();
+ Destroy();
+}
+
+/*
+ * OnExit
+ */
+void MainForm::OnExit(wxCommandEvent& event) {
+ Close(true);
+}
+
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/MainForm.h 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,117 +0,0 @@
-//---------------------------------------------------------------------------
-//
-// Name: MainForm.h
-// Author: Zbyl
-// Created: 2007-07-01 11:17:49
-// Description: MainForm class declaration
-//
-//---------------------------------------------------------------------------
-
-#ifndef __MAINFORM_h__
-#define __MAINFORM_h__
-
-#include "gui_stdafx.h"
-
-#include <wx/frame.h>
-
-//Do not add custom headers between
-//Header Include Start and Header Include End.
-//wxDev-C++ designer will remove them. Add custom headers after the block.
-////Header Include Start
-#include <wx/menu.h>
-#include <wx/notebook.h>
-#include <wx/panel.h>
-#include <wx/treectrl.h>
-#include <wx/splitter.h>
-#include <wx/sizer.h>
-////Header Include End
-
-////Dialog Style Start
-#undef MainForm_STYLE
-#define MainForm_STYLE wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxTHICK_FRAME | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX
-////Dialog Style End
-
-namespace Browser {
-class ObjectChain;
-}
-
-class MainForm : public wxFrame
-{
- private:
- DECLARE_EVENT_TABLE();
-
- static MainForm* _mainForm;
-
- public:
- MainForm(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Game Resource Browser"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MainForm_STYLE);
- virtual ~MainForm();
- //virtual bool Destroy();
- void ZCleanup();
- void OnTimer(wxTimerEvent& event);
- static MainForm* getMainForm();
-
- void dumpObjectChain(Browser::ObjectChain* ochain);
- void ExitClick(wxCommandEvent& event);
- void OnTest1Cleanup(wxCommandEvent& event);
- void OnTest1(wxCommandEvent& event);
- void browserTreeItemActivated(wxTreeEvent& event);
- void browserTreeItemExpanding(wxTreeEvent& event);
- void OnTest0(wxCommandEvent& event);
- void OnDumpRootObjectChain(wxCommandEvent& event);
- void OnTest2(wxCommandEvent& event);
- void OnDumpCurrentObjectChain(wxCommandEvent& event);
- void OnActivateNode(wxCommandEvent& event);
- void browserTreeItemExpanded(wxTreeEvent& event);
- void OnOpen(wxCommandEvent& event);
- void MainFormIdle(wxIdleEvent& event);
-
- private:
- //Do not add custom control declarations between
- //GUI Control Declaration Start and GUI Control Declaration End.
- //wxDev-C++ will remove them. Add custom code after the block.
- ////GUI Control Declaration Start
- wxMenuBar *WxMenuBar1;
- wxNotebook *browserNotebook;
- wxBoxSizer *WxBoxSizer2;
- wxPanel *mainPanel;
- wxTreeCtrl *browserTree;
- wxSplitterWindow *WxSplitterWindow1;
- wxBoxSizer *WxBoxSizer1;
- ////GUI Control Declaration End
- wxTimer* _timer;
-
- private:
- //Note: if you receive any error with these enum IDs, then you need to
- //change your old form code that are based on the #define control IDs.
- //#defines may replace a numeric value for the enum names.
- //Try copy and pasting the below block in your old form header files.
- enum
- {
- ////GUI Enum Control ID Start
- ID_FILE_MENU = 1004,
- ID_OPEN = 1005,
- ID_COMMANDS_MENU = 1025,
- ID_DUMPROOTOBJECTCHAIN = 1026,
- ID_DUMPCURRENTOBJECTCHAIN = 1028,
- ID_ACTIVATENODE = 1029,
- ID_TEST_MENU = 1010,
- ID_TEST1 = 1011,
- ID_TEST1_CLEANUP = 1012,
- ID_TEST0 = 1022,
- ID_TEST2 = 1024,
-
- ID_BROWSERNOTEBOOK = 1021,
- ID_MAINPANEL = 1017,
- ID_BROWSERTREE = 1016,
- ID_WXSPLITTERWINDOW1 = 1014,
- ////GUI Enum Control ID End
- ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
- };
-
- private:
- void OnClose(wxCloseEvent& event);
- void OnExit(wxCommandEvent& event);
- void CreateGUIControls();
-};
-
-#endif
Copied: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.h (from rev 28030, scummex/branches/gsoc2007-gameresbrowser/src/gui/MainForm.h)
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.h (rev 0)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.h 2007-07-11 14:15:52 UTC (rev 28031)
@@ -0,0 +1,117 @@
+//---------------------------------------------------------------------------
+//
+// Name: MainForm.h
+// Author: Zbyl
+// Created: 2007-07-01 11:17:49
+// Description: MainForm class declaration
+//
+//---------------------------------------------------------------------------
+
+#ifndef __MAINFORM_h__
+#define __MAINFORM_h__
+
+#include "gui_stdafx.h"
+
+#include <wx/frame.h>
+
+//Do not add custom headers between
+//Header Include Start and Header Include End.
+//wxDev-C++ designer will remove them. Add custom headers after the block.
+////Header Include Start
+#include <wx/menu.h>
+#include <wx/notebook.h>
+#include <wx/panel.h>
+#include <wx/treectrl.h>
+#include <wx/splitter.h>
+#include <wx/sizer.h>
+////Header Include End
+
+////Dialog Style Start
+#undef MainForm_STYLE
+#define MainForm_STYLE wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxTHICK_FRAME | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX
+////Dialog Style End
+
+namespace Browser {
+class ObjectChain;
+}
+
+class MainForm : public wxFrame
+{
+ private:
+ DECLARE_EVENT_TABLE();
+
+ static MainForm* _mainForm;
+
+ public:
+ MainForm(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("Game Resource Browser"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MainForm_STYLE);
+ virtual ~MainForm();
+ //virtual bool Destroy();
+ void ZCleanup();
+ void OnTimer(wxTimerEvent& event);
+ static MainForm* getMainForm();
+
+ void dumpObjectChain(Browser::ObjectChain* ochain);
+ void ExitClick(wxCommandEvent& event);
+ void OnTest1Cleanup(wxCommandEvent& event);
+ void OnTest1(wxCommandEvent& event);
+ void browserTreeItemActivated(wxTreeEvent& event);
+ void browserTreeItemExpanding(wxTreeEvent& event);
+ void OnTest0(wxCommandEvent& event);
+ void OnDumpRootObjectChain(wxCommandEvent& event);
+ void OnTest2(wxCommandEvent& event);
+ void OnDumpCurrentObjectChain(wxCommandEvent& event);
+ void OnActivateNode(wxCommandEvent& event);
+ void browserTreeItemExpanded(wxTreeEvent& event);
+ void OnOpen(wxCommandEvent& event);
+ void MainFormIdle(wxIdleEvent& event);
+
+ private:
+ //Do not add custom control declarations between
+ //GUI Control Declaration Start and GUI Control Declaration End.
+ //wxDev-C++ will remove them. Add custom code after the block.
+ ////GUI Control Declaration Start
+ wxMenuBar *WxMenuBar1;
+ wxNotebook *browserNotebook;
+ wxBoxSizer *WxBoxSizer2;
+ wxPanel *mainPanel;
+ wxTreeCtrl *browserTree;
+ wxSplitterWindow *WxSplitterWindow1;
+ wxBoxSizer *WxBoxSizer1;
+ ////GUI Control Declaration End
+ wxTimer* _timer;
+
+ private:
+ //Note: if you receive any error with these enum IDs, then you need to
+ //change your old form code that are based on the #define control IDs.
+ //#defines may replace a numeric value for the enum names.
+ //Try copy and pasting the below block in your old form header files.
+ enum
+ {
+ ////GUI Enum Control ID Start
+ ID_FILE_MENU = 1004,
+ ID_OPEN = 1005,
+ ID_COMMANDS_MENU = 1025,
+ ID_DUMPROOTOBJECTCHAIN = 1026,
+ ID_DUMPCURRENTOBJECTCHAIN = 1028,
+ ID_ACTIVATENODE = 1029,
+ ID_TEST_MENU = 1010,
+ ID_TEST1 = 1011,
+ ID_TEST1_CLEANUP = 1012,
+ ID_TEST0 = 1022,
+ ID_TEST2 = 1024,
+
+ ID_BROWSERNOTEBOOK = 1021,
+ ID_MAINPANEL = 1017,
+ ID_BROWSERTREE = 1016,
+ ID_WXSPLITTERWINDOW1 = 1014,
+ ////GUI Enum Control ID End
+ ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
+ };
+
+ private:
+ void OnClose(wxCloseEvent& event);
+ void OnExit(wxCommandEvent& event);
+ void CreateGUIControls();
+};
+
+#endif
Deleted: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.wxform
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/MainForm.wxform 2007-07-10 05:24:30 UTC (rev 28002)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.wxform 2007-07-11 14:15:52 UTC (rev 28031)
@@ -1,386 +0,0 @@
-object frmNewForm: TfrmNewForm
- Left = 8
- Top = 8
- AutoScroll = False
- BorderIcons = [biSystemMenu, biMinimize]
- Caption = 'Game Resource Browser'
- ClientHeight = 359
- ClientWidth = 510
- Color = clAppWorkSpace
- OldCreateOrder = True
- PopupMenu = MainForm.DesignerPopup
- Visible = True
- OnCloseQuery = FormCloseQuery
- OnCreate = FormCreate
- OnDestroy = FormDestroy
- OnResize = FormResize
- EVT_CLOSE = 'OnClose'
- EVT_IDLE = 'MainFormIdle'
- Wx_ICON.Data = {07544269746D617000000000}
- Wx_Name = 'MainForm'
- Wx_IDName = 'ID_DIALOG1'
- Wx_IDValue = 1000
- Wx_Class = 'wxFrame'
- Wx_Center = True
- Wx_Hidden = False
- Wx_SizeToContents = True
- Wx_GeneralStyle = []
- Wx_DialogStyle = [wxCAPTION, wxRESIZE_BORDER, wxSYSTEM_MENU, wxTHICK_FRAME, wxDIALOG_NO_PARENT, wxMINIMIZE_BOX, wxMAXIMIZE_BOX, wxCLOSE_BOX]
- Wx_DesignerType = dtWxFrame
- Wx_Border = 0
- Wx_BorderAlignment = []
- PixelsPerInch = 96
- TextHeight = 13
- object WxBoxSizer1: TWxBoxSizer
- Left = 0
- Top = 0
- Width = 510
- Height = 359
- Align = alClient
- TabOrder = 0
- Wx_Class = 'wxBoxSizer'
- Wx_ControlOrientation = wxControlVertical
- Wx_IDName = 'ID_WXBOXSIZER1'
- Wx_IDValue = 1013
- Wx_BorderAlignment = []
- Wx_Alignment = [wxEXPAND]
- Wx_StretchFactor = 1
- object WxSplitterWindow1: TWxSplitterWindow
- Left = 0
- Top = 0
- Width = 578
- Height = 392
- TabOrder = 0
- Wx_Class = 'wxSplitterWindow'
- Wx_ControlOrientation = wxControlVertical
- Wx_EventList.Strings = (
- 'EVT_SPLITTER_SASH_POS_CHANGING : OnSashPosChanging'
- 'EVT_SPLITTER_SASH_POS_CHANGED : OnSashPosChanged'
- 'EVT_SPLITTER_UNSPLIT : OnUnSplit'
- 'EVT_SPLITTER_DCLICK : OnDoubleClick'
- 'EVT_UPDATE_UI : OnUpdateUI')
- Wx_IDName = 'ID_WXSPLITTERWINDOW1'
- Wx_IDValue = 1014
- Wx_SashPosition = 185
- Wx_GeneralStyle = []
- Wx_SplitterStyle = []
- Wx_Border = 0
- Wx_Alignment = [wxEXPAND]
- Wx_StretchFactor = 1
- object browserTree: TWxTreeCtrl
- Left = 5
- Top = 5
- Width = 185
- Height = 382
- Indent = 19
- TabOrder = 0
- EVT_TREE_ITEM_ACTIVATED = 'browserTreeItemActivated'
- EVT_TREE_ITEM_EXPANDED = 'browserTreeItemExpanded'
- EVT_TREE_ITEM_EXPANDING = 'browserTreeItemExpanding'
- Wx_BGColor = clBlack
- Wx_Class = 'wxTreeCtrl'
- Wx_ControlOrientation = wxControlHorizontal
- Wx_FGColor = clBlack
- Wx_GeneralStyle = []
- Wx_Hidden = False
- Wx_IDName = 'ID_BROWSERTREE'
- Wx_IDValue = 1016
- Wx_TreeviewStyle = [wxTR_HAS_BUTTONS, wxTR_LINES_AT_ROOT]
- Wx_Alignment = [wxEXPAND]
- Wx_StretchFactor = 1
- end
- object mainPanel: TWxPanel
- Left = 200
- Top = 8
- Width = 363
- Height = 376
- TabOrder = 1
- Wx_BKColor = clBlack
- Wx_Class = 'wxPanel'
- Wx_ControlOrientation = wxControlHorizontal
- Wx_Default = False
- Wx_EventList.Strings = (
- 'EVT_UPDATE_UI:OnUpdateUI')
- Wx_FGColor = clBlack
- Wx_GeneralStyle = []
- Wx_Hidden = False
- Wx_IDName = 'ID_MAINPANEL'
- Wx_IDValue = 1017
- Wx_Alignment = [wxEXPAND]
- Wx_StretchFactor = 1
- object WxBoxSizer2: TWxBoxSizer
- Left = 1
- Top = 1
- Width = 361
- Height = 374
- Align = alClient
- TabOrder = 0
- Wx_Class = 'wxBoxSizer'
- Wx_ControlOrientation = wxControlVertical
- Wx_IDName = 'ID_WXBOXSIZER2'
- Wx_IDValue = 1020
- Wx_BorderAlignment = []
- Wx_Alignment = [wxEXPAND]
- Wx_StretchFactor = 1
- object browserNotebook: TWxNotebook
- Left = 5
- Top = 5
- Width = 309
@@ Diff output truncated at 100000 characters. @@
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