]> Creatis software - creaImageIO.git/commitdiff
clean old version of creaImageIO
authorFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Tue, 16 Mar 2010 15:36:19 +0000 (15:36 +0000)
committerFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Tue, 16 Mar 2010 15:36:19 +0000 (15:36 +0000)
46 files changed:
src/AdditionalUsecreaImageIO.cmake.in [deleted file]
src/AdditionalcreaImageIOConfig.cmake.in [deleted file]
src/CMakeLists.txt [deleted file]
src/CppSQLite3.cpp [deleted file]
src/CppSQLite3.h [deleted file]
src/creaImageIODicomDatabase.cpp [deleted file]
src/creaImageIODicomDatabase.h [deleted file]
src/creaImageIODicomDatabaseStructure.cpp [deleted file]
src/creaImageIODicomDatabaseStructure.h [deleted file]
src/creaImageIODicomNode.cpp [deleted file]
src/creaImageIODicomNode.h [deleted file]
src/creaImageIODicomNodeComparators.cpp [deleted file]
src/creaImageIODicomNodeComparators.h [deleted file]
src/creaImageIODicomNodeTypeDescription.cpp [deleted file]
src/creaImageIODicomNodeTypeDescription.h [deleted file]
src/creaImageIOField.cpp [deleted file]
src/creaImageIOField.h [deleted file]
src/creaImageIOImageReader.cpp [deleted file]
src/creaImageIOImageReader.h [deleted file]
src/creaImageIOIndexedHeap.h [deleted file]
src/creaImageIOIndexedHeap_code.h [deleted file]
src/creaImageIOMultiThreadImageReader.cpp [deleted file]
src/creaImageIOMultiThreadImageReader.h [deleted file]
src/creaImageIOSystem.h [deleted file]
src/creaImageIOWxGimmick.cpp [deleted file]
src/creaImageIOWxGimmick.h [deleted file]
src/creaImageIOWxGimmickDialog.cpp [deleted file]
src/creaImageIOWxGimmickDialog.h [deleted file]
src/creaImageIOWxGimmickFieldsView.cpp [deleted file]
src/creaImageIOWxGimmickFieldsView.h [deleted file]
src/creaImageIOWxGimmickSettings.cpp [deleted file]
src/creaImageIOWxGimmickSettings.h [deleted file]
src/doxygen/CMakeLists.txt [deleted file]
src/doxygen/CodingStyle.html [deleted file]
src/doxygen/DoxyMainPage.txt.in [deleted file]
src/doxygen/Doxyfile.txt.in [deleted file]
src/icons/database.xpm [deleted file]
src/icons/dicomdir.xpm [deleted file]
src/icons/folder.xpm [deleted file]
src/icons/image.xpm [deleted file]
src/icons/patient.xpm [deleted file]
src/icons/root.xpm [deleted file]
src/icons/series.xpm [deleted file]
src/icons/study.xpm [deleted file]
src/treelistctrl.cpp [deleted file]
src/treelistctrl.h [deleted file]

diff --git a/src/AdditionalUsecreaImageIO.cmake.in b/src/AdditionalUsecreaImageIO.cmake.in
deleted file mode 100644 (file)
index bdf20d7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-INCLUDE(${crea_USE_FILE})
-
diff --git a/src/AdditionalcreaImageIOConfig.cmake.in b/src/AdditionalcreaImageIOConfig.cmake.in
deleted file mode 100644 (file)
index 35ae10d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# We have to find crea
-FIND_PACKAGE(crea REQUIRED)
\ No newline at end of file
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
deleted file mode 100644 (file)
index 1344659..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-SET( SRCS
-  # SQLite 
-  CppSQLite3
-  
-  # wxTreeListCtrl
-  treelistctrl.cpp
-
-  # Image readers
-  creaImageIOImageReader
-  creaImageIOMultiThreadImageReader
-
-  # Dicom database management
-  creaImageIODicomNode
-  creaImageIODicomNodeComparators
-  creaImageIODicomNodeTypeDescription
-  creaImageIODicomDatabaseStructure
-  creaImageIODicomDatabase
-  creaImageIOField
-
-  # The Gimmick! widgets
-  creaImageIOWxGimmick
-  creaImageIOWxGimmickSettings
-  creaImageIOWxGimmickFieldsView
-
-  creaImageIOWxGimmickDialog
-
-#  creaImageIOWxDicomDatabaseTreeView
-#  creaImageIOWxDicomDatabaseTreeViewSettings
-#  creaImageIOWxDicomNodeFieldsView
-  
-  # File selector wxDialog using a DDB tree view
-#  creaImageIOWxDicomFilesSelectorDialog
-
-  # wx-free function which opens a file selector dialog 
-#  BlockScopeWxApp
-#  creaImageIODicomFilesSelectorDialog
-
-)
-
-
-
-OPTION(creaImageIO_BUILD_SHARED 
-  "Build creaImageIO as a shared library (dynamic) ?" ON)
-IF (creaImageIO_BUILD_SHARED)
-  SET(CREAIMAGEIO_BUILD_SHARED SHARED)
-  crea_DEFINE(CREAIMAGEIO_BUILD_SHARED)
-ENDIF(creaImageIO_BUILD_SHARED)
-
-crea_DEFINE(CREAIMAGEIO_EXPORT_SYMBOLS)
-
-ADD_LIBRARY(creaImageIO ${CREAIMAGEIO_BUILD_SHARED} ${SRCS})
-
-
-
-TARGET_LINK_LIBRARIES(creaImageIO 
-  ${crea_LIBRARIES}
-  ${WXWIDGETS_LIBRARIES}
-  ${VTK_LIBRARIES}
-  ${GDCM_LIBRARIES}
-  ${BOOST_LIBRARIES}
-  sqlite3)
-
-#----------------------------------------------------------------------------
-# INSTALLS LIBRARY
-FILE(GLOB HEADERS "*.h")
-INSTALL(
-  FILES ${HEADERS}
-  DESTINATION include/creaImageIO
-  )
-IF (WIN32)
-  SET(CREAIMAGEIO_LIB_PATH bin)
-ELSE (WIN32)
-  SET(CREAIMAGEIO_LIB_PATH lib)
-ENDIF(WIN32)
-
-INSTALL(
-  TARGETS creaImageIO 
-  DESTINATION ${CREAIMAGEIO_LIB_PATH})
-
-  
-   # Sets the settings for macro CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE
-   SET(LIBRARY_NAME creaImageIO)
-  SET(${LIBRARY_NAME}_INSTALL_FOLDER ${LIBRARY_NAME})
-  SET(${LIBRARY_NAME}_LIBRARIES ${LIBRARY_NAME})
-  
-  FILE(RELATIVE_PATH 
-    ${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS 
-    ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
-    )
-  IF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
-    SET(CILFC_EXECUTABLE_OUTPUT_REL_PATH ".")
-  ELSE ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
-    FILE(RELATIVE_PATH 
-      CILFC_EXECUTABLE_OUTPUT_REL_PATH
-      ${PROJECT_BINARY_DIR} ${EXECUTABLE_OUTPUT_PATH})
-  ENDIF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
-
-  IF(UNIX)
-    SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS 
-      ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
-    SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS lib)
-  ELSE(UNIX)
-    SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS 
-      ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
-    SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS bin)
-  ENDIF(UNIX)
-  SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/${LIBRARY_NAME})
-  
-  SET(${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE TRUE)
-SET(${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE 
-  ${PROJECT_SOURCE_DIR}/src/AdditionalcreaImageIOConfig.cmake.in)
-SET(${LIBRARY_NAME}_ADDITIONAL_USE_FILE 
-  ${PROJECT_SOURCE_DIR}/src/AdditionalUsecreaImageIO.cmake.in)
-
-  # Invoke the advanced macro
-  CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME})
-
-  
-#CREA_INSTALL_LIBRARY_FOR_CMAKE(creaImageIO)
-#-----------------------------------------------------------------------------
-
-OPTION( BUILD_DOXYGEN_DOC "Build doxygen doc ?" OFF)
-IF(BUILD_DOXYGEN_DOC)
-  SUBDIRS(doxygen)
-ENDIF(BUILD_DOXYGEN_DOC)
diff --git a/src/CppSQLite3.cpp b/src/CppSQLite3.cpp
deleted file mode 100644 (file)
index 165f911..0000000
+++ /dev/null
@@ -1,1500 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////\r
-// CppSQLite3 - A C++ wrapper around the SQLite3 embedded database library.\r
-//\r
-// Copyright (c) 2004 Rob Groves. All Rights Reserved. rob.groves@btinternet.com\r
-// \r
-// Permission to use, copy, modify, and distribute this software and its\r
-// documentation for any purpose, without fee, and without a written\r
-// agreement, is hereby granted, provided that the above copyright notice, \r
-// this paragraph and the following two paragraphs appear in all copies, \r
-// modifications, and distributions.\r
-//\r
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,\r
-// INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST\r
-// PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,\r
-// EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-//\r
-// THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT\r
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\r
-// PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF\r
-// ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". THE AUTHOR HAS NO OBLIGATION\r
-// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\r
-//\r
-// V3.0                03/08/2004      -Initial Version for sqlite3\r
-//\r
-// V3.1                16/09/2004      -Implemented getXXXXField using sqlite3 functions\r
-//                                             -Added CppSQLiteDB3::tableExists()\r
-////////////////////////////////////////////////////////////////////////////////\r
-#include "CppSQLite3.h"\r
-#include <cstdlib>\r
-\r
-\r
-// Named constant for passing to CppSQLite3Exception when passing it a string\r
-// that cannot be deleted.\r
-static const bool DONT_DELETE_MSG=false;\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-// Prototypes for SQLite functions not included in SQLite DLL, but copied below\r
-// from SQLite encode.c\r
-////////////////////////////////////////////////////////////////////////////////\r
-int sqlite3_encode_binary(const unsigned char *in, int n, unsigned char *out);\r
-int sqlite3_decode_binary(const unsigned char *in, unsigned char *out);\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-CppSQLite3Exception::CppSQLite3Exception(const int nErrCode,\r
-                                        const char* szErrMess,\r
-                                        bool bDeleteMsg/*=true*/) :\r
-  mnErrCode(nErrCode)\r
-{\r
-  mpszErrMess = sqlite3_mprintf("%s[%d]: %s",\r
-                               errorCodeAsString(nErrCode),\r
-                               nErrCode,\r
-                               szErrMess ? szErrMess : "");\r
-  /*\r
-  if (bDeleteMsg && szErrMess)\r
-    {\r
-      sqlite3_free(szErrMess);\r
-    }\r
-  */\r
-}\r
-\r
-CppSQLite3Exception::CppSQLite3Exception(const int nErrCode,\r
-                                        char* szErrMess,\r
-                                        bool bDeleteMsg/*=true*/) :\r
-  mnErrCode(nErrCode)\r
-{\r
-  mpszErrMess = sqlite3_mprintf("%s[%d]: %s",\r
-                               errorCodeAsString(nErrCode),\r
-                               nErrCode,\r
-                               szErrMess ? szErrMess : "");\r
-  \r
-  if (bDeleteMsg && szErrMess)\r
-    {\r
-      sqlite3_free(szErrMess);\r
-    }\r
-}\r
-                                                                       \r
-CppSQLite3Exception::CppSQLite3Exception(const CppSQLite3Exception&  e) :\r
-                                                                       mnErrCode(e.mnErrCode)\r
-{\r
-       mpszErrMess = 0;\r
-       if (e.mpszErrMess)\r
-       {\r
-               mpszErrMess = sqlite3_mprintf("%s", e.mpszErrMess);\r
-       }\r
-}\r
-\r
-\r
-const char* CppSQLite3Exception::errorCodeAsString(int nErrCode)\r
-{\r
-       switch (nErrCode)\r
-       {\r
-               case SQLITE_OK          : return "SQLITE_OK";\r
-               case SQLITE_ERROR       : return "SQLITE_ERROR";\r
-               case SQLITE_INTERNAL    : return "SQLITE_INTERNAL";\r
-               case SQLITE_PERM        : return "SQLITE_PERM";\r
-               case SQLITE_ABORT       : return "SQLITE_ABORT";\r
-               case SQLITE_BUSY        : return "SQLITE_BUSY";\r
-               case SQLITE_LOCKED      : return "SQLITE_LOCKED";\r
-               case SQLITE_NOMEM       : return "SQLITE_NOMEM";\r
-               case SQLITE_READONLY    : return "SQLITE_READONLY";\r
-               case SQLITE_INTERRUPT   : return "SQLITE_INTERRUPT";\r
-               case SQLITE_IOERR       : return "SQLITE_IOERR";\r
-               case SQLITE_CORRUPT     : return "SQLITE_CORRUPT";\r
-               case SQLITE_NOTFOUND    : return "SQLITE_NOTFOUND";\r
-               case SQLITE_FULL        : return "SQLITE_FULL";\r
-               case SQLITE_CANTOPEN    : return "SQLITE_CANTOPEN";\r
-               case SQLITE_PROTOCOL    : return "SQLITE_PROTOCOL";\r
-               case SQLITE_EMPTY       : return "SQLITE_EMPTY";\r
-               case SQLITE_SCHEMA      : return "SQLITE_SCHEMA";\r
-               case SQLITE_TOOBIG      : return "SQLITE_TOOBIG";\r
-               case SQLITE_CONSTRAINT  : return "SQLITE_CONSTRAINT";\r
-               case SQLITE_MISMATCH    : return "SQLITE_MISMATCH";\r
-               case SQLITE_MISUSE      : return "SQLITE_MISUSE";\r
-               case SQLITE_NOLFS       : return "SQLITE_NOLFS";\r
-               case SQLITE_AUTH        : return "SQLITE_AUTH";\r
-               case SQLITE_FORMAT      : return "SQLITE_FORMAT";\r
-               case SQLITE_RANGE       : return "SQLITE_RANGE";\r
-               case SQLITE_ROW         : return "SQLITE_ROW";\r
-               case SQLITE_DONE        : return "SQLITE_DONE";\r
-               case CPPSQLITE_ERROR    : return "CPPSQLITE_ERROR";\r
-               default: return "UNKNOWN_ERROR";\r
-       }\r
-}\r
-\r
-\r
-CppSQLite3Exception::~CppSQLite3Exception()\r
-{\r
-       if (mpszErrMess)\r
-       {\r
-               sqlite3_free(mpszErrMess);\r
-               mpszErrMess = 0;\r
-       }\r
-}\r
-\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-CppSQLite3Buffer::CppSQLite3Buffer()\r
-{\r
-       mpBuf = 0;\r
-}\r
-\r
-\r
-CppSQLite3Buffer::~CppSQLite3Buffer()\r
-{\r
-       clear();\r
-}\r
-\r
-\r
-void CppSQLite3Buffer::clear()\r
-{\r
-       if (mpBuf)\r
-       {\r
-               sqlite3_free(mpBuf);\r
-               mpBuf = 0;\r
-       }\r
-\r
-}\r
-\r
-\r
-const char* CppSQLite3Buffer::format(const char* szFormat, ...)\r
-{\r
-       clear();\r
-       va_list va;\r
-       va_start(va, szFormat);\r
-       mpBuf = sqlite3_vmprintf(szFormat, va);\r
-       va_end(va);\r
-       return mpBuf;\r
-}\r
-\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-CppSQLite3Binary::CppSQLite3Binary() :\r
-                                               mpBuf(0),\r
-                                               mnBinaryLen(0),\r
-                                               mnBufferLen(0),\r
-                                               mnEncodedLen(0),\r
-                                               mbEncoded(false)\r
-{\r
-}\r
-\r
-\r
-CppSQLite3Binary::~CppSQLite3Binary()\r
-{\r
-       clear();\r
-}\r
-\r
-\r
-void CppSQLite3Binary::setBinary(const unsigned char* pBuf, int nLen)\r
-{\r
-       mpBuf = allocBuffer(nLen);\r
-       memcpy(mpBuf, pBuf, nLen);\r
-}\r
-\r
-\r
-void CppSQLite3Binary::setEncoded(const unsigned char* pBuf)\r
-{\r
-       clear();\r
-\r
-       mnEncodedLen = strlen((const char*)pBuf);\r
-       mnBufferLen = mnEncodedLen + 1; // Allow for NULL terminator\r
-\r
-       mpBuf = (unsigned char*)malloc(mnBufferLen);\r
-\r
-       if (!mpBuf)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Cannot allocate memory",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       memcpy(mpBuf, pBuf, mnBufferLen);\r
-       mbEncoded = true;\r
-}\r
-\r
-\r
-const unsigned char* CppSQLite3Binary::getEncoded()\r
-{\r
-       if (!mbEncoded)\r
-       {\r
-               unsigned char* ptmp = (unsigned char*)malloc(mnBinaryLen);\r
-               memcpy(ptmp, mpBuf, mnBinaryLen);\r
-               mnEncodedLen = sqlite3_encode_binary(ptmp, mnBinaryLen, mpBuf);\r
-               free(ptmp);\r
-               mbEncoded = true;\r
-       }\r
-\r
-       return mpBuf;\r
-}\r
-\r
-\r
-const unsigned char* CppSQLite3Binary::getBinary()\r
-{\r
-       if (mbEncoded)\r
-       {\r
-               // in/out buffers can be the same\r
-               mnBinaryLen = sqlite3_decode_binary(mpBuf, mpBuf);\r
-\r
-               if (mnBinaryLen == -1)\r
-               {\r
-                       throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                                       "Cannot decode binary",\r
-                                                                       DONT_DELETE_MSG);\r
-               }\r
-\r
-               mbEncoded = false;\r
-       }\r
-\r
-       return mpBuf;\r
-}\r
-\r
-\r
-int CppSQLite3Binary::getBinaryLength()\r
-{\r
-       getBinary();\r
-       return mnBinaryLen;\r
-}\r
-\r
-\r
-unsigned char* CppSQLite3Binary::allocBuffer(int nLen)\r
-{\r
-       clear();\r
-\r
-       // Allow extra space for encoded binary as per comments in\r
-       // SQLite encode.c See bottom of this file for implementation\r
-       // of SQLite functions use 3 instead of 2 just to be sure ;-)\r
-       mnBinaryLen = nLen;\r
-       mnBufferLen = 3 + (257*nLen)/254;\r
-\r
-       mpBuf = (unsigned char*)malloc(mnBufferLen);\r
-\r
-       if (!mpBuf)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Cannot allocate memory",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       mbEncoded = false;\r
-\r
-       return mpBuf;\r
-}\r
-\r
-\r
-void CppSQLite3Binary::clear()\r
-{\r
-       if (mpBuf)\r
-       {\r
-               mnBinaryLen = 0;\r
-               mnBufferLen = 0;\r
-               free(mpBuf);\r
-               mpBuf = 0;\r
-       }\r
-}\r
-\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-CppSQLite3Query::CppSQLite3Query()\r
-{\r
-       mpVM = 0;\r
-       mbEof = true;\r
-       mnCols = 0;\r
-       mbOwnVM = false;\r
-}\r
-\r
-\r
-CppSQLite3Query::CppSQLite3Query(const CppSQLite3Query& rQuery)\r
-{\r
-       mpVM = rQuery.mpVM;\r
-       // Only one object can own the VM\r
-       const_cast<CppSQLite3Query&>(rQuery).mpVM = 0;\r
-       mbEof = rQuery.mbEof;\r
-       mnCols = rQuery.mnCols;\r
-       mbOwnVM = rQuery.mbOwnVM;\r
-}\r
-\r
-\r
-CppSQLite3Query::CppSQLite3Query(sqlite3* pDB,\r
-                                                       sqlite3_stmt* pVM,\r
-                                                       bool bEof,\r
-                                                       bool bOwnVM/*=true*/)\r
-{\r
-       mpDB = pDB;\r
-       mpVM = pVM;\r
-       mbEof = bEof;\r
-       mnCols = sqlite3_column_count(mpVM);\r
-       mbOwnVM = bOwnVM;\r
-}\r
-\r
-\r
-CppSQLite3Query::~CppSQLite3Query()\r
-{\r
-       try\r
-       {\r
-               finalize();\r
-       }\r
-       catch (...)\r
-       {\r
-       }\r
-}\r
-\r
-\r
-CppSQLite3Query& CppSQLite3Query::operator=(const CppSQLite3Query& rQuery)\r
-{\r
-       try\r
-       {\r
-               finalize();\r
-       }\r
-       catch (...)\r
-       {\r
-       }\r
-       mpVM = rQuery.mpVM;\r
-       // Only one object can own the VM\r
-       const_cast<CppSQLite3Query&>(rQuery).mpVM = 0;\r
-       mbEof = rQuery.mbEof;\r
-       mnCols = rQuery.mnCols;\r
-       mbOwnVM = rQuery.mbOwnVM;\r
-       return *this;\r
-}\r
-\r
-\r
-int CppSQLite3Query::numFields()\r
-{\r
-       checkVM();\r
-       return mnCols;\r
-}\r
-\r
-\r
-const char* CppSQLite3Query::fieldValue(int nField)\r
-{\r
-       checkVM();\r
-\r
-       if (nField < 0 || nField > mnCols-1)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Invalid field index requested",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       return (const char*)sqlite3_column_text(mpVM, nField);\r
-}\r
-\r
-\r
-const char* CppSQLite3Query::fieldValue(const char* szField)\r
-{\r
-       int nField = fieldIndex(szField);\r
-       return (const char*)sqlite3_column_text(mpVM, nField);\r
-}\r
-\r
-\r
-int CppSQLite3Query::getIntField(int nField, int nNullValue/*=0*/)\r
-{\r
-       if (fieldDataType(nField) == SQLITE_NULL)\r
-       {\r
-               return nNullValue;\r
-       }\r
-       else\r
-       {\r
-               return sqlite3_column_int(mpVM, nField);\r
-       }\r
-}\r
-\r
-\r
-int CppSQLite3Query::getIntField(const char* szField, int nNullValue/*=0*/)\r
-{\r
-       int nField = fieldIndex(szField);\r
-       return getIntField(nField, nNullValue);\r
-}\r
-\r
-\r
-double CppSQLite3Query::getFloatField(int nField, double fNullValue/*=0.0*/)\r
-{\r
-       if (fieldDataType(nField) == SQLITE_NULL)\r
-       {\r
-               return fNullValue;\r
-       }\r
-       else\r
-       {\r
-               return sqlite3_column_double(mpVM, nField);\r
-       }\r
-}\r
-\r
-\r
-double CppSQLite3Query::getFloatField(const char* szField, double fNullValue/*=0.0*/)\r
-{\r
-       int nField = fieldIndex(szField);\r
-       return getFloatField(nField, fNullValue);\r
-}\r
-\r
-\r
-const char* CppSQLite3Query::getStringField(int nField, const char* szNullValue/*=""*/)\r
-{\r
-       if (fieldDataType(nField) == SQLITE_NULL)\r
-       {\r
-               return szNullValue;\r
-       }\r
-       else\r
-       {\r
-               return (const char*)sqlite3_column_text(mpVM, nField);\r
-       }\r
-}\r
-\r
-\r
-const char* CppSQLite3Query::getStringField(const char* szField, const char* szNullValue/*=""*/)\r
-{\r
-       int nField = fieldIndex(szField);\r
-       return getStringField(nField, szNullValue);\r
-}\r
-\r
-\r
-const unsigned char* CppSQLite3Query::getBlobField(int nField, int& nLen)\r
-{\r
-       checkVM();\r
-\r
-       if (nField < 0 || nField > mnCols-1)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Invalid field index requested",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       nLen = sqlite3_column_bytes(mpVM, nField);\r
-       return (const unsigned char*)sqlite3_column_blob(mpVM, nField);\r
-}\r
-\r
-\r
-const unsigned char* CppSQLite3Query::getBlobField(const char* szField, int& nLen)\r
-{\r
-       int nField = fieldIndex(szField);\r
-       return getBlobField(nField, nLen);\r
-}\r
-\r
-\r
-bool CppSQLite3Query::fieldIsNull(int nField)\r
-{\r
-       return (fieldDataType(nField) == SQLITE_NULL);\r
-}\r
-\r
-\r
-bool CppSQLite3Query::fieldIsNull(const char* szField)\r
-{\r
-       int nField = fieldIndex(szField);\r
-       return (fieldDataType(nField) == SQLITE_NULL);\r
-}\r
-\r
-\r
-int CppSQLite3Query::fieldIndex(const char* szField)\r
-{\r
-       checkVM();\r
-\r
-       if (szField)\r
-       {\r
-               for (int nField = 0; nField < mnCols; nField++)\r
-               {\r
-                       const char* szTemp = sqlite3_column_name(mpVM, nField);\r
-\r
-                       if (strcmp(szField, szTemp) == 0)\r
-                       {\r
-                               return nField;\r
-                       }\r
-               }\r
-       }\r
-\r
-       throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                       "Invalid field name requested",\r
-                                                       DONT_DELETE_MSG);\r
-}\r
-\r
-\r
-const char* CppSQLite3Query::fieldName(int nCol)\r
-{\r
-       checkVM();\r
-\r
-       if (nCol < 0 || nCol > mnCols-1)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Invalid field index requested",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       return sqlite3_column_name(mpVM, nCol);\r
-}\r
-\r
-\r
-const char* CppSQLite3Query::fieldDeclType(int nCol)\r
-{\r
-       checkVM();\r
-\r
-       if (nCol < 0 || nCol > mnCols-1)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Invalid field index requested",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       return sqlite3_column_decltype(mpVM, nCol);\r
-}\r
-\r
-\r
-int CppSQLite3Query::fieldDataType(int nCol)\r
-{\r
-       checkVM();\r
-\r
-       if (nCol < 0 || nCol > mnCols-1)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Invalid field index requested",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       return sqlite3_column_type(mpVM, nCol);\r
-}\r
-\r
-\r
-bool CppSQLite3Query::eof()\r
-{\r
-       checkVM();\r
-       return mbEof;\r
-}\r
-\r
-\r
-void CppSQLite3Query::nextRow()\r
-{\r
-       checkVM();\r
-\r
-       int nRet = sqlite3_step(mpVM);\r
-\r
-       if (nRet == SQLITE_DONE)\r
-       {\r
-               // no rows\r
-               mbEof = true;\r
-       }\r
-       else if (nRet == SQLITE_ROW)\r
-       {\r
-               // more rows, nothing to do\r
-       }\r
-       else\r
-       {\r
-               nRet = sqlite3_finalize(mpVM);\r
-               mpVM = 0;\r
-               const char* szError = sqlite3_errmsg(mpDB);\r
-               throw CppSQLite3Exception(nRet,\r
-                                                               (char*)szError,\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Query::finalize()\r
-{\r
-       if (mpVM && mbOwnVM)\r
-       {\r
-               int nRet = sqlite3_finalize(mpVM);\r
-               mpVM = 0;\r
-               if (nRet != SQLITE_OK)\r
-               {\r
-                       const char* szError = sqlite3_errmsg(mpDB);\r
-                       throw CppSQLite3Exception(nRet, (char*)szError, DONT_DELETE_MSG);\r
-               }\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Query::checkVM()\r
-{\r
-       if (mpVM == 0)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Null Virtual Machine pointer",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-CppSQLite3Table::CppSQLite3Table()\r
-{\r
-       mpaszResults = 0;\r
-       mnRows = 0;\r
-       mnCols = 0;\r
-       mnCurrentRow = 0;\r
-}\r
-\r
-\r
-CppSQLite3Table::CppSQLite3Table(const CppSQLite3Table& rTable)\r
-{\r
-       mpaszResults = rTable.mpaszResults;\r
-       // Only one object can own the results\r
-       const_cast<CppSQLite3Table&>(rTable).mpaszResults = 0;\r
-       mnRows = rTable.mnRows;\r
-       mnCols = rTable.mnCols;\r
-       mnCurrentRow = rTable.mnCurrentRow;\r
-}\r
-\r
-\r
-CppSQLite3Table::CppSQLite3Table(char** paszResults, int nRows, int nCols)\r
-{\r
-       mpaszResults = paszResults;\r
-       mnRows = nRows;\r
-       mnCols = nCols;\r
-       mnCurrentRow = 0;\r
-}\r
-\r
-\r
-CppSQLite3Table::~CppSQLite3Table()\r
-{\r
-       try\r
-       {\r
-               finalize();\r
-       }\r
-       catch (...)\r
-       {\r
-       }\r
-}\r
-\r
-\r
-CppSQLite3Table& CppSQLite3Table::operator=(const CppSQLite3Table& rTable)\r
-{\r
-       try\r
-       {\r
-               finalize();\r
-       }\r
-       catch (...)\r
-       {\r
-       }\r
-       mpaszResults = rTable.mpaszResults;\r
-       // Only one object can own the results\r
-       const_cast<CppSQLite3Table&>(rTable).mpaszResults = 0;\r
-       mnRows = rTable.mnRows;\r
-       mnCols = rTable.mnCols;\r
-       mnCurrentRow = rTable.mnCurrentRow;\r
-       return *this;\r
-}\r
-\r
-\r
-void CppSQLite3Table::finalize()\r
-{\r
-       if (mpaszResults)\r
-       {\r
-               sqlite3_free_table(mpaszResults);\r
-               mpaszResults = 0;\r
-       }\r
-}\r
-\r
-\r
-int CppSQLite3Table::numFields()\r
-{\r
-       checkResults();\r
-       return mnCols;\r
-}\r
-\r
-\r
-int CppSQLite3Table::numRows()\r
-{\r
-       checkResults();\r
-       return mnRows;\r
-}\r
-\r
-\r
-const char* CppSQLite3Table::fieldValue(int nField)\r
-{\r
-       checkResults();\r
-\r
-       if (nField < 0 || nField > mnCols-1)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Invalid field index requested",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       int nIndex = (mnCurrentRow*mnCols) + mnCols + nField;\r
-       return mpaszResults[nIndex];\r
-}\r
-\r
-\r
-const char* CppSQLite3Table::fieldValue(const char* szField)\r
-{\r
-       checkResults();\r
-\r
-       if (szField)\r
-       {\r
-               for (int nField = 0; nField < mnCols; nField++)\r
-               {\r
-                       if (strcmp(szField, mpaszResults[nField]) == 0)\r
-                       {\r
-                               int nIndex = (mnCurrentRow*mnCols) + mnCols + nField;\r
-                               return mpaszResults[nIndex];\r
-                       }\r
-               }\r
-       }\r
-\r
-       throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                       "Invalid field name requested",\r
-                                                       DONT_DELETE_MSG);\r
-}\r
-\r
-\r
-int CppSQLite3Table::getIntField(int nField, int nNullValue/*=0*/)\r
-{\r
-       if (fieldIsNull(nField))\r
-       {\r
-               return nNullValue;\r
-       }\r
-       else\r
-       {\r
-               return atoi(fieldValue(nField));\r
-       }\r
-}\r
-\r
-\r
-int CppSQLite3Table::getIntField(const char* szField, int nNullValue/*=0*/)\r
-{\r
-       if (fieldIsNull(szField))\r
-       {\r
-               return nNullValue;\r
-       }\r
-       else\r
-       {\r
-               return atoi(fieldValue(szField));\r
-       }\r
-}\r
-\r
-\r
-double CppSQLite3Table::getFloatField(int nField, double fNullValue/*=0.0*/)\r
-{\r
-       if (fieldIsNull(nField))\r
-       {\r
-               return fNullValue;\r
-       }\r
-       else\r
-       {\r
-               return atof(fieldValue(nField));\r
-       }\r
-}\r
-\r
-\r
-double CppSQLite3Table::getFloatField(const char* szField, double fNullValue/*=0.0*/)\r
-{\r
-       if (fieldIsNull(szField))\r
-       {\r
-               return fNullValue;\r
-       }\r
-       else\r
-       {\r
-               return atof(fieldValue(szField));\r
-       }\r
-}\r
-\r
-\r
-const char* CppSQLite3Table::getStringField(int nField, const char* szNullValue/*=""*/)\r
-{\r
-       if (fieldIsNull(nField))\r
-       {\r
-               return szNullValue;\r
-       }\r
-       else\r
-       {\r
-               return fieldValue(nField);\r
-       }\r
-}\r
-\r
-\r
-const char* CppSQLite3Table::getStringField(const char* szField, const char* szNullValue/*=""*/)\r
-{\r
-       if (fieldIsNull(szField))\r
-       {\r
-               return szNullValue;\r
-       }\r
-       else\r
-       {\r
-               return fieldValue(szField);\r
-       }\r
-}\r
-\r
-\r
-bool CppSQLite3Table::fieldIsNull(int nField)\r
-{\r
-       checkResults();\r
-       return (fieldValue(nField) == 0);\r
-}\r
-\r
-\r
-bool CppSQLite3Table::fieldIsNull(const char* szField)\r
-{\r
-       checkResults();\r
-       return (fieldValue(szField) == 0);\r
-}\r
-\r
-\r
-const char* CppSQLite3Table::fieldName(int nCol)\r
-{\r
-       checkResults();\r
-\r
-       if (nCol < 0 || nCol > mnCols-1)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Invalid field index requested",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       return mpaszResults[nCol];\r
-}\r
-\r
-\r
-void CppSQLite3Table::setRow(int nRow)\r
-{\r
-       checkResults();\r
-\r
-       if (nRow < 0 || nRow > mnRows-1)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Invalid row index requested",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       mnCurrentRow = nRow;\r
-}\r
-\r
-\r
-void CppSQLite3Table::checkResults()\r
-{\r
-       if (mpaszResults == 0)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Null Results pointer",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-CppSQLite3Statement::CppSQLite3Statement()\r
-{\r
-       mpDB = 0;\r
-       mpVM = 0;\r
-}\r
-\r
-\r
-CppSQLite3Statement::CppSQLite3Statement(const CppSQLite3Statement& rStatement)\r
-{\r
-       mpDB = rStatement.mpDB;\r
-       mpVM = rStatement.mpVM;\r
-       // Only one object can own VM\r
-       const_cast<CppSQLite3Statement&>(rStatement).mpVM = 0;\r
-}\r
-\r
-\r
-CppSQLite3Statement::CppSQLite3Statement(sqlite3* pDB, sqlite3_stmt* pVM)\r
-{\r
-       mpDB = pDB;\r
-       mpVM = pVM;\r
-}\r
-\r
-\r
-CppSQLite3Statement::~CppSQLite3Statement()\r
-{\r
-       try\r
-       {\r
-               finalize();\r
-       }\r
-       catch (...)\r
-       {\r
-       }\r
-}\r
-\r
-\r
-CppSQLite3Statement& CppSQLite3Statement::operator=(const CppSQLite3Statement& rStatement)\r
-{\r
-       mpDB = rStatement.mpDB;\r
-       mpVM = rStatement.mpVM;\r
-       // Only one object can own VM\r
-       const_cast<CppSQLite3Statement&>(rStatement).mpVM = 0;\r
-       return *this;\r
-}\r
-\r
-\r
-int CppSQLite3Statement::execDML()\r
-{\r
-       checkDB();\r
-       checkVM();\r
-\r
-       const char* szError=0;\r
-\r
-       int nRet = sqlite3_step(mpVM);\r
-\r
-       if (nRet == SQLITE_DONE)\r
-       {\r
-               int nRowsChanged = sqlite3_changes(mpDB);\r
-\r
-               nRet = sqlite3_reset(mpVM);\r
-\r
-               if (nRet != SQLITE_OK)\r
-               {\r
-                       szError = sqlite3_errmsg(mpDB);\r
-                       throw CppSQLite3Exception(nRet, (char*)szError, DONT_DELETE_MSG);\r
-               }\r
-\r
-               return nRowsChanged;\r
-       }\r
-       else\r
-       {\r
-               nRet = sqlite3_reset(mpVM);\r
-               szError = sqlite3_errmsg(mpDB);\r
-               throw CppSQLite3Exception(nRet, (char*)szError, DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-CppSQLite3Query CppSQLite3Statement::execQuery()\r
-{\r
-       checkDB();\r
-       checkVM();\r
-\r
-       int nRet = sqlite3_step(mpVM);\r
-\r
-       if (nRet == SQLITE_DONE)\r
-       {\r
-               // no rows\r
-               return CppSQLite3Query(mpDB, mpVM, true/*eof*/, false);\r
-       }\r
-       else if (nRet == SQLITE_ROW)\r
-       {\r
-               // at least 1 row\r
-               return CppSQLite3Query(mpDB, mpVM, false/*eof*/, false);\r
-       }\r
-       else\r
-       {\r
-               nRet = sqlite3_reset(mpVM);\r
-               const char* szError = sqlite3_errmsg(mpDB);\r
-               throw CppSQLite3Exception(nRet, (char*)szError, DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Statement::bind(int nParam, const char* szValue)\r
-{\r
-       checkVM();\r
-       int nRes = sqlite3_bind_text(mpVM, nParam, szValue, -1, SQLITE_TRANSIENT);\r
-\r
-       if (nRes != SQLITE_OK)\r
-       {\r
-               throw CppSQLite3Exception(nRes,\r
-                                                               "Error binding string param",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Statement::bind(int nParam, const int nValue)\r
-{\r
-       checkVM();\r
-       int nRes = sqlite3_bind_int(mpVM, nParam, nValue);\r
-\r
-       if (nRes != SQLITE_OK)\r
-       {\r
-               throw CppSQLite3Exception(nRes,\r
-                                                               "Error binding int param",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Statement::bind(int nParam, const double dValue)\r
-{\r
-       checkVM();\r
-       int nRes = sqlite3_bind_double(mpVM, nParam, dValue);\r
-\r
-       if (nRes != SQLITE_OK)\r
-       {\r
-               throw CppSQLite3Exception(nRes,\r
-                                                               "Error binding double param",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Statement::bind(int nParam, const unsigned char* blobValue, int nLen)\r
-{\r
-       checkVM();\r
-       int nRes = sqlite3_bind_blob(mpVM, nParam,\r
-                                                               (const void*)blobValue, nLen, SQLITE_TRANSIENT);\r
-\r
-       if (nRes != SQLITE_OK)\r
-       {\r
-               throw CppSQLite3Exception(nRes,\r
-                                                               "Error binding blob param",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-       \r
-void CppSQLite3Statement::bindNull(int nParam)\r
-{\r
-       checkVM();\r
-       int nRes = sqlite3_bind_null(mpVM, nParam);\r
-\r
-       if (nRes != SQLITE_OK)\r
-       {\r
-               throw CppSQLite3Exception(nRes,\r
-                                                               "Error binding NULL param",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Statement::reset()\r
-{\r
-       if (mpVM)\r
-       {\r
-               int nRet = sqlite3_reset(mpVM);\r
-\r
-               if (nRet != SQLITE_OK)\r
-               {\r
-                       const char* szError = sqlite3_errmsg(mpDB);\r
-                       throw CppSQLite3Exception(nRet, (char*)szError, DONT_DELETE_MSG);\r
-               }\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Statement::finalize()\r
-{\r
-       if (mpVM)\r
-       {\r
-               int nRet = sqlite3_finalize(mpVM);\r
-               mpVM = 0;\r
-\r
-               if (nRet != SQLITE_OK)\r
-               {\r
-                       const char* szError = sqlite3_errmsg(mpDB);\r
-                       throw CppSQLite3Exception(nRet, (char*)szError, DONT_DELETE_MSG);\r
-               }\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Statement::checkDB()\r
-{\r
-       if (mpDB == 0)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Database not open",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-void CppSQLite3Statement::checkVM()\r
-{\r
-       if (mpVM == 0)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Null Virtual Machine pointer",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-CppSQLite3DB::CppSQLite3DB()\r
-{\r
-       mpDB = 0;\r
-       mnBusyTimeoutMs = 60000; // 60 seconds\r
-}\r
-\r
-\r
-CppSQLite3DB::CppSQLite3DB(const CppSQLite3DB& db)\r
-{\r
-       mpDB = db.mpDB;\r
-       mnBusyTimeoutMs = 60000; // 60 seconds\r
-}\r
-\r
-\r
-CppSQLite3DB::~CppSQLite3DB()\r
-{\r
-       close();\r
-}\r
-\r
-\r
-CppSQLite3DB& CppSQLite3DB::operator=(const CppSQLite3DB& db)\r
-{\r
-       mpDB = db.mpDB;\r
-       mnBusyTimeoutMs = 60000; // 60 seconds\r
-       return *this;\r
-}\r
-\r
-\r
-void CppSQLite3DB::open(const char* szFile)\r
-{\r
-       int nRet = sqlite3_open(szFile, &mpDB);\r
-\r
-       if (nRet != SQLITE_OK)\r
-       {\r
-               const char* szError = sqlite3_errmsg(mpDB);\r
-               throw CppSQLite3Exception(nRet, (char*)szError, DONT_DELETE_MSG);\r
-       }\r
-\r
-       setBusyTimeout(mnBusyTimeoutMs);\r
-}\r
-\r
-\r
-void CppSQLite3DB::close()\r
-{\r
-       if (mpDB)\r
-       {\r
-               sqlite3_close(mpDB);\r
-               mpDB = 0;\r
-       }\r
-}\r
-\r
-\r
-CppSQLite3Statement CppSQLite3DB::compileStatement(const char* szSQL)\r
-{\r
-       checkDB();\r
-\r
-       sqlite3_stmt* pVM = compile(szSQL);\r
-       return CppSQLite3Statement(mpDB, pVM);\r
-}\r
-\r
-\r
-bool CppSQLite3DB::tableExists(const char* szTable)\r
-{\r
-       char szSQL[128];\r
-       sprintf(szSQL,\r
-                       "select count(*) from sqlite_master where type='table' and name='%s'",\r
-                       szTable);\r
-       int nRet = execScalar(szSQL);\r
-       return (nRet > 0);\r
-}\r
-\r
-\r
-int CppSQLite3DB::execDML(const char* szSQL)\r
-{\r
-       checkDB();\r
-\r
-       char* szError=0;\r
-\r
-       int nRet = sqlite3_exec(mpDB, szSQL, 0, 0, &szError);\r
-\r
-       if (nRet == SQLITE_OK)\r
-       {\r
-               return sqlite3_changes(mpDB);\r
-       }\r
-       else\r
-       {\r
-               throw CppSQLite3Exception(nRet, szError);\r
-       }\r
-}\r
-\r
-\r
-CppSQLite3Query CppSQLite3DB::execQuery(const char* szSQL)\r
-{\r
-       checkDB();\r
-\r
-       sqlite3_stmt* pVM = compile(szSQL);\r
-\r
-       int nRet = sqlite3_step(pVM);\r
-\r
-       if (nRet == SQLITE_DONE)\r
-       {\r
-               // no rows\r
-               return CppSQLite3Query(mpDB, pVM, true/*eof*/);\r
-       }\r
-       else if (nRet == SQLITE_ROW)\r
-       {\r
-               // at least 1 row\r
-               return CppSQLite3Query(mpDB, pVM, false/*eof*/);\r
-       }\r
-       else\r
-       {\r
-               nRet = sqlite3_finalize(pVM);\r
-               const char* szError= sqlite3_errmsg(mpDB);\r
-               throw CppSQLite3Exception(nRet, (char*)szError, DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-int CppSQLite3DB::execScalar(const char* szSQL)\r
-{\r
-       CppSQLite3Query q = execQuery(szSQL);\r
-\r
-       if (q.eof() || q.numFields() < 1)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Invalid scalar query",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-\r
-       return atoi(q.fieldValue(0));\r
-}\r
-\r
-\r
-CppSQLite3Table CppSQLite3DB::getTable(const char* szSQL)\r
-{\r
-       checkDB();\r
-\r
-       char* szError=0;\r
-       char** paszResults=0;\r
-       int nRet;\r
-       int nRows(0);\r
-       int nCols(0);\r
-\r
-       nRet = sqlite3_get_table(mpDB, szSQL, &paszResults, &nRows, &nCols, &szError);\r
-\r
-       if (nRet == SQLITE_OK)\r
-       {\r
-               return CppSQLite3Table(paszResults, nRows, nCols);\r
-       }\r
-       else\r
-       {\r
-               throw CppSQLite3Exception(nRet, szError);\r
-       }\r
-}\r
-\r
-\r
-sqlite_int64 CppSQLite3DB::lastRowId()\r
-{\r
-       return sqlite3_last_insert_rowid(mpDB);\r
-}\r
-\r
-\r
-void CppSQLite3DB::setBusyTimeout(int nMillisecs)\r
-{\r
-       mnBusyTimeoutMs = nMillisecs;\r
-       sqlite3_busy_timeout(mpDB, mnBusyTimeoutMs);\r
-}\r
-\r
-\r
-void CppSQLite3DB::checkDB()\r
-{\r
-       if (!mpDB)\r
-       {\r
-               throw CppSQLite3Exception(CPPSQLITE_ERROR,\r
-                                                               "Database not open",\r
-                                                               DONT_DELETE_MSG);\r
-       }\r
-}\r
-\r
-\r
-sqlite3_stmt* CppSQLite3DB::compile(const char* szSQL)\r
-{\r
-       checkDB();\r
-\r
-       char* szError=0;\r
-       const char* szTail=0;\r
-       sqlite3_stmt* pVM;\r
-\r
-       int nRet = sqlite3_prepare(mpDB, szSQL, -1, &pVM, &szTail);\r
-\r
-       if (nRet != SQLITE_OK)\r
-       {\r
-               throw CppSQLite3Exception(nRet, szError);\r
-       }\r
-\r
-       return pVM;\r
-}\r
-\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-// SQLite encode.c reproduced here, containing implementation notes and source\r
-// for sqlite3_encode_binary() and sqlite3_decode_binary() \r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-/*\r
-** 2002 April 25\r
-**\r
-** The author disclaims copyright to this source code.  In place of\r
-** a legal notice, here is a blessing:\r
-**\r
-**    May you do good and not evil.\r
-**    May you find forgiveness for yourself and forgive others.\r
-**    May you share freely, never taking more than you give.\r
-**\r
-*************************************************************************\r
-** This file contains helper routines used to translate binary data into\r
-** a null-terminated string (suitable for use in SQLite) and back again.\r
-** These are convenience routines for use by people who want to store binary\r
-** data in an SQLite database.  The code in this file is not used by any other\r
-** part of the SQLite library.\r
-**\r
-** $Id: CppSQLite3.cpp,v 1.2 2008/12/15 12:54:44 guigues Exp $\r
-*/\r
-\r
-/*\r
-** How This Encoder Works\r
-**\r
-** The output is allowed to contain any character except 0x27 (') and\r
-** 0x00.  This is accomplished by using an escape character to encode\r
-** 0x27 and 0x00 as a two-byte sequence.  The escape character is always\r
-** 0x01.  An 0x00 is encoded as the two byte sequence 0x01 0x01.  The\r
-** 0x27 character is encoded as the two byte sequence 0x01 0x03.  Finally,\r
-** the escape character itself is encoded as the two-character sequence\r
-** 0x01 0x02.\r
-**\r
-** To summarize, the encoder works by using an escape sequences as follows:\r
-**\r
-**       0x00  ->  0x01 0x01\r
-**       0x01  ->  0x01 0x02\r
-**       0x27  ->  0x01 0x03\r
-**\r
-** If that were all the encoder did, it would work, but in certain cases\r
-** it could double the size of the encoded string.  For example, to\r
-** encode a string of 100 0x27 characters would require 100 instances of\r
-** the 0x01 0x03 escape sequence resulting in a 200-character output.\r
-** We would prefer to keep the size of the encoded string smaller than\r
-** this.\r
-**\r
-** To minimize the encoding size, we first add a fixed offset value to each \r
-** byte in the sequence.  The addition is modulo 256.  (That is to say, if\r
-** the sum of the original character value and the offset exceeds 256, then\r
-** the higher order bits are truncated.)  The offset is chosen to minimize\r
-** the number of characters in the string that need to be escaped.  For\r
-** example, in the case above where the string was composed of 100 0x27\r
-** characters, the offset might be 0x01.  Each of the 0x27 characters would\r
-** then be converted into an 0x28 character which would not need to be\r
-** escaped at all and so the 100 character input string would be converted\r
-** into just 100 characters of output.  Actually 101 characters of output - \r
-** we have to record the offset used as the first byte in the sequence so\r
-** that the string can be decoded.  Since the offset value is stored as\r
-** part of the output string and the output string is not allowed to contain\r
-** characters 0x00 or 0x27, the offset cannot be 0x00 or 0x27.\r
-**\r
-** Here, then, are the encoding steps:\r
-**\r
-**     (1)   Choose an offset value and make it the first character of\r
-**           output.\r
-**\r
-**     (2)   Copy each input character into the output buffer, one by\r
-**           one, adding the offset value as you copy.\r
-**\r
-**     (3)   If the value of an input character plus offset is 0x00, replace\r
-**           that one character by the two-character sequence 0x01 0x01.\r
-**           If the sum is 0x01, replace it with 0x01 0x02.  If the sum\r
-**           is 0x27, replace it with 0x01 0x03.\r
-**\r
-**     (4)   Put a 0x00 terminator at the end of the output.\r
-**\r
-** Decoding is obvious:\r
-**\r
-**     (5)   Copy encoded characters except the first into the decode \r
-**           buffer.  Set the first encoded character aside for use as\r
-**           the offset in step 7 below.\r
-**\r
-**     (6)   Convert each 0x01 0x01 sequence into a single character 0x00.\r
-**           Convert 0x01 0x02 into 0x01.  Convert 0x01 0x03 into 0x27.\r
-**\r
-**     (7)   Subtract the offset value that was the first character of\r
-**           the encoded buffer from all characters in the output buffer.\r
-**\r
-** The only tricky part is step (1) - how to compute an offset value to\r
-** minimize the size of the output buffer.  This is accomplished by testing\r
-** all offset values and picking the one that results in the fewest number\r
-** of escapes.  To do that, we first scan the entire input and count the\r
-** number of occurances of each character value in the input.  Suppose\r
-** the number of 0x00 characters is N(0), the number of occurances of 0x01\r
-** is N(1), and so forth up to the number of occurances of 0xff is N(255).\r
-** An offset of 0 is not allowed so we don't have to test it.  The number\r
-** of escapes required for an offset of 1 is N(1)+N(2)+N(40).  The number\r
-** of escapes required for an offset of 2 is N(2)+N(3)+N(41).  And so forth.\r
-** In this way we find the offset that gives the minimum number of escapes,\r
-** and thus minimizes the length of the output string.\r
-*/\r
-\r
-/*\r
-** Encode a binary buffer "in" of size n bytes so that it contains\r
-** no instances of characters '\'' or '\000'.  The output is \r
-** null-terminated and can be used as a string value in an INSERT\r
-** or UPDATE statement.  Use sqlite3_decode_binary() to convert the\r
-** string back into its original binary.\r
-**\r
-** The result is written into a preallocated output buffer "out".\r
-** "out" must be able to hold at least 2 +(257*n)/254 bytes.\r
-** In other words, the output will be expanded by as much as 3\r
-** bytes for every 254 bytes of input plus 2 bytes of fixed overhead.\r
-** (This is approximately 2 + 1.0118*n or about a 1.2% size increase.)\r
-**\r
-** The return value is the number of characters in the encoded\r
-** string, excluding the "\000" terminator.\r
-*/\r
-int sqlite3_encode_binary(const unsigned char *in, int n, unsigned char *out){\r
-  int i, j, e, m;\r
-  int cnt[256];\r
-  if( n<=0 ){\r
-    out[0] = 'x';\r
-    out[1] = 0;\r
-    return 1;\r
-  }\r
-  memset(cnt, 0, sizeof(cnt));\r
-  for(i=n-1; i>=0; i--){ cnt[in[i]]++; }\r
-  m = n;\r
-  for(i=1; i<256; i++){\r
-    int sum;\r
-    if( i=='\'' ) continue;\r
-    sum = cnt[i] + cnt[(i+1)&0xff] + cnt[(i+'\'')&0xff];\r
-    if( sum<m ){\r
-      m = sum;\r
-      e = i;\r
-      if( m==0 ) break;\r
-    }\r
-  }\r
-  out[0] = e;\r
-  j = 1;\r
-  for(i=0; i<n; i++){\r
-    int c = (in[i] - e)&0xff;\r
-    if( c==0 ){\r
-      out[j++] = 1;\r
-      out[j++] = 1;\r
-    }else if( c==1 ){\r
-      out[j++] = 1;\r
-      out[j++] = 2;\r
-    }else if( c=='\'' ){\r
-      out[j++] = 1;\r
-      out[j++] = 3;\r
-    }else{\r
-      out[j++] = c;\r
-    }\r
-  }\r
-  out[j] = 0;\r
-  return j;\r
-}\r
-\r
-/*\r
-** Decode the string "in" into binary data and write it into "out".\r
-** This routine reverses the encoding created by sqlite3_encode_binary().\r
-** The output will always be a few bytes less than the input.  The number\r
-** of bytes of output is returned.  If the input is not a well-formed\r
-** encoding, -1 is returned.\r
-**\r
-** The "in" and "out" parameters may point to the same buffer in order\r
-** to decode a string in place.\r
-*/\r
-int sqlite3_decode_binary(const unsigned char *in, unsigned char *out){\r
-  int i, c, e;\r
-  e = *(in++);\r
-  i = 0;\r
-  while( (c = *(in++))!=0 ){\r
-    if( c==1 ){\r
-      c = *(in++);\r
-      if( c==1 ){\r
-        c = 0;\r
-      }else if( c==2 ){\r
-        c = 1;\r
-      }else if( c==3 ){\r
-        c = '\'';\r
-      }else{\r
-        return -1;\r
-      }\r
-    }\r
-    out[i++] = (c + e)&0xff;\r
-  }\r
-  return i;\r
-}\r
diff --git a/src/CppSQLite3.h b/src/CppSQLite3.h
deleted file mode 100644 (file)
index c45c9cb..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////\r
-// CppSQLite3 - A C++ wrapper around the SQLite3 embedded database library.\r
-//\r
-// Copyright (c) 2004 Rob Groves. All Rights Reserved. rob.groves@btinternet.com\r
-// \r
-// Permission to use, copy, modify, and distribute this software and its\r
-// documentation for any purpose, without fee, and without a written\r
-// agreement, is hereby granted, provided that the above copyright notice, \r
-// this paragraph and the following two paragraphs appear in all copies, \r
-// modifications, and distributions.\r
-//\r
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,\r
-// INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST\r
-// PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,\r
-// EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-//\r
-// THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT\r
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\r
-// PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF\r
-// ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". THE AUTHOR HAS NO OBLIGATION\r
-// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\r
-//\r
-// V3.0                03/08/2004      -Initial Version for sqlite3\r
-//\r
-// V3.1                16/09/2004      -Implemented getXXXXField using sqlite3 functions\r
-//                                             -Added CppSQLiteDB3::tableExists()\r
-////////////////////////////////////////////////////////////////////////////////\r
-#ifndef _CppSQLite3_H_\r
-#define _CppSQLite3_H_\r
-\r
-#include "sqlite3.h"\r
-#include <cstdio>\r
-#include <cstring>\r
-\r
-#define CPPSQLITE_ERROR 1000\r
-\r
-class CppSQLite3Exception\r
-{\r
-public:\r
-\r
-    CppSQLite3Exception(const int nErrCode,\r
-                       char* szErrMess,\r
-                       bool bDeleteMsg=true);\r
-  CppSQLite3Exception(const int nErrCode,\r
-                     const char* szErrMess,\r
-                     bool bDeleteMsg=true);\r
-  \r
-    CppSQLite3Exception(const CppSQLite3Exception&  e);\r
-\r
-    virtual ~CppSQLite3Exception();\r
-\r
-    const int errorCode() { return mnErrCode; }\r
-\r
-    const char* errorMessage() { return mpszErrMess; }\r
-\r
-    static const char* errorCodeAsString(int nErrCode);\r
-\r
-private:\r
-\r
-    int mnErrCode;\r
-    char* mpszErrMess;\r
-};\r
-\r
-\r
-class CppSQLite3Buffer\r
-{\r
-public:\r
-\r
-    CppSQLite3Buffer();\r
-\r
-    ~CppSQLite3Buffer();\r
-\r
-    const char* format(const char* szFormat, ...);\r
-\r
-    operator const char*() { return mpBuf; }\r
-\r
-    void clear();\r
-\r
-private:\r
-\r
-    char* mpBuf;\r
-};\r
-\r
-\r
-class CppSQLite3Binary\r
-{\r
-public:\r
-\r
-    CppSQLite3Binary();\r
-\r
-    ~CppSQLite3Binary();\r
-\r
-    void setBinary(const unsigned char* pBuf, int nLen);\r
-    void setEncoded(const unsigned char* pBuf);\r
-\r
-    const unsigned char* getEncoded();\r
-    const unsigned char* getBinary();\r
-\r
-    int getBinaryLength();\r
-\r
-    unsigned char* allocBuffer(int nLen);\r
-\r
-    void clear();\r
-\r
-private:\r
-\r
-    unsigned char* mpBuf;\r
-    int mnBinaryLen;\r
-    int mnBufferLen;\r
-    int mnEncodedLen;\r
-    bool mbEncoded;\r
-};\r
-\r
-\r
-class CppSQLite3Query\r
-{\r
-public:\r
-\r
-    CppSQLite3Query();\r
-\r
-    CppSQLite3Query(const CppSQLite3Query& rQuery);\r
-\r
-    CppSQLite3Query(sqlite3* pDB,\r
-                               sqlite3_stmt* pVM,\r
-                bool bEof,\r
-                bool bOwnVM=true);\r
-\r
-    CppSQLite3Query& operator=(const CppSQLite3Query& rQuery);\r
-\r
-    virtual ~CppSQLite3Query();\r
-\r
-    int numFields();\r
-\r
-    int fieldIndex(const char* szField);\r
-    const char* fieldName(int nCol);\r
-\r
-    const char* fieldDeclType(int nCol);\r
-    int fieldDataType(int nCol);\r
-\r
-    const char* fieldValue(int nField);\r
-    const char* fieldValue(const char* szField);\r
-\r
-    int getIntField(int nField, int nNullValue=0);\r
-    int getIntField(const char* szField, int nNullValue=0);\r
-\r
-    double getFloatField(int nField, double fNullValue=0.0);\r
-    double getFloatField(const char* szField, double fNullValue=0.0);\r
-\r
-    const char* getStringField(int nField, const char* szNullValue="");\r
-    const char* getStringField(const char* szField, const char* szNullValue="");\r
-\r
-    const unsigned char* getBlobField(int nField, int& nLen);\r
-    const unsigned char* getBlobField(const char* szField, int& nLen);\r
-\r
-    bool fieldIsNull(int nField);\r
-    bool fieldIsNull(const char* szField);\r
-\r
-    bool eof();\r
-\r
-    void nextRow();\r
-\r
-    void finalize();\r
-\r
-private:\r
-\r
-    void checkVM();\r
-\r
-       sqlite3* mpDB;\r
-    sqlite3_stmt* mpVM;\r
-    bool mbEof;\r
-    int mnCols;\r
-    bool mbOwnVM;\r
-};\r
-\r
-\r
-class CppSQLite3Table\r
-{\r
-public:\r
-\r
-    CppSQLite3Table();\r
-\r
-    CppSQLite3Table(const CppSQLite3Table& rTable);\r
-\r
-    CppSQLite3Table(char** paszResults, int nRows, int nCols);\r
-\r
-    virtual ~CppSQLite3Table();\r
-\r
-    CppSQLite3Table& operator=(const CppSQLite3Table& rTable);\r
-\r
-    int numFields();\r
-\r
-    int numRows();\r
-\r
-    const char* fieldName(int nCol);\r
-\r
-    const char* fieldValue(int nField);\r
-    const char* fieldValue(const char* szField);\r
-\r
-    int getIntField(int nField, int nNullValue=0);\r
-    int getIntField(const char* szField, int nNullValue=0);\r
-\r
-    double getFloatField(int nField, double fNullValue=0.0);\r
-    double getFloatField(const char* szField, double fNullValue=0.0);\r
-\r
-    const char* getStringField(int nField, const char* szNullValue="");\r
-    const char* getStringField(const char* szField, const char* szNullValue="");\r
-\r
-    bool fieldIsNull(int nField);\r
-    bool fieldIsNull(const char* szField);\r
-\r
-    void setRow(int nRow);\r
-\r
-    void finalize();\r
-\r
-private:\r
-\r
-    void checkResults();\r
-\r
-    int mnCols;\r
-    int mnRows;\r
-    int mnCurrentRow;\r
-    char** mpaszResults;\r
-};\r
-\r
-\r
-class CppSQLite3Statement\r
-{\r
-public:\r
-\r
-    CppSQLite3Statement();\r
-\r
-    CppSQLite3Statement(const CppSQLite3Statement& rStatement);\r
-\r
-    CppSQLite3Statement(sqlite3* pDB, sqlite3_stmt* pVM);\r
-\r
-    virtual ~CppSQLite3Statement();\r
-\r
-    CppSQLite3Statement& operator=(const CppSQLite3Statement& rStatement);\r
-\r
-    int execDML();\r
-\r
-    CppSQLite3Query execQuery();\r
-\r
-    void bind(int nParam, const char* szValue);\r
-    void bind(int nParam, const int nValue);\r
-    void bind(int nParam, const double dwValue);\r
-    void bind(int nParam, const unsigned char* blobValue, int nLen);\r
-    void bindNull(int nParam);\r
-\r
-    void reset();\r
-\r
-    void finalize();\r
-\r
-private:\r
-\r
-    void checkDB();\r
-    void checkVM();\r
-\r
-    sqlite3* mpDB;\r
-    sqlite3_stmt* mpVM;\r
-};\r
-\r
-\r
-class CppSQLite3DB\r
-{\r
-public:\r
-\r
-    CppSQLite3DB();\r
-\r
-    virtual ~CppSQLite3DB();\r
-\r
-    void open(const char* szFile);\r
-\r
-    void close();\r
-\r
-       bool tableExists(const char* szTable);\r
-\r
-    int execDML(const char* szSQL);\r
-\r
-    CppSQLite3Query execQuery(const char* szSQL);\r
-\r
-    int execScalar(const char* szSQL);\r
-\r
-    CppSQLite3Table getTable(const char* szSQL);\r
-\r
-    CppSQLite3Statement compileStatement(const char* szSQL);\r
-\r
-    sqlite_int64 lastRowId();\r
-\r
-    void interrupt() { sqlite3_interrupt(mpDB); }\r
-\r
-    void setBusyTimeout(int nMillisecs);\r
-\r
-    static const char* SQLiteVersion() { return SQLITE_VERSION; }\r
-\r
-private:\r
-\r
-    CppSQLite3DB(const CppSQLite3DB& db);\r
-    CppSQLite3DB& operator=(const CppSQLite3DB& db);\r
-\r
-    sqlite3_stmt* compile(const char* szSQL);\r
-\r
-    void checkDB();\r
-\r
-    sqlite3* mpDB;\r
-    int mnBusyTimeoutMs;\r
-};\r
-\r
-#endif\r
diff --git a/src/creaImageIODicomDatabase.cpp b/src/creaImageIODicomDatabase.cpp
deleted file mode 100644 (file)
index a83542a..0000000
+++ /dev/null
@@ -1,1287 +0,0 @@
-#include <creaImageIODicomDatabase.h>
-
-#include "CppSQLite3.h"
-
-#include <sys/stat.h>
-
-#include <creaImageIODicomDatabaseStructure.h>
-
-//#include <creaImageIOUtilities.h>
-
-//#include <icons/database.xpm>
-
-#include <deque>
-
-#include "wx/wx.h"
-#include <wx/dir.h>
-#include <wx/filename.h>
-
-
-//#include <icons/close.xpm>
-
-#include <creaWx.h>
-#include <creaMessageManager.h>
-using namespace crea;
-
-#include <boost/filesystem.hpp>
-#include <boost/algorithm/string/replace.hpp>
-
-namespace creaImageIO
-{
-
-
-  //=============================================================
-  DicomDatabase::DicomDatabase(const std::string& location, int flags)
-    : DicomNode(DicomNode::Database,0,0),
-      mFileName(location),
-      mFlags(flags)
-  {
-    mDicomDatabase = this;
-    DicomNodeTypeDescription::FieldDescriptionMapType& M = 
-      mDicomNodeTypeDescription[DicomNode::Database].GetFieldDescriptionMap();
-
-    boost::filesystem::path full_path(location);
-    mName = full_path.leaf();
-    Field::Description fname("Name",0,0,"Name",0);
-    M[fname.key] = fname;
-    UnsafeSetFieldValue(fname.key,mName);
-    Field::Description flocation("File name",0,0,"File name",0);
-    M[flocation.key] = flocation;
-    UnsafeSetFieldValue(flocation.key,location);
-
-    //    Field::Description ftype("Type",0,0,"Type",0);
-    //    M[ftype.key] = ftype;
-    //    UnsafeSetFieldValue(ftype.key,"Invalid location");
-
-    mDB = new CppSQLite3DB;
-    //    std::cout << "** SQLite Version: " << mDB->SQLiteVersion() << std::endl;
-
-
-  }
-  //=============================================================
-
-  //=============================================================
-  DicomDatabase::~DicomDatabase()
-  {
-    delete mDB;
-    /*
-      Already done in DicomNode now that DicomDatabase inherits from it
-    ChildrenListType::iterator i;
-    for (i=GetChildrenList().begin(); i!=GetChildrenList().end(); i++)
-      {
-       delete *i;
-      }
-    */
-  }
-  //=============================================================
-  
-
-  //=============================================================
-  void DicomDatabase::BuildDefaultDicomNodeTypeDescriptions()
-  {
-    for (int i = DicomNode::Patient;
-        i <= DicomNode::Image; 
-        ++i)
-      {
-       mDicomNodeTypeDescription[i].BuildDefault(i);
-      }
-  }
-  //=============================================================
-
-  //=============================================================
-  void DicomDatabase::Print() const 
-  {
-    std::cout << "-> '"<<GetName()<< "' - '"
-             << GetFileName()<<"'"<<std::endl;
-    ChildrenListType::const_iterator i;
-    for (i=GetChildrenList().begin(); i!=GetChildrenList().end(); i++)
-      {
-       (*i)->Print();
-      }
-  }
-  //=============================================================
-  
-  //=====================================================================
-  bool DicomDatabase::LocationIsValid()
-  {
-    // TO DO 
-    return true;
-  }
-  //=====================================================================
-
-  char* format_sql(const std::string& s)
-  { 
-    return sqlite3_mprintf("%q",s.c_str());
-  }
-  //  sqlite3_exec(db, zSQL, 0, 0, 0);
-  //  sqlite3_free(zSQL);
-  //   char* CHAIN = format_sql(QUER);         \
-//  sqlite3_free(CHAIN);                               \
-
-  //=====================================================================
-#define QUERYDB(QUER,RES)                                              \
-    try                                                                        \
-      {                                                                        \
-       RES = mDB->execQuery(QUER.c_str());                             \
-      }                                                                        \
-    catch (CppSQLite3Exception& e)                                     \
-      {                                                                        \
-       std::cout << "SQLite query '"<<QUER<<"' : "<< e.errorCode() << ":" \
-                 << e.errorMessage()<<std::endl;                       \
-       creaError("SQLite query '"<<QUER<<"' : "<< e.errorCode() << ":" \
-                  << e.errorMessage() );                               \
-      }                                                                        \
-    
-  //=====================================================================
-  
-  //=====================================================================
-#define UPDATEDB(UP)                                                   \
-  try                                                                  \
-    {                                                                  \
-      mDB->execDML(UP.c_str());                                                \
-    }                                                                  \
-  catch (CppSQLite3Exception& e)                                       \
-    {                                                                  \
-      std::cout << "SQLite update '"<<UP<<"' Error : "<< e.errorCode() << ":" \
-               << e.errorMessage()<<std::endl;                         \
-      creaError("SQLite update '"<<UP<<"' Error : "<< e.errorCode() << ":" \
-                << e.errorMessage() );                                 \
-    }                                                                  
-  //=====================================================================
-
-  //=====================================================================
-  bool DicomDatabase::Open()
-  {
-    //    std::cout << "***> DicomDatabase::Open('"<<GetFileName()<<"')"<<std::endl;
-    return OpenDB();
-  }
-
-  //=====================================================================
-  bool DicomDatabase::New()
-  {
-    //    std::cout << "***> DicomDatabase::New('"<<GetFileName()<<"')"<<std::endl;
-    return CreateDB();
-  }
-  //=====================================================================
-
-  //=====================================================================
-  bool DicomDatabase::OpenDB()
-  {
-    //    std::cout << "### Opening SQLite database '"<<GetFileName()<<std::endl;
-    // OPENING FILE
-    if (!boost::filesystem::exists(GetFileName())) 
-      {
-       return false;
-      }
-
-    try
-      {
-       mDB->open(GetFileName().c_str());
-      }
-    catch (CppSQLite3Exception& e)
-      {
-       std::cerr << "Opening '"<<GetFileName()<<"' : "
-                 << e.errorCode() << ":" 
-                 << e.errorMessage() << std::endl;
-       return false;
-      }
-    // TESTING STRUCTURE VALIDITY
-    if (!DBStructureIsValid())
-      {
-       std::cerr << "Opening '"<<GetFileName()<<"' : "
-                 << " invalid database structure" << std::endl;
-       return false;
-      }
-    // IMPORTING NODE TYPE DESCRIPTIONS
-    ImportDicomNodeTypeDescriptionsFromDB();
-    return true;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  bool DicomDatabase::CreateDB()
-  {
-    //    std::cout << "### Creating SQLite database '"<<GetFileName()<<std::endl;
-
-    if (boost::filesystem::exists(GetFileName())) 
-      {
-       return false;
-      }
-    // OPENING
-    try
-      {
-       mDB->open(GetFileName().c_str());
-      }
-    catch (CppSQLite3Exception& e)
-      {
-       std::cerr << "Creating '"<<GetFileName()<<"' : "
-                  << e.errorCode() << ":" 
-                 << e.errorMessage() <<std::endl;
-       return false;
-      }
-    
-    // CREATING DEFAULT DB STRUCTURE
-    BuildDefaultDicomNodeTypeDescriptions();
-
-    // CREATING TABLES
-    try
-      {
-       std::string command;
-       // PATIENT
-//     command = "create table PATIENT\n(\nID INTEGER PRIMARY KEY AUTOINCREMENT,\n";
-// LG : AUTOINCREMENT unknown on sqlite3 for Win32 ??
-       command = "create table PATIENT\n(\nID INTEGER PRIMARY KEY,\n";
-       AppendSQLFieldsDefinition(DicomNode::Patient,command);
-       command += "\n)";
-       UPDATEDB(command);
-
-       // STUDY
-//     command = "create table STUDY\n(\nID INTEGER PRIMARY KEY AUTOINCREMENT,\nPARENT_ID int not null,\n";    
-       command = "create table STUDY\n(\nID INTEGER PRIMARY KEY,\nPARENT_ID int not null,\n";  
-       AppendSQLFieldsDefinition(DicomNode::Study,command);
-       command +=",\n";
-       command +="constraint FK_PARENT foreign key (PARENT_ID) references PATIENT(ID) on delete restrict on update restrict\n)";
-       UPDATEDB(command);
-       
-       // SERIES
-//     command = "create table SERIES\n(\nID INTEGER PRIMARY KEY AUTOINCREMENT,\nPARENT_ID int not null,\n";
-       command = "create table SERIES\n(\nID INTEGER PRIMARY KEY,\nPARENT_ID int not null,\n";
-       AppendSQLFieldsDefinition(DicomNode::Series,command);
-       command += ",\n";
-       command += "constraint FK_PARENT foreign key (PARENT_ID) references STUDY(ID) on delete restrict on update restrict\n)";
-       UPDATEDB(command);
-       
-       // IMAGE
-//     command = "create table IMAGE\n(\nID INTEGER PRIMARY KEY AUTOINCREMENT,\nPARENT_ID int not null,\n";
-       command = "create table IMAGE\n(\nID INTEGER PRIMARY KEY,\nPARENT_ID int not null,\n";
-       AppendSQLFieldsDefinition(DicomNode::Image,command);
-       command += ",\n";
-       command += "constraint FK_PARENT foreign key (PARENT_ID) references SERIE (ID) on delete restrict on update restrict\n)";
-       UPDATEDB(command);
-
-       //constraint FK_DIRECTORY foreign key (DIRECTORY_ID)            \
-           //      references ROOTDIRECTORY (ID)                       \
-           //      on delete restrict on update restrict,              
-       
-       
-       // Create tables *_FIELDS
-       for (DicomNode::Type type=DicomNode::Patient; 
-            type<=DicomNode::Image; type++)
-         {
-           command = "create table ";
-           command += DicomDatabaseStructure::Table(type);
-           command += "_FIELDS\n(\n";
-           command += "Key text,\n";
-           command += "DicomGroup int,\n";
-           command += "DicomElement int,\n";       
-           command += "Name text,\n";      
-           command += "Flags int\n";       
-           command += "\n)";
-           UPDATEDB(command);
-         }
-       // Fill the tables *_FIELDS
-       ExportDicomNodeTypeDescriptionsToDB();
-
-      }
-    catch (std::exception)
-      {
-       return false;
-      }
-    // LG : TEST
-    if (DBStructureIsValid())
-      {
-       //      std::cout << "*** DONE ***"<<std::endl;
-       //      mDBLoaded = true;
-       SetChildrenLoaded(true);
-       return true;
-       
-      }
-    else 
-      {
-       //      std::cout << "*** AAAARRRRGGG ***"<<std::endl;
-       
-       return false;
-      }
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void DicomDatabase::AppendSQLFieldsDefinition(DicomNode::Type c,
-                                            std::string& s)
-  {
-    std::vector<std::string*> keys;
-    DicomNodeTypeDescription::FieldDescriptionMapType::iterator i;
-    for (i  = GetDicomNodeTypeDescription(c).GetFieldDescriptionMap().begin();
-        i != GetDicomNodeTypeDescription(c).GetFieldDescriptionMap().end();
-        ++i)
-      {
-       if (i->second.flags==1) continue;
-       keys.push_back(&(i->second.key));
-      }
-    std::vector<std::string*>::iterator j;
-    for (j=keys.begin();j!=keys.end();)
-      {
-       s += **j + " text";
-       ++j;
-       if (j!=keys.end())
-         s += ",\n";
-      }
-
-  }
-  //=====================================================================
-  
-  //=====================================================================
-  void DicomDatabase::ExportDicomNodeTypeDescriptionsToDB()
-  {
-    //    std::cout<<"ExportDicomNodeTypeDescriptionsToDB()"<<std::endl;
-    for (DicomNode::Type type=DicomNode::Patient; 
-        type<=DicomNode::Image; 
-        type++)
-      {
-       DicomNodeTypeDescription::FieldDescriptionMapType::iterator i;
-       for (i = GetDicomNodeTypeDescription(type).GetFieldDescriptionMap().begin();
-            i!= GetDicomNodeTypeDescription(type).GetFieldDescriptionMap().end();
-            i++)
-         {
-           
-           std::stringstream insert;
-           insert << "INSERT INTO "
-                  << std::string(DicomDatabaseStructure::Table(type))
-                  << "_FIELDS (Key,DicomGroup,DicomElement,Name,Flags) "
-                  << "VALUES ('"
-                  << (*i).second.GetKey() << "',"
-                  << (*i).second.GetGroup() << ","
-                  << (*i).second.GetElement() << ",'"
-                  << (*i).second.GetName() << "',"
-                  << (*i).second.GetFlags() << ");";
-
-           //      std::cout << "** SQL = '"<<insert.str()<<"'"<<std::endl;
-           
-           UPDATEDB(insert.str());
-         }
-      }
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void DicomDatabase::ImportDicomNodeTypeDescriptionsFromDB()
-  {
-    //    std::cout<<"ImportDicomNodeTypeDescriptionsFromDB()"<<std::endl;
-    for (DicomNode::Type type=DicomNode::Patient; 
-        type<=DicomNode::Image; 
-        type++)
-      {
-       std::string query = "SELECT * FROM ";
-       query += DicomDatabaseStructure::Table(type);
-       query += "_FIELDS";
-
-       //      std::cout << "** SQL = '"<<query<<"'"<<std::endl;
-       
-       CppSQLite3Query q;
-       QUERYDB(query,q);
-       
-
-       while (!q.eof())
-         {
-           Field::Description d(q.getStringField(0), // Key
-                                q.getIntField(1), // Group
-                                q.getIntField(2), // Element 
-                                q.getStringField(3), // Name
-                                q.getIntField(4) // Flags
-                                );
-           GetDicomNodeTypeDescription(type).GetFieldDescriptionMap()[d.key] = d;
-           //      std::cout << d << std::endl;
-           q.nextRow();
-         }
-      }
-  }
-  //=====================================================================
-
-  //=====================================================================
-  bool DicomDatabase::Close()
-  {
-    //    std::cout << "***> DicomDatabase::Close"<<std::endl;
-
-    //    std::cout << "<*** DicomDatabase::Close"<<std::endl;
-         return true;
-  }
-  //=====================================================================
-  /*
-  //=====================================================================
-  bool DicomDatabase::LoadAll()
-  {
-    DBLoadChildren(0,true);
-    mDBLoaded = true;
-    return true;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  bool DicomDatabase::LoadUpToSeries()
-  {
-    //return LoadAll();
-    DBLoadChildren(0,false);
-    //    mDBLoaded = true;
-    return true;
-  }
-  //=====================================================================
-  
-  //=====================================================================
-  bool DicomDatabase::LoadSeriesImages(DicomNode* series)
-  {
-    //    return false;
-    
-    if (!series->GetType()==DicomNode::Series) 
-      {
-       return false;
-       creaError("DicomDatabase::LoadSeriesImages : node is not a series !");
-      }
-    DBLoadChildren(series,true);
-    return true;
-  }
-  //=====================================================================
-*/
-
-  //=====================================================================
-  void DicomDatabase::Clear()
-  {
-  }
-  //=====================================================================
-  
-
-  //=====================================================================
-  int DicomDatabase::DBLoadChildren(DicomNode* parent, 
-                                    DicomNode::Type maxlevel)
-  {
-
-    //    std::cout << "DicomDatabase::DBLoadChildren("<<parent<<","<<maxlevel
-    //       << ")"<<std::endl;
-    int nbloaded = 0;
-    if (parent == this) { parent = 0; }
-    DicomNode* xparent = parent;
-    if ( xparent==0 ) xparent = this;
-    if ( xparent->ChildrenLoaded() ) 
-      {
-       //      std::cout << "--> Children already loaded"<<std::endl;
-       return nbloaded;
-      }
-    if ( xparent->GetType() == DicomNode::Image ) 
-      {
-       return nbloaded;
-      }
-    if ( xparent->GetType() >= maxlevel ) 
-      {
-       return nbloaded;
-      }
-    /*
-    if ( parent->ChildrenLoaded().size()>0 ) 
-      {        
-       DicomNode* n = this;
-       if (parent) n = parent;
-       // If parent already has loaded its children 
-       // simply recurse to its children 
-       DicomNode::ChildrenListType::iterator i;
-       for (i  = n->GetChildrenList().begin();
-            i != n->GetChildrenList().end();
-            i++)
-         {
-           DBLoadChildren(*i,load_images);
-         }
-       return;
-      }
-    */
-    msw[2].Pause();
-    msw[2].Resume();
-    DicomNode::Type type = xparent->GetType()+1;
-
-    // Query DB
-
-    std::string query = "SELECT * FROM ";
-    query += DicomDatabaseStructure::Table(type);
-    if (parent!=0)
-      {
-       query += " WHERE PARENT_ID='" + parent->GetFieldValue("ID") + "'";
-      }
-
-    //    std::cout << "** SQL = '"<<query<<"'"<<std::endl;
-
-    CppSQLite3Query q;
-    QUERYDB(query,q);
-
-    while (!q.eof())
-      {
-       nbloaded++;
-       DicomNode* n = new DicomNode(type,
-                          this,xparent);
-       for (int fld = 0; fld < q.numFields(); fld++)
-         {
-           n->SetFieldValue(q.fieldName(fld),q.getStringField(fld));       
-         }
-       // Index 
-       TypeId ti;
-       ti.type = type;
-       ti.id = n->GetFieldValue("ID");    
-       mTypeIdToDicomNodeMap[ti] = n;
-       // recurse 
-       if ( type < maxlevel ) 
-         {
-           msw[2].Pause();
-           nbloaded += DBLoadChildren(n,maxlevel);
-           msw[2].Resume();
-         }
-       // next entry in db
-       q.nextRow();
-      }
-
-    xparent->SetChildrenLoaded(true);
-    
-    msw[2].Pause();
-    return nbloaded;
-  }
-  //=====================================================================
-
-
-
-  //=====================================================================
-  bool DicomDatabase::DBStructureIsValid()
-  {
-    bool success = true;
-    for (int i = DicomDatabaseStructure::TableBegin();
-        i    != DicomDatabaseStructure::TableEnd();++i)
-      {
-       bool ok = mDB->tableExists(DicomDatabaseStructure::Table(i));
-       if (ok) 
-         {
-           //      std::cout << "** Table "<<DicomDatabaseStructure::Table(i)
-           //                <<" exists"<<std::endl;
-           // TO DO : TEST MANDATORY FIELDS EXIST
-         }
-       else 
-         {
-           //      std::cout << "** Table "<<DicomDatabaseStructure::Table(i)
-           //                <<" does *NOT* exist"<<std::endl;
-           success = false;
-         }
-      }
-    return success;
-  }  
-  //=====================================================================
-
-
-
-  //=====================================================================
-  bool DicomDatabase::DBInsert(DicomNode* alien_node,
-                              UpdateSummary& summary)
-  {
-    //    std::cout << "DicomDatabase::Insert('"<<alien_node->GetLabel()
-    //       <<"')"<<std::endl;
-    
-    //    if (!ChildrenLoaded()) DBLoadChildren(this,DicomNode::Database);
-    
-    // Find parent
-    DicomNode* parent;
-    std::string parent_id;
-    parent = DBGetOrCreateParent(alien_node,parent_id,summary);
-    
-    // Insert 
-    DBRecursiveGetOrCreateDicomNode(alien_node,parent,parent_id,summary);
-   return true;
-  }
-  //=====================================================================
-
-
-  //=====================================================================
-  DicomNode* DicomDatabase::DBGetOrCreateParent(DicomNode* alien_node,
-                                               std::string& parent_id,
-                                               UpdateSummary& summary)
-  {
-    //    std::cout << "DBGetOrCreateParent '" << alien_node->GetLabel()<<"'"
-    //       << std::endl;
-    // Load the patients if not already done
-    DBLoadChildren(this,DicomNode::Patient);
-
-    parent_id = "";
-    DicomNode* parent = this;
-
-    // The chain of ancestors
-    std::deque<DicomNode*> chain;
-    DicomNode* cur = alien_node->GetParent();
-    for (int type=DicomNode::Patient; 
-        type<alien_node->GetType();++type)
-      {
-       chain.push_front(cur);
-       cur = cur->GetParent();
-      }
-
-    // create the nodes if do not exist
-    std::deque<DicomNode*>::iterator i;
-    for (i=chain.begin();i!=chain.end();++i)
-      {
-       //      std::cout << " cur = '"<<(*i)->GetLabel()<<"'"<<std::endl;
-       //      std::string cur_id = DBGetDicomNodeId(*i,parent_id);
-       //      if (cur_id.size()==0)
-       //        {
-       // Node does not exist : create it
-       std::string cur_id;
-       parent = DBGetOrCreateDicomNode(*i, 
-                                       parent,
-                                       parent_id,
-                                       cur_id,
-                                       summary
-                                       );
-       DBLoadChildren(parent,parent->GetType()+1);
-       /*        }
-         else
-         {
-           // Node exists : get it and load its children
-           parent = GetDicomNodeFromTypeId((*i)->GetType(),cur_id);
-           DBLoadChildren(parent,parent->GetType()+1);
-         }
-       */
-       parent_id = cur_id;
-      }
-    return parent;
-  }
-  //=====================================================================
-
-
-
-  //=====================================================================
-  void DicomDatabase::DBRecursiveGetOrCreateDicomNode(DicomNode* alien_node, 
-                                                     DicomNode* parent, 
-                                                     const std::string& parent_id,
-                                                     UpdateSummary& summary)
-  {
-    //    std::cout << "DicomDatabase::RecursiveGetOrCreateDicomNode('"
-    //       <<alien_node->GetLabel()
-    //       <<"','"<<parent<<"','"<<parent_id<<"')"<<std::endl;
-    if (parent != 0) 
-      {
-       //      std::cout << " -- Parent = '"<<parent->GetLabel()<<"'"<<std::endl;
-      }   
-    std::string new_id;
-    DicomNode* new_node = DBGetOrCreateDicomNode(alien_node, 
-                                                parent,
-                                                parent_id,
-                                                new_id,
-                                                summary);
-    DicomNode::ChildrenListType::iterator i;
-    for (i  = alien_node->GetChildrenList().begin();
-        i != alien_node->GetChildrenList().end();
-        i++)
-      {
-       DBRecursiveGetOrCreateDicomNode((*i),new_node,new_id,summary);
-      }
-  }
-  //=====================================================================
-
-
-  //=====================================================================
-  DicomNode* DicomDatabase::DBGetOrCreateDicomNode(DicomNode* alien_node, 
-                                                  DicomNode* internal_parent,
-                                                  std::string parent_id,
-                                                  std::string& node_id,
-                                                  UpdateSummary& summary)
-  {
-    //   std::cout << "DBGetOrCreateDicomNode('"<<alien_node->GetLabel()<<"','"
-    //       << internal_parent << "','"<< parent_id<<"')"<<std::endl;
-    if (internal_parent != 0) 
-      {
-       //      std::cout << " -- Parent = '"<<internal_parent->GetLabel()<<"'"<<std::endl;
-      }
-    // DicomNode Exists ? return it 
-    // First try among children of internal parent 
-    DicomNode* node = GetChildrenLike(internal_parent,alien_node);
-    if (node>0)
-      {
-       node_id = node->UnsafeGetFieldValue("ID");
-       return node;
-      }
-    // Second : try in DB 
-    /*
-    node_id = DBGetDicomNodeId(alien_node,parent_id);
-    if (node_id.size()>0)
-      {
-       msw[4].Pause();
-       return GetDicomNodeFromTypeId(alien_node->GetType(),node_id);
-      }
-    */
-    // Does not exist : Create new one
-    node = new DicomNode(alien_node->GetType(),this,internal_parent);
-    node->SetChildrenLoaded(true);
-    // Copy fields values from alien
-    DicomNode::FieldValueMapType::iterator i,j;
-    for (i =  node->GetFieldValueMap().begin();
-        i != node->GetFieldValueMap().end();
-        i++)
-      {
-       j = alien_node->GetFieldValueMap().find(i->first);
-       if (j != alien_node->GetFieldValueMap().end() )
-         {
-           i->second = j->second;
-         }
-      }
-
-    msw[2].Resume();
-    if (node->GetType()!=DicomNode::Patient) 
-      node->SetFieldValue("PARENT_ID",parent_id);
-
-    // Insert in DB
-    std::string val;
-    BuildSQLFieldsValues(node,val);
-    std::string insert("INSERT INTO ");
-    insert += std::string(DicomDatabaseStructure::Table(node->GetType())) 
-      + " " + val + ";";
-    //    std::cout << "** SQL = '"<<insert<<"'"<<std::endl;
-    UPDATEDB(insert);
-    //    std::cout << "** SQL OK"<<std::endl;
-
-    // Store DB id of newly created node;
-    long lastrow = mDB->lastRowId();
-    std::stringstream ri;
-    ri << mDB->lastRowId();
-    node_id = ri.str();
-    //    std::cout << "LastRowId='"<<mDB->lastRowId()<<"' vs '"<<created_id<<"'"<<std::endl;
-
-    node->SetFieldValue("ID",node_id);
-    // Insert in TypeId map
-    TypeId ti;
-    ti.type = node->GetType();
-    ti.id = node_id;
-    mTypeIdToDicomNodeMap[ti] = node;
-    //    std::cout << "== Insert TypeId ("<<ti.type<<","<<ti.id<<")"<<std::endl; 
-    // 
-    msw[2].Pause();
-
-    if (node->GetType()==DicomNode::Patient) summary.added_patients++;
-    if (node->GetType()==DicomNode::Study) summary.added_studies++;
-    if (node->GetType()==DicomNode::Series) summary.added_series++;
-    if (node->GetType()==DicomNode::Image) summary.added_images++;
-
-    return node;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  DicomNode* DicomDatabase::GetChildrenLike(DicomNode* parent,
-                                           DicomNode* alien_node)
-  {
-    DicomNode::ChildrenListType::iterator i;
-    for (i  = parent->GetChildrenList().begin();
-        i != parent->GetChildrenList().end();
-        i++)
-      {
-       DicomNode::Type type = alien_node->GetType();
-       bool ok = true;
-       for (int j=0;
-            j<DicomDatabaseStructure::NbQueryFields(type);
-            j++) 
-         {
-           if ( 
-               alien_node->GetFieldValue(DicomDatabaseStructure::
-                                   QueryField(type,j).key )   !=
-               (*i)->GetFieldValue(DicomDatabaseStructure::
-                                   QueryField(type,j).key ) )
-             {
-               ok = false;
-               break;
-             }
-         }
-       if (ok) 
-         {
-           return (*i);
-         }
-      }
-    return 0;    
-  }
-  //=====================================================================
-
-  //=====================================================================
-  std::string DicomDatabase::DBGetDicomNodeId(DicomNode* node, 
-                                             const std::string& parent_id)
-  {
-    //    std::cout << "DicomDatabase::DBGetDicomNodeId('"<<node->GetLabel()
-    //       <<"','"<<parent_id<<"')"
-    //       <<std::endl;
-    msw[2].Resume();
-    int type = node->GetType();
-
-    std::string table = DicomDatabaseStructure::Table(type);
-    std::string where = "WHERE ";
-    
-    if (type!=DicomNode::Patient)
-      {
-       where += "PARENT_ID='" + parent_id 
-         //node->GetFieldValue("PARENT_ID") 
-         + "' AND ";
-      }
-
-    for (int i=0;i<DicomDatabaseStructure::NbQueryFields(type);i++) 
-      {
-       where += DicomDatabaseStructure::QueryField(type,i).key + "='"
-         + node->GetFieldValue(DicomDatabaseStructure::QueryField(type,i).key) + "' ";
-       if (i<DicomDatabaseStructure::NbQueryFields(type)-1)
-         where += "AND ";
-    }
-
-    std::string query = "SELECT ID FROM " + table + " " + where + ";";                                                   
-    //    std::cout << "** SQL = '"<<query<<"'"<<std::endl;
-    CppSQLite3Query q;
-    QUERYDB(query,q);
-
-    if (!q.eof())
-      {
-       
-       //      std::cout << " - DicomNode exists " << std::endl;
-       std::string id = q.getStringField(0);
-       //      std::cout << " id = '"<<id<<"'"<<std::endl;
-       msw[2].Pause();
-       return id;
-      }
-    msw[2].Pause();
-    return "";
-  }
-  //=====================================================================
-
-
-
-  //=====================================================================
-  DicomNode* DicomDatabase::GetDicomNodeFromTypeId(DicomNode::Type type,
-                                      const std::string& id)
-  {
-    //    std::cout << "GetDicomNodeFromTypeId("<<type<<","<<id<<")"<<std::endl;
-
-    TypeId ti;
-    ti.type = type;
-    ti.id = id;
-    
-    TypeIdToDicomNodeMapType::iterator i = mTypeIdToDicomNodeMap.find(ti);
-    if (i == mTypeIdToDicomNodeMap.end())
-      {
-       /*
-       LoadAll();
-       i = mTypeIdToDicomNodeMap.find(ti);
-       if (i == mTypeIdToDicomNodeMap.end())
-         {
-       */
-           std::cout << "Internal error : mTypeIdToDicomNodeMap does not contain key"
-                     << std::endl;
-           creaError("Internal error : mTypeIdToDicomNodeMap does not contain key");
-           // }
-      }
-
-    //    std::cout << " ** DicomNode = "<<i->second<<std::endl;
-    return i->second;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  bool DicomDatabase::Remove(DicomNode* node)
-  {
-    DBRecursiveRemoveDicomNode(node);
-    /*
-    if (node->GetType()==DicomNode::Patient)
-      {
-       //      std::cout << "IS PATIENT"<<std::endl;
-       ChildrenListType::iterator i = find(GetChildrenList().begin(),
-                                          GetChildrenList().end(),
-                                          node);
-       //      std::cout << "ERASE"<<std::endl;
-       GetChildrenList().erase(i);
-       //      std::cout << "ERASE OK"<<std::endl;
-      }
-    */
-    //    std::cout << "DELETE"<<std::endl;
-    if (node->GetParent())
-      {
-       node->GetParent()->RemoveChildrenFromList(node);
-      }
-    delete node;
-    //    std::cout << "DELETE OK"<<std::endl;
-    return true;
-  }
-  //========================================================================
-
-  //=====================================================================
-  void DicomDatabase::DBRecursiveRemoveDicomNode(DicomNode* node)
-  {
-    //    std::cout << "DicomDatabase::DBRecursiveRemoveDicomNode('"
-    //       <<node->GetLabel()<<"')"<<std::endl;
-
-    std::string query = "DELETE FROM ";
-    query += DicomDatabaseStructure::Table(node->GetType());
-    query += " WHERE ID='"+ node->GetFieldValue("ID") + "';";
-    UPDATEDB(query);
-
-    DicomNode::ChildrenListType::iterator i;
-    for (i  = node->GetChildrenList().begin();
-        i != node->GetChildrenList().end();
-        i++)
-      {
-       DBRecursiveRemoveDicomNode((*i));
-      }
-  }
-  //=====================================================================
-  
-  //=====================================================================
-  int DicomDatabase::DBQueryNumberOfChildren(DicomNode* node)
-  {
-    std::string query = "SELECT COUNT (ID) FROM ";
-    query += DicomDatabaseStructure::Table(node->GetType()+1);
-    if (node->GetType() != DicomNode::Database) 
-      {
-       query += " WHERE PARENT_ID='"+ node->GetFieldValue("ID")+"'";
-      }
-    query  += ";";
-    
-    //   std::cout << "**SQL = "<< query << std::endl;
-    
-    CppSQLite3Query q;
-    QUERYDB(query,q);
-   
-     //    std::cout << "**RES = "<< q.getIntField(0) <<std::endl;
-
-    return q.getIntField(0);
-  }
-  //=====================================================================
-  //========================================================================
-  std::string& format_sql2(std::string& str)
-  {
-    // quote must be doubled
-    //    crea::Utils::Replace( str, "'", "''" );
-    boost::algorithm::replace_all(str,"'","''");
-    // Found strange strings which contained NULL char INSIDE string 
-    int i,size=str.size();
-    for (i=0;i<size;++i) 
-      {
-       if (str[i]==0) 
-         {
-           str = str.substr(0,i);
-           break;
-         }
-      }
-    //    if (i<str.size())
-    return str;
-  }
-   //========================================================================
-
-  //=====================================================================
-  void DicomDatabase::BuildSQLFieldsValues(DicomNode* n,
-                                       std::string& str)
-  {
-    //    std::cout << "BuildSQLFieldsValues('"<<n->GetLabel()<<"')"<<std::endl;
-
-    std::string atts="";
-    std::string values="";
-    DicomNode::FieldValueMapType::iterator i;
-    for (i =  n->GetFieldValueMap().begin();
-        i != n->GetFieldValueMap().end();
-        i++)
-      {
-       if (i->first=="ID") 
-         {
-           continue;
-         }
-       //      std::cout << "("<<i->first<<","<<i->second<<")"<<std::endl;
-       atts += "'" + i->first + "'";
-       values += "'" + format_sql2(i->second) + "'"; 
-       atts += ",";
-       values += ",";
-      }
-    atts[atts.size()-1]=' ';
-    values[values.size()-1]=' ';
-
-    str = "("+atts+") VALUES ("+values+")";
-
-  }
-  //=====================================================================
-
-  //=====================================================================
-  bool DicomDatabase::IsHandledFile( const std::string& filename)
-  {
-    return (mReader.CanRead(filename,""));
-  }
-  //=====================================================================
-
-  //=====================================================================
-  bool DicomDatabase::AddFiles( const std::vector<std::string>& filenames,
-                               wxProgressDialog* progress, 
-                               UpdateSummary& summary)
-  {
-     for (int swi=0;swi<10;swi++) 
-      {
-       msw[swi].Start(0);
-       msw[swi].Pause();
-      }
-    
-    // Parse directory
-    wxStopWatch sw; 
-
-
-     summary.added_images = 0;
-     unsigned int nbf = filenames.size(); 
-     std::vector<std::string>::const_iterator i;
-     for (i=filenames.begin();i!=filenames.end();++i)
-       {
-        summary.scanned_files++;
-        if (IsHandledFile(*i)) 
-          {
-            summary.handled_images++;
-            AddFile(*i,summary);
-            
-            if (progress)
-              {
-                std::string mess("Adding ");
-                mess += *i;
-                if (!progress->Update( (int)(summary.added_images*999./nbf),
-                                       std2wx(mess)))
-                  {
-                    // Some file was added hence we must return true !
-                    summary.cancelled_by_user = true;
-                    break;
-                  }
-              }
-          }
-       }
-
-
-     sw.Pause();
-     msw[0].Pause();
-     msw[1].Pause();
-     msw[2].Pause();
-
-     summary.total_time = sw.Time();
-     summary.file_scan_time = msw[1].Time();
-     summary.update_database_time = msw[2].Time();
-     summary.update_structs_time = 
-       summary.total_time - 
-       summary.parse_time - 
-       summary.file_scan_time - 
-       summary.update_database_time;
-     
-     return true;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  bool DicomDatabase::AddFile( const std::string& filename,
-                              UpdateSummary& summary)
-   {
-     // std::cout << "** DicomDatabase::AddFile '"<<filename<<"'"<<std::endl;
-     // Create *unknown* patient / study / series 
-     DicomNode* patient = new DicomNode(DicomNode::Patient,this,0);
-     //         FillFields/*<GDCM_NAME_SPACE::DicomDir>*/(patient,0);
-     //         patient->SetData(new DirDicomNodeData());
-     // Insert 
-     //GetChildrenList().push_back(patient);
-     DicomNode* study = new DicomNode(DicomNode::Study,this,patient);
-     //FillFields/*<GDCM_NAME_SPACE::DicomDir>*/(study,0);
-     //study->SetData(new DirDicomNodeData());
-     DicomNode* series = new DicomNode(DicomNode::Series,this,study);
-     //FillFields/*<GDCM_NAME_SPACE::DicomDir>*/(series,0);
-     //series->SetData(new DirDicomNodeData());
-     DicomNode* image = new DicomNode(DicomNode::Image,this,series);
-     
-     msw[1].Resume();
-     mReader.ReadDicomInfo(filename,image);
-     msw[1].Pause();
-
-     image->SetFieldValue("FullFileName",filename);
-     
-     DBInsert(patient,summary);
-     
-     delete patient;
-     
-     //image->SetData(new DirDicomNodeData());
-     // Fill Fields
-     //FillFields/*<GDCM_NAME_SPACE::DicomDir>*/(image,0);
-     //std::string f(Utilities::GetFileName(*i));
-     //image->SetFieldValue("A0004_1500",cclean(f));
-     //image->SetFieldValue("FullFileName",cclean(*i));   
-     return true;
-   }
-  //=====================================================================
-
-  //=====================================================================
-  /**
-   * \brief   Explore a directory with possibility of recursion
-   *          return number of files read
-   * @param  dirpath   directory to explore
-   * @param  recursive whether we want recursion or not
-   */
-  void DicomDatabase::ParseDirectory( const std::string &dirpath, 
-                                     std::vector<std::string> &Filenames,
-                                     bool recursive,
-                                     wxProgressDialog* progress, 
-                                     UpdateSummary& summary)
-    
-  {
-    if (progress) 
-      {
-               std::string mess("Parsing ");
-               mess += dirpath;
-               progress->Pulse(std2wx(mess));
-      }
-
-       wxStopWatch sw; 
-       sw.Start(0);
-    
-    std::string fileName;
-    std::string dirName = dirpath;
-
-    summary.scanned_dirs++;
-
-    wxDir dir( std2wx(dirpath) );
-
-    if ( !dir.IsOpened() )
-    {
-        // deal with the error here - wxDir would already log an error message
-        // explaining the exact reason of the failure
-        return;
-    }
-
-    wxString filename;
-
-    bool cont = dir.GetFirst(&filename, wxEmptyString, wxDIR_FILES | wxDIR_HIDDEN );
-    while ( cont )
-    {
-               if ((progress)&&( sw.Time() >= 250 )) 
-               {
-//                     std::cout << "PULSE"<<std::endl;
-                       sw.Start(0);
-                       if (!progress->Pulse()) 
-                       {
-                               summary.cancelled_by_user = true;
-                               break;
-                       }
-               }
-
-               summary.scanned_files++;
-               wxFileName wxffn(dir.GetName(),filename);
-               std::string ffn = wx2std(wxffn.GetFullPath());
-//             std::cout << ffn << std::endl;
-               if (mReader.CanRead(ffn,""))
-                       {
-                               Filenames.push_back( ffn );
-                               summary.handled_images++;
-                       }
-        cont = dir.GetNext(&filename);
-    }
-
-       // Recurse into subdirs
-       if ( recursive )
-               {
-                       cont = dir.GetFirst(&filename, wxEmptyString, wxDIR_DIRS | wxDIR_HIDDEN );
-                       while ( cont )
-                       {
-
-                               wxFileName wxffn(dir.GetName(),filename);
-                               std::string ffn = wx2std(wxffn.GetFullPath());
-               
-//                             std::cout << "dir="<< ffn<< std::endl;
-
-                               ParseDirectory( ffn, 
-                                                               Filenames,
-                                                               recursive,
-                                                               progress,
-                                                               summary);
-                               if (summary.cancelled_by_user) break;
-
-                               cont = dir.GetNext(&filename);
-                       }
-               }
-    
-  }
-  //=======================================================================
-
-
-  //=====================================================================
-  bool DicomDatabase::AddDirectory( const std::string& directory,
-                                   bool recurse,
-                                   wxProgressDialog* progress, 
-                                   UpdateSummary& summary
-                                   )
-  {
-    //    std::cout << "** DicomDatabase::AddDirectory"
-    //       << " '"<<directory<<"'"<<std::endl;
-    //    std::cout << "------ Parsing directory ------"<<std::endl;
-    
-    if (progress)
-      {
-       progress->Pulse();
-      }
-
-    for (int swi=0;swi<10;swi++) 
-      {
-       msw[swi].Start(0);
-       msw[swi].Pause();
-      }
-    
-    // Parse directory
-    wxStopWatch sw; 
-    
-    bool was_canceled_by_user(false);
-    std::vector<std::string> filenames;
-    ParseDirectory( directory, 
-                   filenames,
-                   recurse, 
-                   progress,
-                   summary);
-    
-    if ( summary.cancelled_by_user ) 
-      {
-       return false;
-      }
-    
-    summary.parse_time = sw.Time();
-
-
-     summary.added_images = 0;
-     unsigned int nbf = filenames.size(); // , nf = 0;
-     std::vector<std::string>::iterator i;
-     for (i=filenames.begin();i!=filenames.end();++i)
-       {
-        AddFile(*i,summary);
-
-        if (progress)
-          {
-            std::string mess("Adding ");
-            mess += *i;
-            if (!progress->Update( (int)(summary.added_images*999./nbf),
-                                   std2wx(mess)))
-              {
-                // Some file was added hence we must return true !
-                summary.cancelled_by_user = true;
-                break;
-              }
-          }
-       }
-
-
-     sw.Pause();
-     msw[0].Pause();
-     msw[1].Pause();
-     msw[2].Pause();
-
-     summary.total_time = sw.Time();
-     summary.file_scan_time = msw[1].Time();
-     summary.update_database_time = msw[2].Time();
-     summary.update_structs_time = 
-       summary.total_time - 
-       summary.parse_time - 
-       summary.file_scan_time - 
-       summary.update_database_time;
-     
-     return true;
-  }
-  //=====================================================================
-
-
-
-
-
-
-
-} // namespace creaImageIO
diff --git a/src/creaImageIODicomDatabase.h b/src/creaImageIODicomDatabase.h
deleted file mode 100644 (file)
index da40be2..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-#ifndef __creaImageIODicomDatabase_h_INCLUDED__
-#define __creaImageIODicomDatabase_h_INCLUDED__
-
-
-#include <creaImageIODicomNode.h>
-#include <creaImageIOImageReader.h>
-
-#include <vector>
-#include <wx/wx.h>
-#include <wx/progdlg.h>
-
-class CppSQLite3DB;
-
-namespace creaImageIO
-{
-
-
-  //=====================================================================
-  class DicomDatabase : public DicomNode
-  {
-  public:
-
-    /// Creates a database associated to the file 'filename'.
-    /// Does not create the db nor reads any data from the file
-    DicomDatabase(const std::string& filename, int flags = 0);
-    /// Dtor
-    ~DicomDatabase();
-    
-      /// Returns the DicomNodeTypeDescription for DicomNodes of type c
-    DicomNodeTypeDescription& GetDicomNodeTypeDescription(DicomNode::Type c) 
-    { return mDicomNodeTypeDescription[c]; }
-    /// Returns the DicomNodeTypeDescription for DicomNodes of type c (const)
-    const DicomNodeTypeDescription& GetDicomNodeTypeDescription(DicomNode::Type c) const
-    { return mDicomNodeTypeDescription[c]; }
-
-
-    /// Returns the sqlite db file name 
-    const std::string& GetFileName() const { return UnsafeGetFieldValue("File name"); }
-    void SetName(const std::string& n) { UnsafeSetFieldValue("Name",n); }
-    const std::string& GetName() const { return UnsafeGetFieldValue("Name"); }
-
-
-    void Print() const;
-
-
-    //=============================================================
-    void Clear();
-    bool LocationIsValid();
-    /// Creates a new db on disk 
-    bool New();
-    /// Opens an existing db on disk
-    bool Open();
-    /// Closes the db
-    bool Close();
-
-    /// Recursively loads the children of node 'parent' until maxlevel 
-    /// is reached.
-    /// If parent == NULL or parent == this then starts with the 'children' of 
-    /// the database itself, i.e. the patients.
-    /// Returns the total number of children loaded.
-    int DBLoadChildren(DicomNode* parent, DicomNode::Type maxlevel);
-   
-    /// 
-
-    struct UpdateSummary
-    {
-      int scanned_dirs;
-      int scanned_files;
-      int handled_images;
-      int added_images;
-
-      int added_patients;
-      int added_studies;
-      int added_series;
-
-      long parse_time;
-      long file_scan_time;
-      long update_structs_time;
-      long update_database_time;
-      long total_time;
-      bool cancelled_by_user;
-      
-      UpdateSummary() :
-       scanned_dirs(0),
-       scanned_files(0),
-       handled_images(0),
-       added_images(0),
-       added_patients(0),
-       added_studies(0),
-       added_series(0),
-       parse_time(0),
-       file_scan_time(0),
-       update_structs_time(0),
-       update_database_time(0),
-       total_time(0),
-       cancelled_by_user(false)
-      {}
-    };
-
-
-    ///
-    bool IsHandledFile( const std::string& filename);
-    bool AddFile( const std::string& filename,
-                 UpdateSummary& summary );
-    bool AddFiles( const std::vector<std::string>& filename,
-                  wxProgressDialog* progress, 
-                  UpdateSummary& summary);
-    bool AddDirectory( const std::string& directory, 
-                      bool recurse,
-                      wxProgressDialog* progress, 
-                      UpdateSummary& summary
-                      );
-
-    void ParseDirectory( const std::string& directory, 
-                        std::vector<std::string> &Filenames,
-                        bool recurse,
-                        wxProgressDialog* progress, 
-                        UpdateSummary& summary);
-
-
-    /// Removes the node and its descendants from the db
-    bool Remove(DicomNode*);
-    //=============================================================
-
-
-   int DBQueryNumberOfChildren(DicomNode* n);
-
-  protected:
-    // Open 
-    bool OpenDB();
-    void ImportDicomNodeTypeDescriptionsFromDB();
-
-    // Creation
-    bool CreateDB();
-    void BuildDefaultDicomNodeTypeDescriptions();
-    void AppendSQLFieldsDefinition(DicomNode::Type c, std::string& s);
-    void ExportDicomNodeTypeDescriptionsToDB();
-    //
-
-    // Test
-    bool DBStructureIsValid();
-
-    
-    // Insertion
-    bool DBInsert(DicomNode* alien_node, UpdateSummary& summary);
-    
-    //
-    std::string DBGetDicomNodeId(DicomNode* node, const std::string& parent_id);
-    DicomNode* GetDicomNodeFromTypeId(DicomNode::Type t, const std::string& id);
-
-    // 
-    DicomNode* DBGetOrCreateDicomNode(DicomNode* alien_node, 
-                                     DicomNode* internal_parent,
-                                     std::string parentid,
-                                     std::string& created_id, 
-                                     UpdateSummary& summary);
-    
-    DicomNode* DBGetOrCreateParent(DicomNode* alien_node,
-                                  std::string& parent_id, 
-                                  UpdateSummary& summary);
-    
-    void DBRecursiveGetOrCreateDicomNode(DicomNode* alien_node, 
-                                        DicomNode* parent, 
-                                        const std::string& parent_id, 
-                                        UpdateSummary& summary);
-    
-
-    // 
-    void DBRecursiveRemoveDicomNode(DicomNode* node);
-
-
-    void BuildSQLFieldsValues(DicomNode* n,
-                             std::string& str);
-
-
-    DicomNode* GetChildrenLike(DicomNode* internal_parent,
-                              DicomNode* alien_node);
-
-  private:
-    CppSQLite3DB* mDB;
-    ImageReader mReader;
-
-
-    struct TypeId
-    {
-      int type;
-      std::string id;
-      bool operator< (const TypeId& o) const 
-      {
-       return ((type<o.type) ||
-               ((type==o.type)&&id<o.id));
-      }
-    };
-    
-    typedef std::map<TypeId,DicomNode*> TypeIdToDicomNodeMapType;
-    TypeIdToDicomNodeMapType mTypeIdToDicomNodeMap;
-
-    
-    /// The 5 descriptions of node types (Database,Patient,Study,Series,Image)
-    /// The array is accessed through the DicomNode::TypeCode
-    DicomNodeTypeDescription mDicomNodeTypeDescription[5];
-    
-
-    /// The physical location associated to the DicomDatabase (directory, db file...)
-    std::string mFileName;
-
-    std::string mName;
-
-    int mFlags;
-
-    wxStopWatch msw[10];
-
-  }; // class DicomDatabase
-  //=====================================================================
-
-
-
-} // namespace creaImageIO
-
-
-
-#endif // #ifndef __creaImageIODicomDatabase_h_INCLUDED__
diff --git a/src/creaImageIODicomDatabaseStructure.cpp b/src/creaImageIODicomDatabaseStructure.cpp
deleted file mode 100644 (file)
index 7fdbc7a..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-#include <creaImageIODicomDatabaseStructure.h>
-
-namespace creaImageIO
-{
-
-  const int table_size = 5;
-  const char* const table[]
-  = {
-    "DATABASE",
-    "PATIENT" ,
-    "STUDY",
-    "SERIES",
-    "IMAGE"
-  };
-
-
-  // PATIENT
-  const int mandatory_patient_fields_size = 1;
-  const Field::Description mandatory_patient_fields[] 
-  = 
-    { 
-      Field::Description("ID",0,0,"Database ID",1)
-       // Flag is set to 1 to mean that it is a database use only field
-       // not visible by user
-    };
-  const int default_patient_fields_size = 4;
-  const Field::Description default_patient_fields[] 
-  = 
-    { 
-      Field::Description("A0010_0010",0x0010,0x0010,"Name",0),
-      Field::Description("A0010_0020",0x0010,0x0020,"Patient ID",0),
-      Field::Description("A0010_0040",0x0010,0x0040,"Sex",0),
-      Field::Description("A0010_0030",0x0010,0x0030,"Birthday",0)
-    };
-  
-  const int patient_query_fields_size = 4;
-
-  // STUDY
-  const int mandatory_study_fields_size = 2;
-  const Field::Description mandatory_study_fields[] 
-  = 
-    { 
-      Field::Description("ID",0,0,"Database ID",1),
-      Field::Description("PARENT_ID",0,0,"Parent database ID",1)
-    };
-
-  const int default_study_fields_size = 7;
-  const Field::Description default_study_fields[] 
-  = 
-    { 
-      Field::Description("A0020_0010",0x0020,0x0010,"Study ID",0),
-      Field::Description("A0008_0020",0x0008,0x0020,"Study Date",0),   
-      Field::Description("A0008_0030",0x0008,0x0030,"Study Time",0),
-      Field::Description("A0020_000D",0x0020,0x000D,"Study Instance UID",0),
-      Field::Description("A0008_0050",0x0008,0x0050,"Study Accession Number",0),
-      
-      Field::Description("A0008_1030",0x0008,0x1030,"Study Description",0),
-      Field::Description("A0008_0005",0x0008,0x0005,"Specific Character Set",0)
-    };
-  const int study_query_fields_size = 4;
-  // SERIES
-  const int mandatory_series_fields_size = 2;
-  const Field::Description mandatory_series_fields[] 
-  = 
-    { 
-      Field::Description("ID",0,0,"Database ID",1),
-      Field::Description("PARENT_ID",0,0,"Parent database ID",1)
-    };
-
-  const int default_series_fields_size = 11;
-  const Field::Description default_series_fields[] 
-  = 
-    { 
-      Field::Description("A0008_0021",0x0008,0x0021,"Series Date",0),
-      Field::Description("A0008_0031",0x0008,0x0031,"Series Time",0),
-      Field::Description("A0008_0060",0x0008,0x0060,"Modality",0),
-      Field::Description("A0020_000E",0x0020,0x000E,"Series Instance UID",0),
-      Field::Description("A0008_103E",0x0008,0x103E,"Description",0),
-      Field::Description("A0008_0080",0x0008,0x0080,"Institution Name",0),
-      Field::Description("A0008_0081",0x0008,0x0081,"Institution Adress",0),
-      Field::Description("A0008_1010",0x0008,0x1010,"Station Name",0),
-      Field::Description("A0008_1048",0x0008,0x1048,"Physician of Record",0),
-      Field::Description("A0008_1050",0x0008,0x1050,"Performing Physician s Name",0),
-      Field::Description("A0018_1030",0x0018,0x1030,"Protocol Name",0)
-    };
-
-  const int series_query_fields_size = 4;
-  
-
-  // IMAGE
-  const int mandatory_image_fields_size = 2;
-  const Field::Description mandatory_image_fields[] 
-  = 
-    { 
-      Field::Description("ID",0,0,"Database ID",1),
-      Field::Description("PARENT_ID",0,0,"Parent database ID",1)
-    };
-  const int default_image_fields_size = 27;
-  const Field::Description default_image_fields[] 
-  = 
-    { 
-      Field::Description("A0004_1500",0x0004,0x1500,"File name",0),
-      Field::Description("FullFileName",0,0,"Full file name",0),      
-      Field::Description("A0008_0008",0x0008,0x0008,"Image Type",0),
-      Field::Description("A0008_0023",0x0008,0x0023,"Content Date",0),
-      Field::Description("A0008_0033",0x0008,0x0033,"Content Time",0),
-      Field::Description("A0020_0013",0x0020,0x0013,"Image Number",0),
-      Field::Description("A0020_0032",0x0020,0x0032,"Image Position Patient",0),
-      Field::Description("A0020_0037",0x0020,0x0037,"Image Orientation Patient",0),
-      Field::Description("A0020_0052",0x0020,0x0052,"Frame Reference UID",0),
-      Field::Description("A0020_1041",0x0020,0x1041,"Slice Location",0),
-      Field::Description("A0020_4000",0x0020,0x4000,"Image Comments",0),
-      Field::Description("A0028_0002",0x0028,0x0002,"Sample per pixels",0),
-      Field::Description("A0028_0004",0x0028,0x0004,"Photometric Interpretation",0),
-      Field::Description("A0028_0006",0x0028,0x0006,"Planar Configuration",0),
-      Field::Description("A0028_0008",0x0028,0x0008,"Number of Frames",0),
-      Field::Description("A0028_0010",0x0028,0x0010,"Rows",0),
-      Field::Description("A0028_0011",0x0028,0x0011,"Columns",0),
-      Field::Description("A0028_0030",0x0028,0x0030,"Pixel Spacing",0),
-      Field::Description("A0028_0100",0x0028,0x0100,"AlocatedBits",0),
-      Field::Description("A0028_0101",0x0028,0x0101,"StoredBits",0),
-      Field::Description("A0028_0103",0x0028,0x0103,"Pixel Representation",0),
-      Field::Description("A0028_1052",0x0028,0x1052,"Rescale Intercept",0),
-      Field::Description("A0028_1053",0x0028,0x1053,"Rescale Slope",0),
-      Field::Description("A0050_0004",0x0050,0x0004,"Calibration Image",0),
-      Field::Description("A0008_0016",0x0008,0x0016,"SOP Class UID",0),
-      Field::Description("OWNER",    0,     0,     "Owner",0),
-      Field::Description("REGISTRATION",0,  0,     "Registration",0)
-    };
-
-  const int image_query_fields_size = 1;
-
-  // Indexation
-  const int mandatory_fields_size[5] = 
-    {
-      0,
-      mandatory_patient_fields_size,
-      mandatory_study_fields_size,
-      mandatory_series_fields_size,
-      mandatory_image_fields_size
-    };
-  const Field::Description* mandatory_fields[5] =
-    {
-      0,
-      mandatory_patient_fields,
-      mandatory_study_fields,
-      mandatory_series_fields,
-      mandatory_image_fields
-    };
-  const int default_fields_size[5] = 
-    {
-      0,
-      default_patient_fields_size,
-      default_study_fields_size,
-      default_series_fields_size,
-      default_image_fields_size
-    };
-  const Field::Description* default_fields[5] =
-    {
-      0,
-      default_patient_fields,
-      default_study_fields,
-      default_series_fields,
-      default_image_fields
-    };
-  const int query_fields_size[5] = 
-    {
-      0,
-      patient_query_fields_size,
-      study_query_fields_size,
-      series_query_fields_size,
-      image_query_fields_size
-    };
-
-
-  int DicomDatabaseStructure::TableBegin() { return DicomNode::Patient; }
-  int DicomDatabaseStructure::TableEnd() { return DicomNode::Image+1; }
-
-
-  const char* DicomDatabaseStructure::Table(int i) { return table[i]; }
-    
-  int DicomDatabaseStructure::NbMandatoryFields(DicomNode::Type c)
-  {
-    return mandatory_fields_size[c];
-  }
-  const Field::Description& DicomDatabaseStructure::MandatoryField(DicomNode::Type c, 
-                                                         int i)
-  {
-    return mandatory_fields[c][i];
-  }
-
-  int DicomDatabaseStructure::NbDefaultFields(DicomNode::Type c)
-  {
-    return default_fields_size[c];
-  }
-
-  const Field::Description& DicomDatabaseStructure::DefaultField(DicomNode::Type c,
-                                                       int i)
-  {
-    return default_fields[c][i];
-  }
-
-  int DicomDatabaseStructure::NbQueryFields(DicomNode::Type c)
-  {
-    return query_fields_size[c];
-  }
-
-  const Field::Description& DicomDatabaseStructure::QueryField(DicomNode::Type c,
-                                                     int i)
-  {
-    return default_fields[c][i];    
-  }
-
-} // namespace creaImageIO
diff --git a/src/creaImageIODicomDatabaseStructure.h b/src/creaImageIODicomDatabaseStructure.h
deleted file mode 100644 (file)
index e1eaca7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef __creaImageIODicomDatabaseStructure_h_INCLUDED__
-#define __creaImageIODicomDatabaseStructure_h_INCLUDED__
-
-#include <creaImageIODicomNode.h>
-
-namespace creaImageIO
-{
-
-  struct DicomDatabaseStructure
-  {
-    /// The minimum DicomNode::Type value. Used to iterate over tables
-    static int TableBegin();
-       /// The maximum DicomNode::Type value. Used to iterate over tables
-       static int TableEnd();
-    /// Returns the name of the SQL table associated to a certain DicomNode::Type 
-       static const char* Table(DicomNode::Type);
-    
-    static int NbMandatoryFields(DicomNode::Type);
-    static const Field::Description& MandatoryField(DicomNode::Type,int);
-
-    static int NbDefaultFields(DicomNode::Type);
-    static const Field::Description& DefaultField(DicomNode::Type,int);
-
-    static int NbQueryFields(DicomNode::Type);
-    static const Field::Description& QueryField(DicomNode::Type,int);
-  };
-
-
-} // namespace creaImageIO
-
-#endif // #ifndef __creaImageIODicomDatabaseStructure_h_INCLUDED__
diff --git a/src/creaImageIODicomNode.cpp b/src/creaImageIODicomNode.cpp
deleted file mode 100644 (file)
index 04879c8..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-#include <creaMessageManager.h>
-#include <creaImageIODicomNode.h>
-
-#include <creaImageIODicomDatabase.h>
-//#include <creaImageIOException.h>
-
-#include <algorithm>
-
-namespace creaImageIO
-{
-  //=============================================================
-  const int DicomNode::Database = 0;
-  const int DicomNode::Patient = 1;
-  const int DicomNode::Study   = 2;
-  const int DicomNode::Series  = 3;
-  const int DicomNode::Image   = 4;
-  //=============================================================
-
-  const std::string DicomNodeTypeName[5] =
-    { "Database",
-      "Patient",
-      "Study",
-      "Series",
-      "Image"
-    };
-  const std::string DicomNodePluralTypeName[5] =
-    { "Databases",
-      "Patients",
-      "Studies",
-      "Series",
-      "Images"
-    };
-
-  //=============================================================
-  DicomNode::DicomNode(Type type, DicomDatabase* root, DicomNode* parent)
-    : mType(type),
-      mDicomDatabase(root),
-      mParent(parent),
-      mData(0),
-      mChildrenLoaded(false),
-      mNumberOfChildren(-1)
-  {
-    if (parent) 
-      {
-       parent->GetChildrenList().push_back(this);
-      }
-    if (root) 
-      {
-       DicomNodeTypeDescription::FieldDescriptionMapType::const_iterator i;
-       for (i  = GetTypeDescription().GetFieldDescriptionMap().begin();
-            i != GetTypeDescription().GetFieldDescriptionMap().end();
-            i++)
-         {
-           mFieldValueMap[i->first] = "----";
-         }
-      }
-  }
-  //=============================================================
-
-  //=============================================================
-  DicomNode::~DicomNode()
-  {
-    ChildrenListType::iterator i;
-    for (i=GetChildrenList().begin(); i!=GetChildrenList().end(); i++)
-      {
-       delete *i;
-      }
-    if (mData) 
-      {
-       delete mData;
-       mData = 0;
-      }
-  }
-  //=============================================================
-
-  //=============================================================
-  const std::string& DicomNode::GetTypeName(const Type& t)
-  {
-    return DicomNodeTypeName[t];
-  }
-  //=============================================================
-  //=============================================================
-  const std::string& DicomNode::GetPluralTypeName(const Type& t)
-  {
-    return DicomNodePluralTypeName[t];
-  }
-  //=============================================================
-
-  //=============================================================
-  const std::string& DicomNode::GetTypeName() const
-  {
-    return DicomNodeTypeName[GetType()];
-  }
-  //=============================================================
-
-  //=============================================================
-  void DicomNode::RemoveChildrenFromList(DicomNode* node)
-  {
-    ChildrenListType::iterator i = find(GetChildrenList().begin(),
-                                       GetChildrenList().end(),
-                                       node);
-    if (i != GetChildrenList().end())
-      {
-       GetChildrenList().erase(i);
-      }
-  }
-  //=============================================================
-
-  //=============================================================
-  const DicomNodeTypeDescription& DicomNode::GetTypeDescription() const
-  {
-    return mDicomDatabase->GetDicomNodeTypeDescription(mType);
-  }
-  //=============================================================
-
-
-  //  Tree* DicomNode::GetTree() const { return mDicomDatabase->GetTree(); }
-  
-
-  //=============================================================
-  const Field::Value& DicomNode::GetFieldValue(const Field::Key& k) const
-  {
-    //    std::cout << "this = "<<(void*)this<<std::endl;
-    //    std::cout << "mFieldValueMap="<<(void*)(&mFieldValueMap)<<std::endl;
-    FieldValueMapType::const_iterator i = mFieldValueMap.find(k);
-    if (i==mFieldValueMap.end())
-      {
-       static Field::Value def("");
-       return def;
-       //      CREAIMAGEIO_ERROR("DicomNode::GetFieldValue : no field with key '"<<k<<"'");
-      }
-    return i->second;
-  }
-  //=============================================================
-
-  //=============================================================
-  const Field::Value& DicomNode::GetCleanFieldValue(const Field::Key& k) const
-  {
-    static std::string Clean("-");
-    FieldValueMapType::const_iterator i = mFieldValueMap.find(k);
-    if (i==mFieldValueMap.end())
-      {
-       creaError("DicomNode::GetFieldValue : no field with key '"<<k<<"'");
-      }
-    if (i->second == "GDCM::Unfound")
-      {
-       return Clean;
-      }
-    return i->second;
-  }
-  //=============================================================
-
-
-  //=============================================================
-  void DicomNode::SetFieldValue(const Field::Key& k, const Field::Value& v)
-  {
-    FieldValueMapType::iterator i = mFieldValueMap.find(k);
-    if (i==mFieldValueMap.end())
-      {
-       std::cout << "DicomNode::SetFieldValue : no field with key '"<<k
-                 <<"'"<<std::endl;
-       creaError("DicomNode::SetFieldValue : no field with key '"<<k<<"'");
-      }
-    i->second = v;
-  }
-  //=============================================================
-
-  //=============================================================
-  int DicomNode::ImageGetRows() const
-  {
-    return atoi(UnsafeGetFieldValue("A0028_0010").c_str());
-  }
-  //=============================================================
-
-  //=============================================================
-  int DicomNode::ImageGetColumns() const
-  {
-    return atoi(UnsafeGetFieldValue("A0028_0011").c_str());
-  }
-  //=============================================================
-
-  //=============================================================
-  int DicomNode::ImageGetFrames() const
-  {
-    return atoi(UnsafeGetFieldValue("A0028_0008").c_str());
-  }
-  //=============================================================
-
-  //=============================================================
-  void DicomNode::Print() const 
-  {
-    for (int ii=0;ii<GetType()+1;++ii) std::cout << " ";
-    std::cout << "-> "<<GetLabel() << std::endl;
-    ChildrenListType::const_iterator i;
-    for (i=GetChildrenList().begin(); i!=GetChildrenList().end(); i++)
-      {
-       (*i)->Print();
-      }
-  }
-  //=============================================================
-
-  //=============================================================
-  std::string DicomNode::GetLabel() const 
-  {
-    std::string l;
-    switch (GetType())
-      {
-      case Database :
-       l += GetFieldValue("Name");
-       break;
-       //        + " (" + GetFieldValue("Location") + ")";
-     case Patient :
-       l += GetCleanFieldValue("A0010_0010")  // Name 
-         + " | " + GetCleanFieldValue("A0010_0040") + " | "  // Sex
-         + GetCleanFieldValue("A0010_0030"); // Birthday
-       break;
-     case Study :
-       l += GetCleanFieldValue("A0008_0020")  // Study Date
-        + " | " +  GetCleanFieldValue("A0008_1030"); // Study Description
-       break;
-      case Series :
-       l += GetCleanFieldValue("A0008_0060")  // Modality
-         + " | " +  GetCleanFieldValue("A0008_103E");  // Description
-       break;
-      case Image :
-       l += GetCleanFieldValue("A0004_1500"); // File Name
-       break;
-      }
-    return l;
-  }
-  //=============================================================
-
-  //=============================================================
-  int DicomNode::GetNumberOfChildren()
-  {
-    //    std::cout << "$$$ DicomNode::GetNumberOfChildren"<<std::endl;
-    if ( GetType() == DicomNode::Image ) return 0;
-    if ( GetChildrenList().size() > 0 ) return GetChildrenList().size();
-    if ( mNumberOfChildren == -1 ) 
-      {
-       mNumberOfChildren = 0;
-       if (GetDicomDatabase()!=0)
-         {
-           mNumberOfChildren = 
-             GetDicomDatabase()->DBQueryNumberOfChildren(this);
-         }
-      }
-    return mNumberOfChildren;
-  }
-  //=============================================================
-
-  /*
-  const Field::Description& DicomNode::GetFieldDescription(const Field::Key& k) 
-    const
-  {
-    
-    return GetTypeDescription().GetFieldDescription(k);
-    
-  }
-  */
-
-
-
- //=====================================================================
-  void DicomNode::SortChildren(const LexicographicalDicomNodeComparator& c)
-  {
-    // Check 
-    /*
-    ChildrenListType::const_iterator i;
-    for (i=GetChildrenList().begin(); i!=GetChildrenList().end(); i++)
-      {
-       std::cout << (*i)->GetLabel()<<std::endl;
-       if ((*i)==0) 
-         {
-           std::cout << "!!! SortChildren : child = "<<*i<<std::endl;
-           exit(0);
-         }
-      }
-    std::cout<<"=========================="<<std::endl;
-    */
-    std::sort(GetChildrenList().begin(),
-             GetChildrenList().end(),
-             c);
-  }
- //=====================================================================
-
-
-
-
-
-} // namespace creaImageIO
diff --git a/src/creaImageIODicomNode.h b/src/creaImageIODicomNode.h
deleted file mode 100644 (file)
index 42949c6..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-#ifndef __creaImageIODicomNode_h_INCLUDED__
-#define __creaImageIODicomNode_h_INCLUDED__
-
-#include <creaImageIODicomNodeTypeDescription.h>
-#include <creaImageIODicomNodeComparators.h>
-#include <vector>
-
-namespace creaImageIO
-{
-
-  //=====================================================================
-  /// Forward declaration
-  class DicomDatabase;
-  //=====================================================================  
-
-  //=====================================================================
-  /// 
-  struct DicomNodeData
-  { 
-    DicomNodeData() {}
-    virtual ~DicomNodeData() {}
-  };
-  //=====================================================================
-
-
-  //=====================================================================
-  class DicomNode
-  {
-  public:
-
-    /// The identifier of "Database" node types (root of a tree)
-    static const int Database;
-    /// The identifier of "Patient" node types 
-    static const int Patient;
-    /// The identifier of "Study" node types 
-    static const int Study;
-    /// The identifier of "Series" node types 
-    static const int Series;
-    /// The identifier of "Image" node types 
-    static const int Image;
-
-    typedef int Type;
-    
-    /// Ctor
-    DicomNode(Type type, DicomDatabase* db, DicomNode* parent);
-    virtual ~DicomNode();
-
-    Type GetType() const { return mType; }
-    const std::string& GetTypeName() const;
-
-    static const std::string& GetTypeName(const Type&);
-    static const std::string& GetPluralTypeName(const Type&);
-
-    const DicomNodeTypeDescription& GetTypeDescription() const;
-
-    DicomDatabase* GetDicomDatabase() const { return mDicomDatabase; }
-    //    Tree* GetTree() const;
-    DicomNode* GetParent() const { return mParent; }
-
-    bool ChildrenLoaded() const { return mChildrenLoaded; }
-    void SetChildrenLoaded(bool l) { mChildrenLoaded = l; }
-
-    /// returns the number of children of the node.
-    /// Warning : a non null number of children does not mean that they 
-    /// are loaded !
-    int GetNumberOfChildren();
-
-
-    typedef std::vector<DicomNode*> ChildrenListType;
-    ChildrenListType& GetChildrenList() { return mChildren; }
-    const ChildrenListType& GetChildrenList() const { return mChildren; }
-    void RemoveChildrenFromList(DicomNode*);
-
-    typedef std::map<Field::Key,Field::Value> FieldValueMapType;
-    FieldValueMapType& GetFieldValueMap() { return mFieldValueMap; }
-    const FieldValueMapType& GetFieldValueMap() const { return mFieldValueMap; }
-    const Field::Value& GetFieldValue(const Field::Key& k) const;
-    const Field::Value& GetCleanFieldValue(const Field::Key& k) const;
-    const Field::Value& UnsafeGetFieldValue(const Field::Key& k) const
-    { return mFieldValueMap.find(k)->second; }
-    void SetFieldValue(const Field::Key& k, const Field::Value& v);
-    void UnsafeSetFieldValue(const Field::Key& k, const Field::Value& v)
-    { mFieldValueMap[k] = v; }
-    
-    const Field::Description& GetFieldDescription(const Field::Key& k) const
-    { return GetTypeDescription().GetFieldDescription(k); }
-
-
-    virtual void Print() const;
-    std::string GetLabel() const;
-
-    template<class T> T GetData() const 
-    { if (mData!=0) return dynamic_cast<T>(mData); return 0; }
-
-    void SetData(DicomNodeData* d) { if (mData) delete mData; mData = d; }
-
-    void SortChildren(const LexicographicalDicomNodeComparator&);
-
-
-    int ImageGetRows() const;
-    int ImageGetColumns() const;
-    int ImageGetFrames() const;
-    const std::string& ImageGetFullFileName() const { return UnsafeGetFieldValue("FullFileName"); }
-
-  protected:
-    DicomDatabase* mDicomDatabase;
-
-  private:
-    Type mType;
-    DicomNode* mParent;
-    ChildrenListType mChildren;
-    FieldValueMapType mFieldValueMap;
-    DicomNodeData* mData;
-    bool mChildrenLoaded;
-    int mNumberOfChildren;
-
-  }; // class DicomNode
-  //=====================================================================
-
-
-
-
-} // namespace creaImageIO
-
-
-
-#endif // #ifndef __creaImageIODicomNode_h_INCLUDED__
diff --git a/src/creaImageIODicomNodeComparators.cpp b/src/creaImageIODicomNodeComparators.cpp
deleted file mode 100644 (file)
index c19b80c..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <creaImageIODicomNodeComparators.h>
-#include <creaImageIODicomNode.h>
-#include <stdlib.h>
-namespace creaImageIO
-{
-
-  //===================================================================
-  bool DicomNodeIntFieldComparator::compare(DicomNode* const & x, 
-                                           DicomNode* const & y) 
-  { 
-    int ix = atoi(x->GetFieldValue(mKey).c_str());
-    int iy = atoi(y->GetFieldValue(mKey).c_str());   
-    //      std::cout << ix << " < " << iy << " ? "<<std::endl;
-    return (ix<iy);
-  }
-  //===================================================================
-  
-  //===================================================================
-  bool DicomNodeFloatFieldComparator::compare(DicomNode* const & x, 
-                                             DicomNode* const & y) 
-  { 
-    if ( x->GetFieldValue(mKey) == y->GetFieldValue(mKey) )
-      return false;
-    float ix = (float)atof(x->GetFieldValue(mKey).c_str());
-    float iy = (float)atof(y->GetFieldValue(mKey).c_str());   
-    return (ix < iy);
-  }
-  //===================================================================
-  
-  
-  //===================================================================
-  bool DicomNodeStringFieldComparator::compare(DicomNode* const & x,
-                                              DicomNode* const & y) 
-  { 
-    return (  x->GetFieldValue(mKey) < y->GetFieldValue(mKey) );
-  }
-  //===================================================================
-
-  //===================================================================
-  bool LexicographicalDicomNodeComparator::operator() (DicomNode* const & x, 
-                                                      DicomNode * const & y)
-  {
-    std::vector<DicomNodeComparator*>::iterator i;
-    for (i =mDicomNodeComparator.begin();
-        i!=mDicomNodeComparator.end();
-        ++i)
-      {
-       if ( (*i)->operator()(x,y) ) 
-         {
-           return true;
-         }
-       if ( (*i)->operator()(y,x) ) 
-         {
-           return false;
-         }
-      }
-    return false;
-  }
-  //===================================================================
-
-}
diff --git a/src/creaImageIODicomNodeComparators.h b/src/creaImageIODicomNodeComparators.h
deleted file mode 100644 (file)
index f2da0b5..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-#ifndef __creaImageIODicomNodeComparators_h_INCLUDED__
-#define __creaImageIODicomNodeComparators_h_INCLUDED__
-
-#include <vector>
-#include <iostream>
-
-namespace creaImageIO
-{
-
-  class DicomNode;
-
-  //=====================================================================
-  struct DicomNodeComparator
-  {
-    virtual ~DicomNodeComparator() {}
-    virtual bool operator() (DicomNode* const & x, DicomNode* const & y) = 0;
-  };
-  //=====================================================================
-
-  //=====================================================================
-  struct DicomNodeComparatorWithOrder : public DicomNodeComparator
-  {
-    DicomNodeComparatorWithOrder(bool reverse_order = false) 
-      : mReverseOrder(reverse_order) {}
-    virtual ~DicomNodeComparatorWithOrder() {}
-
-
-    virtual bool compare(DicomNode* const &, DicomNode* const &) = 0;
-
-    virtual bool operator() (DicomNode* const & x, DicomNode* const & y)
-    {
-      if (mReverseOrder) return this->compare(y,x);
-      return this->compare(x,y);
-    };
-
-    bool mReverseOrder;
-  };
-  //=====================================================================
-
-  //=====================================================================
-  class LexicographicalDicomNodeComparator : public DicomNodeComparator
-  {
-  public:
-    LexicographicalDicomNodeComparator(const std::string& name) 
-      : mName(name) {}
-    ~LexicographicalDicomNodeComparator() {}
-
-    const std::string& GetName() const { return mName; }
-    void SetName(const std::string& s) { mName = s; }
-    void Clear() { mDicomNodeComparator.clear(); }
-    void DeleteComparators() 
-    { 
-       std::vector<DicomNodeComparator*>::iterator i;
-       for (i =mDicomNodeComparator.begin();
-           i!=mDicomNodeComparator.end();
-           ++i)
-        {
-          delete *i;
-        }
-       mDicomNodeComparator.clear(); 
-    }
-    void Add(DicomNodeComparator* c) { mDicomNodeComparator.push_back(c); }
-    
-    bool operator() (DicomNode* const & x, DicomNode * const & y);
-
-  private:
-    std::string mName;
-    std::vector<DicomNodeComparator*> mDicomNodeComparator;
-  };
-  //=====================================================================
-
-
-  //===================================================================
-  struct DicomNodeIntFieldComparator : 
-    public DicomNodeComparatorWithOrder
-  {    
-    DicomNodeIntFieldComparator(const std::string& key,
-                                    bool reverse_order)
-      :
-      DicomNodeComparatorWithOrder(reverse_order),
-      mKey(key)
-    {}
-    virtual bool compare(DicomNode* const & x, DicomNode* const & y);
-
-  private:
-    std::string mKey;
-  };
-  //===================================================================
-
-  //===================================================================
-  struct DicomNodeFloatFieldComparator : 
-    public DicomNodeComparatorWithOrder
-  {    
-    DicomNodeFloatFieldComparator(const std::string& key,
-                                      bool reverse_order )
-      : 
-      DicomNodeComparatorWithOrder(reverse_order),
-      mKey(key)
-    {}
-
-    virtual bool compare(DicomNode* const & x, DicomNode* const & y);
-
-  private:
-    std::string mKey;
-  };
-  //===================================================================
-
-  //===================================================================
-  struct DicomNodeStringFieldComparator : 
-    public DicomNodeComparatorWithOrder
-  {    
-    DicomNodeStringFieldComparator(const std::string& key,
-                                  bool reverse_order )
-      : 
-      DicomNodeComparatorWithOrder(reverse_order),
-      mKey(key)
-    {}
-    
-    virtual bool compare(DicomNode* const & x, DicomNode* const & y);
-    
-  private:
-    std::string mKey;
-  };
-  //===================================================================
-
-  //===================================================================
-#define INT_FIELD_COMP(NAME,FIELD)             \
-  struct DicomNode##NAME##Comparator : \
-    public DicomNodeIntFieldComparator \
-  {                                            \
-    DicomNode##NAME##Comparator(bool o = false) :      \
-      DicomNodeIntFieldComparator(FIELD,o)     \
-    {}                                         \
-  }
-  //==================================================================
-  
-  //===================================================================
-#define FLOAT_FIELD_COMP(NAME,FIELD)           \
-  struct DicomNode##NAME##Comparator : \
-    public DicomNodeFloatFieldComparator       \
-  {                                            \
-    DicomNode##NAME##Comparator(bool o = false) :      \
-      DicomNodeFloatFieldComparator(FIELD,o)   \
-    {}                                         \
-  }
-  //===================================================================
-
-  //===================================================================
-#define STRING_FIELD_COMP(NAME,FIELD)          \
-  struct DicomNode##NAME##Comparator : \
-    public DicomNodeStringFieldComparator      \
-  {                                            \
-    DicomNode##NAME##Comparator(bool o = false) :      \
-      DicomNodeStringFieldComparator(FIELD,o)  \
-    {}                                         \
-  }
-  //===================================================================
-
-
-
-  //===================================================================
-  // Patient comparators
-  STRING_FIELD_COMP(PatientName,"A0010_0010");
-  STRING_FIELD_COMP(PatientSex, "A0010_0040");
-  STRING_FIELD_COMP(PatientBirthday, "A0010_0030");
-  //===================================================================
-
-  //===================================================================
-  // Study comparators
-  STRING_FIELD_COMP(StudyDate,"A0008_0020");
-  STRING_FIELD_COMP(StudyDescription,"A0008_1030");
-  //===================================================================
-
-  //===================================================================
-  // Series comparators
-  STRING_FIELD_COMP(Modality,"A0008_0060");
-  STRING_FIELD_COMP(SeriesDescription,"A0008_103E");
-  STRING_FIELD_COMP(SeriesDate,"A0008_0021");
-  //===================================================================
-
-  //===================================================================
-  // Image comparators
-  INT_FIELD_COMP(ImageNumber,"A0020_0013");
-  FLOAT_FIELD_COMP(SliceLocation,"A0020_1041");
-  STRING_FIELD_COMP(FullFileName,"FullFileName");
-  //===================================================================
-
-
-} // namespace creaImageIO
-
-
-
-#endif // #ifndef __creaImageIOComparators_h_INCLUDED__
diff --git a/src/creaImageIODicomNodeTypeDescription.cpp b/src/creaImageIODicomNodeTypeDescription.cpp
deleted file mode 100644 (file)
index 6b937d4..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <creaImageIODicomNodeTypeDescription.h>
-#include <creaImageIODicomDatabaseStructure.h>
-
-namespace creaImageIO
-{
-
-  DicomNodeTypeDescription::DicomNodeTypeDescription()
-  {
-  }
-
-  DicomNodeTypeDescription::~DicomNodeTypeDescription()
-  {
-  }
-  
-  /*
-  const Field::Description& DicomNodeTypeDescription::GetFieldDescription(const Field::Key& k) const
-  {
-    
-  }
-  */
-
-  void DicomNodeTypeDescription::BuildDefault(int typecode)
-  {
-    //    std::cout << "*** DicomNodeTypeDescription::BuildDefault("<<typecode
-    // <<") s="<<size<<std::endl;
-
-    mFieldDescriptionMap.clear();
-
-    for (int i=0;i<DicomDatabaseStructure::NbMandatoryFields(typecode);i++)
-      {
-       Add(DicomDatabaseStructure::MandatoryField(typecode,i));
-      }
-    for (int i=0;i<DicomDatabaseStructure::NbDefaultFields(typecode);i++)
-      {
-       Add(DicomDatabaseStructure::DefaultField(typecode,i));
-      }
-  }
-
-
-  void DicomNodeTypeDescription::Add(const Field::Description& d)
-  {
-    mFieldDescriptionMap[d.key] = d;
-  }
-    
-
-} // namespace creaImageIO
diff --git a/src/creaImageIODicomNodeTypeDescription.h b/src/creaImageIODicomNodeTypeDescription.h
deleted file mode 100644 (file)
index 08d767f..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef __creaImageIODicomNodeTypeDescription_h_INCLUDED__
-#define __creaImageIODicomNodeTypeDescription_h_INCLUDED__
-
-
-#include <creaImageIOField.h>
-
-#include <map>
-
-namespace creaImageIO
-{
-
-
-  //=====================================================================
-  class DicomNodeTypeDescription
-  {
-  public:
-    DicomNodeTypeDescription();
-    ~DicomNodeTypeDescription();
-
-    void BuildDefault(int typecode);
-    void Add(const Field::Description&);
-    
-    typedef std::map<Field::Key,Field::Description> FieldDescriptionMapType;
-    FieldDescriptionMapType& GetFieldDescriptionMap()
-    { return mFieldDescriptionMap; }
-    const FieldDescriptionMapType& GetFieldDescriptionMap() const 
-    { return mFieldDescriptionMap; }
-
-    const Field::Description& GetFieldDescription(const Field::Key& k) const
-    {
-      return mFieldDescriptionMap.find(k)->second;
-    }
-
-
-  protected:
-
-
-  private:
-    FieldDescriptionMapType mFieldDescriptionMap;
-    
-
-  }; // class DicomNodeTypeDescription
-  //=====================================================================
-
-
-} // namespace creaImageIO
-
-
-  //=====================================================================
-inline std::ostream& operator<<(std::ostream& s, 
-                               const creaImageIO::DicomNodeTypeDescription& d)
-{
-  const creaImageIO::DicomNodeTypeDescription::FieldDescriptionMapType& m = d.GetFieldDescriptionMap();
-  s <<"[";
-  creaImageIO::DicomNodeTypeDescription::FieldDescriptionMapType::const_iterator i;
-  for (i=m.begin();i!=m.end();++i)
-    {
-      s <<i->second; 
-    }
-  s<<"]";
-  return s;
-}
-//=====================================================================
-
-
-
-#endif // #ifndef __creaImageIODicomNodeTypeDescription_h_INCLUDED__
diff --git a/src/creaImageIOField.cpp b/src/creaImageIOField.cpp
deleted file mode 100644 (file)
index 704d6c3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <creaImageIOField.h>
-
-
-namespace creaImageIO
-{
-
-
-} // namespace creaImageIO
diff --git a/src/creaImageIOField.h b/src/creaImageIOField.h
deleted file mode 100644 (file)
index 54edbc3..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef __creaImageIOField_h_INCLUDED__
-#define __creaImageIOField_h_INCLUDED__
-
-#include <string>
-#include <iostream>
-namespace creaImageIO
-{
-
-
-  //=====================================================================
-  namespace Field
-  {
-
-    typedef std::string Key;
-
-    struct Description
-    {      
-      Description()
-       : key(""), group(0), element(0), name(""), flags(0)
-      {
-      }
-      Description(const std::string& k,
-                 unsigned short g,
-                 unsigned short e,
-                 const std::string& n,
-                 unsigned int f)
-       : key(k), group(g), element(e), name(n), flags(f) 
-      {}
-      const std::string& GetKey() const { return key; }
-      unsigned short GetGroup() const { return group; }
-      unsigned short GetElement() const { return element; }
-      const std::string& GetName() const { return name; }
-      unsigned int GetFlags() const { return flags; }
-      
-      std::string key;
-      unsigned short group;
-      unsigned short element;
-      std::string name;
-      unsigned int flags;
-    };
-
-    typedef std::string Value;
-
-  } // namespace Field
-  //=====================================================================
-
-
-} // namespace creaImageIO
-
-
-
-  //=====================================================================
-inline std::ostream& operator<<(std::ostream& s, const creaImageIO::Field::Description& d)
-{
-  s << "[" << d.key << ":" << d.name << "]";
-  return s;
-}
-//=====================================================================
-
-
-
-#endif // #ifndef __creaImageIOField_h_INCLUDED__
diff --git a/src/creaImageIOImageReader.cpp b/src/creaImageIOImageReader.cpp
deleted file mode 100644 (file)
index 2d34c66..0000000
+++ /dev/null
@@ -1,477 +0,0 @@
-#include <creaImageIOImageReader.h>
-//#include <creaImageIOUtilities.h>
-
-
-#include <vtkImageReader2.h>
-#include <vtkPNGReader.h>
-#include <vtkTIFFReader.h>
-#include <vtkJPEGReader.h>
-#include <vtkBMPReader.h>
-#include <vtkSLCReader.h>
-#include <vtkMetaImageReader.h>
-//#include <vtkGESignalReader.h>
-
-#include <gdcmFile.h> 
-#include <vtkGdcmReader.h>
-
-
-#include "boost/filesystem/path.hpp"
-
-namespace creaImageIO
-{
-  
-  //========================================================================
-  std::string irclean(const std::string& str)
-  {
-    if (str == "GDCM::Unfound") 
-      {
-       return "----";
-      }
-    if (str[str.size()-1]==' ')
-      {
-       return str.substr(0,str.size()-1);
-      }
-    if (str[str.size()-1]==0)
-      {
-       return str.substr(0,str.size()-1);
-      }
-    
-    return str;
-  }
-  //========================================================================
-
-  void IRSplitString ( const std::string& str, 
-                      const std::string& delimiters, 
-                      std::vector<std::string>& tokens)
-  {
-    // Skip delimiters at beginning.
-    std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
-    // Find first delimiter.
-    std::string::size_type pos     = str.find_first_of(delimiters, lastPos);
-    
-    while (std::string::npos != pos || std::string::npos != lastPos)
-      {
-       // Found a token, add it to the vector.
-       // SPECIFIC : REMOVE INITIAL DOT (lastPos + 1)
-       tokens.push_back(str.substr(lastPos+1, pos - lastPos));
-       // Skip delimiters.  Note the "not_of"
-       lastPos = str.find_first_not_of(delimiters, pos);
-       // Find next delimiter
-       pos = str.find_first_of(delimiters, lastPos);
-      }
-    
-    }
-  
-  //=====================================================================
-  // Static members
-  /*
-  std::vector<SpecificImageReader*> ImageReader::mReader;
-  std::vector<std::string>ImageReader::mKnownExtensions;
-  vtkImageData* ImageReader::mUnreadableImage = 0;
-  std::string ImageReader::mLastFilename("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-  SpecificImageReader* ImageReader::mLastReader = 0;
-  //=====================================================================  
-  // Global instance : automatic init / destr
-  ImageReader GlobalImageReader;
-  //=====================================================================  
-  */
-
-  //=====================================================================
-  class SpecificImageReader 
-  {
-  public:
-    SpecificImageReader() {}
-    virtual ~SpecificImageReader() {}
-    void SetName(const std::string& s) { mName = s; }
-    const std::string& GetName() const { return mName; }
-    virtual bool CanRead(const std::string& filename) { return false; }
-    virtual vtkImageData* Read(const std::string& filename) { return 0; }
-    virtual void PushBackExtensions(std::vector<std::string>&) {}
-    virtual void ReadDicomInfo(const std::string& filename, 
-                              DicomNode* image) {}
-  private:
-    std::string mName;
-  };
-  //=====================================================================
-  
-  //=====================================================================
-  class SpecificVtkReader : public SpecificImageReader         
-  {                                                                    
-  public:                                                              
-    SpecificVtkReader(vtkImageReader2* r, 
-                     const std::string& name = "",
-                     const std::string& extensions = "")
-      : mVTKReader(r), mExtensions(extensions)
-    {
-      if (name.size() == 0) 
-       {
-         SetName ( mVTKReader->GetDescriptiveName() );
-       }
-      else 
-       {
-         SetName ( name );
-       }
-    };
-    ~SpecificVtkReader()
-    {
-      mVTKReader->Delete();
-    }
-    bool CanRead(const std::string& filename)
-    { 
-      //      std::cout << "## Reader "<<GetName()
-      //<<" ::CanRead("<<filename<<")"
-      //               <<std::endl;
-      return (mVTKReader->CanReadFile(filename.c_str())!=0);
-    }
-    vtkImageData* Read(const std::string& filename)
-    {
-      //      std::cout << "## Reader "<<GetName()
-      //<<" ::Read("<<filename<<")"
-      //               <<std::endl;
-      vtkImageData* im = 0;
-      try
-       {
-         mVTKReader->SetFileName(filename.c_str());
-         mVTKReader->Update();
-         im = vtkImageData::New();
-         im->ShallowCopy(mVTKReader->GetOutput());
-       }
-      catch (...)
-       {
-         if (im!=0) im->Delete();
-         im = 0;
-       }
-      return im;
-    }
-
-    void PushBackExtensions(std::vector<std::string>& v)
-    {
-      std::string ext = mExtensions;
-      if (ext.size()==0) ext = mVTKReader->GetFileExtensions ();
-      
-      IRSplitString(ext," ",v);
-    }
-     
-    void ReadDicomInfo(const std::string& filename, 
-                      DicomNode* image) 
-    {
-      //      std::cout << "SpecificVtkReader::ReadDicomInfo '"<<filename<<"'"<<std::endl;
-      boost::filesystem::path full_path(filename);
-      std::string f = full_path.leaf();
-       //Utilities::GetFileName(filename));
-      // file name 
-      image->SetFieldValue("A0004_1500",irclean(f));
-      // Does not work : 
-      // How to get the image info without loading it in vtk ?
-      
-      mVTKReader->SetFileName(filename.c_str());
-      mVTKReader->Update(); //OpenFile();
-      int ext[6];
-      mVTKReader->GetDataExtent(ext);
-      // Columns
-      char str[128];
-      sprintf(str,"%i",ext[1]-ext[0]);
-      //      std::cout << "col="<<str<<std::endl;
-      image->SetFieldValue("A0028_0011",str);
-      // Rows
-      sprintf(str,"%i",ext[3]-ext[2]);
-      //      std::cout << "row="<<str<<std::endl;
-      image->SetFieldValue("A0028_0010",str);
-      // Planes == frames
-      sprintf(str,"%i",ext[5]-ext[4]);
-      //      std::cout << "frames="<<str<<std::endl;
-      image->SetFieldValue("A0028_0008",str);
-            
-    }
-  private:
-    vtkImageReader2* mVTKReader;
-    std::string mExtensions;
-  };
-  //=====================================================================
-  //===================================================================== 
-  void IRFillFields(DicomNode* node, 
-                 GDCM_NAME_SPACE::File* gdcmFile)
-  {
-    const DicomNodeTypeDescription::FieldDescriptionMapType& dm
-      = node->GetTypeDescription().GetFieldDescriptionMap();
-    DicomNodeTypeDescription::FieldDescriptionMapType::const_iterator i;
-    
-       
-    DicomNode::FieldValueMapType& vm = node->GetFieldValueMap();
-    for (i=dm.begin(); i!=dm.end(); ++i)
-      {
-       if ( (i->second.flags==0) && 
-            (i->second.group!=0) && 
-            (i->second.element!=0) )
-         {
-               uint16_t gr = i->second.group;
-               uint16_t el = i->second.element;
-
-               std::string val = gdcmFile->GetEntryString(gr,el);
-
-           vm[i->first] = irclean(val);
-         }
-       else 
-         {
-           vm[i->first] = "";
-         }
-      }
-  }
-  //=====================================================================
-
-  //=====================================================================
-  class DicomReader : public SpecificImageReader               
-  {                                                                    
-  public:                                                              
-    DicomReader()
-    {
-      mReader = vtkGdcmReader::New();
-      SetName ( "Dicom" );
-    };
-    ~DicomReader()
-    {
-      mReader->Delete();
-    }
-    bool CanRead(const std::string& filename)
-    { 
-      //      std::cout << "## Reader "<<GetName()
-      //<<" ::CanRead("<<filename<<")"
-      //               <<std::endl;
-      //      return true;
-
-      
-      //      GDCM_NAME_SPACE
-      //  std::cout << "GDCM_NAME_SPACE = '" << STRINGIFY_SYMBOL(GDCM_NAME_SPACE)
-      // << "'" 
-      // <<std::endl;
-      
-      GDCM_NAME_SPACE::File* file = GDCM_NAME_SPACE::File::New();
-      file->SetLoadMode( GDCM_NAME_SPACE::LD_ALL);
-      file->SetFileName(filename.c_str());
-      file->Load();
-      bool ok = file->IsReadable();
-      file->Delete();
-      return ok;
-    }
-    vtkImageData* Read(const std::string& filename)
-    {
-      //      std::cout << "## Reader "<<GetName()
-      //<<" ::Read("<<filename<<")"
-      //               <<std::endl;
-
-      vtkImageData* im = 0;
-      try
-       {
-         mReader->SetFileName(filename.c_str());
-         mReader->Update();
-         im = vtkImageData::New();
-         im->ShallowCopy(mReader->GetOutput());
-       }
-      catch (...)
-       {
-         if (im!=0) im->Delete();
-         im = 0;
-       }
-      return im;
-    }
-
-    void PushBackExtensions(std::vector<std::string>& v)
-    {
-      v.push_back("dcm");
-      v.push_back("");
-    }
-
-    void ReadDicomInfo(const std::string& filename,
-                      DicomNode* image)
-    { 
-      //    std::cout << "DicomReader::ReadDicomInfo '"<<filename<<"'"<<std::endl;
-      GDCM_NAME_SPACE::File* file = GDCM_NAME_SPACE::File::New();
-      file->SetLoadMode( GDCM_NAME_SPACE::LD_ALL);
-      file->SetFileName(filename.c_str());
-      file->Load();
-      if (file->IsReadable())
-       {
-         
-         DicomNode* cur = image;
-         do 
-           {
-             IRFillFields(cur,file);
-             cur = cur->GetParent();
-           }
-         while (cur);
-         // File name and full file name
-         image->SetFieldValue("FullFileName",filename);
-         
-         boost::filesystem::path full_path(filename);
-         
-         image->SetFieldValue("A0004_1500",full_path.leaf());
-                              //Utilities::GetFileName(filename));
-       }
-      file->Delete();
-    }
-  
-
-  private:
-    vtkGdcmReader* mReader;
-  };
-  //=====================================================================
-
-
-
-
-  //=====================================================================
-  ImageReader::ImageReader()
-    :   
-    mUnreadableImage(0),
-    mLastFilename("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"),
-    mLastReader(0)
-
-  {
-    //    std::cout << "#### ImageReader::ImageReader()"<<std::endl;
-    if (mUnreadableImage!=0) return;
-
-    Register(new SpecificVtkReader(vtkPNGReader::New()));
-    Register(new SpecificVtkReader(vtkTIFFReader::New()));
-    Register(new SpecificVtkReader(vtkJPEGReader::New()));
-    Register(new SpecificVtkReader(vtkBMPReader::New()));
-    Register(new SpecificVtkReader(vtkSLCReader::New()));
-    Register(new SpecificVtkReader(vtkMetaImageReader::New(),"MHD",".mhd"));
-    //   Register(new SpecificVtkReader(vtkGESignalReader::New()));
-    Register(new DicomReader);
-
-    /*
-    std::cout << "## Registered file extensions : "<<std::endl;
-    std::vector<std::string>::const_iterator i;
-    for (i=GetKnownExtensions().begin();
-        i!=GetKnownExtensions().end();
-        i++)
-      {
-       std::cout << "'"<<(*i)<<"'"<<std::endl;
-      }
-    */
-    // 
-    mUnreadableImage = vtkImageData::New();
-    int dim[3];
-    dim[0] = dim[1] = 128; 
-    dim[2] = 1; 
-    mUnreadableImage->SetDimensions ( dim );
-    mUnreadableImage->SetScalarTypeToUnsignedChar();
-    mUnreadableImage->AllocateScalars();    
-    for (int i=0;i<dim[0];i++) 
-      for (int j=0;j<dim[1];j++) 
-       mUnreadableImage->SetScalarComponentFromFloat(i,j,0,0,0);
-    for (int i=0;i<dim[0];i++) 
-      {
-       mUnreadableImage->SetScalarComponentFromFloat(i,i,0,0,255);
-       mUnreadableImage->SetScalarComponentFromFloat(dim[0]-1-i,i,0,0,255);
-      }
-
-
-    
-  }
-  //=====================================================================
-
-  //=====================================================================
-  ImageReader::~ImageReader()
-  {
-    //    std::cout << "#### ImageReader::~ImageReader()"<<std::endl;
-    std::vector<SpecificImageReader*>::iterator i;
-    for (i=mReader.begin(); i!=mReader.end(); i++)
-      {
-       //      std::cout << "#### ImageReader::UnRegister("
-       //                << (*i)->GetName()<<")"<<std::endl;
-       delete (*i);
-      }
-    mReader.clear();
-    if (mUnreadableImage!=0) 
-      {
-       mUnreadableImage->Delete();
-       mUnreadableImage = 0;
-      }
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void ImageReader::Register(SpecificImageReader* r)
-  {
-    //    std::cout << "#### ImageReader::Register("<<r->GetName()<<")"<<std::endl;
-    mReader.push_back(r);
-    r->PushBackExtensions(mKnownExtensions);
-  }
-  //=====================================================================
-
-  //=====================================================================
-  // Returns true iff the file is readable
-  bool ImageReader::CanRead( const std::string& filename, 
-                            const std::string& exclude )
-  {
-    //    std::cout << "## ImageReader::CanRead("<<filename<<")"<<std::endl;
-    bool ok = false;
-    std::vector<SpecificImageReader*>::iterator i;
-    for (i=mReader.begin(); i!=mReader.end(); i++)
-      {
-       if ((*i)->GetName()==exclude) continue;
-       ok = (*i)->CanRead(filename);
-       if (ok) 
-         {
-           mLastFilename = filename;
-           mLastReader = *i;
-           break;
-         }
-      }
-    return ok;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  // Reads the file (CanRead must be called before : no test here)
-  vtkImageData*  ImageReader::Read( const std::string& filename, 
-                                   const std::string& exclude )
-  {
-    //    std::cout << "## ImageReader::Read("<<filename<<")"<<std::endl;
-    if (mLastFilename!=filename)
-      {
-       if (!CanRead(filename,exclude)) 
-         { 
-           //      std::cout << "  -- Cannot read image "<<std::endl;
-           vtkImageData* im = vtkImageData::New();
-           im->ShallowCopy(mUnreadableImage);
-           return im;
-         }
-      }
-    vtkImageData* i = mLastReader->Read(mLastFilename);
-    //    std::cout << "i="<<i<<std::endl;
-    if (i==0) 
-      {
-       //      std::cout << "i=UNREAD"<<i<<std::endl;
-       i = vtkImageData::New();
-       i->ShallowCopy(mUnreadableImage);
-      }
-    //    std::cout << "i="<<i<<std::endl;
-    return i;
-  }
-  //=====================================================================
-
-
-  //=====================================================================
-   void ImageReader::ReadDicomInfo(const std::string& filename, 
-                                  DicomNode* image)
-   {
-     // std::cout << "ImageReader::ReadDicomInfo '"<<filename<<"'"<<std::endl;
-    //    std::cout << "## ImageReader::Read("<<filename<<")"<<std::endl;
-    if (mLastFilename!=filename)
-      {
-       if (!CanRead(filename)) 
-         { 
-           return;
-         }
-      }
-    mLastReader->ReadDicomInfo(mLastFilename,image);
-   }
-  //=====================================================================
-
-
-
-} // namespace creaImageIO
diff --git a/src/creaImageIOImageReader.h b/src/creaImageIOImageReader.h
deleted file mode 100644 (file)
index 2ac860f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef __creaImageIOImageReader_h_INCLUDED__
-#define __creaImageIOImageReader_h_INCLUDED__
-
-
-#include <creaImageIODicomNode.h>
-
-#include <vtkImageData.h>
-#include <string>
-#include <vector>
-
-namespace creaImageIO
-{
-
-
-  //=====================================================================
-  class SpecificImageReader;
-  //=====================================================================
-
-  //=====================================================================
-  class ImageReader
-  {
-  public:
-    ImageReader();
-    ~ImageReader();
-
-    // Returns the known extensions
-    /*static*/ const std::vector<std::string>& GetKnownExtensions()  
-    { return mKnownExtensions; }
-    // Returns true iff the file is readable
-    /*static*/ bool CanRead( const std::string& filename, 
-                        const std::string& exclude = "");
-    // Reads the file. Returns an "Unreadable image" picture if fails
-    /*static*/ vtkImageData* Read( const std::string& filename,
-                              const std::string& exclude = "");
-
-    void ReadDicomInfo(const std::string& filename, 
-                      DicomNode* image);
-
-  protected:
-    
-    /*static*/ void Register(SpecificImageReader*);
-
-    /*static*/ std::vector<SpecificImageReader*> mReader;
-    /*static*/ std::vector<std::string> mKnownExtensions;
-    /*static*/ vtkImageData* mUnreadableImage;
-
-    /*static*/ std::string mLastFilename;
-    /*static*/ SpecificImageReader* mLastReader;
-    
-  private:
-
-  }; // class ImageReader
-  //=====================================================================
-
-
-
-} // namespace creaImageIO
-
-
-
-#endif // #ifndef __creaImageIOImageReader_h_INCLUDED__
diff --git a/src/creaImageIOIndexedHeap.h b/src/creaImageIOIndexedHeap.h
deleted file mode 100644 (file)
index 8dc9b02..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/* 
-
-*/
-/*! \file 
-       \brief Indexed priority queues handled by binary trees.
-*/
-#ifndef __creaImageIOIndexedHeap_h_INCLUDED__
-#define __creaImageIOIndexedHeap_h_INCLUDED__
-
-#include <vector>
-
-namespace creaImageIO 
-{
-
-       
-
-  template <class T, 
-           class Comparator/*=Less<T>*/,
-           class Indexer/*=Index<T> */> 
-  class IndexedHeap ;
-  template < class T, 
-            class C, 
-            class I> 
-  std::ostream& operator << (std::ostream&, const IndexedHeap<T,C,I>& );
-
-  //template <class T, class Comparator=std::less<T>, class Index=IndexIndex<T> > class SlicedIndexedHeap; 
-
-
-  //========================================================================
-  /// \brief Indexed priority queues handled by binary trees. 
-  /// 
-  ///  Heap Allows :
-  ///          - log(n) insertion
-  ///          - constant time acces to the first element
-  ///          - log(n) removal of the first element
-  ///          - log(n) priority change of a random element 
-  /// Indexation Allows :
-  ///          - constant time access to a random element (for priority change)
-  /// 
-  /// The Indexer is an unary_function<T,int&> whose operator()(T& t) 
-  /// returns a reference on an integer which 
-  /// is maintained by the IndexedHeap in order to provide at any time 
-  /// the position of the object t in the Heap 
-  /// (hence allowing constant time random access to an object). 
-  template <class T, 
-           class Comparator /*=Less<T>*/, 
-           class Indexer /*=Index<T>*/> 
-  class IndexedHeap 
-  {
-    //                 friend class SlicedIndexedHeap<T,Comparator,Index>;
-  public :
-               
-    //======================================================================
-    /// Constructor 
-    IndexedHeap () {}
-    /// Constructor 
-    IndexedHeap ( const Comparator& comp, const Indexer& ind ) ;
-    /// Destructor 
-    ~IndexedHeap() { }
-    /// Sets the comparator 
-    void set( const Comparator& comp );
-    /// Sets the Index 
-    void set( const Indexer& ind );
-    //======================================================================
-               
-    //======================================================================
-    /// inserts an element in the Heap and returns its position 
-    int insert(T);
-    /// return a reference on the first element of the Heap 
-    T& top(); 
-    /// return a constant reference on the first element of the Heap 
-    const T& top() const;  
-    /// removes and returns the first element of the Heap 
-    T remove_top();
-    /// removes and returns the nth element 
-    T remove(int n);
-    /// returns the size of the Heap 
-    inline int size() const {return m_p.size(); }
-    /// empties the Heap 
-    void clear();
-    //======================================================================
-       
-    //======================================================================
-    /// returns a constant on the stack of elements 
-    const std::vector<T> & stack() const {return m_p;}
-    /// returns a reference to the ith element of the stack 
-    T& operator [] (int i) { return m_p[i];}
-    /// returns a constant reference to the ith element of the stack 
-    const T& operator [] (int i) const { return m_p[i];}
-    /// returns the index (position) of t 
-    inline int index(T& t) { return (*m_i)(t); }
-    //======================================================================
-
-    //======================================================================
-    /// returns the position of the father of i 
-    inline int father( int i ) const;
-    /// returns the position of the right son of i 
-    inline int rightson( int i ) const;
-    /// returns the position of the leftson of i 
-    inline int leftson( int i ) const;
-    //======================================================================
-    /// swaps ith and jth elements 
-    inline void swap(int i, int j);
-    /// remonte un element dans le tas tant qu'il n'est pas a sa place. 
-    /// renvoie la position finale 
-    inline int upsort(int);
-    /// descend un element dans le tas tant qu'il n'est pas a sa place.
-    /// renvoie la position finale
-    inline int downsort(int);
-    //======================================================================
-                       
-  protected : 
-    /// binary tree handled by a vector 
-    std::vector<T> m_p;
-    /// comparator pointer 
-    const Comparator* m_c;
-    /// Index pointer 
-    const Indexer*  m_i;
-  };
-  //========================================================================
-  // EO class IndexedHeap
-  //========================================================================
-
-
-#include "creaImageIOIndexedHeap_code.h"
-
-
-};
-//===========================================================================
-// EO namespace creaImageIO
-//===========================================================================
-
-
-
-//===========================================================================
-// EOF
-//===========================================================================
-#endif
diff --git a/src/creaImageIOIndexedHeap_code.h b/src/creaImageIOIndexedHeap_code.h
deleted file mode 100644 (file)
index b5b5753..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/* 
-
-*/
-/*! \file 
-  \brief Code of IndexedHeap
-*/
-//============================================================================
-template <class T, class CT, class IT>
-std::ostream& operator << (std::ostream& s, const IndexedHeap<T,CT,IT>& t)
-{
-  s << "[";
-  for (int i=0; i<t.size(); i++) s << t[i] << " "  ;
-  s << "]";
-  return s;
-}
-//============================================================================
-
-
-//===========================================================
-template <class T, class CT, class IT>
-IndexedHeap<T,CT,IT>::IndexedHeap ( const CT& comp, const IT& index ) 
-  : m_c(&comp), m_i(&index) 
-{}
-//===========================================================
-
-
-//===========================================================
-template <class T, class CT, class IT>
-void IndexedHeap<T,CT,IT>::set( const CT& comp ) 
-{ 
-  m_c = &comp; 
-}
-//===========================================================
-
-//===========================================================
-template <class T, class CT, class IT>
-void IndexedHeap<T,CT,IT>::set ( const IT& index ) 
-{ 
-  m_i = &index; 
-}
-//===========================================================
-
-
-//===========================================================
-template <class T, class CT, class IT>
-int IndexedHeap<T,CT,IT>::insert(T t)
-{
-  m_p.push_back(t);
-  (*m_i)(t) = size()-1;
-  return upsort(size()-1);
-}
-//===========================================================
-
-//===========================================================
-template <class T, class CT, class IT>
-T& IndexedHeap<T,CT,IT>::top()
-{
-  //  lglASSERT( size() > 0)
-    return m_p.front();
-}
-//===========================================================
-
-
-//===========================================================
-template <class T, class CT, class IT>
-const T& IndexedHeap<T,CT,IT>::top() const
-{
-  //  lglASSERT( size() > 0)
-    return m_p.front();
-}
-//===========================================================
-
-//===========================================================
-template <class T, class CT, class IT>
-T IndexedHeap<T,CT,IT>::remove_top()
-{
-  //  lglASSERT( size() > 0 ) 
-    T f(m_p[0]);
-  (*m_i)(f) = -1;
-  T last = m_p.back();
-  m_p.pop_back();
-  if (m_p.size()>0) 
-    {
-    m_p[0] = last;
-    (*m_i)(last) = 0;
-    downsort(0);
-  }
-  return f;
-}
-//============================================================================
-
-
-
-//============================================================================
-template <class T, class CT, class IT>
-T IndexedHeap<T,CT,IT>::remove(int n)
-{
-  //  lglASSERT ( (n>=0)&&(n<size()) ) 
-    T f(m_p[n]);
-  (*m_i)(f) = -1;
-  T last = m_p.back();
-  m_p.pop_back();
-  if (m_p.size()>0) 
-    {
-    m_p[n] = last;
-    (*m_i)(last) = n;
-    downsort(n);
-  }
-  return f;
-}
-//============================================================================
-
-
-//============================================================================
-template <class T, class CT, class IT>
-void IndexedHeap<T,CT,IT>::clear()
-{
-  for (typename std::vector<T>::iterator i=m_p.begin(); i!=m_p.end(); ++i) 
-    { 
-      (*m_i)(*i)=-1; 
-    }
-  m_p.clear();
-}
-//============================================================================
-
-
-//============================================================================
-template <class T, class CT, class IT>
-int  IndexedHeap<T,CT,IT>::father( int  i) const
-{
-  return ((i-1)/2);
-}
-//============================================================================
-
-//============================================================================
-template <class T, class CT, class IT>
-int  IndexedHeap<T,CT,IT>::rightson( int  i) const
-{ 
-  return (i*2+2);
-}
-//============================================================================
-
-//============================================================================
-template <class T, class CT, class IT>
-int  IndexedHeap<T,CT,IT>::leftson( int  i) const
-{ 
-  return (i*2+1);
-}
-//============================================================================
-
-//============================================================================
-template <class T, class CT, class IT>
-void IndexedHeap<T,CT,IT>::swap(int i, int j)
-{
-  T tmp = m_p[i];
-  m_p[i] = m_p[j];
-  m_p[j] = tmp;
-  // update indices  
-  (*m_i)(m_p[i]) = i;
-  (*m_i)(m_p[j]) = j;
-}
-//============================================================================
-
-
-
-//============================================================================
-template <class T, class CT, class IT>
-int  IndexedHeap<T,CT,IT>::upsort(int  i)
-{
-  //if (i==0) return i;
-  int  j = father(i);
-  while ((i>0)&&(*m_c)(m_p[i],m_p[j])) 
-    {
-    swap(i,j);
-    i = j;
-    j = father(j);
-  }    
-  return i;
-}
-//============================================================================
-
-
-//============================================================================
-template <class T, class CT, class IT>
-int  IndexedHeap<T,CT,IT>::downsort(int  i)
-{
-  do 
-    {
-      
-      unsigned int  ls = leftson(i);
-      if (ls<m_p.size()) 
-       {
-      bool lc = ((*m_c)(m_p[i],m_p[ls]));
-      unsigned int  rs = ls + 1;
-      bool rc = true;
-      if (rs<m_p.size()) rc = ((*m_c)(m_p[i],m_p[rs]));
-      if  ( !lc ) 
-       { 
-       if ( !rc ) 
-         { 
-         if ((*m_c)(m_p[ls],m_p[rs])) 
-           { 
-           swap(i,ls);
-           i = ls;
-         }
-         else 
-           { 
-           swap(i,rs);
-           i = rs;
-         }
-       }
-       else 
-         {
-         swap(i,ls);
-         i = ls;
-       }
-      }
-      else if ( !rc ) 
-       { 
-       swap(i,rs);
-       i = rs;
-      }
-      else return i;
-    } 
-    else return i;
-  }
-  while (true);
-  return i;
-}
-//============================================================================
-
-
-//============================================================================
-// EOF
-//============================================================================
diff --git a/src/creaImageIOMultiThreadImageReader.cpp b/src/creaImageIOMultiThreadImageReader.cpp
deleted file mode 100644 (file)
index 83908ad..0000000
+++ /dev/null
@@ -1,590 +0,0 @@
-#include <creaImageIOMultiThreadImageReader.h>
-#include <creaImageIOImageReader.h>
-#include <wx/utils.h>
-
-namespace creaImageIO
-{
-
-  //=====================================================================
-  void MultiThreadImageReaderUser::MultiThreadImageReaderSendEvent
-  ( const std::string& filename,
-    EventType type,
-    vtkImageData* image)
-  {
-    wxMutexLocker lock(mMultiThreadImageReaderUserMutex);
-    this->OnMultiThreadImageReaderEvent(filename,type,image);
-  }
-  //=====================================================================
-
-  //=====================================================================
-  class ThreadedImageReader: public wxThread
-  {
-  public:
-    ThreadedImageReader(MultiThreadImageReader* tir) :
-      mMultiThreadImageReader(tir)
-    {}
-
-    void* Entry();
-    void  OnExit();
-
-    vtkImageData* Read(const std::string& filename);
-    
-
-  private:
-    ImageReader mReader;
-    MultiThreadImageReader* mMultiThreadImageReader;
-  };
-  //=====================================================================
-
-  
-  //=====================================================================
-  MultiThreadImageReader::MultiThreadImageReader(int number_of_threads)
-    : //mDoNotSignal(false),
-      mReader(0),
-      mTotalMem(0),
-      mTotalMemMax(10000)
-  {
-    //    std::cout << "#### MultiThreadImageReader::MultiThreadImageReader("
-    //       << " #threads= " << number_of_threads <<" )"<<std::endl;
-
-    // Create the threads
-    for (int i=0; i<number_of_threads; i++) 
-      {
-       ThreadedImageReader* t = new ThreadedImageReader(this);
-       mThreadedImageReaderList.push_back(t);
-      }
-    mNumberOfThreadedReadersRunning = 0;
-    // Init the queue
-    mQueue.set(mComparator);
-    mQueue.set(mIndexer);
-    // 
-    // no thread : alloc self reader
-    if (number_of_threads==0)
-      {
-       mReader = new ImageReader();
-      }
-  }
-  //=====================================================================
-
-
-  //=====================================================================
-  bool MultiThreadImageReader::Start()
-  {
-
-    //    std::cout << "#### MultiThreadImageReader::Start()"
-    //               <<std::endl;
-    ThreadedImageReaderListType::iterator i;
-    for (i =mThreadedImageReaderList.begin();
-        i!=mThreadedImageReaderList.end();
-        i++)
-      {
-       (*i)->Create();
-       if ( (*i)->Run() != wxTHREAD_NO_ERROR )
-         {
-           std::cout << "ERROR starting a thread"<< std::endl;
-           return false;
-         }
-       else 
-         {
-           //      std::cout << "  ===> Thread "<<(*i)->GetCurrentId()
-           //                <<" successfully created"<< std::endl;
-           
-         }
-      }
-    wxMutexLocker locker(GetMultiThreadImageReaderUserMutex());
-    //    std::cout << "EO Start : #Threads running = "
-    //               << mNumberOfThreadedReadersRunning<<std::endl;
-
-    return true;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void MultiThreadImageReader::Stop()
-  { 
-//                 std::cout << "#### MultiThreadImageReader::Stop()"
-//           <<std::endl;
-  //  std::cout << "Sending stop order to the threads..."<<std::endl;
-
-    ThreadedImageReaderListType::iterator i;
-    for (i =mThreadedImageReaderList.begin();
-        i!=mThreadedImageReaderList.end();
-        i++)
-      {
-       (*i)->Delete();
-      }
-    mThreadedImageReaderList.clear();
-    // Wait a little to be sure that all threads have stopped
-    // A better way to do this ?
-    //    wxMilliSleep(1000);
-    // New method : the threads generate a stop event when they have finished
-    // We wait until all threads have stopped
-//        std::cout << "Waiting for stop signals..."<<std::endl;
-    do 
-      {
-       // Sleep a little
-       wxMilliSleep(10);
-       // Lock
-       {
-         wxMutexLocker locker(GetMultiThreadImageReaderUserMutex());
-//               std::cout << "#Threads running = "
-//                         << mNumberOfThreadedReadersRunning<<std::endl;
-         // Break if all readers have stopped
-         if (mNumberOfThreadedReadersRunning <= 0) 
-           {
-             break;
-           }
-       }
-      } 
-    while (true);
-//        std::cout << "All threads stopped : OK "<<std::endl;
-
-    ImageMapType::iterator j;
-    for (j =mImages.begin();
-        j!=mImages.end();
-        ++j)
-
-      {
-       delete j->first;
-      }
-    mImages.clear();
-  }
-  //=====================================================================
-
-  //=====================================================================
-  MultiThreadImageReader::~MultiThreadImageReader()
-  {
-    //    std::cout << "#### MultiThreadImageReader::~MultiThreadImageReader()"
-    //       <<std::endl;
-    Stop();
-    if (mReader) delete mReader;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void MultiThreadImageReader::UpdateUnloadPriority(ImageToLoadPtr p, 
-                                                   int priority)
-  {
-    // not in unload queue : ciao
-    if (p->UnloadIndex()<0) return;
-    int old_prio = p->GetPriority();
-    if (priority > old_prio) 
-      {
-       p->SetPriority(priority);
-       mUnloadQueue.downsort(p->UnloadIndex());
-      }
-    else if ( old_prio > priority )
-      {
-       p->SetPriority(priority);
-       mUnloadQueue.upsort(p->UnloadIndex());
-     }
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void MultiThreadImageReader::Request( MultiThreadImageReaderUser* user,
-                                       const std::string& filename, 
-                                       int priority )
-  {
-    wxMutexLocker lock(GetMultiThreadImageReaderUserMutex()); //mMutex);
-    
-    if (mThreadedImageReaderList.size()==0) 
-      {
-       // no detached reader : use self reader
-       ImageToLoad itl(user,filename);
-       ImageMapType::iterator i = mImages.find(&itl);
-       if (i!=mImages.end())
-         {
-           ImageToLoadPtr pitl = const_cast<ImageToLoadPtr>(i->first);
-           // Already inserted
-           if (pitl->GetImage() != 0)
-             {
-               // Already read
-               pitl->SetUser(user);
-               UpdateUnloadPriority(pitl,priority);
-               SignalImageRead(pitl,false);
-               return; // pitl->GetImage();
-             }
-         }
-       ImageToLoadPtr pitl = new ImageToLoad(user,filename,0);
-       mImages[pitl] = 0;
-       pitl->SetImage(mReader->Read(filename));
-       UpdateUnloadPriority(pitl,priority);
-       SignalImageRead(pitl,true);
-       //      return pitl->GetImage();
-       return;
-      }
-
-
-    ImageToLoad itl(user,filename);
-    ImageMapType::iterator i = mImages.find(&itl);
-    if (i!=mImages.end())
-      {
-       // Already inserted
-       if (i->first->GetImage() != 0)
-         {
-           // Already read : ok :signal the user
-           UpdateUnloadPriority(i->first,priority);
-           SignalImageRead(i->first,false);
-           return;
-         }
-       /// Already requested : change the priority
-       ImageToLoadPtr pitl = const_cast<ImageToLoadPtr>(i->first);
-       pitl->SetPriority(priority);
-       // Already in queue
-       if (pitl->Index()>=0) 
-         {
-           // Re-sort the queue
-           mQueue.upsort(pitl->Index());
-         }
-       // Not read but not in queue = being read = ok
-       else 
-         {
-           
-         }
-      }
-    else 
-      {
-       // Never requested before or unloaded 
-       ImageToLoadPtr pitl = new ImageToLoad(user,filename,priority);
-       mImages[pitl] = 0;
-       mQueue.insert(pitl);
-      }
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void MultiThreadImageReader::OnMultiThreadImageReaderEvent
-  (const std::string& filename,
-   MultiThreadImageReaderUser::EventType e,
-   vtkImageData* image)
-  {
-    if ((e==MultiThreadImageReaderUser::ImageLoaded) &&
-       (filename == mRequestedFilename))
-      {
-       mRequestedImage = image;
-      }
-    else if (e==MultiThreadImageReaderUser::ThreadedReaderStarted)
-      {
-       mNumberOfThreadedReadersRunning++;
-       //      std::cout << "#TR=" << mNumberOfThreadedReadersRunning << std::endl;
-      }
-    else if (e==MultiThreadImageReaderUser::ThreadedReaderStopped)
-      {
-       mNumberOfThreadedReadersRunning--;
-       //      std::cout << "#TR=" << mNumberOfThreadedReadersRunning << std::endl;
-      }
-  }
-  //=====================================================================
-
-  //=====================================================================
-  vtkImageData* MultiThreadImageReader::GetImage(const std::string& filename)
-  {
-    
-    //    std::cout << "** MultiThreadImageReader::GetImage('"<<filename<<"')"
-    //       <<std::endl;
-    
-    do 
-      {
-       wxMutexLocker lock(GetMultiThreadImageReaderUserMutex()); //mMutex);
-               
-       if (mThreadedImageReaderList.size()==0)
-         {
-           ImageToLoad itl(this,filename);
-           ImageMapType::iterator i = mImages.find(&itl);
-           if (i!=mImages.end())
-             {
-               ImageToLoadPtr pitl = const_cast<ImageToLoadPtr>(i->first);
-               // Already inserted
-               if (pitl->GetImage() != 0)
-                 {
-                   // Already read
-                   UpdateUnloadPriority(pitl,
-                                        GetMaximalPriorityWithoutLocking()+1);
-                   return pitl->GetImage();
-                 }
-             }
-           ImageToLoadPtr pitl = new ImageToLoad(this,filename,0);
-           mImages[pitl] = 0;
-           pitl->SetImage(mReader->Read(filename));
-           UpdateUnloadPriority(pitl,
-                                GetMaximalPriorityWithoutLocking()+1);
-           return pitl->GetImage();
-         }
-       
-       mRequestedFilename = filename;
-       mRequestedImage = 0;
-       ImageToLoad itl(this,filename);
-       ImageMapType::iterator i = mImages.find(&itl);
-       if (i!=mImages.end())
-         {
-           // Already inserted in queue
-           if (i->first->GetImage() != 0)
-             {
-               // Already read : ok : return it 
-               return i->first->GetImage();
-             }
-           /// Already requested : change the priority
-             ImageToLoadPtr pitl = const_cast<ImageToLoadPtr>(i->first);
-             pitl->SetPriority( GetMaximalPriorityWithoutLocking() + 1 );
-             pitl->SetUser( this );
-             // Already in queue
-             if (pitl->Index()>=0) 
-               {
-                 // Re-sort the queue
-                 mQueue.upsort(pitl->Index());
-               }
-             // Not read but not in queue = being read = ok
-             else 
-               {
-                 pitl->SetUser( this );
-               }
-         }
-       else 
-         {
-           
-           // Never requested before or unloaded 
-           ImageToLoadPtr pitl = 
-             new ImageToLoad(this,filename,
-                             GetMaximalPriorityWithoutLocking() + 1);
-           mImages[pitl] = 0;
-           mQueue.insert(pitl);
-         }
-      }
-    while (0);
-
-    //    std::cout << "Waiting..."<<std::endl;
-
-    // Waiting that it is read
-    int n = 0;
-    do 
-      {
-       //      std::cout << n++ << std::endl;
-       wxMilliSleep(10);
-       do 
-         {
-           //      wxMutexLocker lock(mMutex);
-           wxMutexLocker lock(GetMultiThreadImageReaderUserMutex());
-           if (mRequestedImage!=0) 
-             {
-               return mRequestedImage;
-             } 
-         }
-       while (0);
-      }
-    while (true);
-    // 
-    
-  }
-  //=====================================================================
-  
-  //=====================================================================
-  void MultiThreadImageReader::SignalImageRead(ImageToLoadPtr p, 
-                                              bool purge)
-  {
-    //    std::cout << "MultiThreadImageReader::SignalImageRead" <<std::endl;
-    //    std::cout << "this="<<this <<std::endl;
-    //    std::cout << "user="<<p->GetUser() <<std::endl;
-
-    if ( p->GetUser() == this ) 
-      GetMultiThreadImageReaderUserMutex().Unlock();
-
-    p->GetUser()->MultiThreadImageReaderSendEvent
-      (p->GetFilename(),
-       MultiThreadImageReaderUser::ImageLoaded,
-       p->GetImage());
-
-    /*
-      AN ATTEMPT TO UNLOAD OLDEST IMAGE IF EXCEEDED A CERTAIN MEMORY QUOTA
-      BUGGY : TO FIX 
-    */
-    if (!purge)  return;
-
-    //    wxMutexLocker lock(GetMultiThreadImageReaderUserMutex());
-          
-    mUnloadQueue.insert(p);
-    p->GetImage()->UpdateInformation();
-    p->GetImage()->PropagateUpdateExtent();
-    long ImMem = p->GetImage()->GetEstimatedMemorySize();
-    mTotalMem += ImMem;
-    //    std::cout << " ==> Total mem = "<<mTotalMem<<" Ko"<<std::endl;
-    while (mTotalMem > mTotalMemMax)
-      {
-       //      std::cout 
-       //                <<"   ! Exceeded max of "
-       //                << mTotalMemMax << " : unloading oldest image ... "
-       //                << std::endl;
-       if ( mUnloadQueue.size() <= 1 ) 
-         {
-           //      std::cout << "Only one image : cannot load AND unload it !!"
-           //                <<std::endl;
-           break; 
-
-         }
-       ImageToLoadPtr unload = mUnloadQueue.remove_top();
-       MultiThreadImageReaderUser* user = unload->GetUser();
-
-       if ((user!=0)&&(user!=this)) 
-         {
-           user->GetMultiThreadImageReaderUserMutex().Lock();
-         }
-
-
-       //      std::cout << "'" << unload->GetFilename() << "'" << std::endl;
-       mTotalMem -= unload->GetImage()->GetEstimatedMemorySize();
-       //      std::cout << " ==> Total mem = "<<mTotalMem<<" Ko "<<std::endl;
-       
-
-       std::string filename = unload->GetFilename();
-       if (unload->Index()>=0)
-         {
-           //   std::cout << "still in queue"<<std::endl;
-         }
-       unload->Index() = -1;
-
-
-       ImageMapType::iterator it = mImages.find(unload);
-       if (it!=mImages.end())
-         {
-           mImages.erase(it);
-         }
-       //          std::cout << "delete..."<<std::endl;
-       delete unload;
-       //          std::cout << "delete ok."<<std::endl;
-
-       if (user!=0) 
-         {
-           //      std::cout << "unlock..."<<std::endl;
-           user->GetMultiThreadImageReaderUserMutex().Unlock();
-           //      std::cout << "event"<<std::endl;
-           user->MultiThreadImageReaderSendEvent
-             (filename,
-              MultiThreadImageReaderUser::ImageUnloaded,
-              0);
-           //      std::cout << "event ok"<<std::endl;
-
-         }
-      }
-    
-  
-  }
-  //=====================================================================
-
-  //=====================================================================
-  int MultiThreadImageReader::GetMaximalPriority()
-  { 
-    wxMutexLocker lock(GetMultiThreadImageReaderUserMutex()); //mMutex);
-    return GetMaximalPriorityWithoutLocking();
-  }
-  //=====================================================================
-
-
-  //=====================================================================
-  int MultiThreadImageReader::GetMaximalPriorityWithoutLocking()
-  { 
-    long max = 0;
-    if (mQueue.size()>0) 
-      {
-       max = mQueue.top()->GetPriority();
-      }
-    if (mUnloadQueue.size()>0)
-      {
-       int max2 = mUnloadQueue.top()->GetPriority();
-       if (max2>max) max=max2;
-      }
-    return max;
-  }
-  //=====================================================================
-
-
-  //=====================================================================
-  //=====================================================================
-  //=====================================================================
-  //=====================================================================
-
-  //=====================================================================
-  void*  ThreadedImageReader::Entry()
-  {
-    //    std::cout << "### Thread "<<GetCurrentId()<<"::Entry()"
-    //               << std::endl;
-
-    mMultiThreadImageReader->MultiThreadImageReaderSendEvent
-      ("",
-       MultiThreadImageReaderUser::ThreadedReaderStarted,
-       0);
-
-    // While was not deleted 
-    while (!TestDestroy())
-      {
-       //      std::cout << "### Thread "<<GetCurrentId()<<" waiting for image"
-       //        << std::endl;
-         
-       // Lock the mutex
-       mMultiThreadImageReader->MultiThreadImageReaderEventLock();
-       //mMutex.Lock();
-       // If image in queue
-       if (mMultiThreadImageReader->mQueue.size()>0)
-         {
-           MultiThreadImageReader::ImageToLoadPtr i = 
-             mMultiThreadImageReader->mQueue.remove_top();
-
-           mMultiThreadImageReader->MultiThreadImageReaderEventUnlock();
-           //mMutex.Unlock();
-
-           
-           //      std::cout << "### Thread "<<GetCurrentId()<<" : reading '"
-           //                << i->GetFilename() << "'" << std::endl;
-           
-           // Do the job
-           vtkImageData* im = Read(i->GetFilename());
-
-           // Store it in the map
-           mMultiThreadImageReader->MultiThreadImageReaderEventLock();
-           //mMutex.Lock();
-           MultiThreadImageReader::ImageToLoad itl(0,i->GetFilename());
-           MultiThreadImageReader::ImageMapType::iterator it = 
-             mMultiThreadImageReader->mImages.find(&itl);
-           MultiThreadImageReader::ImageToLoadPtr 
-             pitl = const_cast<MultiThreadImageReader::ImageToLoadPtr>
-             (it->first);
-           pitl->SetImage(im);
-           mMultiThreadImageReader->SignalImageRead(pitl,true);//i->GetFilename());
-           mMultiThreadImageReader->MultiThreadImageReaderEventUnlock();           //mMutex.Unlock();
-           
-           //      std::cout << "### Thread "<<GetCurrentId()<<" : reading '"
-           //                << i->GetFilename() << "' : DONE" << std::endl;
-           
-         }
-       else 
-         {
-           mMultiThreadImageReader->MultiThreadImageReaderEventUnlock();
-           //mMutex.Unlock();
-           // Wait a little to avoid blocking 
-           Sleep(10);
-         }
-      };
-    //    std::cout << "### Thread "<<GetCurrentId()<<" stopping"
-    //               << std::endl;
-       
-    return 0;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void ThreadedImageReader::OnExit()
-  {
-    mMultiThreadImageReader->MultiThreadImageReaderSendEvent
-      ("",
-       MultiThreadImageReaderUser::ThreadedReaderStopped,
-       0);
-  }
-  //=====================================================================
-
-  //=====================================================================
-  vtkImageData* ThreadedImageReader::Read(const std::string& filename)
-  {
-    return mReader.Read(filename);
-  }
-  //=====================================================================
-
-} // namespace creaImageIO
diff --git a/src/creaImageIOMultiThreadImageReader.h b/src/creaImageIOMultiThreadImageReader.h
deleted file mode 100644 (file)
index d72981d..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-#ifndef __creaImageIOThreadedImageReader_h_INCLUDED__
-#define __creaImageIOThreadedImageReader_h_INCLUDED__
-
-#include <creaImageIOSystem.h>
-#include <creaImageIOImageReader.h>
-#include <creaImageIOIndexedHeap.h>
-#include <map>
-#include <deque>
-#include <wx/thread.h>
-#include <queue>
-
-namespace creaImageIO
-{
-
-  //=====================================================================
-  class ThreadedImageReader;
-  class MultiThreadImageReader;
-  //=====================================================================
-  
-  //=====================================================================
-  class CREAIMAGEIO_EXPORT MultiThreadImageReaderUser
-  {
-  public:
-    friend class ThreadedImageReader;
-    friend class MultiThreadImageReader;
-
-    MultiThreadImageReaderUser() {}
-    virtual ~MultiThreadImageReaderUser() {}
-
-    typedef enum 
-      {
-       ThreadedReaderStarted,
-       ThreadedReaderStopped,
-       ImageLoaded,
-       ImageUnloaded,
-       Error
-      }
-      EventType;
-    /// The virtual method to overload by MultiThreadImageReader users
-      /// It is called when an image has been loaded or unloaded 
-      /// Provides :
-      /// * The image file name which was requested 
-      /// * The type of event 
-      /// * If type==ImageLoaded the image pointer, else NULL pointer 
-    virtual void OnMultiThreadImageReaderEvent( const std::string& filename,
-                                               EventType type,
-                                               vtkImageData* image) 
-    {}
-    inline void MultiThreadImageReaderEventLock() 
-    { mMultiThreadImageReaderUserMutex.Lock(); }
-    inline void MultiThreadImageReaderEventUnlock() 
-    { mMultiThreadImageReaderUserMutex.Unlock(); }
-    inline wxMutex& GetMultiThreadImageReaderUserMutex() 
-    { return mMultiThreadImageReaderUserMutex; }
-  private:
-    /// 
-    void MultiThreadImageReaderSendEvent( const std::string& filename,
-                                         EventType type,
-                                         vtkImageData* image);
-    wxMutex mMultiThreadImageReaderUserMutex;
-  };
-  //=====================================================================
-
-  //=====================================================================
-  /// 
-  /// TAKE CARE : For the moment it only supports a **SINGLE USER** 
-  class MultiThreadImageReader : public MultiThreadImageReaderUser
-  {
-  public:
-    friend class ThreadedImageReader;
-
-    /// Ctor with the number of threads to use
-    MultiThreadImageReader(int number_of_threads = 1);
-    /// Dtor 
-    ~MultiThreadImageReader();
-
-    /// Starts the reader = create the threads which start to check 
-    /// periodically the queue of requested images to read
-    bool Start();
-    /// Stops the reader = stops the threads and delete the images loaded
-    void Stop();
-
-    /// Request the image "filename" with a given priority 
-    /// When the image is ready (or an error occurred) 
-    /// The observer's callback is invoked 
-    void Request( MultiThreadImageReaderUser* user,
-                 const std::string& filename, 
-                 int priority );
-    
-    /// Request the image "filename" immediately 
-       /// Blocks until image loaded
-    /// (no user callback but image returned)
-    vtkImageData* GetImage(const std::string& filename);
-
-    /// 
-    int GetMaximalPriority(); 
-    
-    ///
-    void OnMultiThreadImageReaderEvent( const std::string& filename,
-                                       EventType type,
-                                       vtkImageData* image);
-    
-  protected:
-    int GetMaximalPriorityWithoutLocking();
-    // 
-    class ImageToLoad
-    {
-    public:
-      ImageToLoad( MultiThreadImageReaderUser* user,
-                  const std::string& filename, 
-                  int prio=0) 
-       : mUser(user),
-         mFilename(filename), 
-         mPriority(prio), 
-         mIndex(-1), 
-         mUnloadIndex(-1), 
-         mImage(0)
-      {}
-      ~ImageToLoad()
-      {
-       if (mImage>0) 
-         {
-           //      std::cout << "Refs = "<<mImage->GetReferenceCount()<<std::endl;
-           mImage->Delete();
-         }
-      }
-      MultiThreadImageReaderUser* GetUser() const { return mUser; }
-      void SetUser( MultiThreadImageReaderUser* u ) { mUser = u; }
-      const std::string& GetFilename() const { return mFilename; }
-      int GetPriority() const { return mPriority; }
-      void SetPriority(int p) { mPriority=p; }
-      int& Index() { return mIndex; }
-      int& UnloadIndex() { return mUnloadIndex; }
-      vtkImageData* GetImage() const { return mImage; }
-      void SetImage( vtkImageData* i ) { mImage=i; }
-    private:
-      MultiThreadImageReaderUser* mUser;
-      std::string mFilename;
-      int mPriority;
-      int mIndex;
-      int mUnloadIndex;
-      vtkImageData* mImage;
-    };
-    // 
-
-    /// Type of pointer on an ImageToLoad struct
-    typedef ImageToLoad* ImageToLoadPtr;
-
-    /// ImageToLoadPtr comparator on priority (for image queue)
-    struct ImageToLoadPtrPriorityComparator
-    {
-      bool operator() (ImageToLoadPtr const & a, ImageToLoadPtr const & b)
-       const 
-      {
-       return ( a->GetPriority() > b->GetPriority() );
-      }
-    };
-    /// ImageToLoadPtr comparator on inverse priority (for image to unload queue)
-    struct ImageToLoadPtrInversePriorityComparator
-    {
-      bool operator() (ImageToLoadPtr const & a, ImageToLoadPtr const & b)
-       const 
-      {
-       return ( a->GetPriority() < b->GetPriority() );
-      }
-    };
-
-
-    /// ImageToLoadPtr comparator on filename (for image map)
-    struct ImageToLoadPtrFilenameComparator
-    {
-      bool operator() (ImageToLoadPtr const & a, ImageToLoadPtr const & b)
-       const 
-      {
-       return ( a->GetFilename() < b->GetFilename() );
-      }
-    };
-
-    /// ImageToLoadPtr indexer for image queue
-    struct ImageToLoadPtrIndexer
-    {
-      int& operator()(ImageToLoadPtr & t) const { return t->Index(); }
-    };
-    /// ImageToLoadPtr indexer for to unload image queue
-    struct ImageToUnloadPtrIndexer
-    {
-      int& operator()(ImageToLoadPtr & t) const { return t->UnloadIndex(); }
-    };
-
-    /// The callback from threaded readers when an image is read
-    void SignalImageRead(ImageToLoadPtr p, bool purge);
-  
-    /// The type of map of images 
-    typedef std::map<ImageToLoadPtr,vtkImageData*,
-                    ImageToLoadPtrFilenameComparator> ImageMapType;
-    /// The map of images
-    ImageMapType mImages;
-    /// Comparator for the image to load queue
-    ImageToLoadPtrPriorityComparator mComparator;
-    /// Indexer for the image to load queue 
-    ImageToLoadPtrIndexer mIndexer;
-    /// The image to load priority queue
-    IndexedHeap<ImageToLoadPtr,
-               ImageToLoadPtrPriorityComparator,
-               ImageToLoadPtrIndexer> mQueue;
-
-    /// The type of list of threaded readers
-    typedef std::vector<ThreadedImageReader*> ThreadedImageReaderListType;
-    ThreadedImageReaderListType mThreadedImageReaderList;
-    /// The number of currently running threaded readers
-    int mNumberOfThreadedReadersRunning;
-    /// The mutex used to access safely internal data from any thread
-    /// LG : Removed ! We now use the embedded mutex in User from which 
-    /// we inherit...
-    //  wxMutex mMutex;
-
-    /// For GetImage : the filename requested
-    std::string mRequestedFilename;
-    /// For GetImage : the image requested
-    vtkImageData* mRequestedImage;
-
-    /// If number of threads == 0 then uses an internal non-threaded reader
-    ImageReader* mReader;
-
-    /// The type of list of images loaded 
-    /// used to unload oldest image when memory limit exceeded
-   /// The image to unload priority queue
-    IndexedHeap<ImageToLoadPtr,
-               ImageToLoadPtrInversePriorityComparator,
-               ImageToUnloadPtrIndexer> mUnloadQueue;
-
-    void UpdateUnloadPriority(ImageToLoadPtr p, int priority);
-    long mTotalMem;
-    long mTotalMemMax;
-
-
-  }; // class MultiThreadImageReader
-  //=====================================================================
-
-
-
-} // namespace creaImageIO
-
-
-
-#endif // #ifndef __creaImageIOThreadedImageReader_h_INCLUDED__
diff --git a/src/creaImageIOSystem.h b/src/creaImageIOSystem.h
deleted file mode 100644 (file)
index c98f7b8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __creaImageIOSystem_INCLUDED__
-#define __creaImageIOSystem_INCLUDED__
-
-
-
-#if defined(_WIN32)
-  #ifdef CREAIMAGEIO_EXPORT_SYMBOLS
-    #define CREAIMAGEIO_EXPORT __declspec( dllexport )
-#else
-    #define CREAIMAGEIO_EXPORT __declspec( dllimport )
-  #endif
-  #define CREAIMAGEIO_CDECL __cdecl
-#else
-  #define CREAIMAGEIO_EXPORT
-  #define CREAIMAGEIO_CDECL
-#endif // defined(_WIN32)
-
-#endif
-
diff --git a/src/creaImageIOWxGimmick.cpp b/src/creaImageIOWxGimmick.cpp
deleted file mode 100644 (file)
index 63470ba..0000000
+++ /dev/null
@@ -1,3003 +0,0 @@
-
-#include <creaImageIOWxGimmick.h>
-#include <creaImageIODicomNodeComparators.h>
-
-#include <creaMessageManager.h>
-
-#include "icons/database.xpm"
-#include "icons/folder.xpm"
-#include "icons/dicomdir.xpm"
-#include "icons/patient.xpm"
-#include "icons/study.xpm"
-#include "icons/series.xpm"
-#include "icons/image.xpm"
-#include "icons/root.xpm"
-#include <wx/filedlg.h>
-#include <wx/dirdlg.h>
-
-#include <fstream>
-#include <vtkCamera.h>
-#include <vtkRenderer.h>
-
-#include <wx/filefn.h>
-//#include <wx/tipwin.h>
-
-using namespace crea;
-
-#include <boost/filesystem.hpp>
-#include <boost/algorithm/string.hpp>
-
-namespace creaImageIO
-{
-  //================================================================
-  const int WxGimmick::UserMenuFirstId = 1000;
-  //================================================================
-
-  //================================================================
-  typedef enum
-    {
-      Icon_Root,
-      Icon_Database,
-      Icon_Folder,
-      Icon_DicomDir,
-      Icon_Patient,
-      Icon_Study,
-      Icon_Series,
-      Icon_Image
-    }
-    icon_id;
-  //================================================================
-
-  //================================================================
-  enum 
-    {
-      PopUp_NewCollection = 100,
-      PopUp_OpenCollection = 101,
-      PopUp_CloseCollection = 102,
-      PopUp_DeleteCollection = 103,
-      PopUp_AddDirectory = 110,
-      PopUp_AddFile = 111,
-      PopUp_AddRawFile = 112,
-      PopUp_Remove = 120,
-      PopUp_Sort = 200,
-      PopUp_Settings = 501,
-      PopUp_About    = 502,
-      PopUp_User = WxGimmick::UserMenuFirstId,
-      PopUp_SaveAs = 701,
-      PopUp_AddToFavorites = 702
-    };
-  //================================================================
-
-  //================================================================
-#define TreeListCtrlId 10000
-  //================================================================
-
-  //================================================================
-  const icon_id Icon[5] = { Icon_Database,  
-                           Icon_Patient,
-                           Icon_Study,
-                           Icon_Series,
-                           Icon_Image };
-  //================================================================
-
-  //================================================================
-  class WxGimmickDicomNodeData : public DicomNodeData
-  {
-  public:
-    WxGimmickDicomNodeData
-    (WxGimmickTreeItemData* d = 0) :
-      mTreeItemData(d),
-      mLoaded(false)
-    {}
-    ~WxGimmickDicomNodeData();
-
-    WxGimmickTreeItemData* GetTreeItemData()
-    { return mTreeItemData; }
-    void SetTreeItemData(   WxGimmickTreeItemData* d)
-    { mTreeItemData = d; }
-    inline bool IsLoaded() { return mLoaded; }
-    inline void SetLoaded(bool v) { mLoaded = v; }
-
-  private:    
-    WxGimmickTreeItemData* mTreeItemData;
-    bool mLoaded;
-  };
-  //================================================================
-
-
-  //================================================================
-  class WxGimmickTreeItemData : public wxTreeItemData
-  {
-  public:
-    WxGimmickTreeItemData(DicomNode* node) 
-      : 
-      mType(0),
-      mDicomNode(node), 
-      //       mLoaded(false),
-      mUpdateTime(0),
-      mUserFlags(0)
-    { 
-      if (node) 
-       {
-         WxGimmickDicomNodeData* data =
-           node->GetData<WxGimmickDicomNodeData*>();
-         if (data!=0)
-           {
-             if (data->GetTreeItemData()!=0) 
-               {
-                 std::cout << "WxGimmickTreeItemData ERROR ****"
-                           << std::endl;
-                 return;
-               }
-             data->SetTreeItemData(this);
-             return;
-           }
-         node->SetData( new WxGimmickDicomNodeData(this) );
-         if (node->GetType()==DicomNode::Database)
-           {
-             mType = 2;
-           }
-         else 
-           {
-             mType = 1;
-           }
-       }
-    }
-    ~WxGimmickTreeItemData()
-    {
-      if (mDicomNode) 
-       {
-         WxGimmickDicomNodeData* data =
-           mDicomNode->GetData<WxGimmickDicomNodeData*>();
-         if (data) data->SetTreeItemData(0);
-
-       }
-    }
-    inline void ResetDicomNode() 
-    {
-      mDicomNode = 0;
-    }
-
-    inline void SetItemId ( const wxTreeItemId& item ) { mItemId = item; }
-    inline const wxTreeItemId& GetItemId() const { return mItemId; }
-
-    inline bool IsDefault() const { return (mType == 0); }
-    inline bool IsDatabase() const { return (mType == 2); }
-    inline bool IsDicomNode() const { return (mType == 1); }
-    
-    inline DicomNode* GetDicomNode() { return mDicomNode; }
-    inline long& UpdateTime() { return mUpdateTime; }
-    inline bool IsLoaded() 
-    { 
-      mDicomNode->GetData<WxGimmickDicomNodeData*>()->IsLoaded();
-    }
-    inline void SetLoaded(bool v) 
-    { 
-      mDicomNode->GetData<WxGimmickDicomNodeData*>()->SetLoaded(v);
-    }
-
-    inline int GetUserFlags() const { return mUserFlags; }
-    inline void SetUserFlags(int f) { mUserFlags = f; }
-
-  private:
-    // The type of item : 
-    // 0 = Default
-    // 1 = DicomNode
-    // 2 = DicomNode of type Database
-    int mType;
-    wxTreeItemId mItemId;
-    DicomNode* mDicomNode;
-    //    bool mLoaded;
-    long mUpdateTime;
-    int mUserFlags;
-  };
-  //================================================================
-
-  //================================================================
-  WxGimmickDicomNodeData::~WxGimmickDicomNodeData()
-  {
-    if (mTreeItemData) 
-      {
-       mTreeItemData->ResetDicomNode();
-      }
-  }
-  //================================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  //================================================================
-  //================================================================
-  //================================================================
-  //================================================================
-  //================================================================
-  //================================================================
-  //================================================================
-  WxGimmick::WxGimmick(wxWindow *parent, 
-                      wxWindowID id,
-                      const wxPoint& pos,
-                      const wxSize& size,
-                      int image_type,
-                      int threads)
-    : wxPanel(parent,id,pos,size),
-      mSelectionType(image_type),
-      mSaveConfigurationOnClose(true),
-      mReader(threads)
-  {
-    // Initialize image size corresponding to current selection
-    switch (mSelectionType) 
-      {
-      case GIMMICK_2D_IMAGE_SELECTION : mSelectionMaxImageDimension = 2; break;
-      case GIMMICK_3D_IMAGE_SELECTION : mSelectionMaxImageDimension = 3; break;
-      case GIMMICK_4D_IMAGE_SELECTION : mSelectionMaxImageDimension = 4; break;
-      default : mSelectionMaxImageDimension = 0;
-      }
-
-
-    // Start the threads ...
-    mReader.Start();
-
-    //
-    SetDatabaseExtension("sqlite3");
-    // Create the UserSettings dir if does not exist
-    CreateUserSettingsDirectory();
-    // Sets the current directory to the Setting dir
-    mCurrentDirectory =  std2wx(GetUserSettingsDirectory());
-
-    // Window layout creation
-    wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
-
-    // Left/Right split
-    mSplitter1 = new wxSplitterWindow( this, -1);
-
-    // TreeCtrl on the left
-    long style = 
-      wxTR_HIDE_ROOT 
-      | wxTR_HAS_BUTTONS 
-      | wxTR_NO_LINES
-      //| wxTR_LINES_AT_ROOT 
-      | wxTR_FULL_ROW_HIGHLIGHT
-      //      | wxTR_SINGLE 
-      | wxTR_MULTIPLE
-      | wxTR_EDIT_LABELS ;
-    /*
-      style = style 
-      | wxTR_EDIT_LABELS       //Use this style if you wish the user to be able to edit labels in the tree list control.
-      //wxTR_NO_BUTTONS        For convenience to document that no buttons are to be drawn.
-      | wxTR_HAS_BUTTONS       //Use this style to show + and - buttons to the left of parent items.
-      | wxTR_TWIST_BUTTONS     //Use this style to show Mac-style twister buttons to the left of parent items. If both wxTR_HAS_BUTTONS and wxTR_TWIST_BUTTONS are given, twister buttons are generated.
-      //wxTR_NO_LINES  Use this style to hide vertical level connectors.
-      | wxTR_FULL_ROW_HIGHLIGHT        //Use this style to have the background colour and the selection highlight extend over the entire horizontal row of the tree list control window. (This flag is ignored under Windows unless you specify wxTR_NO_LINES as well.)
-      | wxTR_LINES_AT_ROOT     //Use this style to show lines between root nodes. Only applicable if wxTR_HIDE_ROOT is set and wxTR_NO_LINES is not set.
-      | wxTR_HIDE_ROOT         //Use this style to suppress the display of the root node, effectively causing the first-level nodes to appear as a series of root nodes.
-      //   wxTR_ROW_LINES //   Use this style to draw a contrasting border between displayed rows.
-      //      wxTR_HAS_VARIABLE_ROW_HEIGHT//   Use this style to cause row heights to be just big enough to fit the content. If not set, all rows use the largest row height. The default is that this flag is unset.
-      // wxTR_SINGLE   For convenience to document that only one item may be selected at a time. Selecting another item causes the current selection, if any, to be deselected. This is the default.
-      | wxTR_MULTIPLE //       Use this style to allow a range of items to be selected. If a second range is selected, the current range, if any, is deselected.
-      | wxTR_EXTENDED //       Use this style to allow disjoint items to be selected. (Only partially implemented; may not work in all cases.)
-      //wxTR_DEFAULT_STYLE     The set of flags that are closest to the defaults for the native control for a particular toolkit.
-      //| wxTR_VIRTUAL //The application provides items text on demand.
-      */
-  
-    mTreeListCtrl = new wxTreeListCtrl(mSplitter1,
-                                      TreeListCtrlId,
-                                      wxDefaultPosition,
-                                      wxDefaultSize,
-                                      style);
-
-    mTreeListCtrl->SetIndent(0);
-    mTreeListCtrl->SetLineSpacing(5); 
-
-    CreateImageList();
-
-    // Right panel
-    wxPanel *rpanel = new wxPanel( mSplitter1, -1 ); 
-    // Right sizer
-    wxBoxSizer *rsizer = new wxBoxSizer(wxHORIZONTAL);
-    // Right panel top/bottom split
-    mSplitter2 = new wxSplitterWindow( rpanel , -1);
-
-    // Image panel (top)
-    mPanelImage = new wxPanel(mSplitter2,-1);
-    mPanelImage->SetBackgroundColour( wxColour(0,0,0) );
-    // Image sizer
-    wxBoxSizer *isizer = new wxBoxSizer(wxHORIZONTAL  );
-    mPanelImage->SetSizer( isizer ); 
-    // Notebook
-    mwxNotebook = new wxNotebook(mSplitter2,
-                                -1,wxDefaultPosition, wxDefaultSize, 0);
-
-
-    
-    // Fields view (bottom)
-    mFieldsView = new WxGimmickFieldsView(mwxNotebook,-1,
-                                           wxDefaultPosition,
-                                           wxDefaultSize,0);
-
-    mFieldsView->SetColors
-      ( GetSettings().Colour(DicomNode::Database),
-       GetSettings().BgColour(DicomNode::Database),
-       GetSettings().Colour(DicomNode::Patient),
-       GetSettings().BgColour(DicomNode::Patient),
-       GetSettings().Colour(DicomNode::Study),
-       GetSettings().BgColour(DicomNode::Study),
-       GetSettings().Colour(DicomNode::Series),
-       GetSettings().BgColour(DicomNode::Series),
-       GetSettings().Colour(DicomNode::Image),
-       GetSettings().BgColour(DicomNode::Image));
-    mwxNotebook->AddPage( mFieldsView, _T("Dicom fields"));
-    
-    // Help 
-    mHelp = new WxGimmickHelp(mwxNotebook);
-    mwxNotebook->AddPage( mHelp, _T("Help"));    
-    // Splitting
-    int wsize = size.GetWidth();
-    int hsize = size.GetHeight();
-    int previewhsize = 150;
-    int previewwsize = 400;
-
-    mSplitter2->SetMinimumPaneSize( previewhsize );
-    mSplitter2->SplitHorizontally( mPanelImage, mwxNotebook, //mFieldsView, 
-                                  hsize - previewhsize);
-  
-    rsizer->Add( mSplitter2,1,wxGROW  ,0);
-  
-    rpanel->SetAutoLayout(true);
-    rpanel->SetSizer( rsizer );     
-    rpanel->Layout(); 
-  
-    // previewer
-       mInteractor = new crea::creawxVTKRenderWindowInteractor(mPanelImage,-1);
-    mInteractor->UseCaptureMouseOn();  
-  
-    mViewer    = vtkImageViewer2::New();
-    mViewer->SetupInteractor ( mInteractor );
-    mViewer->SetInput(mReader.GetImage(""));
-
-    isizer-> Add( mInteractor ,1,wxGROW  ,0);
-
-    topsizer->Add( mSplitter1,1,wxGROW  ,0);
-
-    // Left/right split 
-    mSplitter1->SetMinimumPaneSize( 200 );
-    mSplitter1->SplitVertically(mTreeListCtrl, 
-                               rpanel, 
-                               wsize - previewwsize );
-
-  
-    //    ProcessImageEvents();
-    SetSizer( topsizer );     
-    SetAutoLayout(true);
-    mDatabaseListFile = GetUserSettingsDirectory();
-    mDatabaseListFile += "collections.txt";
-
-    LoadConfiguration();
-    Layout();
-
-    ShowImage(mReader.GetImage(""));
-
-    // Show help if no collection
-    if (GetDicomDatabaseList().size()==0)
-      {
-       mwxNotebook->SetSelection(1);
-      } 
-    else
-      {
-       mwxNotebook->SetSelection(0);
-      }
-    //    mJustStarted = true;
-  }
-  //================================================================
-    
-// file separator
-#if defined(_WIN32)
-#define VALID_FILE_SEPARATOR "\\"
-#define INVALID_FILE_SEPARATOR "/"
-#else
-#define INVALID_FILE_SEPARATOR "\\"
-#define VALID_FILE_SEPARATOR "/"
-#endif
-
-  //================================================================
-  const std::string& WxGimmick::GetUserSettingsDirectory()
-  {
-    if (mUserSettingsDirectory.size()==0) 
-      {
-#if defined(__GNUC__)
-       mUserSettingsDirectory = getenv("HOME");
-#elif defined(_WIN32)
-       mUserSettingsDirectory = getenv("USERPROFILE");
-#endif
-       mUserSettingsDirectory += "/.gimmick/";
-       boost::algorithm::replace_all( mUserSettingsDirectory, 
-                                      INVALID_FILE_SEPARATOR , 
-                                      VALID_FILE_SEPARATOR);
-      }
-    return mUserSettingsDirectory;
-  }
-  //================================================================
-
-  //========================================================================
-  void WxGimmick::CreateUserSettingsDirectory()
-  {
-    if (! boost::filesystem::is_directory( GetUserSettingsDirectory() ) )
-      {
-       creaMessage("Gimmick!",1,"==> Directory '"<<GetUserSettingsDirectory()<<"' "
-                   << "does not exist : creating it"<<std::endl);
-
-       if ( ! boost::filesystem::create_directory( GetUserSettingsDirectory() ) )
-         {
-           creaMessage("Gimmick!",1,"!! ERROR CREATING '"<<GetUserSettingsDirectory()<<"'");
-         }
-      }
-  }
-  //========================================================================
-
-  //================================================================
-  WxGimmick::~WxGimmick()
-  {
-//    std::cout << "WxGimmick::~WxGimmick()" <<std::endl;
-    if (mSaveConfigurationOnClose) SaveConfiguration();
-    
-       mReader.Stop();
-//     std::cout << "Reader stopped"<<std::endl;
-    
-       DicomDatabaseListType::iterator i;
-    for (i =GetDicomDatabaseList().begin(); 
-        i!=GetDicomDatabaseList().end(); 
-        ++i)
-      {
-       delete *i;
-      }
-    mViewer->Delete();
-    delete mInteractor;  
-  }
-  //================================================================
-
-
-  //================================================================
-  void WxGimmick::RebuildView()
-  {
-    wxBusyCursor busy;
-
-    mTreeListCtrl->DeleteRoot(); //DeleteAllItems();
-    //    mTreeDefaultItemId = wxTreeItemId();
-
-  
-    int nbattr = mSettings.GetMaxNumberOfColumns();
-
-    for (int j=0;j<nbattr; j++)
-      {
-       mTreeListCtrl->AddColumn (_T(""),
-                                 200, //DEFAULT_COL_WIDTH,
-                                 wxALIGN_LEFT,
-                                 -1,
-                                 true,
-                                 false);
-      }
-    mTreeListCtrl->SetMainColumn (0);
-    mTreeListCtrl->SetColumnEditable (0, true);
-
-    mTreeRootId = mTreeListCtrl->AddRoot( _T(""),Icon_Root,Icon_Root);
-
-    // The collections columns legends
-    mCollectionsTitlesItemId = 
-      CreateChildrenColumnsTitles(mTreeRootId,DicomNode::Database);
-
-    DicomDatabaseListType::iterator i;
-    for (i =GetDicomDatabaseList().begin(); 
-        i!=GetDicomDatabaseList().end(); 
-        ++i)
-      {  
-       UpdateDicomDatabaseView(*i);
-      }
-
-    mTreeListCtrl->Expand(mTreeRootId);
-    // LG : test
-    //    mTreeListCtrl->ExpandAll(mTreeRootId);
-    //    std::cout << "EO RebuildAll"<<std::endl;
-  }
-  //================================================================
-
-  
-
-  //================================================================
-  void WxGimmick::UpdateDicomDatabaseView(DicomDatabase* db)
-  {
-    wxBusyCursor busy;
-    wxTreeItemId dbid;
-    TreeItemData *data;
-
-    // Does the db exist ?
-    wxTreeItemIdValue cookie;
-    for (dbid = mTreeListCtrl->GetFirstChild(mTreeRootId,cookie);
-        dbid.IsOk();
-        dbid = mTreeListCtrl->GetNextChild(mTreeRootId,cookie))
-      {    
-       data = (TreeItemData *)mTreeListCtrl->GetItemData(dbid);
-       if ((data->IsDatabase())&&(data->GetDicomNode()==db)) break;
-      }
-
-    // Not found : create
-    if (!dbid.IsOk())
-      {
-       // Icon
-       int iconid = Icon[DicomNode::Database];
-
-       // Creation
-       //      std::cout << " -> Creating item for '"<<db->GetLabel()<<"'"<<std::endl;
-       data = new TreeItemData(db);
-       dbid = mTreeListCtrl->AppendItem( mTreeRootId,
-                                         std2wx(db->GetLabel()),
-                                         iconid, 
-                                         iconid, 
-                                         data );
-       data->SetItemId(dbid);
-       mTreeListCtrl->SetItemTextColour
-         (dbid,mSettings.Colour(DicomNode::Database));
-       mTreeListCtrl->SetItemBackgroundColour
-         (dbid,mSettings.BgColour(DicomNode::Database));
-       UpdateColumns(dbid);
-       // The patients columns legends
-       CreateChildrenColumnsTitles(dbid,DicomNode::Patient);
-
-      }
-    // Increase UpdateTime to detect obsolete items after 
-    // tree traversal
-    data->UpdateTime()++;
-    // Recurse
-    DicomNode::ChildrenListType::iterator j;
-    for (j= db->GetChildrenList().begin();
-        j!=db->GetChildrenList().end();
-        j++)
-      {
-       UpdateDicomNodeView(*j,dbid);
-      }
-    
-    DeleteObsoleteChildren(dbid);
-
-    mTreeListCtrl->EnsureVisible(dbid);
-
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::UpdateDicomNodeView(DicomNode* n, 
-                                                   const wxTreeItemId& parent)
-  {
-  
-    wxBusyCursor busy;
-    //     std::cout << "* UpdateDicomNodeView("<<n->GetLabel()<<")"<<std::endl;
-
-    wxTreeItemId newparent = parent; 
-    TreeItemData *data;
-    // Skip study level
-    if ((!mSettings.MergeStudySeries()) ||
-       (n->GetType() != DicomNode::Study))
-      {
-       // Does the item exist ?
-       wxTreeItemIdValue cookie;
-       for (newparent = mTreeListCtrl->GetFirstChild(parent,cookie);
-            newparent.IsOk();
-            newparent = mTreeListCtrl->GetNextChild(parent,cookie))
-         {    
-           data = (TreeItemData *)mTreeListCtrl->GetItemData(newparent);
-           if (data->GetDicomNode() == n) break;
-         }
-       // Not found : create
-       if (!newparent.IsOk())
-         {
-           int image(Icon[n->GetType()]);
-           wxColour *colour(&mSettings.Colour(n->GetType()));
-           wxColour *bgcolour(&mSettings.BgColour(n->GetType()));
-
-           if (n->GetType()==DicomNode::Image)
-             {
-               //              std::cout << "!!!Image"<<std::endl;
-               if (n->GetData<NodeData*>()!=0)
-                 {
-                   //              std::cout << ">> n->GetData<NodeData*>()!=0" << std::endl;
-                   if (n->GetData<NodeData*>()->IsLoaded())
-                     {
-                       colour = &mSettings.LoadedImageColour();
-                     }
-                   //              std::cout << "<< n->GetData<NodeData*>()!=0" << std::endl;
-                 }
-             }
-
-           data = new TreeItemData(n);
-           newparent = mTreeListCtrl->AppendItem(parent, 
-                                                 _T(""),
-                                                 image, image,
-                                                 data);
-           data->SetItemId(newparent);
-           mTreeListCtrl->SetItemTextColour(newparent,*colour);
-           mTreeListCtrl->SetItemBackgroundColour(newparent,*bgcolour);
-           UpdateColumns(newparent);
-
-           
-           if (n->GetType()!=DicomNode::Image)
-             {
-               CreateChildrenColumnsTitles(newparent,n->GetType()+1);
-             }
-           
-         }
-       else 
-         {
-           UpdateColumns(newparent,true);
-
-         }
-       // synchonise update time with parent
-       TreeItemData * parent_data = 
-         (TreeItemData *)mTreeListCtrl->GetItemData(parent);
-       data->UpdateTime() = parent_data->UpdateTime();
-      }
-  
-    DicomNode::ChildrenListType::iterator i;
-    for (i=n->GetChildrenList().begin();
-        i!=n->GetChildrenList().end();
-        i++)
-      {
-       UpdateDicomNodeView(*i,newparent);
-      }
-
-    if (n->GetType() != DicomNode::Image) 
-      DeleteObsoleteChildren(newparent);
-
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::UpdateColumns(wxTreeItemId& item,
-                                             bool only_first)
-  {
-    TreeItemData *data = 
-      (TreeItemData *)mTreeListCtrl->GetItemData(item);
-    DicomNode* node = data->GetDicomNode();
-    
-    if (only_first) 
-      {
-       // Update only the first field (for #children update)
-       DicomNode* node2 = node;
-       // If Study and Series level are merged and node type is Series
-       // then have to get back to the Study level
-       if ((mSettings.MergeStudySeries())&& 
-           (node->GetType() == DicomNode::Series))
-         node2 = node->GetParent();
-    
-       std::string lab;
-       lab += node2->GetFieldValueMap()
-         [ mSettings.GetColumnList(node2->GetType())[0].Key ];
-
-       if (node->GetType() != DicomNode::Image) 
-         {
-           if (node->GetChildrenList().size()>0)
-             {
-               char sz[100];
-               sprintf(sz,"  [%d]",node->GetNumberOfChildren());
-               lab += sz;
-             }
-         }
-       mTreeListCtrl->SetItemText(item,std2wx(lab));
-      }
-    else 
-      {        
-       int c = 0;
-       Settings::ColumnListType::iterator col;
-       // If Study and Series level are merged and node type is Series
-       // then have to fill the Study level cols first
-       if ((mSettings.MergeStudySeries())&& 
-           (node->GetType() == DicomNode::Series))
-         {
-           DicomNode* node2 = node->GetParent();
-           for (col  = mSettings.GetColumnList(node2->GetType()).begin();
-                col != mSettings.GetColumnList(node2->GetType()).end();
-                ++col)
-             {
-               std::string s = node2->GetFieldValueMap()[col->Key];
-               
-               if (c==0) 
-                 {
-                   char sz[100];
-                   sprintf(sz,"  [%d]",node->GetNumberOfChildren());
-                   s += sz;
-                 }
-               mTreeListCtrl->SetItemText (item, c,  std2wx(s));
-               c++;
-             }   
-         }
-       
-       for (col  = mSettings.GetColumnList(node->GetType()).begin();
-            col != mSettings.GetColumnList(node->GetType()).end();
-            ++col)
-         {
-           std::string s = node->GetFieldValueMap()[col->Key];
-           if ((c==0)&&(node->GetType() != DicomNode::Image))
-             {
-               char sz[100];
-               sprintf(sz,"  [%d]",node->GetNumberOfChildren());
-               s += sz;
-             }
-           mTreeListCtrl->SetItemText (item, c,  std2wx(s));
-           c++;
-         }
-      }
-
-  }
-  //================================================================
-
-  //================================================================
-  wxTreeItemId WxGimmick::CreateChildrenColumnsTitles
-  (wxTreeItemId& item,
-   DicomNode::Type t)
-  {
-    // Creates the sub-level columns titles
-    TreeItemData* data 
-      = new TreeItemData(0);
-    wxTreeItemId id = mTreeListCtrl->AppendItem( item,
-                                                _T(""),
-                                                -1,
-                                                -1,
-                                                data );
-    data->SetItemId(id);
-    mTreeListCtrl->SetItemFont(id, *wxITALIC_FONT);
-    mTreeListCtrl->SetItemTextColour(id, mSettings.Colour(t));
-    mTreeListCtrl->SetItemBackgroundColour(id, mSettings.BgColour(t));
-    UpdateColumnsTitles(id,t);  
-    return id;
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::UpdateColumnsTitles(wxTreeItemId& item,
-                                      DicomNode::Type t)
-  {
-    //    std::cout << "Update columns titles "<<t<<std::endl;
-    int c = 0;
-    Settings::ColumnListType::iterator col;
-    for (col  = mSettings.GetColumnList(t).begin();
-        col != mSettings.GetColumnList(t).end();
-        ++col)
-      {
-       //      std::cout << col->Name << std::endl;
-       mTreeListCtrl->SetItemText (item, c,  std2wx(col->Name));
-       c++;
-      }
-  }
-  //================================================================
-
-
-  //================================================================
-  void WxGimmick::DeleteObsoleteChildren(wxTreeItemId& id)
-    
-  {
-    TreeItemData * parent_data = 
-      (TreeItemData *)mTreeListCtrl->GetItemData(id);
-    
-    wxTreeItemId child;
-    wxTreeItemIdValue cookie;
-    std::vector<wxTreeItemId> children;
-    for (child = mTreeListCtrl->GetFirstChild(id,cookie);
-        child.IsOk();
-        child = mTreeListCtrl->GetNextChild(id,cookie))
-      {    
-       children.push_back(child);
-      }
-    std::vector<wxTreeItemId>::iterator i;
-    for (i=children.begin();i!=children.end();++i)
-      {
-       TreeItemData *data = 
-         (TreeItemData *)mTreeListCtrl->GetItemData(*i);
-       if (
-           ((data->GetDicomNode()>0) && 
-            ((data->UpdateTime() != parent_data->UpdateTime()))) || 
-           ((data->IsDicomNode()) &&
-            (data->GetDicomNode()==0))
-           ) 
-         {
-           //      std::cout << "DOBSC="<<mTreeListCtrl->GetItemText(*i)<<std::endl;
-           mTreeListCtrl->Delete(*i);
-         }
-      }
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::OpenOrNewDatabase(bool open)
-  {
-    wxBusyCursor busy;
-
-    long style = wxFD_SAVE | wxFD_OVERWRITE_PROMPT;
-    if (open) style = wxOPEN | wxFILE_MUST_EXIST;
-    std::string wc("*.");
-    wc += GetDatabaseExtension();
-
-    // TO DO : Handler give their wildcards
-    wxFileDialog* FD = new wxFileDialog( 0, 
-                                        _T("Select file"),
-                                        mCurrentDirectory,
-                                        _T(""),
-                                        std2wx(wc),
-                                        style,
-                                        wxDefaultPosition);
-
-       if (FD->ShowModal()!=wxID_OK) return;
-
-    std::string filename = wx2std (FD->GetPath());
-       mCurrentDirectory = FD->GetDirectory();
-
-    if (!open)
-      {
-       boost::filesystem::path filepath(filename);
-       boost::filesystem::change_extension(filepath,GetDatabaseExtension());
-       if ( boost::filesystem::exists(filepath) )
-         {
-                 boost::filesystem::remove(filepath);  
-                         /* 
-                         LG : works on Linux but not Windows :
-           if ( ! boost::filesystem::remove(filepath) )
-             {
-               wxMessageBox(_T("Could not overwrite ")
-                            +std2wx(filepath.string()),
-                            _T("Error"),
-                            wxOK,this);
-               return;
-               
-       
-             }
-                 */
-         }
-      }
-    
-    DicomDatabase* db = new DicomDatabase(filename);
-    bool r;
-    if (open) 
-      {
-       r = db->Open();
-       if (!r) 
-         {
-           wxMessageBox(_T("An error occured while opening ")
-                        +std2wx(filename),
-                        _T("Error"),
-                        wxOK,this);
-           return;
-         }
-      }
-    else 
-      {
-       wxString collname = 
-         wxGetTextFromUser(_T("Enter collection name"),_T("New collection"),
-                           _T(""),this);
-       db->SetName(wx2std(collname));
-
-       r = db->New();
-       if (!r) 
-         {
-           wxMessageBox(_T("An error occured while creating ")
-                        +std2wx(filename),
-                        _T("Error"),
-                        wxOK,this);
-           return;
-         }
-      }
-
-    if (GetDicomDatabaseList().size()==0) mFieldsView->UpdateFields(db);
-    GetDicomDatabaseList().push_back(db);
-    UpdateDicomDatabaseView(db);
-
-
-  }
-  //================================================================
-
-
-  //================================================================
-  void WxGimmick::LoadConfiguration()
-  {
-    wxBusyCursor busy;
-    //    std::cout << "WxGimmick : Reading config"<<std::endl;
-    LoadOrCreateFavoritesDatabase();
-
-    //    std::cout <<     
-    creaMessage("Gimmick!",1,"Gimmick! : ==> Loading collections from '"<<mDatabaseListFile<<"'"<<std::endl);
-    //       <<"'"<<std::endl;
-
-
-    std::ifstream s;
-    s.open(mDatabaseListFile.c_str());
-    if (s.good())
-       {
-       while (!s.eof()) 
-         {
-           std::string str;
-           std::getline(s,str);
-           if (str.size()==0) continue;
-
-           std::vector<std::string> tokens;        
-           boost::split( tokens, str, boost::is_any_of("\t") );
-
-           DicomDatabase* db = new DicomDatabase(tokens[0]);
-           
-           //  std::cout << "  -> Loading collection '"<<tokens[0]<<"'"<<std::endl;
-           
-           if (tokens.size()==2) 
-             {
-               db->SetName(tokens[1]);
-             }
-           
-           if (db->Open()) 
-             {
-               GetDicomDatabaseList().push_back(db);
-               db->DBLoadChildren(db,DicomNode::Patient);
-               if (mSettings.HasActiveComparator(DicomNode::Patient))
-                 {
-                   db->SortChildren
-                     ( mSettings.GetActiveComparator(DicomNode::Patient)  );
-                 }
-             }
-           else 
-             {
-               creaMessage("Gimmick!",1,"           ==> ERROR opening collection '"<<tokens[0]<<"'"<<std::endl);
-               delete db;
-             }
-         }
-       s.close();
-       }
-       else 
-       {
-         creaMessage("Gimmick!",1,"           ==> File does not exist. It will be created on exit (if you already ran Gimmick! and exited normally, this is not normal. Send a bug report).");
-       }
-
-       
-    mTreeListCtrl->SetBackgroundColour(mSettings.BgColour(DicomNode::Database));
-    if (GetDicomDatabaseList().begin() != 
-       GetDicomDatabaseList().end() )
-      {
-       mFieldsView->UpdateFields(*GetDicomDatabaseList().begin());
-      }
-
-    RebuildView();
-      
-  }
-  //================================================================
-  
-  //================================================================
-  void WxGimmick::SaveConfiguration()
-  {
-    wxBusyCursor busy;
-    creaMessage("Gimmick!",1,"Gimmick! : Saving configuration..."<<std::endl);
-    
-    creaMessage("Gimmick!",1,"Gimmick! : ==> Saving collections in '"
-               <<mDatabaseListFile<<"'"<<std::endl);
-    
-    std::ofstream s;
-    s.open(mDatabaseListFile.c_str());
-    if (!s.good())
-      {
-       creaError("Gimmick! : error opening '"<<mDatabaseListFile<<"'"); 
-      }
-    
-    DicomDatabaseListType::iterator i;
-    for (i =GetDicomDatabaseList().begin();
-        i!=GetDicomDatabaseList().end();
-        ++i)
-      {  
-       s << (*i)->GetFileName() << "\t";
-       s << (*i)->GetName() << std::endl;
-      }
-    
-    s.close();
-
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::LoadOrCreateFavoritesDatabase()
-  {
-    // TODO
-  }
-  //================================================================
-
-  /*
-  //================================================================
-  void  WxGimmick::OnClose(wxCloseEvent& event)
-  {
-  if (mSaveConfigurationOnClose) SaveConfiguration();
-  }
-  //================================================================
-  */
-  //================================================================
-  void WxGimmick::OnItemActivated(wxTreeEvent& event)
-  {  
-    event.Skip();
-    return;
-
-    wxBusyCursor busy;
-    //    std::cout << "OnItemActivated" <<std::endl;
-    wxTreeItemId itemId = event.GetItem();
-    if (mTreeListCtrl->IsExpanded(itemId))
-      {
-       mTreeListCtrl->Collapse(itemId);
-      }
-    else 
-      {
-       mTreeListCtrl->Expand(itemId);
-      }
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::LoadChildren(wxTreeItemId& id)
-  {
-    TreeItemData *item = (TreeItemData *)mTreeListCtrl->GetItemData(id);
-    if (item)
-      {
-       if ( ( item->IsDicomNode() || item->IsDatabase() ) &&
-            ( ! item->GetDicomNode()->ChildrenLoaded() ) )
-         {
-           
-           // If children not already loaded : do it 
-           if (
-               item->GetDicomNode()->GetDicomDatabase()->DBLoadChildren
-               (item->GetDicomNode(),item->GetDicomNode()->GetType()+1)
-               > 0 )
-             {
-               // Some new children loaded
-               // Sort them
-               if (mSettings.HasActiveComparator
-                   (item->GetDicomNode()->GetType()+1))
-                 {
-                   /*                  std::cout << "Sorting using '"
-                     << mSettings.GetActiveComparator
-                     (item->GetDicomNode()->GetType()+1).GetName() 
-                     << "' ... ";
-                   */
-                   item->GetDicomNode()->SortChildren
-                     ( mSettings.GetActiveComparator
-                       (item->GetDicomNode()->GetType()+1)
-                       );
-                   //                  std::cout << "ok"<<std::endl;
-                 }
-               // Update tree
-               DicomNode::ChildrenListType::iterator i;
-               for (i=item->GetDicomNode()->GetChildrenList().begin();
-                    i!=item->GetDicomNode()->GetChildrenList().end();
-                    i++)
-                 {
-                   UpdateDicomNodeView(*i,id);
-                 }
-             }
-           // EO If children not already loaded 
-         }
-      } 
-  }
-  //================================================================
-
-
-  //================================================================
-  void WxGimmick::OnItemExpanded(wxTreeEvent& event)                   
-  {
-    //    std::cout << "* Expanded *"<<std::endl;
-    //  }
-
-    wxBusyCursor busy;
-    
-    wxTreeItemId itemId = event.GetItem();
-    LoadChildren(itemId);
-    
-    return;
-
-    // expand if collapsed and collapse if expanded ...
-    TreeItemData *item = 
-      (TreeItemData *)mTreeListCtrl->GetItemData(itemId);
-    if (item)
-      {
-       if ( ( item->IsDicomNode() || item->IsDatabase() ) &&
-            ( ! item->GetDicomNode()->ChildrenLoaded() ) )
-         {
-               
-           // If children not already loaded : do it 
-           if (
-               item->GetDicomNode()->GetDicomDatabase()->DBLoadChildren
-               (item->GetDicomNode(),item->GetDicomNode()->GetType()+1)
-               > 0 )
-             {
-                   
-               // Some new children loaded
-               // Sort them
-               if (mSettings.HasActiveComparator
-                   (item->GetDicomNode()->GetType()+1))
-                 {
-                   /*                  std::cout << "Sorting using '"
-                     << mSettings.GetActiveComparator
-                     (item->GetDicomNode()->GetType()+1).GetName() 
-                     << "' ... ";
-                   */
-                   item->GetDicomNode()->SortChildren
-                     ( mSettings.GetActiveComparator
-                       (item->GetDicomNode()->GetType()+1)
-                       );
-                   //                  std::cout << "ok"<<std::endl;
-                 }
-               /*              
-               // If images : sort them 
-               if (item->IsDicomNode())
-               {
-               if (item->GetDicomNode()->GetType()==DicomNode::Series)
-               {  
-               // SORT
-                  
-               LexicographicalDicomNodeComparator compare;
-               // DicomNodeImageImageNumberComparator c1;
-                   
-               DicomNodeImageSliceLocationComparator c1;
-               DicomNodeImageImageNumberComparator c2;
-               DicomNodeImageFileNameComparator cn;
-               compare.Add(c1);
-               compare.Add(c2);
-               compare.Add(cn);
-               //              std::cout << "SORT"<<std::endl;
-               item->GetDicomNode()->SortChildren(compare);
-               //              std::cout << "EO SORT"<<std::endl;
-               //
-                   
-               }
-               }
-               */
-                   
-               // Update tree
-               DicomNode::ChildrenListType::iterator i;
-               for (i=item->GetDicomNode()->GetChildrenList().begin();
-                    i!=item->GetDicomNode()->GetChildrenList().end();
-                    i++)
-                 {
-                   UpdateDicomNodeView(*i,itemId);
-                 }
-             }
-           // EO If children not already loaded 
-         }
-      }
-    // mTreeListCtrl->Expand(itemId);
-     
-  }
-  //================================================================
-
-
-  /*
-  //=====================================================================
-  void WxGimmick::InsertRoot(wxTreeItemId& id, Root* r)
-  {
-  wxBusyCursor busy;
-  TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(id);
-  if (data)
-  { 
-       
-  wxStopWatch sw;
-  data->GetDicomNode()->GetDicomDatabase()->LoadAll();
-  printf(">>>>>> Time to load all = %ldms \n",sw.Time());
-
-  UpdateRootView(data->GetDicomNode()->GetDicomDatabase());
-    
-
-  if (data->IsDicomNode())
-  {
-  wxStopWatch sw1;
-  r->Insert(data->GetDicomNode());
-  printf(">>>>>> Time to insert = %ldms \n",sw1.Time());
-  UpdateRootView(r);
-  }
-  else if (data->IsDatabase())
-  {    
-  wxStopWatch sw1;
-  DicomNode::ChildrenListType::iterator j;
-  for (j= data->GetDicomNode()->GetChildrenList().begin();
-  j!=data->GetDicomNode()->GetChildrenList().end();
-  j++)
-  {
-  r->Insert(*j);
-  }
-  printf(">>>>>> Time to insert = %ldms \n",sw1.Time());
-  UpdateRootView(r);    
-  }
-
-  }
-  }
-  //=====================================================================
-  */
-
-  
-  //=================================================
-  void WxGimmick::DeleteDicomDatabase(wxTreeItemId& id, 
-                                                   DicomDatabase* db)
-  {
-    wxBusyCursor busy;
-    DicomDatabaseListType::iterator i = find(GetDicomDatabaseList().begin(),
-                                            GetDicomDatabaseList().end(),
-                                            db);
-    delete (*i);
-    GetDicomDatabaseList().erase(i);
-    mTreeListCtrl->Delete(id);
-  }
-  //=================================================
-
-
-
-  //=====================================================================
-  
-  void WxGimmick::OnItemRightClick(wxTreeEvent& event)
-  {
-    wxTreeItemId itemId = event.GetItem();
-    if (itemId.IsOk())
-      {
-       wxPoint clientpt = event.GetPoint();
-       wxPoint screenpt = ClientToScreen(clientpt);
-       ShowMenu(itemId, clientpt);
-      }
-    event.Skip();
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void WxGimmick::ShowMenu(wxTreeItemId id, const wxPoint& pt)
-  { 
-
-    //  std::cout << "ShowMenu" <<std::endl;
-    mItemOfMenu = id;
-    TreeItemData *data = 
-      (TreeItemData *)mTreeListCtrl->GetItemData(id);
-  
-    /*
-      wxString title;
-      if ( id.IsOk() )
-      {
-      title << wxT("Menu for ") << mTreeListCtrl->GetItemText(id);
-      }
-      else
-      {
-      title = wxT("Menu for no particular item");
-      }
-    */
-
-#if wxUSE_MENUS
-    wxMenu menu;
-
-    if (id==mCollectionsTitlesItemId)
-      {
-       menu.Append(PopUp_NewCollection, _T("&New collection"));
-       menu.Append(PopUp_OpenCollection, _T("&Open collection"));
-      }
-    if (data)
-      {
-       if (data->IsDatabase())
-         {
-           wxMenu* addmenu = new wxMenu;
-           addmenu->Append(PopUp_AddDirectory, _T("Scan &Directory"));
-           addmenu->Append(PopUp_AddFile, _T("Select &File(s)"));
-           //      addmenu->Append(PopUp_AddRawFile, _T("Add &Raw image"));
-           menu.AppendSubMenu(addmenu, _T("&Add image(s) to collection..."));
-           menu.Append(PopUp_CloseCollection, _T("&Close collection"));
-           menu.Append(PopUp_DeleteCollection, _T("&Delete collection"));
-         }
-       if (data->IsDicomNode())
-         {
-           
-           //      LG : BUGGY
-           /*
-           std::string str("&Remove ");
-           str += data->GetDicomNode()->GetTypeName();
-           menu.Append(PopUp_Remove, std2wx(str));
-           */
-         }
-      
-       if ((data->GetDicomNode()>0)&&
-           ( data->GetDicomNode()->GetType()<DicomNode::Image))
-         {
-           int ctype = data->GetDicomNode()->GetType()+1;
-           if (mSettings.HasActiveComparator(ctype))
-             {
-               wxMenu* sortmenu = new wxMenu;
-               int n = 0;
-               Settings::ComparatorsList::iterator i;
-               for (i =mSettings.GetComparatorsList(ctype).begin();
-                    i !=mSettings.GetComparatorsList(ctype).end();
-                    ++i)
-                 {
-                   sortmenu->AppendRadioItem(PopUp_Sort+n, std2wx(i->GetName()));
-                   n++;
-                 }    
-             
-               sortmenu->Check(PopUp_Sort+
-                               mSettings.GetActiveComparatorIndex(ctype)
-                               ,true);
-             
-               std::string sortmenustr("&Sort ");
-               sortmenustr += DicomNode::GetPluralTypeName(ctype);
-               sortmenustr += " by...";
-               if (menu.GetMenuItemCount()>0) menu.AppendSeparator();
-               menu.AppendSubMenu(sortmenu,std2wx(sortmenustr));
-             
-               /*
-                 item->GetDicomNode()->SortChildren
-                 ( mSettings.GetActiveComparator
-                 (item->GetDicomNode()->GetType()+1)
-                 );
-                 std::cout << "ok"<<std::endl;
-               */
-             }
-         }
-      }
-    // Event : user can customize the menu 
-    WxGimmickEvent 
-      ev(wxEVT_COMMAND_TREEVIEWLIST_CONTEXTUAL_MENU,this,id);
-    ev.SetMenu(&menu);
-    if (data)
-      {
-       ev.SetDicomNode(data->GetDicomNode());
-      }
-    GetEventHandler()->ProcessEvent(ev);
-    //
-
-    if (menu.GetMenuItemCount()>0) menu.AppendSeparator();
-    menu.Append(PopUp_Settings, wxT("&Settings..."));
-    menu.Append(PopUp_About, wxT("&About..."));
-  
-    /*
-      wxMenu* newmenu = new wxMenu;
-      wxMenu* openmenu = new wxMenu;
-      Tree::RootHandlerListType::iterator h;
-      int i=0;
-      for (h= Tree::GetRootHandlerList().begin();
-      h!=Tree::GetRootHandlerList().end();
-      h++)
-      {
-      if ((*h)->SupportsNew()) 
-      {
-      newmenu->Append(PopUp_New+i, std2wx((*h)->GetName()));
-      }
-      if ((*h)->SupportsOpen()) 
-      openmenu->Append(PopUp_Open+i, std2wx((*h)->GetName()));
-      i++;
-      }
-    
-      menu.AppendSubMenu(openmenu, _T("&Open"));
-      menu.AppendSubMenu(newmenu, _T("&New"));
-
-      if (data)
-      { 
-      if ((data->IsDatabase())||(data->IsDicomNode()))
-      {
-      Root* itroot = data->GetDicomNode()->GetDicomDatabase();
-      //       if (!itroot) itroot = data->GetDicomNode()->GetRoot();
-      wxMenu* insertmenu = new wxMenu;
-      bool hasone = false;
-      i = 0;
-      Tree::RootListType::iterator j;
-      for (j  = mTree->GetDatabaseList().begin();
-      j != mTree->GetDatabaseList().end();
-      j++)
-      {
-      //           std::cout << (*j)->GetName() << " " 
-      //                     <<  (*j)->GetTypeName()
-      //                     << " i="<<(*j)->SupportsInsert()<<std::endl;
-      if ( ((*j)!=itroot) && ((*j)->SupportsInsert()) ) 
-      {
-      insertmenu->Append(PopUp_Insert+i, 
-      std2wx((*j)->GetName()));
-      hasone = true;
-      }
-      i++;
-      }
-           
-      if (hasone) menu.AppendSubMenu(insertmenu, _T("&Insert into"));
-      }
-      if (data->IsDatabase())
-      {
-      menu.Append(PopUp_Close, wxT("&Close"));
-      }
-      if (data->IsDicomNode() && data->GetDicomNode()->GetDicomDatabase()->SupportsRemove())
-      {
-      menu.Append(PopUp_Remove, wxT("&Remove"));
-      }
-      }
-    */
-    PopupMenu(&menu, pt);
-#endif // wxUSE_MENUS
-
-    //    std::cout << "EO ShowMenu" <<std::endl;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  // Pop up menu callbacks
-  void  WxGimmick::OnPopUpAbout(wxCommandEvent& event)
-  {
-    wxMessageBox( _T("Give me my medical images quick ! \n\n  (c) CREATIS-LRMN 2008\n      laurent.guigues@creatis.insa-lyon.fr"),
-                 _T("Gimmick!"),
-                 wxOK | wxICON_INFORMATION, this);
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpSettings(wxCommandEvent& event)
-  {
-    WxGimmickSettingsDialog* s = 
-      new WxGimmickSettingsDialog(this,&mSettings);
-    s->ShowModal();
-    delete s;
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpNewCollection(wxCommandEvent& event)
-  {
-    wxBusyCursor busy;
-    OpenOrNewDatabase(false);
-  }
-  //=====================================================================
-  
-  //=====================================================================
-  void  WxGimmick::OnPopUpOpenCollection(wxCommandEvent& event)
-  {
-    wxBusyCursor busy;
-    OpenOrNewDatabase(true);
-  }
-  //=====================================================================
-
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpCloseCollection(wxCommandEvent& event)
-  {
-    if (wxMessageBox(_T("This will remove this collection from your list of collections but will not delete the collection's file on disk. Proceed ?"),_T("Confirm"),wxYES_NO,this)==wxNO) return;
-   
-    wxBusyCursor busy;
-    //   std::cout << "OnPopUpClose"<<std::endl;
-    //  wxTreeItemId id = event.GetId();
-    TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(mItemOfMenu);
-    DicomDatabase* r = data->GetDicomNode()->GetDicomDatabase();
-    //   std::cout << "OnPopUpClose '"<<r->GetName()<<"'"<<std::endl;
-    DeleteDicomDatabase(mItemOfMenu,r);
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpDeleteCollection(wxCommandEvent& event)
-  {
-    if (wxMessageBox(_T("This will physically delete the collection's file on disk and cannot be reverted. Proceed ?"),_T("Confirm"),wxYES_NO,this)==wxNO) return;
-  
-    wxBusyCursor busy;
-
-    //   std::cout << "OnPopUpClose"<<std::endl;
-    //  wxTreeItemId id = event.GetId();
-    TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(mItemOfMenu);
-    DicomDatabase* r = data->GetDicomNode()->GetDicomDatabase();
-    wxRemoveFile(std2wx(r->GetFileName()));
-    //   std::cout << "OnPopUpClose '"<<r->GetName()<<"'"<<std::endl;
-    DeleteDicomDatabase(mItemOfMenu,r);
-  }
-  //=====================================================================
-
-  void DisplayUpdateSummary( DicomDatabase::UpdateSummary& summary,
-                            wxWindow* parent )
-  {
-    std::stringstream mess;
-    mess << "Dirs\tscanned\t\t\t: " << summary.scanned_dirs << "\n";
-    mess << "Files\tscanned\t\t\t: " << summary.scanned_files << "\n";
-    mess << "Files\thandled\t\t\t: " << summary.handled_images << "\n\n";
-    mess << "Patients\tadded\t\t: " << summary.added_patients<< "\n";
-    mess << "Studies\tadded\t\t: " << summary.added_studies<< "\n";
-    mess << "Series\tadded\t\t: " << summary.added_series<< "\n";
-    mess << "Images\tadded\t\t: " << summary.added_images<< "\n\n";
-    char times[500];
-    sprintf(times,"Time to parse dir \t\t: %ld ms \t%d°/o\nTime to read files info \t: %ld ms \t%d°/o\nTime to update structs \t: %ld ms \t%d°/o\nTime to update database \t: %ld ms \t%d°/o\nTotal time \t\t\t: %ld ms",
-           summary.parse_time,
-           (int)( summary.parse_time*100./summary.total_time),
-           summary.file_scan_time,
-           (int)(summary.file_scan_time*100./summary.total_time),
-           summary.update_structs_time,
-           (int)(summary.update_structs_time*100./summary.total_time),
-           summary.update_database_time,
-           (int)(summary.update_database_time*100./summary.total_time),
-           summary.total_time );
-
-    mess << times;
-    wxMessageBox(std2wx(mess.str()),_T("Update summary"),wxOK,parent);
-  }
-
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpAddFile(wxCommandEvent& event)
-  {
-    long style = wxOPEN | wxFILE_MUST_EXIST | wxFD_MULTIPLE;
-    std::string wc("*");
-    wxFileDialog* FD = new wxFileDialog( 0, 
-                                        _T("Select file"),
-                                        mCurrentDirectory,
-                                        _T(""),
-                                        std2wx(wc),
-                                        style,
-                                        wxDefaultPosition);
-
-    if (FD->ShowModal()==wxID_OK)
-      {
-       wxBusyCursor busy;
-
-       mCurrentDirectory = FD->GetDirectory();
-       wxArrayString files;
-       FD->GetPaths(files);
-       unsigned int i;
-       std::vector<std::string> filenames;
-       for (i=0;i<files.GetCount();++i)
-         filenames.push_back(wx2std(files[i]));
-
-       
-       TreeItemData *data = 
-         (TreeItemData *)
-         mTreeListCtrl->GetItemData(mItemOfMenu);
-       DicomDatabase* db = data->GetDicomNode()->GetDicomDatabase();
-       DicomDatabase::UpdateSummary summary;
-       wxProgressDialog* progress = 
-         new wxProgressDialog(_T("Adding file(s)"),
-                              _T(""),
-                              1000,
-                              this,
-                              wxPD_ELAPSED_TIME |
-                              wxPD_ESTIMATED_TIME | 
-                              wxPD_REMAINING_TIME |
-                              wxPD_CAN_ABORT );
-       
-       db->AddFiles(filenames,progress,summary);
-       
-       progress->Pulse(_T("Updating view..."));
-       UpdateDicomDatabaseView(db);
-       delete progress;
-       DisplayUpdateSummary(summary,this);
-      }
-  
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpAddRawFile(wxCommandEvent& event)
-  {
-    wxMessageBox(_T("Not yet implemented !"),_T("Sorry"),wxOK,this);
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpAddDirectory(wxCommandEvent& event)
-  {
-    long style = wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST;
-    wxDirDialog* FD = 
-      new wxDirDialog( 0, 
-                      _T("Select directory"),
-                      mCurrentDirectory,
-                      style);
-   
-    if (FD->ShowModal()==wxID_OK)
-      {
-
-       bool recurse = false;
-       if (wxMessageBox(_T("Recurse into sub-directories ?"),
-                        _T("Scan directory"),
-                        wxYES_NO,this ) == wxYES)
-         {
-           recurse = true;
-         }
-       
-       wxBusyCursor busy;
-       wxProgressDialog* progress = 
-         new wxProgressDialog(_T("Scanning directory"),
-                              _T("Parsing directory"),
-                              1000,
-                              this,
-                              wxPD_ELAPSED_TIME |
-                              wxPD_ESTIMATED_TIME | 
-                              wxPD_REMAINING_TIME |
-                              wxPD_CAN_ABORT );
-       DicomDatabase::UpdateSummary summary;
-
-       std::string dirname = wx2std (FD->GetPath()) ;
-       mCurrentDirectory = FD->GetPath();
-       TreeItemData *data = 
-         (TreeItemData *)
-         mTreeListCtrl->GetItemData(mItemOfMenu);
-       DicomDatabase* db = data->GetDicomNode()->GetDicomDatabase();
-       db->AddDirectory(dirname,recurse,progress,summary);
-
-       progress->Pulse(_T("Updating view..."));
-       UpdateDicomDatabaseView(db);
-
-       delete progress;    
-       DisplayUpdateSummary(summary,this);
-       /*    
-             if (summary.cancelled_by_user)
-             {
-             std::cout << "!! Cancelled by user !!"<<std::endl;
-             }
-       */
-
-      }
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpRemove(wxCommandEvent& event)
-  {
-
-    /*
-      wxMessageBox(_T("Not yet implemented"),_T("Sorry !"),wxOK);
-      return;
-    */
-
-    //  wxTreeItemId id = event.GetId();
-    TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(mItemOfMenu);
-
-    std::string mess("Remove ");
-    mess += data->GetDicomNode()->GetTypeName();
-    mess += " from collection ?";
-    int answer = wxMessageBox(std2wx(mess), _T("Confirm"), wxYES_NO);
-    if (answer == wxNO) return;
-   
-    if ( mTreeListCtrl->IsSelected(mItemOfMenu) )
-      {
-       wxTreeItemId next = mTreeListCtrl->GetNextSibling(mItemOfMenu);
-       if (next.IsOk()) 
-         {
-           mTreeListCtrl->SelectItem(next);
-         }
-       else 
-         {
-           return;
-         }
-      }
-
-    DicomDatabase* db = data->GetDicomNode()->GetDicomDatabase();
-    db->Remove(data->GetDicomNode());
-    //   std::cout << "OnPopUpClose '"<<r->GetName()<<"'"<<std::endl;
-    // TODO : Optimize update only parent's branch
-    UpdateDicomDatabaseView(db);
-    //   DeleteDicomDatabase(mItemOfMenu,r);
-  }
-  //=====================================================================
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpSort(wxCommandEvent& event)
-  {
-    wxBusyCursor busy;
-    //    std::cout << "OnPopUpSort"<<std::endl;
-    TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(mItemOfMenu);
-    int index = event.GetId() - PopUp_Sort;
-    DicomNode* node = data->GetDicomNode();
-    DicomNode::Type ctype = node->GetType()+1;
-    mSettings.SetActiveComparatorIndex(ctype,index);
-
-    if (node->ChildrenLoaded())
-      {
-       // Remove children
-       mTreeListCtrl->DeleteChildren(mItemOfMenu);
-
-       /*      std::cout << "Sorting using '"
-         << mSettings.GetActiveComparator(ctype).GetName() 
-         << "' ... ";
-       */
-       node->SortChildren ( mSettings.GetActiveComparator(ctype) );
-       //      std::cout << "ok"<<std::endl;
-
-       
-       // Update tree
-       CreateChildrenColumnsTitles(mItemOfMenu,ctype);
-       DicomNode::ChildrenListType::iterator i;
-       for (i=node->GetChildrenList().begin();
-            i!=node->GetChildrenList().end();
-            i++)
-         {
-           UpdateDicomNodeView(*i,mItemOfMenu);
-         }
-      }
-  }
-  //=====================================================================
-
-
-  //=====================================================================
-  void  WxGimmick::OnPopUpUser(wxCommandEvent& event)
-  {
-    //    std::cout << "OnPopUpUser"<<std::endl;
-    event.Skip();
-  }
-  //=====================================================================
-
-  //=================================================
-  void WxGimmick::CreateImageList(int size)
-  {
-    if ( size == -1 )
-      {
-        mTreeListCtrl->SetImageList(NULL);
-        return;
-      }
-    if ( size == 0 )
-      size = m_imageSize;
-    else
-      m_imageSize = size;
-    
-    wxIcon icons[20];
-    // should correspond to Icon_xxx enum
-    icons[Icon_Patient] = wxIcon(patient_xpm);
-    icons[Icon_Study] = wxIcon(study_xpm);
-    icons[Icon_Series] = wxIcon(series_xpm);
-    icons[Icon_Image] = wxIcon(image_xpm);
-    icons[Icon_Database] = wxIcon(database_xpm);
-    icons[Icon_Folder] = wxIcon(folder_xpm);
-    icons[Icon_DicomDir] = wxIcon(dicomdir_xpm);
-    icons[Icon_Root] = wxIcon(root_xpm);
-
-
-    //    mFirstRootIconIndex = 8;
-    //    int i=0;
-    /*
-      Tree::RootHandlerListType::iterator h;
-
-      for (h= Tree::GetDatabaseHandlerList().begin();
-      h!=Tree::GetDatabaseHandlerList().end();
-      h++)
-      {
-      icons[mFirstRootIconIndex+i] = (*h)->GetIcon();
-      i++;
-      }
-    */
-    unsigned int NbIcons = 8;//mFirstRootIconIndex + i;
-    // Make an image list containing small icons
-    wxImageList *images = new wxImageList(size, size, true);
-    
-    int sizeOrig = icons[0].GetWidth();
-    for ( size_t i = 0; i < NbIcons; i++ )
-      {
-       if ( size == sizeOrig )
-         {
-           images->Add(icons[i]);
-         }
-        else
-         {
-            images->Add(wxBitmap(wxBitmap(icons[i]).ConvertToImage().Rescale(size, size)));
-         }
-      }
-    mTreeListCtrl->AssignImageList(images);
-  }
-  //=================================================
-
-
-
-
-
-
-
-
-  //================================================================
-  bool WxGimmick::IsImageSelectable(DicomNode* node)                   
-  {
-    int rows = node->ImageGetRows();
-    int cols = node->ImageGetColumns();
-    int frms = node->ImageGetFrames();
-    
-    //    std::cout << "R/C/F = " << rows << "/"<< cols <<"/"<<frms<<std::endl;
-
-    int dim = 0;
-    if (frms>0) dim=3;
-    else if (cols>0) dim=2;
-    else if (rows>0) dim=1;
-    
-    if (dim == 0) 
-      {
-       std::cout << "Unknown image dimension : cannot select !" 
-                 << std::endl;
-       return false;
-      }
-    else if (dim>mSelectionMaxImageDimension)
-      {
-       std::cout << "Selecting "<<dim<<"D images is not allowed !" 
-                 << std::endl;
-       return false;
-      }
-    
-    if ( mTreeListCtrl->GetSelectionSize() == 0 ) 
-      {
-       mCurrentSelectionImageSize[0] = cols;
-       mCurrentSelectionImageSize[1] = rows;
-       mCurrentSelectionImageSize[2] = frms;
-       return true;
-      }
-    else 
-      {
-       if ( dim == mSelectionMaxImageDimension )
-         {
-           std::cout << "Cannot add this image to selection : would result in a "<<dim+1<<"D image !" << std::endl;
-           return false;
-         }
-       if ( ( cols != mCurrentSelectionImageSize[0] ) ||
-            ( rows != mCurrentSelectionImageSize[1] ) ||
-            ( frms != mCurrentSelectionImageSize[2] ) )
-         {
-           std::cout << "Cannot add this image to selection : image size is incomptatible with currently selected images" << std::endl; 
-           return false;
-         }
-      }
-    //    std::cout << "Selecting : "<<node->ImageGetFullFileName() << std::endl;
-    return true;
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::OnSelChanging(wxTreeEvent& event)                   
-  {
-    event.Veto();
-    wxTreeItemId id = event.GetItem();
-    if (!id.IsOk()) 
-      {
-       std::cout << "INTERNAL ERROR : ID NOT OK"<<std::endl;
-       return;
-      }
-
-
-    TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(id);
-    if (data->IsDicomNode())
-      {
-       if (data->GetDicomNode()>0)
-         {
-           // An image was selected 
-           if (data->GetDicomNode()->GetType()==DicomNode::Image)
-             {
-               if (IsImageSelectable(data->GetDicomNode())) event.Allow();
-             }
-           // A series was selected 
-           else if (data->GetDicomNode()->GetType()==DicomNode::Series)
-             {
-               // If images not loaded do it 
-               LoadChildren(id);
-               // can be selected if all its images can
-               wxTreeItemId child;
-               wxTreeItemIdValue cookie;
-               for (child = mTreeListCtrl->GetFirstChild(id,cookie);
-                    child.IsOk();
-                    child = mTreeListCtrl->GetNextChild(id,cookie))
-                 {    
-                   TreeItemData *cdata = 
-                     (TreeItemData *)mTreeListCtrl->GetItemData(child);
-                   if ((cdata->IsDicomNode())&&
-                       (cdata->GetDicomNode()>0)&&
-                       (cdata->GetDicomNode()->GetType()==DicomNode::Image)&&
-                       (!IsImageSelectable(cdata->GetDicomNode())))
-                     return;
-                 }
-               event.Allow();
-             }
-         }
-      }
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::OnSelChanged(wxTreeEvent& event)                   
-  {
-    //    wxBusyCursor busy;
-    //    std::vector<wxTreeItemId> items;
-    //    GetSelectedItems(items);
-    /*
-      std::vector<DicomNode*>::iterator i;
-      for (i=nodes.begin();i!=nodes.end();++i)
-      {
-      std::cout << "'" << (*i)->GetFieldValue("FullFileName") 
-      << "'" << std::endl;
-      }
-      std::cout << "++++++++++++++++++++" << std::endl;
-    */
-    //    ShowImage(mReader.GetImage(""));
-
-     bool no_image = true;
-
-    static int max = 1000;
-
-    
-    //    if (items.size()>0) 
-    //      {
-
-       // Update image preview : send requests to the MTImageReader
-    // bool first = true;
-    // std::vector<wxTreeItemId>::iterator i;
-    // for (i=items.begin();i!=items.end();++i)
-    //   {
-
-           /*
-           if (first)
-             {
-               DicomNode* node = GetDicomNodeOfItem(items[0]);
-               if (!node) return;
-               // Update dicom fields panel
-               mFieldsView->UpdateValues(node);
-             }
-           */
-
-    wxTreeItemId item =  mTreeListCtrl->GetCurrent();
-    
-    DicomNode* n = GetDicomNodeOfItem(item);
-
-    if (n) mFieldsView->UpdateValues(n);    
-
-    if ( (n!=0) &&
-        (n->GetType()==DicomNode::Image) )
-      {
-
-       //                
-       no_image = false;
-       //if (i==items.begin()) 
-       mCurImageItemToShow = item;
-       
-       int maxprio = mReader.GetMaximalPriority();
-       int prio = maxprio + 1000;
-       wxTreeItemId sib = item; //GetTreeListCtrl()->GetNextSibling(*i);
-       while (sib.IsOk())
-         {
-           DicomNode* nsib = GetDicomNodeOfItem(sib);
-           if (nsib>0) 
-             {
-               //                      std::cout << "-- Request '"
-               //                                << nsib->GetFieldValue("FullFileName")
-               //                                << "' prio="<<prio<<std::endl;
-               mReader.Request(this,
-                               nsib->ImageGetFullFileName(), 
-                               prio);
-               mImageFileNameToNode[nsib->ImageGetFullFileName()] =
-                 nsib;
-               prio--;
-             }
-           sib = GetTreeListCtrl()->GetNextSibling(sib);
-         }
-       prio = maxprio + 999;
-       sib = GetTreeListCtrl()->GetPrevSibling(item);
-       while (sib.IsOk())
-         {
-           DicomNode* nsib = GetDicomNodeOfItem(sib);
-           if (nsib>0) 
-             {
-               //                      std::cout << "-- Request '"
-               //                                << nsib->GetFieldValue("FullFileName")
-               //                                << "' prio="<<prio<<std::endl;
-               mReader.Request(this,
-                               nsib->ImageGetFullFileName(), 
-                               prio);
-               mImageFileNameToNode[nsib->ImageGetFullFileName()] =
-                 nsib;
-               prio--;
-             }
-           sib = GetTreeListCtrl()->GetPrevSibling(sib);
-         }
-       //              mImageFileNameToNode[n->GetFieldValue("FullFileName")] = n;
-       max += 1000;
-       
-       ProcessImageEvents();
-      }
-    // std::cout << "* Selection changed * (im)"<<std::endl;
-
-    //---------------------------------------------------------------------
-    // Send event
-    WxGimmickEvent ev(wxEVT_COMMAND_TREEVIEWLIST_SEL_CHANGED,
-                                   this,
-                                   event.GetItem());
-    
-    GetEventHandler()->ProcessEvent(ev);
-
-    if (no_image) ShowImage(mReader.GetImage(""));
-    
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::ShowImage(vtkImageData* im)
-  {
-    //  wxBusyCursor busy;
-    mViewer->SetInput( im );
-    mViewer->SetSlice( 0 );
-    
-
-    int x1,x2,y1,y2,z1,z2;
-    double spx,spy,spz;
-    im->Update();
-    im->GetSpacing(spx,spy,spz);
-    im->GetExtent (x1,x2,y1,y2,z1,z2);
-    /*
-    std::cout << "-----------------------------"<<std::endl;
-      std::cout << x1 << "-"<<x2<<std::endl; 
-      std::cout << y1 << "-"<<y2<<std::endl; 
-      std::cout << z1 << "-"<<z2<<std::endl; 
-      std::cout << spx << "-"<<spy<<"-"<<spz<<std::endl; 
-    */
-    
-    if ((x1!=mx1) ||
-       (x2!=mx2) ||
-       (y1!=my1) ||
-       (y2!=my2) ||
-       (z1!=mz1) ||
-       (z2!=mz2) ||
-       (spx!=mspx) ||
-       (spy!=mspy) ||
-       (spz!=mspz) 
-       )
-      {
-       mx1 = x1;
-       mx2 = x2;
-       my1 = y1;
-       my2 = y2;
-       mz1 = z1;
-       mz2 = z2;
-       mspx = spx;
-       mspy = spy;
-       mspz = spz;
-       
-       double *range = im->GetScalarRange();
-        mViewer->SetColorWindow(range[1] - range[0]);
-        mViewer->SetColorLevel(0.5 * (range[1] + range[0]));
-
-        mViewer->GetRenderer()->ResetCamera();
-       double bounds[6];
-
-
-        mViewer->GetRenderer()->ComputeVisiblePropBounds(bounds);
-
-        /*
-       std::cout <<"bounds : "<<bounds[0]<<","
-<<bounds[1]<<","
-<<bounds[2]<<","
-<<bounds[3]<<","
-<<bounds[4]<<","
-                 <<bounds[5]<<std::endl;
-        */
-        mViewer->GetRenderer()->ResetCameraClippingRange(bounds);
-       /*
-       vtkCamera *camera = mViewer->GetRenderer()->GetActiveCamera();
-       
-       camera->SetViewUp ( spx*0, -spy*1, spz*0);
-       camera->SetPosition( spx*(x1+x2)/2, spy*(y1+y2)/2, spz*10000000); 
-       camera->SetFocalPoint   ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0); 
-       
-       camera->ComputeViewPlaneNormal();
-       camera->SetParallelScale(  spx*(x2-x1)/2.0 );
-       
-       camera->Roll ( 180 );
-       */
-      }
-    
-    mInteractor->Render();
-  } 
-  //================================================================
-  
-
-
-
-
-
-  //================================================================
-  void WxGimmick::
-  OnMultiThreadImageReaderEvent(const std::string& filename,
-                               MultiThreadImageReaderUser::EventType e,
-                               vtkImageData* image)
-  {
-    if (filename.size()==0)
-      {
-       mImageEventQueue.push_back(ImageEventType(image));
-       return;
-      }
-    std::map<std::string,DicomNode*>::iterator i;
-    i = mImageFileNameToNode.find(filename);
-    if (i!=mImageFileNameToNode.end())
-      {
-       wxTreeItemId id = i->second->GetData<NodeData*>()->GetTreeItemData()->GetItemId();
-       mImageEventQueue.push_back(ImageEventType(id,image));
-      }
-  }
-  //================================================================
-
-  //================================================================
-  // Processes the queue of image events 
-  void WxGimmick::ProcessImageEvents()
-  {
-    //    std::cout << "++++++++++ ProcessImageEvents " << std::endl;
-    MultiThreadImageReaderEventLock();
-
-
-    while (!mImageEventQueue.empty())
-      {
-       ImageEventType e = mImageEventQueue.front();
-       mImageEventQueue.pop_front();
-       if( e.image!=0 ) 
-         {
-           if (e.item.IsOk()) 
-             {
-               mTreeListCtrl->SetItemTextColour(e.item,
-                                                mSettings.LoadedImageColour());//wxImageLoadedColour);
-               TreeItemData *data = 
-                 (TreeItemData *)mTreeListCtrl->GetItemData(e.item);
-               data->SetLoaded(true);
-
-               if (mCurImageItemToShow == e.item)
-                 {
-                   ShowImage(e.image);
-                 }
-             }
-           else if (!mCurImageItemToShow.IsOk())
-             {
-               ShowImage(e.image);
-             }
-         }
-       else if (e.item.IsOk())
-         {
-           mTreeListCtrl->SetItemTextColour(e.item,mSettings.Colour(DicomNode::Image)); //.wxImageUnloadedColour);
-           TreeItemData *data = 
-             (TreeItemData *)mTreeListCtrl->GetItemData(e.item);
-           data->SetLoaded(false);
-         }
-      }
-    mImageEventQueue.clear();
-    MultiThreadImageReaderEventUnlock();
-    //    std::cout << "++++++++++ END ProcessImageEvents " << std::endl;
-  }
-  //================================================================
-
-  //================================================================
-  void  WxGimmick::OnInternalIdle()
-  {
-    ProcessImageEvents();
-    /*
-    if (mJustStarted)
-      {
-
-       mJustStarted = false;
-       }
-    */
-    //
-  }
-  //================================================================
-
-  //================================================================
-  // LG : For the moment any selection is valid but in the future 
-  // incomplete selections can be invalid...
-  bool WxGimmick::IsSelectionValid() 
-  { 
-    return (mTreeListCtrl->GetSelectionSize()>0); 
-  } 
-  //================================================================
-
-  //================================================================
-  void WxGimmick::GetSelectedFiles(std::vector<std::string>& f)
-  {
-    wxArrayTreeItemIds id;
-    // TO DO : TEST THAT STYLE IS MULTIPLE 
-    unsigned int nb = mTreeListCtrl->GetSelections(id);
-    f.clear();
-    for (unsigned int i=0; i<nb; ++i)
-      {
-       TreeItemData *data = 
-         (TreeItemData *)mTreeListCtrl->GetItemData(id[i]);
-       if ((data) && (data->IsDicomNode()))
-         {
-           if (data->GetDicomNode()->GetType()==DicomNode::Image)
-             {
-               f.push_back ( data->GetDicomNode()->ImageGetFullFileName() );
-             }
-           else if (data->GetDicomNode()->GetType()==DicomNode::Series)
-             {
-               DicomNode::ChildrenListType::iterator j;
-               for (j =data->GetDicomNode()->GetChildrenList().begin();
-                    j!=data->GetDicomNode()->GetChildrenList().end();
-                    j++) 
-                 {
-                   f.push_back((*j)->ImageGetFullFileName());
-                 }
-             }
-         }
-      }
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::GetSelectedImages(std::vector<vtkImageData*>& f)
-  {
-    wxArrayTreeItemIds id;
-    // TO DO : TEST THAT STYLE IS MULTIPLE 
-    unsigned int nb = mTreeListCtrl->GetSelections(id);
-    f.clear();
-
-    // Collect the brute vector of Image nodes
-    std::vector<DicomNode*> im;
-    for (unsigned int i=0; i<nb; ++i)
-      {
-       TreeItemData *data = 
-         (TreeItemData *)mTreeListCtrl->GetItemData(id[i]);
-       if ((data) && (data->IsDicomNode()))
-         {
-           if (data->GetDicomNode()->GetType()==DicomNode::Image)
-             {
-               im.push_back ( data->GetDicomNode() );
-
-             }
-           else if (data->GetDicomNode()->GetType()==DicomNode::Series)
-             {
-               DicomNode::ChildrenListType::iterator j;
-               for (j =data->GetDicomNode()->GetChildrenList().begin();
-                    j!=data->GetDicomNode()->GetChildrenList().end();
-                    j++) 
-                 {
-                   im.push_back ( *j );
-                 }
-             }
-         }
-      }
-    // Create the output data
-    if (im.size()==1) 
-      {
-       // Only one image : give it
-       vtkImageData* out = vtkImageData::New();
-       out->ShallowCopy(mReader.GetImage(im.front()->ImageGetFullFileName()));
-       f.push_back( out );
-      }
-    else if (im.size()>1)
-      {
-       vtkImageData* first = mReader.GetImage( im.front()->ImageGetFullFileName() );
-       if (first->GetDataDimension()==2) 
-         {     
-           // n2D to 3D
-           vtkImageData* out = vtkImageData::New();
-           out->CopyStructure(first);  
-           out->SetScalarType(first->GetScalarType());
-           int ext[6];
-           first->GetExtent(ext);
-           ext[5] = im.size();
-           out->SetExtent(ext);
-           // LG : TODO : Z Spacing  ?
-           //
-           // ==> to get an accurate ZSpacing from a Dicom set of files
-           // ==> you need a gdcm::SerieHelper
-           //  JPR
-           
-           out->AllocateScalars();
-           
-           //first->Print(std::cout);
-           //      out->Print(std::cout);
-           
-           int dim[3];
-           first->GetDimensions(dim);
-           unsigned long imsize = 
-             ( (unsigned long)first->GetScalarPointer(0,1,0)
-               - (unsigned long)first->GetScalarPointer(0,0,0))
-             *dim[1];
-
-           int slice = 0;
-           std::vector<DicomNode*>::iterator it;
-           for (it=im.begin(); it!=im.end(); ++it) 
-             {
-               //std::cout << "copying slice "<<slice <<std::endl;
-               vtkImageData* cur = mReader.GetImage( (*it)->ImageGetFullFileName() );
-               
-               void* src = cur->GetScalarPointer(0,0,0);
-               void* dst = out->GetScalarPointer(0,0,slice);
-               //              std::cout << "src="<<src<<std::endl;
-               //              std::cout << "dst="<<dst<<std::endl;
-               //              std::cout << "siz="<<imsize<<std::endl;
-               memcpy(dst,src,imsize);
-
-               /*
-               // verif
-               int ii,jj;
-               for (ii=1;ii<4;ii++) {
-                 for (jj=1;jj<4;jj++) {
-                   int x = (int)(ii*dim[0] / 4);
-                   int y = (int)(jj*dim[1] / 4);
-                   std::cout << cur->GetScalarComponentAsFloat(x,y,0,0)
-                             << " vs "
-                             << out->GetScalarComponentAsFloat(x,y,slice,0)
-                             << std::endl;
-                 }
-               }
-               */
-
-               slice++;
-             }
-           f.push_back(out);
-         }
-       else 
-         {
-           // n3D
-           std::vector<DicomNode*>::iterator it;
-           for (it=im.begin(); it!=im.end(); ++it) 
-             {
-               vtkImageData* out = vtkImageData::New();
-               out->ShallowCopy(mReader.GetImage((*it)->ImageGetFullFileName()));
-               f.push_back(out);
-             }
-         }
-      }
-  }
-  //================================================================
-
-
-  //================================================================
-  void WxGimmick::GetSelectedDicomNodes(std::vector<DicomNode*>& f)
-  {
-    wxArrayTreeItemIds id;
-    // TO DO : TEST THAT STYLE IS MULTIPLE 
-    unsigned int nb = mTreeListCtrl->GetSelections(id);
-    f.clear();
-    for (unsigned int i=0; i<nb; ++i)
-      {
-       TreeItemData *data = 
-         (TreeItemData *)mTreeListCtrl->GetItemData(id[i]);
-       if ((data) && (data->IsDicomNode()))
-         {
-           f.push_back ( data->GetDicomNode() );
-         }
-       /*
-
-       if (data->GetDicomNode()->GetType()==DicomNode::Image)
-       {
-       f.push_back ( data->GetDicomNode() ); //->ImageGetFullFileName() );
-       }  
-       else if (data->GetDicomNode()->GetType()==DicomNode::Series)
-       {
-       DicomNode::ChildrenListType::iterator j;
-       for (j =data->GetDicomNode()->GetChildrenList().begin();
-       j!=data->GetDicomNode()->GetChildrenList().end();
-       j++) 
-       {
-       f.push_back((*j)); //->ImageGetFullFileName() );        }
-       }
-       }
-       */
-      }
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmick::GetSelectedItems(std::vector<wxTreeItemId>& f)
-  {
-    wxArrayTreeItemIds id;
-    // TO DO : TEST THAT STYLE IS MULTIPLE 
-    unsigned int nb = mTreeListCtrl->GetSelections(id);
-    f.clear();
-    for (unsigned int i=0; i<nb; ++i)
-      {
-       f.push_back(id[i]);
-      }
-  }
-  //================================================================
-
-  //================================================================
-  DicomNode* WxGimmick::GetDicomNodeOfItem(const wxTreeItemId& i)
-  {
-    TreeItemData *data = 
-      (TreeItemData *)mTreeListCtrl->GetItemData(i);
-    if (data) return ( data->GetDicomNode() );
-    return 0;
-  }
-  //================================================================
-
-  //================================================================
-  //================================================================
-  //================================================================
-  //================================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  //================================================================
-  //================================================================
-  //================================================================
-  //================================================================
-  
-  BEGIN_EVENT_TABLE(WxGimmick, wxPanel)
-  // POP UP MENU
-    EVT_MENU(PopUp_NewCollection,WxGimmick::OnPopUpNewCollection)
-    EVT_MENU(PopUp_OpenCollection,WxGimmick::OnPopUpOpenCollection)
-    EVT_MENU(PopUp_CloseCollection,WxGimmick::OnPopUpCloseCollection)
-    EVT_MENU(PopUp_DeleteCollection,WxGimmick::OnPopUpDeleteCollection)
-    EVT_MENU(PopUp_AddFile, WxGimmick::OnPopUpAddFile)
-    EVT_MENU(PopUp_AddRawFile, WxGimmick::OnPopUpAddRawFile)
-    EVT_MENU(PopUp_AddDirectory, WxGimmick::OnPopUpAddDirectory)
-    EVT_MENU(PopUp_Remove, WxGimmick::OnPopUpRemove)
-    EVT_MENU(PopUp_About, WxGimmick::OnPopUpAbout)
-    EVT_MENU(PopUp_Settings, WxGimmick::OnPopUpSettings)
-    
-    EVT_MENU_RANGE(PopUp_Sort, PopUp_Sort+99,  WxGimmick::OnPopUpSort)
-    EVT_MENU_RANGE(PopUp_User, PopUp_User+99,  WxGimmick::OnPopUpUser)
-    
-    
-    
-  // DRAG
-    EVT_TREE_BEGIN_DRAG(TreeListCtrlId, WxGimmick::OnBeginDrag)
-    EVT_TREE_BEGIN_RDRAG(TreeListCtrlId, WxGimmick::OnBeginRDrag)
-    EVT_TREE_END_DRAG(TreeListCtrlId, WxGimmick::OnEndDrag)
-
-  // LABEL
-    EVT_TREE_BEGIN_LABEL_EDIT(TreeListCtrlId, WxGimmick::OnBeginLabelEdit)
-    EVT_TREE_END_LABEL_EDIT(TreeListCtrlId, WxGimmick::OnEndLabelEdit)
-
-  //DELETE : UNUSED
-    EVT_TREE_DELETE_ITEM(TreeListCtrlId, WxGimmick::OnDeleteItem)
-#if 0       // there are so many of those that logging them causes flicker
-    EVT_TREE_GET_INFO(TreeListCtrlId, WxGimmick::OnGetInfo)
-#endif
-  // UNUSED
-    EVT_TREE_SET_INFO(TreeListCtrlId, WxGimmick::OnSetInfo)
-
-  // EXPAND/COLLAPSE
-    EVT_TREE_ITEM_EXPANDED(TreeListCtrlId, WxGimmick::OnItemExpanded)
-    EVT_TREE_ITEM_EXPANDING(TreeListCtrlId, WxGimmick::OnItemExpanding)
-    EVT_TREE_ITEM_COLLAPSED(TreeListCtrlId, WxGimmick::OnItemCollapsed)
-    EVT_TREE_ITEM_COLLAPSING(TreeListCtrlId, WxGimmick::OnItemCollapsing)
-
-  // SELECTION
-    EVT_TREE_SEL_CHANGED(TreeListCtrlId, WxGimmick::OnSelChanged)
-    EVT_TREE_SEL_CHANGING(TreeListCtrlId, WxGimmick::OnSelChanging)
-  // KEY
-    EVT_TREE_KEY_DOWN(TreeListCtrlId, WxGimmick::OnTreeKeyDown)
-  // ACTIVATION = DOUBLE CLICK OR ENTER ON SELECTED
-    EVT_TREE_ITEM_ACTIVATED(TreeListCtrlId, WxGimmick::OnItemActivated)
-
-  // so many differents ways to handle right mouse button clicks...
-  //    EVT_CONTEXT_MENU(WxGimmick::OnContextMenu)
-  // EVT_TREE_ITEM_MENU is the preferred event for creating context menus
-  // on a tree control, because it includes the point of the click or item,
-  // meaning that no additional placement calculations are required.
-  //    EVT_TREE_ITEM_MENU(TreeListCtrlId, WxGimmick::OnItemMenu)
-    
-    EVT_TREE_ITEM_RIGHT_CLICK(TreeListCtrlId, WxGimmick::OnItemRightClick)
-
-  // UNUSED
-  //    EVT_RIGHT_DOWN(WxGimmick::OnRMouseDown)
-  //    EVT_RIGHT_UP(WxGimmick::OnRMouseUp)
-  //    EVT_RIGHT_DCLICK(WxGimmick::OnRMouseDClick)
-    END_EVENT_TABLE()
-
-  //IMPLEMENT_DYNAMIC_CLASS(WxGimmick, wxTreeListCtrl)
-
-  /*
-    wxTree::wxTree(wxWindow *parent, const wxWindowID id,
-    const wxPoint& pos, const wxSize& size,
-    long style)
-    : wxTreeListCtrl(parent, id, pos, size, style)
-    {
-    m_reverseSort = false;
-
-    CreateImageList();
-
-    // Add some items to the tree
-    AddTestItemsToTree(5, 2);
-    }
-  */
-
-
-
-#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
-    void WxGimmick::CreateButtonsImageList(int size)
-  {
-    /*
-      if ( size == -1 )
-      {
-      mTreeListCtrl->SetButtonsImageList(NULL);
-      return;
-      }
-
-      // Make an image list containing small icons
-      wxImageList *images = new wxImageList(size, size, true);
-
-      // should correspond to TreeListCtrlIcon_xxx enum
-      wxBusyCursor wait;
-      wxIcon icons[4];
-      icons[0] = wxIcon(icon3_xpm);   // closed
-      icons[1] = wxIcon(icon3_xpm);   // closed, selected
-      icons[2] = wxIcon(icon5_xpm);   // open
-      icons[3] = wxIcon(icon5_xpm);   // open, selected
-
-      for ( size_t i = 0; i < WXSIZEOF(icons); i++ )
-      {
-      int sizeOrig = icons[i].GetWidth();
-      if ( size == sizeOrig )
-      {
-      images->Add(icons[i]);
-      }
-      else
-      {
-      images->Add(wxBitmap(wxBitmap(icons[i]).ConvertToImage().Rescale(size, size)));
-      }
-      }
-
-      mTreeListCtrl->AssignButtonsImageList(images);
-    */
-#else
-    void WxGimmick::CreateButtonsImageList(int WXUNUSED(size))
-    {
-#endif
-    }
-
-    /*
-      int WxGimmick::OnCompareItems(const wxTreeItemId& item1,
-      const wxTreeItemId& item2)
-      {
-      if ( m_reverseSort )
-      {
-      // just exchange 1st and 2nd items
-      return mTreeListCtrl->OnCompareItems(item2, item1);
-      }
-      else
-      {
-      return mTreeListCtrl->OnCompareItems(item1, item2);
-      }
-      }
-
-
-      void WxGimmick::DoToggleIcon(const wxTreeItemId& item)
-      {
-  
-      int image = (mTreeListCtrl->GetItemImage(item) == TreeIcon_Folder)
-      ? TreeIcon_File
-      : TreeIcon_Folder;
-      mTreeListCtrl->SetItemImage(item, image, wxTreeItemIcon_Normal);
-
-      image = (mTreeListCtrl->GetItemImage(item) == TreeIcon_FolderSelected)
-      ? TreeIcon_FileSelected
-      : TreeIcon_FolderSelected;
-      mTreeListCtrl->SetItemImage(item, image, wxTreeItemIcon_Selected);
-      }
-
-      void WxGimmick::LogEvent(const wxChar *name, const wxTreeEvent& event)
-      {
-      wxTreeItemId item = event.GetItem();
-      wxString text;
-      if ( item.IsOk() )
-      text << _T('"') << mTreeListCtrl->GetItemText(item).c_str() << _T('"');
-      else
-      text = _T("invalid item");
-      //    wxLogMessage(wxT("%s(%s)"), name, text.c_str());
-      }
-
-    */
-    // avoid repetition
-#define TREE_EVENT_HANDLER(name)                               \
-    void WxGimmick::name(wxTreeEvent& event)   \
-    {                                                          \
-      /*    LogEvent(_T(#name), event);        */                      \
-      /*    SetLastItem(mTreeListCtrl->wxTreeItemId()) *;*/    \
-      event.Skip();                                            \
-    }
-
-    TREE_EVENT_HANDLER(OnBeginRDrag)
-      TREE_EVENT_HANDLER(OnDeleteItem)
-      TREE_EVENT_HANDLER(OnGetInfo)
-      TREE_EVENT_HANDLER(OnSetInfo)
-      //TREE_EVENT_HANDLER(OnItemExpanded)
-      TREE_EVENT_HANDLER(OnItemExpanding)
-      //TREE_EVENT_HANDLER(OnItemCollapsed)
-      //TREE_EVENT_HANDLER(OnSelChanged)
-      //      TREE_EVENT_HANDLER(OnSelChanging)
-
-
-      void WxGimmick::OnItemCollapsed(wxTreeEvent& event)                   
-      {
-       //    std::cout << "* Collapsed *"<<std::endl;
-      }
-
-#undef TREE_EVENT_HANDLER
-
-    void WxGimmick::OnTreeKeyDown(wxTreeEvent& event)
-    {
-      /*
-      //  LogKeyEvent(wxT("Tree key down "), event.GetKeyEvent());
-      std::cout << "* Key down *"<<std::endl;
-      if (event.GetKeyCode()==WXK_RIGHT)
-       {
-         std::cout << "Right"<<std::endl;
-         wxTreeItemId itemId =  mTreeListCtrl->GetSelection();
-         if (itemId.IsOk())
-           {
-             std::cout << "item is ok"<<std::endl;
-             wxPoint clientpt = event.GetPoint();
-             wxPoint screenpt = ClientToScreen(clientpt);
-             ShowMenu(itemId, clientpt);
-           }     
-         event.Veto();
-         return;
-       }
-      std::cout << "NOT Right"<<std::endl;
-      */
-      event.Skip();      
-    }
-
-    void WxGimmick::OnBeginDrag(wxTreeEvent& event)
-    {
-      wxTreeItemId id = event.GetItem();
-      TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(id);
-      //    std::cout << "OnBeginDrag("<<id<<")"<<std::endl;
-      if (data->IsDatabase())
-       {
-         //      std::cout << "-- IS ROOT"<<std::endl;
-         //  event.Allow();
-       }
-      else if (data->IsDicomNode())
-       {
-         //      std::cout << "-- IS NODE"<<std::endl;
-       }
-      /*
-      // need to explicitly allow drag
-      if ( event.GetItem() != GetDatabaseItem() )
-      {
-      m_draggedItem = event.GetItem();
-
-      wxPoint clientpt = event.GetPoint();
-      wxPoint screenpt = ClientToScreen(clientpt);
-
-      wxLogMessage(wxT("OnBeginDrag: started dragging %s at screen coords (%i,%i)"),
-      GetItemText(m_draggedItem).c_str(),
-      screenpt.x, screenpt.y);
-
-      event.Allow();
-      }
-      else
-      {
-      wxLogMessage(wxT("OnBeginDrag: this item can't be dragged."));
-      }
-      */
-    }
-
-    void WxGimmick::OnEndDrag(wxTreeEvent& event)
-    {
-      wxTreeItemId id = event.GetItem();
-      //      std::cout << "OnEndDrag("<<id<<")"<<std::endl;
-      if (!id.IsOk()) return;
-      TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(id);
-      if (data->IsDatabase())
-       {
-         //      std::cout << "-- IS ROOT"<<std::endl;
-       }
-      else if (data->IsDicomNode())
-       {
-         //      std::cout << "-- IS NODE"<<std::endl;
-       }
-
-      /*
-       wxTreeItemId itemSrc = m_draggedItem,
-       itemDst = event.GetItem();
-       m_draggedItem = (wxTreeItemId)0l;
-
-       // where to copy the item?
-       if ( itemDst.IsOk() && !ItemHasChildren(itemDst) )
-       {
-        // copy to the parent then
-        itemDst = GetItemParent(itemDst);
-       }
-
-       if ( !itemDst.IsOk() )
-       {
-        wxLogMessage(wxT("OnEndDrag: can't drop here."));
-
-        return;
-       }
-
-       wxString text = GetItemText(itemSrc);
-       wxLogMessage(wxT("OnEndDrag: '%s' copied to '%s'."),
-       text.c_str(), GetItemText(itemDst).c_str());
-
-       // just do append here - we could also insert it just before/after the item
-       // on which it was dropped, but this requires slightly more work... we also
-       // completely ignore the client data and icon of the old item but could
-       // copy them as well.
-       //
-       // Finally, we only copy one item here but we might copy the entire tree if
-       // we were dragging a folder.
-       int image = wxGetApp().ShowImages() ? TreeIcon_File : -1;
-       AppendItem(itemDst, text, image);
-      */
-    }
-
-
-    //====================================================================
-    void WxGimmick::OnBeginLabelEdit(wxTreeEvent& event)
-    {
-      //      std::cout << "OnBeginLabelEdit"<<std::endl;
-      wxTreeItemId id = event.GetItem();
-      TreeItemData *data = (TreeItemData *)mTreeListCtrl->GetItemData(id);
-      // If not a root : veto
-      if (data->IsDatabase()) 
-       { 
-         event.Allow();
-         return;
-       }
-      event.Veto();
-    }
-    //====================================================================
-
-    //====================================================================
-    void WxGimmick::OnEndLabelEdit(wxTreeEvent& event)
-    {
-      //      std::cout << "OnEndLabelEdit"<<std::endl;
-      wxTreeItemId id = event.GetItem();
-      TreeItemData *data = GetItemData(id);
-      // If not a database : bug !
-      if (data->IsDatabase()) 
-       { 
-         data->GetDicomNode()->GetDicomDatabase()->SetName(wx2std(event.GetLabel()));
-         mFieldsView->UpdateValues(data->GetDicomNode());
-       }
-      else
-       {
-         std::cerr<< "!!!! Internal error : send bug report !!!!"<<std::endl;
-       }
-    }
-    //====================================================================
-
-
-    void WxGimmick::OnItemCollapsing(wxTreeEvent& event)
-    {
-      //    wxLogMessage(wxT("OnItemCollapsing"));
-
-      // for testing, prevent the user from collapsing the first child folder
-      wxTreeItemId itemId = event.GetItem();
-
-      /*
-       if ( IsTestItem(itemId) )
-       {
-        wxMessageBox(wxT("You can't collapse this item."));
-
-        event.Veto();
-       }
-      */
-    }
-
-
-    //====================================================================
-    void WxGimmick::ShowHelp()
-    {
-      /*
-      if (mHelpWindow==0)
-       {
-         mHelpWindow = new WxGimmickHelpWindow(this);
-       }
-      mHelpWindow->CenterOnParent();
-      mHelpWindow->ShowModal();
-      */
-    }
-    //====================================================================
-
-
-
-
-
-    //================================================================
-    //================================================================
-    //================================================================
-    //================================================================
-    //================================================================
-    // WxGimmickEvent
-    //================================================================
-    //================================================================
-    //================================================================
-    //================================================================
-    //================================================================
-
-
-
-
-
-    // ----------------------------------------------------------------------------
-    // events
-    // ----------------------------------------------------------------------------
-    /*
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_DRAG)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_RDRAG)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_DELETE_ITEM)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_GET_INFO)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SET_INFO)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDED)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDING)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSED)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSING)
-    */
-
-    DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_LABEL_EDIT)
-
-
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_SEL_CHANGED)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_SEL_CHANGING)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_KEY_DOWN)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_CONTEXTUAL_MENU)
-      DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_ITEM_STYLE_CHANGED)
-      /*
-       DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_ACTIVATED)
-       DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK)
-       DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK)
-       DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_DRAG)
-       DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK)
-       DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP)
-       DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MENU)
-      */
-      // ----------------------------------------------------------------------------
-      // Tree event
-      // ----------------------------------------------------------------------------
-
-      IMPLEMENT_ABSTRACT_CLASS(WxGimmickEvent, wxNotifyEvent)
-  
-  
-      WxGimmickEvent::WxGimmickEvent(wxEventType commandType,
-                                                                WxGimmick *tree,
-                                                                const wxTreeItemId& item)
-      : 
-      wxNotifyEvent(commandType, tree->GetId()),
-      m_item(item),
-      mDicomNode(0)
-       {
-         //      m_editCancelled = false;
-      
-         SetEventObject(tree);
-      
-         if ( item.IsOk() )
-           SetClientObject(tree->mTreeListCtrl->GetItemData(item));
-       }
-  
-      WxGimmickEvent::WxGimmickEvent(wxEventType commandType, int id)
-       : 
-       wxNotifyEvent(commandType, id),
-       mDicomNode(0)
-         {
-           m_itemOld = 0l;
-           //      m_editCancelled = false;
-         }
-    
-       WxGimmickEvent::WxGimmickEvent(const WxGimmickEvent & event)
-         : 
-         wxNotifyEvent(event),
-         mDicomNode(0)
-
-           {
-             m_evtKey = event.m_evtKey;
-             m_item = event.m_item;
-             m_itemOld = event.m_itemOld;
-             mColor = event.mColor;
-             mUserData = event.mUserData;
-             //    m_pointDrag = event.m_pointDrag;
-             //    m_label = event.m_label;
-             //    m_editCancelled = event.m_editCancelled;
-           }
-      
-      
-
-
-
-
-
-
-         //================================================================
-         //================================================================
-         //================================================================
-         //================================================================
-         //================================================================
-         WxGimmickFrame::WxGimmickFrame( wxWindow *parent, 
-                                         wxString title, 
-                                         wxSize size)
-           : wxFrame((wxFrame *)parent, -1, title, wxDefaultPosition, size)
-           {   
-             wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
-             mWxGimmick = new WxGimmick(this,-1,
-                                        wxDefaultPosition,
-                                        wxDefaultSize);
-             sizer->Add(mWxGimmick,1,wxGROW);
-             SetSizer(sizer);
-             SetAutoLayout(true);
-             Layout();
-           }
-           //================================================================
-
-           //================================================================
-           WxGimmickFrame::~WxGimmickFrame()
-             {
-             }
-           //================================================================
-
-           //================================================================
-           void WxGimmickFrame::OnSelChanged(WxGimmickEvent& event)
-           {
-             //    std::cout << "+++++ WxGimmickFrame::OnSelChanged ++++++++++"
-             //              <<std::endl;
-             std::vector<std::string> file;
-             //    mWxGimmick->GetSelectedImages(file);
-             /*
-               std::vector<std::string>::iterator i;
-               for (i=file.begin();i!=file.end();++i)
-               {
-               std::cout << "'" << *i << "'" << std::endl;
-               }
-               std::cout << "++++++++++++++++++++" << std::endl;
-             */
-           }
-           //================================================================
-
-           //================================================================
-           BEGIN_EVENT_TABLE(WxGimmickFrame, wxFrame)
-             EVT_TREEVIEWLIST_SEL_CHANGED(-1,WxGimmickFrame::OnSelChanged)
-             END_EVENT_TABLE()
-             //================================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-           
-
-
-
-  }
diff --git a/src/creaImageIOWxGimmick.h b/src/creaImageIOWxGimmick.h
deleted file mode 100644 (file)
index 75e969e..0000000
+++ /dev/null
@@ -1,546 +0,0 @@
-#ifndef __creaImageIOWxGimmick_h_INCLUDED__
-#define __creaImageIOWxGimmick_h_INCLUDED__
-
-// dicom database
-#include <creaImageIOSystem.h>
-#include <creaImageIODicomDatabase.h>
-
-// wx
-#include <creaWx.h>
-#include <wx/image.h>
-#include <wx/imaglist.h>
-#include <wx/splitter.h>
-#include <wx/notebook.h>
-#include "treelistctrl.h"
-
-// dicom fields view panel
-#include <creaImageIOWxGimmickFieldsView.h>
-// settings widget
-#include <creaImageIOWxGimmickSettings.h>
-
-// For image preview 
-// vtk and wxvtk classes
-#include "creawxVTKRenderWindowInteractor.h"
-#include "vtkImageViewer2.h"
-// multi-thread image reader
-#include <creaImageIOMultiThreadImageReader.h>
-
-
-namespace creaImageIO
-{
-
-  //====================================================================
-  // Forward decl of event class for WxGimmick
-  class WxGimmickEvent;
-  class WxGimmickTreeItemData;
-  class WxGimmickDicomNodeData;
-  //====================================================================
-
-#define GIMMICK_NO_IMAGE_SELECTION 0
-#define GIMMICK_2D_IMAGE_SELECTION 2
-#define GIMMICK_3D_IMAGE_SELECTION 3
-#define GIMMICK_4D_IMAGE_SELECTION 4
-
-  //====================================================================
-  class CREAIMAGEIO_EXPORT WxGimmick : public wxPanel,
-                                      public MultiThreadImageReaderUser
-  {
-  public:
-    /// Ctor
-    WxGimmick(wxWindow *parent, const wxWindowID id,
-             const wxPoint& pos, const wxSize& size,
-             int image_type = GIMMICK_3D_IMAGE_SELECTION,
-             int number_of_threads = 0);
-    /// Dtor
-    virtual ~WxGimmick();
-
-    /// Returns the size of the current selection
-    int GetSelectionSize() { return mTreeListCtrl->GetSelectionSize(); } 
-    /// Returns true if there is a valid selection
-    bool IsSelectionValid();
-    /// Returns the vector of full filenames of selected images
-    void GetSelectedFiles(std::vector<std::string>&);
-    /// Returns the vector of images corresponding to selection
-    void GetSelectedImages(std::vector<vtkImageData*>&);
-    /// Returns the vector of DicomNode corresponding to selection
-    void GetSelectedDicomNodes(std::vector<DicomNode*>&);
-    /// Returns the vector of wxTreeItemId corresponding to selection
-    void GetSelectedItems(std::vector<wxTreeItemId>&);
-
-    /// Returns the DicomNode corresponding to the tree item
-    DicomNode* GetDicomNodeOfItem(const wxTreeItemId& i);
-
-    /// Stores the first id of user menu
-    static const int UserMenuFirstId;
-
-    /// The class storing WxGimmick settings
-    typedef WxGimmickSettings Settings;
-    /// Returns the settings (const)
-    const Settings& GetSettings() const { return mSettings; }
-    /// Returns the settings 
-    Settings& GetSettings() { return mSettings; }
-
-
-    /// The type of event sent by WxGimmick
-    typedef WxGimmickEvent EventType;
-
-    /// The type of list of DicomDatabase
-    typedef std::vector<DicomDatabase*> DicomDatabaseListType;
-
-    /// Returns the list of DicomDatabase open
-    DicomDatabaseListType& GetDicomDatabaseList() 
-    { return mDicomDatabaseList; }
-    /// Returns the list of DicomDatabase open (const)
-    const DicomDatabaseListType& GetDicomDatabaseList() const 
-    { return mDicomDatabaseList; }
-    
-    /// Returns the wxTreeListCtrl of the main view
-    wxTreeListCtrl* GetTreeListCtrl() { return mTreeListCtrl; }
-    /// Returns the wxTreeListCtrl of the main view (const)
-    const wxTreeListCtrl* GetTreeListCtrl() const { return mTreeListCtrl; }
-
-    /// 
-    void SetConfigurationFile(const std::string& filename) 
-    { mConfigurationFile = filename;}
-    void LoadConfiguration();
-    void SaveConfiguration();
-    void SetSaveConfigurationOnClose(bool v) 
-    { mSaveConfigurationOnClose = v; }
-    void LoadOrCreateFavoritesDatabase();
-
-
-  protected:
-
-    /// Completely rebuilds the view (i.e. the wxTreeListCtrl) with 
-    /// current DicomDatabaseList
-    void RebuildView();
-    /// Recursively updates the part of the view corresponding 
-    /// to the DicomDatabase passed
-    /// i.e. creates items for the DicomNode which do not have
-    ///      deletes obsolete items (whose DicomNode has been deleted)
-    void UpdateDicomDatabaseView(DicomDatabase*);
-    /// Recursively updates the part of the view corresponding 
-    /// to the DicomNode provided.
-    /// parent is its parent in the tree (where to insert / remove it)
-    void UpdateDicomNodeView(DicomNode* n, const wxTreeItemId& parent);
-    /// Recursively deletes 
-    void DeleteObsoleteChildren(wxTreeItemId& id);
-    /// Create the column titles of the children of the item
-    wxTreeItemId CreateChildrenColumnsTitles(wxTreeItemId& item,
-                                            DicomNode::Type t);
-    /// 
-    void UpdateColumnsTitles(wxTreeItemId& item, DicomNode::Type t);
-    /// 
-    void UpdateColumns(wxTreeItemId& item, bool only_first = false);
-
-
-
-    /// General entry point for 
-    void OpenOrNewDatabase(bool open);
-
-    void InsertDicomDatabase(wxTreeItemId& id, DicomDatabase* r);
-    void DeleteDicomDatabase(wxTreeItemId& id, DicomDatabase* r);
-
-    void LoadChildren( wxTreeItemId& id );
-    friend class WxGimmickEvent;
-
-    void ShowHelp();
-
-  private:
-
-    WxGimmick() { }
-    WxGimmick(const WxGimmick& ) { }
-
-    int mSelectionType;
-    int mSelectionMaxImageDimension;
-    int mCurrentSelectionImageSize[4];
-
-    DicomDatabaseListType mDicomDatabaseList;
-    DicomDatabase* mFavoriteDatabase;
-
-    wxTreeListCtrl* mTreeListCtrl;
-    wxTreeItemId mTreeRootId;
-    wxTreeItemId mCollectionsTitlesItemId;
-
-    std::string mUserSettingsDirectory;
-    void CreateUserSettingsDirectory();
-    const std::string& GetUserSettingsDirectory();
-    wxString mCurrentDirectory;
-    std::string mConfigurationFile;
-    std::string mDatabaseListFile;
-    bool mSaveConfigurationOnClose;
-
-    std::string mDatabaseExtension;
-    const std::string& GetDatabaseExtension() { return mDatabaseExtension; }
-    void SetDatabaseExtension(const std::string& ext) 
-    { mDatabaseExtension = ext; }
-
-
-    /// Settings
-    Settings mSettings;
-
-
-    // Help 
-    WxGimmickHelp* mHelp;
-    bool mJustStarted;
-
-    int  mFirstDicomDatabaseIconIndex;
-    // Id of the item which activated the popup menu 
-    wxTreeItemId mItemOfMenu;
-
-
-    /// Preview related stuff
-
-    wxPanel *mPanelImage;
-
-    WxGimmickFieldsView* mFieldsView;
-
-    wxNotebook* mwxNotebook;
-
-    wxSplitterWindow           *mSplitter1;
-    wxSplitterWindow           *mSplitter2;
-    
-    void ShowImage(vtkImageData* image);
-    void ShowInformation(DicomNode*);
-   // Previewer
-    vtkImageViewer2* mViewer;
-    // Associated wxvtk interactor
-       crea::creawxVTKRenderWindowInteractor  *mInteractor;
-  
-    int mx1,mx2,my1,my2,mz1,mz2;
-    double mspx,mspy,mspz;
-  
-    // Image preview :
-    // Multi-thread image reader
-    MultiThreadImageReader mReader;
-    // map of images name to node
-    std::map<std::string,DicomNode*> mImageFileNameToNode;
-    // Cur image item to show
-    wxTreeItemId mCurImageItemToShow;
-    // type of image event
-    // If the image pointer is non null then the image is available (loaded)
-    // else it has been unloaded
-    struct ImageEventType
-    {
-      ImageEventType( wxTreeItemId it,  vtkImageData* im )
-       : item(it), image(im) {}
-      ImageEventType(vtkImageData* im )
-       : image(im) {}
-      wxTreeItemId item;
-      vtkImageData* image;
-    };
-    // queue of image event 
-    typedef std::deque<ImageEventType> ImageEventQueueType;
-    ImageEventQueueType mImageEventQueue;
-    // Processes the queue of image events 
-    // Called in OnInternalIdle();
-    // (locks the MultiThreadImageReaderEvent mutex)
-    void ProcessImageEvents();
-    // 
-    void OnInternalIdle();
-
-    typedef WxGimmickTreeItemData TreeItemData;
-    TreeItemData* GetItemData(const wxTreeItemId& id)
-    { return (TreeItemData *)mTreeListCtrl->GetItemData(id); }
-
-    typedef WxGimmickDicomNodeData NodeData;
-    
-  public:
-    // Event callbacks
-    //    void OnClose(wxCloseEvent& event);
-    void OnBeginDrag(wxTreeEvent& event);
-    void OnBeginRDrag(wxTreeEvent& event);
-    void OnEndDrag(wxTreeEvent& event);
-    void OnBeginLabelEdit(wxTreeEvent& event);
-    void OnEndLabelEdit(wxTreeEvent& event);
-    void OnDeleteItem(wxTreeEvent& event);
-
-    void OnGetInfo(wxTreeEvent& event);
-    void OnSetInfo(wxTreeEvent& event);
-    void OnItemExpanded(wxTreeEvent& event);
-    void OnItemExpanding(wxTreeEvent& event);
-    void OnItemCollapsed(wxTreeEvent& event);
-    void OnItemCollapsing(wxTreeEvent& event);
-    void OnSelChanged(wxTreeEvent& event);
-    void OnSelChanging(wxTreeEvent& event);
-    bool IsImageSelectable(DicomNode* node);
-    void OnTreeKeyDown(wxTreeEvent& event);
-    void OnItemActivated(wxTreeEvent& event);
-    void OnItemRightClick(wxTreeEvent& event);
-
-    // Pop up menu callbacks
-    void ShowMenu(wxTreeItemId id, const wxPoint& pt);
-    void OnPopUpNewCollection(wxCommandEvent& event);
-    void OnPopUpOpenCollection(wxCommandEvent& event);
-    void OnPopUpCloseCollection(wxCommandEvent& event);
-    void OnPopUpDeleteCollection(wxCommandEvent& event);
-    void OnPopUpAddFile(wxCommandEvent& event);
-    void OnPopUpAddRawFile(wxCommandEvent& event);
-    void OnPopUpAddDirectory(wxCommandEvent& event);
-    void OnPopUpAddToFavorites(wxCommandEvent& event);
-    void OnPopUpRemove(wxCommandEvent& event);
-    void OnPopUpSettings(wxCommandEvent& event);
-    void OnPopUpAbout(wxCommandEvent& event);
-    void OnPopUpUser(wxCommandEvent& event);
-    void OnPopUpSort(wxCommandEvent& event);
-
-    void CreateImageList(int size = 16);
-    void CreateButtonsImageList(int size = 11);
-
-    // Multi-thread image reader callback
-    void OnMultiThreadImageReaderEvent(const std::string& filename,
-                                      MultiThreadImageReaderUser::EventType t,
-                                      vtkImageData* image);
-    /*
-    void DoSortChildren(const wxTreeItemId& item, bool reverse = false)
-        { m_reverseSort = reverse; wxTreeListCtrl::SortChildren(item); }
-    void DoEnsureVisible() { if (m_lastItem.IsOk()) EnsureVisible(m_lastItem); }
-    */
-
-    void DoToggleIcon(const wxTreeItemId& item);
-
-
-    int ImageSize(void) const { return m_imageSize; }
-
-    // void SetLastItem(wxTreeItemId id) { m_lastItem = id; }
-
-protected:
-    //    virtual int OnCompareItems(const wxTreeItemId& i1, const wxTreeItemId& i2);
-
-
-private:
-
-
-    //    void LogEvent(const wxChar *name, const wxTreeEvent& event);
-
-    int          m_imageSize;               // current size of images
-
-    /*
-    bool         m_reverseSort;             // flag for OnCompareItems
-    wxTreeItemId m_lastItem,                // for OnEnsureVisible()
-                 m_draggedItem;             // item being dragged right now
-    */
-    // NB: due to an ugly wxMSW hack you _must_ use DECLARE_DYNAMIC_CLASS()
-    //     if you want your overloaded OnCompareItems() to be called.
-    //     OTOH, if you don't want it you may omit the next line - this will
-    //     make default (alphabetical) sorting much faster under wxMSW.
-    //    DECLARE_DYNAMIC_CLASS(wxTree)
-    DECLARE_EVENT_TABLE()
-};
-  //====================================================================
-
-
-
-
-
-
-
-
- //====================================================================
-class CREAIMAGEIO_EXPORT WxGimmickEvent : public wxNotifyEvent
-{
-public:
-    WxGimmickEvent(wxEventType commandType,
-                                WxGimmick *tree,
-                                const wxTreeItemId &item = wxTreeItemId());
-
-    WxGimmickEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
-    WxGimmickEvent(const WxGimmickEvent& event);
-
-    virtual wxEvent *Clone() const { return new WxGimmickEvent(*this); }
-
-    // accessors
-        // get the item on which the operation was performed or the newly
-        // selected item for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events
-    wxTreeItemId GetItem() const { return m_item; }
-    void SetItem(const wxTreeItemId& item) { m_item = item; }
-
-        // for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events, get the previously
-        // selected item
-    wxTreeItemId GetOldItem() const { return m_itemOld; }
-    void SetOldItem(const wxTreeItemId& item) { m_itemOld = item; }
-
-        // the point where the mouse was when the drag operation started (for
-        // wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only) or click position
-  //  wxPoint GetPoint() const { return m_pointDrag; }
-  //    void SetPoint(const wxPoint& pt) { m_pointDrag = pt; }
-
-        // keyboard data (for wxEVT_COMMAND_TREE_KEY_DOWN only)
-    const wxKeyEvent& GetKeyEvent() const { return m_evtKey; }
-    int GetKeyCode() const { return m_evtKey.GetKeyCode(); }
-    void SetKeyEvent(const wxKeyEvent& evt) { m_evtKey = evt; }
-
-    void  SetDicomNode(DicomNode* n) { mDicomNode = n; }
-    DicomNode* GetDicomNode() { return mDicomNode; }
-
-    wxMenu& GetMenu() { return *m_PopUpMenu; }
-    void SetMenu(wxMenu* m) {  m_PopUpMenu = m; }
-  
-  void SetColor(wxColor& c) { mColor=c; }
-  wxColor& GetColor() { return mColor; }
-
-  void* GetUserData() const { return mUserData; }
-  void SetUserData(void* v) { mUserData = v; }
-
-        // label (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only)
-  //   const wxString& GetLabel() const { return m_label; }
-  //  void SetLabel(const wxString& label) { m_label = label; }
-
-        // edit cancel flag (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only)
-  //    bool IsEditCancelled() const { return m_editCancelled; }
-  //  void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
-
-        // Set the tooltip for the item (for EVT\_TREE\_ITEM\_GETTOOLTIP events)
-  //   void SetToolTip(const wxString& toolTip) { m_label = toolTip; }
-  //  wxString GetToolTip() { return m_label; }
-
-private:
-  // not all of the members are used (or initialized) for all events
-  wxKeyEvent    m_evtKey;
-  wxTreeItemId  m_item,
-                  m_itemOld;
-  wxMenu* m_PopUpMenu;
-  DicomNode* mDicomNode;
-  wxColor mColor;
-  void* mUserData;
-  //    wxPoint       m_pointDrag;
-  //    wxString      m_label;
-  //    bool          m_editCancelled;
-
-  friend class /*WXDLLEXPORT*/ WxGimmick;
-  //    friend class WXDLLEXPORT wxGenericTreeListCtrl;
-
-    DECLARE_DYNAMIC_CLASS(WxGimmickEvent)
-};
- //====================================================================
-
-typedef void (wxEvtHandler::*WxGimmickEventFunction)(WxGimmickEvent&);
-
-// ----------------------------------------------------------------------------
-// tree control events and macros for handling them
-// ----------------------------------------------------------------------------
-
-BEGIN_DECLARE_EVENT_TYPES()
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_BEGIN_DRAG, 600)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_BEGIN_RDRAG, 601)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_BEGIN_LABEL_EDIT, 602)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_END_LABEL_EDIT, 603)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_DELETE_ITEM, 604)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_GET_INFO, 605)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_SET_INFO, 606)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_ITEM_EXPANDED, 607)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_ITEM_EXPANDING, 608)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_ITEM_COLLAPSED, 609)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_ITEM_COLLAPSING, 610)
-    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_SEL_CHANGED, 666611)
-    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_SEL_CHANGING, 666612)
-    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_KEY_DOWN, 666613)
-    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_CONTEXTUAL_MENU, 666614)
-    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEWLIST_ITEM_STYLE_CHANGED, 666615)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_ITEM_ACTIVATED, 614)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_ITEM_RIGHT_CLICK, 615)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_ITEM_MIDDLE_CLICK, 616)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_END_DRAG, 617)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_STATE_IMAGE_CLICK, 618)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_ITEM_GETTOOLTIP, 619)
-//    DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREEVIEW_ITEM_MENU, 620)
-END_DECLARE_EVENT_TYPES()
-
-#define WxGimmickEventHandler(func) \
-    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(WxGimmickEventFunction, &func)
-
-#define wx__DECLARE_TREEVIEWLISTEVT(evt, id, fn) \
-    wx__DECLARE_EVT1(wxEVT_COMMAND_TREEVIEWLIST_ ## evt, id, WxGimmickEventHandler(fn))
-
-// GetItem() returns the item being dragged, GetPoint() the mouse coords
-//
-// if you call event.Allow(), the drag operation will start and a
-// EVT_TREEVIEW_END_DRAG event will be sent when the drag is over.
-//#define EVT_TREEVIEW_BEGIN_DRAG(id, fn) wx__DECLARE_TREEVIEWEVT(BEGIN_DRAG, id, fn)
-//#define EVT_TREEVIEW_BEGIN_RDRAG(id, fn) wx__DECLARE_TREEVIEWEVT(BEGIN_RDRAG, id, fn)
-
-// GetItem() is the item on which the drop occurred (if any) and GetPoint() the
-// current mouse coords
-//#define EVT_TREEVIEW_END_DRAG(id, fn) wx__DECLARE_TREEVIEWEVT(END_DRAG, id, fn)
-
-// GetItem() returns the itme whose label is being edited, GetLabel() returns
-// the current item label for BEGIN and the would be new one for END.
-//
-// Vetoing BEGIN event means that label editing won't happen at all,
-// vetoing END means that the new value is discarded and the old one kept
-//#define EVT_TREEVIEW_BEGIN_LABEL_EDIT(id, fn) wx__DECLARE_TREEVIEWEVT(BEGIN_LABEL_EDIT, id, fn)
-//#define EVT_TREEVIEW_END_LABEL_EDIT(id, fn) wx__DECLARE_TREEVIEWEVT(END_LABEL_EDIT, id, fn)
-
-// provide/update information about GetItem() item
-//#define EVT_TREEVIEW_GET_INFO(id, fn) wx__DECLARE_TREEVIEWEVT(GET_INFO, id, fn)
-//#define EVT_TREEVIEW_SET_INFO(id, fn) wx__DECLARE_TREEVIEWEVT(SET_INFO, id, fn)
-
-// GetItem() is the item being expanded/collapsed, the "ING" versions can use
-//#define EVT_TREEVIEW_ITEM_EXPANDED(id, fn) wx__DECLARE_TREEVIEWEVT(ITEM_EXPANDED, id, fn)
-//#define EVT_TREEVIEW_ITEM_EXPANDING(id, fn) wx__DECLARE_TREEVIEWEVT(ITEM_EXPANDING, id, fn)
-//#define EVT_TREEVIEW_ITEM_COLLAPSED(id, fn) wx__DECLARE_TREEVIEWEVT(ITEM_COLLAPSED, id, fn)
-//#define EVT_TREEVIEW_ITEM_COLLAPSING(id, fn) wx__DECLARE_TREEVIEWEVT(ITEM_COLLAPSING, id, fn)
-
-// GetOldItem() is the item which had the selection previously, GetItem() is
-// the item which acquires selection
-#define EVT_TREEVIEWLIST_SEL_CHANGED(id, fn) wx__DECLARE_TREEVIEWLISTEVT(SEL_CHANGED, id, fn)
-#define EVT_TREEVIEWLIST_SEL_CHANGING(id, fn) wx__DECLARE_TREEVIEWLISTEVT(SEL_CHANGING, id, fn)
-
-// GetKeyCode() returns the key code
-// NB: this is the only message for which GetItem() is invalid (you may get the
-//     item from GetSelection())
-#define EVT_TREEVIEWLIST_KEY_DOWN(id, fn) wx__DECLARE_TREEVIEWLISTEVT(KEY_DOWN, id, fn)
-#define EVT_TREEVIEWLIST_CONTEXTUAL_MENU(id, fn) wx__DECLARE_TREEVIEWLISTEVT(CONTEXTUAL_MENU, id, fn)
-#define EVT_TREEVIEWLIST_ITEM_STYLE_CHANGED(id, fn) wx__DECLARE_TREEVIEWLISTEVT(ITEM_STYLE_CHANGED, id, fn)
-
-// GetItem() returns the item being deleted, the associated data (if any) will
-// be deleted just after the return of this event handler (if any)
-//#define EVT_TREEVIEWLIST_DELETE_ITEM(id, fn) wx__DECLARE_TREEVIEWLISTEVT(DELETE_ITEM, id, fn)
-
-// GetItem() returns the item that was activated (double click, enter, space)
-//#define EVT_TREEVIEWLIST_ITEM_ACTIVATED(id, fn) wx__DECLARE_TREEVIEWLISTEVT(ITEM_ACTIVATED, id, fn)
-
-// GetItem() returns the item for which the context menu shall be shown
-//#define EVT_TREEVIEWLIST_ITEM_MENU(id, fn) wx__DECLARE_TREEVIEWLISTEVT(ITEM_MENU, id, fn)
-
-// GetItem() returns the item that was clicked on
-//#define EVT_TREEVIEWLIST_ITEM_RIGHT_CLICK(id, fn) wx__DECLARE_TREEVIEWLISTEVT(ITEM_RIGHT_CLICK, id, fn)
-//#define EVT_TREEVIEWLIST_ITEM_MIDDLE_CLICK(id, fn) wx__DECLARE_TREEVIEWLISTEVT(ITEM_MIDDLE_CLICK, id, fn)
-
-// GetItem() returns the item whose state image was clicked on
-//#define EVT_TREEVIEWLIST_STATE_IMAGE_CLICK(id, fn) wx__DECLARE_TREEVIEWLISTEVT(STATE_IMAGE_CLICK, id, fn)
-
-// GetItem() is the item for which the tooltip is being requested
-//#define EVT_TREEVIEWLIST_ITEM_GETTOOLTIP(id, fn) wx__DECLARE_TREEVIEWLISTEVT(ITEM_GETTOOLTIP, id, fn)
-
-
-
-
-
-
-  //====================================================================
-  class WxGimmickFrame : public wxFrame
-  {
-  public:
-    WxGimmickFrame( wxWindow *parent, wxString title, wxSize size);
-    ~WxGimmickFrame();
-
-    WxGimmick* GetWxGimmick() { return mWxGimmick; }
-
-    void OnSelChanged(WxGimmickEvent& event);
-
-
-    DECLARE_EVENT_TABLE();
-  private :
-    
-    WxGimmick* mWxGimmick;
-  };
-  //====================================================================
-
-
-  
-} // namespace creaImageIO
-
-
-#endif // #ifndef __creaImageIOWxGimmick_h_INCLUDED__
diff --git a/src/creaImageIOWxGimmickDialog.cpp b/src/creaImageIOWxGimmickDialog.cpp
deleted file mode 100644 (file)
index b8c222d..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-#include <creaImageIOWxGimmickDialog.h>
-#include <creaImageIOImageReader.h>
-
-namespace creaImageIO
-{
-
-  //================================================================
-  WxGimmickDialog::WxGimmickDialog()
-  {
-  }
-  //================================================================
-  
-  //================================================================
-  WxGimmickDialog::WxGimmickDialog(wxWindow *parent, 
-                                  wxWindowID id,
-                                  wxString title,
-                                  const wxPoint& pos,
-                                  const wxSize& size,
-                                  int image_type,
-                                  int threads)
-    :   wxDialog( parent, 
-                 id, 
-                 title,
-                 pos,
-                 size,
-                 wxRESIZE_BORDER | 
-                 wxSYSTEM_MENU  |
-                 wxCLOSE_BOX |
-                 wxMAXIMIZE_BOX | 
-                 wxMINIMIZE_BOX | 
-                 wxCAPTION  
-                 )
-  {
-    wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
-    
-    mView = new ViewType(this,
-                        TVID,
-                        wxDefaultPosition,
-                        size,
-                        image_type,
-                        threads);
-    topsizer->Add( mView,1,wxGROW,0);
-
-    wxSizer* bsizer = CreateSeparatedButtonSizer(wxOK|wxCANCEL);
-    mOkButton = (wxButton*)FindWindowById(GetAffirmativeId(), this);
-    mCancelButton = (wxButton*)FindWindowById(GetEscapeId(), this);
-    
-    mOkButton->Enable(false);
-
-    topsizer->Add ( bsizer, 0, wxGROW );
-
-    SetSizer( topsizer );     
-    Layout(); 
-  
-  }
-  //================================================================
-
-  //================================================================
-  WxGimmickDialog::~WxGimmickDialog()
-  {
-    //   std::cout <<"WxGimmickDialog::~WxGimmickDialog()"<<std::endl;
-  }
-  //================================================================
-
-  //================================================================
-  void WxGimmickDialog::OnSelChanged(EventType& event)
-  {
-    //    std::cout << "++++++++++ WxGimmickDialog::OnSelChanged ++++++++++"
-  
-    if (mView->IsSelectionValid())
-      {
-       mOkButton->Enable(true);
-      }
-    else 
-      {
-       mOkButton->Enable(false);
-      }
-  }
-   //================================================================
-
-
- //================================================================
-  void WxGimmickDialog::OnContextualMenu(EventType& event)
-  {
-    //    std::cout << "++++++++++ WxGimmickDialog::OnContextualMenu ++++++++++"
-    //       <<std::endl;
-    /*
-    event.GetMenu().AppendSeparator();
-    event.GetMenu().Append(ViewType::UserMenuFirstId, 
-                          wxT("&Test user menu"));
-    */
-  }
- //================================================================
-
-  //================================================================
-  void WxGimmickDialog::OnMenuTest(wxCommandEvent& event)
-  {
-    //    std::cout << "++++++++++ WxGimmickDialog::OnMenuTest ++++++++++"
-    //       <<std::endl;
-    wxMessageBox( wxT("WxGimmickDialog : user clicked on 'Test user menu'"),
-                 wxT("Test"),
-                 wxOK | wxICON_INFORMATION, this);
-  }
- //================================================================
-
-  /*
-  //================================================================
-  void WxGimmickDialog::OnButtonOk(wxCommandEvent& event)
-  {
-    std::cout << "++++++++++ WxGimmickDialog::OnButtonOk ++++++++++"
-             << std::endl;
-    EndModal(wxID_OK);
-  }
-  //================================================================
-  
-  
-  //================================================================
-  void WxGimmickDialog::OnButtonCancel(wxCommandEvent& event)
-  {
-    std::cout << "++++++++++ WxGimmickDialog::OnButtonCancel ++++++++++"
-             << std::endl;
-    EndModal(wxID_CANCEL);
-  }
-  //================================================================
-  */
-
- //================================================================
-  BEGIN_EVENT_TABLE(WxGimmickDialog, wxDialog)
-    EVT_TREEVIEWLIST_SEL_CHANGED(TVID,WxGimmickDialog::OnSelChanged)
-    EVT_TREEVIEWLIST_CONTEXTUAL_MENU(TVID,WxGimmickDialog::OnContextualMenu)
-    EVT_MENU(WxGimmickDialog::ViewType::UserMenuFirstId, 
-            WxGimmickDialog::OnMenuTest)
-  //    EVT_BUTTON(OKID, WxGimmickDialog::OnButtonOk )
-  //    EVT_BUTTON(CANCELID, WxGimmickDialog::OnButtonCancel )
-    END_EVENT_TABLE()
- //================================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  //================================================================
-} // namespace creaImageIO
diff --git a/src/creaImageIOWxGimmickDialog.h b/src/creaImageIOWxGimmickDialog.h
deleted file mode 100644 (file)
index aafdc5d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef __creaImageIOWxGimmickDialog_h_INCLUDED__
-#define __creaImageIOWxGimmickDialog_h_INCLUDED__
-
-#include <creaImageIOSystem.h>
-#include <creaImageIOWxGimmick.h>
-
-namespace creaImageIO
-{
-
-
-  //=====================================================================
-  class CREAIMAGEIO_EXPORT WxGimmickDialog : public wxDialog
-  {
-  public:
-    WxGimmickDialog();    
-    WxGimmickDialog(wxWindow *parent, 
-                   const wxWindowID id,
-                   wxString title,
-                   const wxPoint& pos, 
-                   const wxSize& size,
-                   int image_type = GIMMICK_3D_IMAGE_SELECTION,
-                   int threads = 0);
-    
-    typedef WxGimmick ViewType;
-    typedef WxGimmick::EventType EventType;
-
-    ~WxGimmickDialog();
-
-    void GetSelectedImages(std::vector<vtkImageData*>& s)
-    { mView->GetSelectedImages(s); }
-    void GetSelectedFiles(std::vector<std::string>& s) 
-    { mView->GetSelectedFiles(s); }
-    
-    void OnSelChanged(EventType& event);
-    void OnContextualMenu(EventType& event);
-    void OnMenuTest(wxCommandEvent& event);
-    //    void OnButtonOk(wxCommandEvent& event);
-    //    void OnButtonCancel(wxCommandEvent& event);
-
-    DECLARE_EVENT_TABLE();
-  private :
-    
-    ViewType* mView;
-
-    wxButton* mOkButton;
-    wxButton* mCancelButton;
-
-    enum 
-      {
-       TVID = 1
-       //      OKID = 2,
-       //      CANCELID = 3
-      };
-
-  }; // class WxGimmickDialog
-  //=====================================================================
-
-
-} // namespace creaImageIO
-
-
-
-#endif // #ifndef __creaImageIOWxGimmickDialog_h_INCLUDED__
diff --git a/src/creaImageIOWxGimmickFieldsView.cpp b/src/creaImageIOWxGimmickFieldsView.cpp
deleted file mode 100644 (file)
index cef93e4..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-#include <creaImageIOWxGimmickFieldsView.h>
-
-#include <gdcm.h> 
-
-namespace creaImageIO
-{
-
-#define TreeListCtrlId -1
-
-
-
- //================================================================
-  class WxGimmickFieldsViewItemData : public wxTreeItemData
-  {
-  public:
-    WxGimmickFieldsViewItemData(const std::string& key) : 
-      mKey(key)
-    { }
-    const std::string& GetKey() const { return mKey; }
-
-  private:
-    std::string mKey;
-  };
-  //================================================================
-
- //================================================================
-  WxGimmickFieldsView::WxGimmickFieldsView(wxWindow *parent, 
-                                                  wxWindowID id,
-                                                  const wxPoint& pos,
-                                                  const wxSize& size,
-                                                  long style)
-    : wxPanel(parent,id,pos,size)
-   {
-    wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
-
-    style = //wxTR_DEFAULT_STYLE
-      wxTR_HIDE_ROOT 
-      | wxTR_HAS_BUTTONS 
-      //      | wxTR_NO_LINES
-      | wxTR_FULL_ROW_HIGHLIGHT
-      //| wxTR_SINGLE 
-      //      | wxTR_LINES_AT_ROOT 
-      ;
-
-   /*
-    style = style 
-      //      | wxTR_EDIT_LABELS       //Use this style if you wish the user to be able to edit labels in the tree list control.
-      //wxTR_NO_BUTTONS        For convenience to document that no buttons are to be drawn.
-      | wxTR_HAS_BUTTONS       //Use this style to show + and - buttons to the left of parent items.
-      | wxTR_TWIST_BUTTONS     //Use this style to show Mac-style twister buttons to the left of parent items. If both wxTR_HAS_BUTTONS and wxTR_TWIST_BUTTONS are given, twister buttons are generated.
-      //wxTR_NO_LINES  Use this style to hide vertical level connectors.
-      | wxTR_FULL_ROW_HIGHLIGHT        //Use this style to have the background colour and the selection highlight extend over the entire horizontal row of the tree list control window. (This flag is ignored under Windows unless you specify wxTR_NO_LINES as well.)
-      | wxTR_LINES_AT_ROOT     //Use this style to show lines between root nodes. Only applicable if wxTR_HIDE_ROOT is set and wxTR_NO_LINES is not set.
-      | wxTR_HIDE_ROOT         //Use this style to suppress the display of the root node, effectively causing the first-level nodes to appear as a series of root nodes.
-      //   wxTR_ROW_LINES //   Use this style to draw a contrasting border between displayed rows.
-      //      xTR_HAS_VARIABLE_ROW_HEIGHT//    Use this style to cause row heights to be just big enough to fit the content. If not set, all rows use the largest row height. The default is that this flag is unset.
-      &  !wxTR_SINGLE //       For convenience to document that only one item may be selected at a time. Selecting another item causes the current selection, if any, to be deselected. This is the default.
-      & !wxTR_MULTIPLE //      Use this style to allow a range of items to be selected. If a second range is selected, the current range, if any, is deselected.
-      &   ! wxTR_EXTENDED //   Use this style to allow disjoint items to be selected. (Only partially implemented; may not work in all cases.)
-      //wxTR_DEFAULT_STYLE     The set of flags that are closest to the defaults for the native control for a particular toolkit.
-      //| wxTR_VIRTUAL //The application provides items text on demand.
-      */
-      /*
-     | wxTR_HIDE_ROOT
-      | wxTR_HAS_BUTTONS
-      | wxTR_TWIST_BUTTONS
-      //      | wxTR_NO_LINES
-      | wxTR_LINES_AT_ROOT
-      | wxTR_EDIT_LABELS
-      //      | wxTR_ROW_LINES
-      | wxTR_FULL_ROW_HIGHLIGHT  
-      | wxTR_MULTIPLE
-      | wxTR_EXTENDED
-      */
-      ;
-    mTreeListCtrl = new wxTreeListCtrl(this,
-                                      TreeListCtrlId,
-                                      wxDefaultPosition,
-                                      wxDefaultSize,style);
-
-    mTreeListCtrl->AddColumn (_T("Field"),200,wxALIGN_LEFT,-1,true,false);
-    mTreeListCtrl->AddColumn (_T("Value"),400,wxALIGN_LEFT,-1,true,false);
-    mTreeListCtrl->AddColumn (_T("Tag"),100,wxALIGN_LEFT,-1,true,false);
-    mTreeListCtrl->AddColumn (_T("VR"),40,wxALIGN_LEFT,-1,true,false);
-
-    mTreeListCtrl->SetMainColumn (0);
-    
-    mRootId = mTreeListCtrl->AddRoot( _T(""));
-    
-    mItemId[DicomNode::Database] = mTreeListCtrl->AppendItem( mRootId,
-                                                             _T("Collection"));
-    mItemId[DicomNode::Patient] = mTreeListCtrl->AppendItem( mRootId,
-                                                            _T("Patient"));
-    mItemId[DicomNode::Study] = mTreeListCtrl->AppendItem( mRootId,
-                                                          _T("Study"));
-    mItemId[DicomNode::Series] = mTreeListCtrl->AppendItem( mRootId,
-                                                           _T("Series"));
-    mItemId[DicomNode::Image] = mTreeListCtrl->AppendItem(mRootId,
-                                                         _T("Image"));
-    
-    
-    //    CreateImageList();
-    //    CreateButtonsImageList();
-   //    mTreeListCtrl->SetBackgroundColour(*wxWHITE);
-    //    mTreeListCtrl->SetSpacingY(0);
-    sizer->Add(mTreeListCtrl,1,wxGROW);
-    
-    SetSizer(sizer);
-    SetAutoLayout(true);
-    Layout();
-
-  }
- //================================================================
-    
- //================================================================
-  WxGimmickFieldsView::~WxGimmickFieldsView()
-  {
-  }
- //================================================================
-
-
- //================================================================
-  void WxGimmickFieldsView::UpdateFields(DicomDatabase* db)
-  {
-
-    for (int i=DicomNode::Database; 
-        i<DicomNode::Image+1;i++)
-      {
-       DicomNodeTypeDescription::FieldDescriptionMapType::iterator j;
-       for (j  = db->GetDicomNodeTypeDescription(i).GetFieldDescriptionMap().begin();
-            j != db->GetDicomNodeTypeDescription(i).GetFieldDescriptionMap().end();
-            j++)
-         {
-           
-           Field::Description& desc = j->second;
-           // Skip DB fields
-           if (desc.GetFlags() & 1) continue;
-           
-           WxGimmickFieldsViewItemData* data = 
-             new WxGimmickFieldsViewItemData(desc.GetKey());
-           wxTreeItemId item = mTreeListCtrl->AppendItem
-             ( mItemId[i], crea::std2wx( desc.GetName() ), 0, 0, data );
-           //      mTreeListCtrl->SetItemFont(item,0,*wxITALIC_FONT);
-    
-           
-           if ( ( desc.GetGroup()!=0 ) || ( desc.GetElement()!=0) ) 
-             {
-               std::string groupelem = 
-                 GDCM_NAME_SPACE::Util::Format("%04x | %04x" , 
-                                               desc.GetGroup() , 
-                                               desc.GetElement());
-               mTreeListCtrl->SetItemText(item,2,crea::std2wx(groupelem));
-             }
-           
-         }  
-      }  
-    /*
-      mTreeListCtrl->SetItemTextColour(mTreeRootId,
-                                    mSettings.RootColour());
-                                    mTreeListCtrl->SetItemBackgroundColour(mTreeRootId,
-                                    mSettings.RootBgColour());
-    */
-    mTreeListCtrl->ExpandAll(mRootId);
-    //    mTreeListCtrl->CollapseAll();
-  }
-  //================================================================
-
-  //================================================================
-   void WxGimmickFieldsView::UpdateValues(DicomNode* node)
-   {
-     //     std::cout << "WxGimmickFieldsView::UpdateValues "<<node->GetLabel()<<std::endl;
-     // Fill the values for each level until top of the node hierarchy
-     DicomNode* n = node;
-     do
-       {
-        wxTreeItemIdValue cookie;
-        wxTreeItemId i;
-        for (i = mTreeListCtrl->GetFirstChild(mItemId[n->GetType()],cookie);
-             i.IsOk();
-             i = mTreeListCtrl->GetNextChild(mItemId[n->GetType()],cookie))
-          {
-            const std::string& key = 
-              ((WxGimmickFieldsViewItemData *)(mTreeListCtrl->GetItemData(i)))->GetKey();;
-            wxString v(crea::std2wx(n->GetFieldValueMap()[key]));
-            mTreeListCtrl->SetItemText(i,1,v);
-          }
-        n = n->GetParent();
-       }
-     while (n != 0);
-     
-     // Reset N/A items (below the node level)
-     for (int t=node->GetType()+1;
-         t<DicomNode::Image+1;t++)
-       {
-        wxTreeItemIdValue cookie;
-        wxTreeItemId i;
-        for (i = mTreeListCtrl->GetFirstChild(mItemId[t],cookie);
-             i.IsOk();
-             i = mTreeListCtrl->GetNextChild(mItemId[t],cookie))
-          {
-            mTreeListCtrl->SetItemText(i,1,_T(""));
-          } 
-       }
-     //
-
-   }
-  //================================================================
-
-  //================================================================
-   void WxGimmickFieldsView::SetColors( const wxColour& DatabaseColour,
-                                         const wxColour& DatabaseBgColour,
-                                         const wxColour& PatientColour,
-                                         const wxColour& PatientBgColour,
-                                         const wxColour& StudyColour,
-                                         const wxColour& StudyBgColour,
-                                         const wxColour& SeriesColour,
-                                         const wxColour& SeriesBgColour,
-                                         const wxColour& ImageColour,
-                                         const wxColour& ImageBgColour)
-   {
-     mTreeListCtrl->SetItemTextColour(mItemId[DicomNode::Database],
-                                     DatabaseColour);
-     mTreeListCtrl->SetItemBackgroundColour(mItemId[DicomNode::Database],
-                                           DatabaseBgColour);
-     mTreeListCtrl->SetItemTextColour(mItemId[DicomNode::Patient],
-                                     PatientColour);
-     mTreeListCtrl->SetItemBackgroundColour(mItemId[DicomNode::Patient],
-                                           PatientBgColour);
-     mTreeListCtrl->SetItemTextColour(mItemId[DicomNode::Study],
-                                     StudyColour);
-     mTreeListCtrl->SetItemBackgroundColour(mItemId[DicomNode::Study],
-                                           StudyBgColour);
-     mTreeListCtrl->SetItemTextColour(mItemId[DicomNode::Series],
-                                     SeriesColour);
-     mTreeListCtrl->SetItemBackgroundColour(mItemId[DicomNode::Series],
-                                           SeriesBgColour);
-     mTreeListCtrl->SetItemTextColour(mItemId[DicomNode::Image],
-                                     ImageColour);
-     mTreeListCtrl->SetItemBackgroundColour(mItemId[DicomNode::Image],
-                                           ImageBgColour);
-   }
- //================================================================
-
-
-
-
-}
diff --git a/src/creaImageIOWxGimmickFieldsView.h b/src/creaImageIOWxGimmickFieldsView.h
deleted file mode 100644 (file)
index 7c03365..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef __creaImageIOWxGimmickFieldsView_h_INCLUDED__
-#define __creaImageIOWxGimmickFieldsView_h_INCLUDED__
-
-#include <creaImageIODicomDatabase.h>
-
-#include <creaWx.h>
-
-#include "wx/image.h"
-#include "wx/imaglist.h"
-#include "treelistctrl.h"
-
-namespace creaImageIO
-{
-
-  //====================================================================
-  class WxGimmickFieldsView : public wxPanel
-  {
-  public:
-    WxGimmickFieldsView() { }
-    WxGimmickFieldsView(wxWindow *parent, const wxWindowID id,
-                           const wxPoint& pos, const wxSize& size,
-                           long style);
-    virtual ~WxGimmickFieldsView();
-
-    void UpdateFields(DicomDatabase* db);
-    void UpdateValues(DicomNode* node);
-    void SetColors( const wxColour& DatabaseColour,
-                   const wxColour& DatabaseBgColour,
-                   const wxColour& PatientColour,
-                   const wxColour& PatientBgColour,
-                   const wxColour& StudyColour,
-                   const wxColour& StudyBgColour,
-                   const wxColour& SeriesColour,
-                   const wxColour& SeriesBgColour,
-                   const wxColour& ImageColour,
-                   const wxColour& ImageBgColour);
-
-  private:
-
-    wxTreeListCtrl* mTreeListCtrl;
-    wxTreeItemId mRootId;
-    wxTreeItemId mItemId[5];
-
-
-  };
-  //====================================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-} // namespace creaImageIO
-
-
-#endif // #ifndef __creaImageIOWxGimmickFieldsView_h_INCLUDED__
diff --git a/src/creaImageIOWxGimmickSettings.cpp b/src/creaImageIOWxGimmickSettings.cpp
deleted file mode 100644 (file)
index 683ec5e..0000000
+++ /dev/null
@@ -1,343 +0,0 @@
-#include <creaImageIOWxGimmickSettings.h>
-
-
-namespace creaImageIO
-{
- //================================================================
-  WxGimmickSettings::WxGimmickSettings()
-    :
-    mMergeStudySeries(false)
-    
-  {
-    // Defaults colours 
-    mColour[DicomNode::Database] = wxColour(0,0,128);
-    mBgColour[DicomNode::Database] = wxColour(230,230,255);
-
-    mColour[DicomNode::Patient] = wxColour(255,0,0);
-    mBgColour[DicomNode::Patient] = wxColour(255,200,200);
-
-    mColour[DicomNode::Study] = wxColour(128,128,0);
-    mBgColour[DicomNode::Study] = wxColour(220,255,220);
-
-
-    mColour[DicomNode::Series] = wxColour(0,0,255);
-    mBgColour[DicomNode::Series] = wxColour(200,255,255);
-
-    mColour[DicomNode::Image] = wxColour(64,64,0);
-    mBgColour[DicomNode::Image] = wxColour(255,255,200);
-
-    mLoadedImageColour = wxColour(128,128,0);
-
-
-    // Default columns 
-    // Database
-    GetColumnList(DicomNode::Database).push_back(Column("Name","Collection"));
-    GetColumnList(DicomNode::Database).push_back(Column("File name","File name"));
-    // Patient
-    GetColumnList(DicomNode::Patient).push_back(Column("A0010_0010","Patient's name"));
-    GetColumnList(DicomNode::Patient).push_back(Column("A0010_0040","Sex"));
-    GetColumnList(DicomNode::Patient).push_back(Column("A0010_0030","Birthday"));
-    
-    // Study
-    GetColumnList(DicomNode::Study).push_back(Column("A0008_1030","Study Description"));
-    GetColumnList(DicomNode::Study).push_back(Column("A0008_0020","Study Date"));
-    GetColumnList(DicomNode::Study).push_back(Column("A0008_0030","Study Time"));
-    GetColumnList(DicomNode::Study).push_back(Column("A0008_0005","Specific Character Set"));
-
-    // Series
-    GetColumnList(DicomNode::Series).push_back(Column("A0008_0060","Modality"));
-    GetColumnList(DicomNode::Series).push_back(Column("A0008_103E","Description"));
-    GetColumnList(DicomNode::Series).push_back(Column("A0018_1030","Protocol Name"));
-    GetColumnList(DicomNode::Series).push_back(Column("A0008_0080","Institution Name"));
-    GetColumnList(DicomNode::Series).push_back(Column("A0008_1010","Station Name"));
-
-    // Image
-    GetColumnList(DicomNode::Image).push_back(Column("A0004_1500","File name"));
-    GetColumnList(DicomNode::Image).push_back(Column("A0020_0013","Image Number"));
-    GetColumnList(DicomNode::Image).push_back(Column("A0020_1041","Slice Location"));
-    GetColumnList(DicomNode::Image).push_back(Column("A0020_0032","Image Position Patient"));
-    GetColumnList(DicomNode::Image).push_back(Column("A0020_0037","Image Orientation Patient"));
-    GetColumnList(DicomNode::Image).push_back(Column("A0028_0010","Rows"));
-    GetColumnList(DicomNode::Image).push_back(Column("A0028_0011","Columns"));
-    
-
-    // Default comparators
-    LexicographicalDicomNodeComparator c("");
-
-    SetActiveComparatorIndex(DicomNode::Database,-1);
-
-    // Patient
-    c.SetName("Name");
-    c.Clear();
-    c.Add( new DicomNodePatientNameComparator );
-    GetComparatorsList(DicomNode::Patient).push_back(c);
-
-    c.SetName("Sex");
-    c.Clear();
-    c.Add( new DicomNodePatientSexComparator );
-    GetComparatorsList(DicomNode::Patient).push_back(c);
-
-    c.SetName("Birthday");
-    c.Clear();
-    c.Add( new DicomNodePatientBirthdayComparator );
-    GetComparatorsList(DicomNode::Patient).push_back(c);
-
-    SetActiveComparatorIndex(DicomNode::Patient,0);
-
-    // Study
-    c.SetName("Description");
-    c.Clear();
-    c.Add( new DicomNodeStudyDescriptionComparator );
-    GetComparatorsList(DicomNode::Study).push_back(c);
-
-    c.SetName("Date");
-    c.Clear();
-    c.Add( new DicomNodeStudyDateComparator );
-    GetComparatorsList(DicomNode::Study).push_back(c);
-
-    SetActiveComparatorIndex(DicomNode::Study,0);
-
-    // Series
-    c.SetName("Modality");
-    c.Clear();
-    c.Add( new DicomNodeModalityComparator );
-    GetComparatorsList(DicomNode::Series).push_back(c);
-
-    c.SetName("Description");
-    c.Clear();
-    c.Add( new DicomNodeSeriesDescriptionComparator );
-    GetComparatorsList(DicomNode::Series).push_back(c);
-
-    c.SetName("Date");
-    c.Clear();
-    c.Add( new DicomNodeSeriesDateComparator );
-    GetComparatorsList(DicomNode::Series).push_back(c);
-
-    SetActiveComparatorIndex(DicomNode::Series,0);
-
-    // Image    
-    c.SetName("Ascending slice location");
-    c.Clear();
-    c.Add( new DicomNodeSliceLocationComparator );
-    c.Add( new DicomNodeFullFileNameComparator );
-    GetComparatorsList(DicomNode::Image).push_back(c);
-    
-    c.SetName("Descending slice location");
-    c.Clear();
-    c.Add( new DicomNodeSliceLocationComparator(true) );
-    c.Add( new DicomNodeFullFileNameComparator );
-    GetComparatorsList(DicomNode::Image).push_back(c);
-
-
-    c.SetName("Ascending image number");
-    c.Clear();
-    c.Add( new DicomNodeImageNumberComparator );
-    c.Add( new DicomNodeFullFileNameComparator );
-    GetComparatorsList(DicomNode::Image).push_back(c);
-
-    c.SetName("Descending image number");
-    c.Clear();
-    c.Add( new DicomNodeImageNumberComparator(true) );
-    c.Add( new DicomNodeFullFileNameComparator );
-    GetComparatorsList(DicomNode::Image).push_back(c);
-
-    SetActiveComparatorIndex(DicomNode::Image,0);
-
-  }
-  //====================================================================
-
-  //====================================================================
-  WxGimmickSettings::~WxGimmickSettings()
-  {
-    for (int i=0;i<DicomNode::Image+1;++i) 
-      {
-       ComparatorsList::iterator c;
-       for (c =GetComparatorsList(i).begin();
-            c!=GetComparatorsList(i).end();
-            ++c)
-         {
-           c->DeleteComparators();
-         }
-      }
-  }
-  //====================================================================
-
-  //====================================================================
-  int  WxGimmickSettings::GetMaxNumberOfColumns()
-  {
-    unsigned int n = 0;
-    for (int i=0; i<5; i++)
-      {
-       if ( mColumnList[i].size() > n)  n = mColumnList[i].size();
-      }
-    if (mMergeStudySeries)
-      {
-       unsigned int ss =  mColumnList[DicomNode::Study].size() + 
-         mColumnList[DicomNode::Series].size() ;
-       if (ss>n) n=ss;
-      }
-    return n;
-  }
-  //====================================================================
-
-
-
-  //================================================================
-  //================================================================
-  //================================================================
-  //================================================================
-
-  //================================================================
-  WxGimmickSettingsDialog::WxGimmickSettingsDialog(wxWindow *parent,
-                                                  WxGimmickSettings* settings)
-    : 
-    wxDialog( parent, 
-             -1, 
-             _T("Settings"),
-             wxDefaultPosition,
-             wxSize(400,400),
-             wxRESIZE_BORDER | 
-             wxSYSTEM_MENU  |
-             wxCLOSE_BOX |
-             wxMAXIMIZE_BOX | 
-             wxMINIMIZE_BOX | 
-             wxCAPTION  
-             ),
-    mSettings(settings)
-  {
-    wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
-    
-    
-
-    wxSizer* bsizer = CreateSeparatedButtonSizer(wxOK|wxCANCEL);
-    mOkButton = (wxButton*)FindWindowById(GetAffirmativeId(), this);
-    mCancelButton = (wxButton*)FindWindowById(GetEscapeId(), this);
-    
-    sizer->Add ( bsizer, 0, wxGROW );
-
-    SetSizer( sizer );     
-    Layout(); 
-  } 
-  //================================================================
-    
-  //================================================================
-  WxGimmickSettingsDialog::~WxGimmickSettingsDialog()
-  {
-  }
-  //================================================================
-
-    
-  //================================================================
-  //================================================================
-  //================================================================
-  //================================================================
-
-  //================================================================
-  WxGimmickHelp::WxGimmickHelp(wxWindow *parent)
-    : 
-    wxPanel( parent, -1)
-                             /*
-             -1, 
-             _T("Gimmick! Help"),
-             wxDefaultPosition,
-             wxSize(600,500),
-             
-             
-             //wxDEFAULT_FRAME_STYLE | 
-             //wxFRAME_FLOAT_ON_PARENT 
-             
-            
-             wxBORDER_SIMPLE
-             // wxRESIZE_BORDER | 
-             //wxSYSTEM_MENU  |
-             //wxCLOSE_BOX |
-             //              wxMAXIMIZE_BOX | 
-             //wxMINIMIZE_BOX | 
-             //wxCAPTION 
-             
-
-             )
-                             */
-  {
-    //    SetBackgroundColour(*wxBLUE);
-
-    wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
-    
-    mText = new wxTextCtrl(this,
-                          -1, //ID_InputText,
-                          _T(""),
-                          wxDefaultPosition,
-                          wxDefaultSize,
-                          wxTE_READONLY |
-                          wxTE_MULTILINE 
-                          //    |wxTE_PROCESS_ENTER
-                          //| wxTE_PROCESS_TAB 
-                          //               | wxWANTS_CHARS 
-                          // |  wxTAB_TRAVERSAL
-                          );
-   
-    wxFont* FixedFont = new wxFont(10,
-                                   wxFONTFAMILY_MODERN,
-                                   wxFONTSTYLE_NORMAL,
-                                   wxFONTWEIGHT_NORMAL,
-                                   false);
-    
-    //    wxTextAttr mwxInputTextAttr;
-    //    mwxInputTextAttr.SetFont(*FixedFont);
-    //    mwxInputTextAttr.SetBackgroundColour(*wxBLUE);
-    //    mwxInputTextAttr.SetTextColour(*wxWHITE);
-    //    mText->SetDefaultStyle(mwxInputTextAttr);
-    //    mText->SetBackgroundColour(*wxBLUE);
-
-    std::string tip("\n");
-    tip += "           Welcome to Gimmick !\n";
-    tip += "    ( Give me my medical images quick ! )\n\n\n";
-    tip += "  To start you must create a 'Collection' :\n";
-    tip += "     1) Right click on 'Collection'\n";
-    tip += "     2) Select 'New collection'\n";
-    tip += "     3) Enter the collection file name and the collection name\n\n";
-    tip += "  To add images to your collection :\n";
-    tip += "     1) Right click on your collection\n";
-    tip += "     2) Select 'Add image(s) to collection'\n";
-    tip += "     3) Select :\n";
-    tip += "        * 'Scan Directory' to add all images of a directory or\n";
-    tip += "        * 'Select File(s)' to add only some selected images\n";
-    tip += "     4) Select the directory or the files to add\n";
-    tip += "\n\n";
-    tip += "  Remember then that *ALL ACTIONS* in Gimmick!\n";
-    tip += "  are done by right clicking on the DICOM tree elements\n";
-    tip += "\n";
-    tip += "                                Enjoy!\n";
-
-    mText->AppendText(crea::std2wx(tip));
-
-
-    sizer->Add(mText,1,wxGROW);
-    /*
-    wxSizer* bsizer = CreateSeparatedButtonSizer(wxOK);
-    mOkButton = (wxButton*)FindWindowById(GetAffirmativeId(), this);
-    
-    sizer->Add ( bsizer, 0, wxGROW );
-    */
-
-    SetSizer(sizer);
-    SetAutoLayout(true);
-    Layout();
-    
-    
-    
-  } 
-  //================================================================
-    
-  //================================================================
-  WxGimmickHelp::~WxGimmickHelp()
-  {
-  }
-  //================================================================
-
-
-
-
-
-}
diff --git a/src/creaImageIOWxGimmickSettings.h b/src/creaImageIOWxGimmickSettings.h
deleted file mode 100644 (file)
index 19b970e..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#ifndef __creaImageIOWxGimmickSettings_h_INCLUDED__
-#define __creaImageIOWxGimmickSettings_h_INCLUDED__
-
-#include <creaWx.h>
-#include <vector>
-#include <string>
-
-#include <creaImageIODicomNode.h>
-
-namespace creaImageIO
-{
-
-  
-  //================================================================
-  class WxGimmickSettings
-  {
-  public : 
-    WxGimmickSettings();
-    ~WxGimmickSettings();
-    void Load(const std::string& filename);
-    void Save(const std::string& filename);
-
-    // Colours
-    wxColour& Colour(DicomNode::Type t) { return mColour[t]; }
-    wxColour& BgColour(DicomNode::Type t) { return mBgColour[t]; }
-    wxColour& LoadedImageColour() { return mLoadedImageColour; }
-    
-    // Columns
-    struct Column
-    {
-      Column(const std::string& key, const std::string& name) 
-       : Key(key), Name(name) {}
-      std::string Key;
-      std::string Name;
-    };
-    typedef std::vector<Column> ColumnListType;
-
-    ColumnListType& GetColumnList(DicomNode::Type t) { return mColumnList[t];}
-    int GetMaxNumberOfColumns();
-
-    // Merge study and series levels
-    bool MergeStudySeries() { return mMergeStudySeries; }
-
-    // Sorting criteria
-    typedef std::vector<LexicographicalDicomNodeComparator> ComparatorsList;
-    const ComparatorsList& GetComparatorsList(DicomNode::Type t) const
-    { return mComparatorsList[t]; }
-    ComparatorsList& GetComparatorsList(DicomNode::Type t) 
-    { return mComparatorsList[t]; }
-    
-    bool HasActiveComparator(DicomNode::Type t) 
-    {
-      return (mActiveComparator[t]>=0);
-    }
-    const LexicographicalDicomNodeComparator& GetActiveComparator(DicomNode::Type t) const 
-    { 
-      return mComparatorsList[t][mActiveComparator[t]];
-    }
-    void SetActiveComparatorIndex(DicomNode::Type t, int n) 
-    { 
-      mActiveComparator[t] = n;
-    }
-    int GetActiveComparatorIndex(DicomNode::Type t) const
-    { 
-      return mActiveComparator[t];
-    }
-     
-
-  protected:
-    wxColour mColour[5];
-    wxColour mBgColour[5];
-    wxColour mLoadedImageColour;
-
-    ColumnListType mColumnList[5]; 
-
-    bool mMergeStudySeries;
-
-    ComparatorsList mComparatorsList[5];
-    int mActiveComparator[5];
-  };
-  //================================================================
-
-
-
-  //================================================================
-  class WxGimmickSettingsDialog : public wxDialog
-  {
-  public:
-    WxGimmickSettingsDialog(wxWindow *parent,WxGimmickSettings* settings);
-    ~WxGimmickSettingsDialog();
-    
-    WxGimmickSettings* mSettings;
-    wxButton* mOkButton;
-    wxButton* mCancelButton;
-  
-  };
-  //================================================================
-
-
-  //================================================================
-  class WxGimmickHelp : public wxPanel
-  {
-  public:
-    WxGimmickHelp(wxWindow *parent);
-    ~WxGimmickHelp();
-    
-    wxTextCtrl* mText;
-    wxButton* mOkButton;
-  };
-  //================================================================
-
-
-} // namespace creaImageIO
-
-
-#endif // #ifndef __creaImageIOWxGimmickSettings_h_INCLUDED__
-
diff --git a/src/doxygen/CMakeLists.txt b/src/doxygen/CMakeLists.txt
deleted file mode 100644 (file)
index 3d7c06b..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-MACRO(CREA_BUILD_DOXYGEN_DOC NAME INPUT DOC_RELATIVE_INSTALL_PATH PREDEFINED)
-
-  #--------------------------------------------------------------------------
-  SET(USE_DOXYGEN ON CACHE BOOL "" FORCE)
-  
-  # Name
-  SET(DOXYGEN_PROJECT_NAME "${NAME}")
-
-  # Inputs
-  STRING(REGEX REPLACE ";" " " DOXYGEN_INPUT "${INPUT}")
-
-  # Output dirs
-  SET(DOXYGEN_HTML_OUTPUT ".")
-  SET(DOXYGEN_OUTPUT ${PROJECT_BINARY_DIR}/${DOC_RELATIVE_INSTALL_PATH})
-  IF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
-    FILE(MAKE_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
-  ENDIF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
-
-  # Doc exclude
-  SET(DOXYGEN_EXCLUDE "")
-  STRING(REGEX REPLACE ";" " " DOXYGEN_EXCLUDE "${DOXYGEN_EXCLUDE}")
-
-  # Log file name 
-  SET(DOXYGEN_LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/doxygen.log")
-
-  # Predefined symbols
-  STRING(REGEX REPLACE ";" " " DOXYGEN_DOC_PREDEFINED "${PREDEFINED}")
-  
-  #---------------------------------------------------------------------------
-  # DOT verification
-  IF(DOT)
-    GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH ${DOT} PATH)
-    SET(DOXYGEN_HAVE_DOT "YES")
-  ELSE(DOT)
-    SET(DOXYGEN_DOT_PATH "")
-    SET(DOXYGEN_HAVE_DOT "NO")
-  ENDIF(DOT)
-  
-  #---------------------------------------------------------------------------
-  # Create file and project
-  CONFIGURE_FILE(
-    ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.txt.in
-    ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
-    @ONLY IMMEDIATE
-    )
-  
-  ADD_CUSTOM_COMMAND(
-    OUTPUT ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html
-    COMMAND 
-    ${DOXYGEN}
-    ARGS
-    ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
-    #  DEPENDS bbtk bbi 
-    )
-  
-  ADD_CUSTOM_TARGET(doxygen_${NAME} ALL
-    DEPENDS  ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html
-    )
-  
-#  INSTALL(
-#    DIRECTORY
-#    ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}
-#    DESTINATION
-#    ${BBTK_DOXYGEN_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH}
-#    )
-  #--------------------------------------------------------------------------
-
-ENDMACRO(CREA_BUILD_DOXYGEN_DOC)
-
-
-
-#CONFIGURE_FILE(
-#  ${CMAKE_CURRENT_SOURCE_DIR}/CodingStyle.html
-#  ${CMAKE_CURRENT_BINARY_DIR}/CodingStyle.html
-#  IMMEDIATE
-#  )
-CONFIGURE_FILE(
-  ${CMAKE_CURRENT_SOURCE_DIR}/DoxyMainPage.txt.in
-  ${CMAKE_CURRENT_BINARY_DIR}/DoxyMainPage.txt
-  @ONLY IMMEDIATE
-  )
-
-SET(INPUT 
-  ${CMAKE_CURRENT_BINARY_DIR}/DoxyMainPage.txt
-  ${PROJECT_SOURCE_DIR}/src
-#  ${PROJECT_SOURCE_DIR}/appli
-  )
-
-CREA_BUILD_DOXYGEN_DOC(
-  ${CMAKE_PROJECT_NAME}_lib
-  "${INPUT}" 
-  "doxygen" 
-  "${DOXYGEN_DOC_PREDEFINED}"
-  )
-
diff --git a/src/doxygen/CodingStyle.html b/src/doxygen/CodingStyle.html
deleted file mode 100644 (file)
index 57758d7..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-   <meta http-equiv="Content-Type"
-   content="text/html;charset=iso-8859-1"><title>bbtk Developpers</title></head>
-
-<body>
-
-<!--#######################################################################-->
-<h1>bbtk coding style (and other religious/agnostic beliefs)</h1>
-<hr size="1"><address style=""></address>
-
-<pre>* Introduction:
-   The following coding style intends to ease the work of developpers
-   themselves but also of users who will study, maintain, fix, and extend
-   the code. Any bread crumbs that you can drop in the way of explanatory
-   names and comments will go a long way towards helping other readers and
-   developers.
-   Keep in mind that to a large extent the structure of code directly
-   expresses its implementation.
-                                                                                
-* Language:
- - C++ (for the kernel) and Python (for the wrappers).
- - all the names (variables, members, methods, functions) and comments
-   should be based on English. Documentation, guides, web site and other
-   informations should be in English.
-   Make sure you use correct (basic) English and complete, grammatically
-   correct sentences for comments and documentation.
-                                                                                
-* General layout:
- - Each line of code should take no more than 79 characters. Break the code
-   across multiple lines as necessary.
- - Methods and functions should keep a reasonable number of lines when
-   possible (a typical editor displays 50 lines). Avoid code duplication.
-   Always prefer creating a new method or function to duplication.
-   A high indentation level generally suggests the need for a new
-   method or function.
- - All the code should be properly indented. The appropriate indentation
-   level is TWO spaces for each level of indentation. DO NOT USE TABS.
-   Set up your editor to insert spaces. Using tabs may look good in your
-   editor but will wreak havoc in others, or in external tools (e.g. side
-   by side diffs).
- - The declaration of variables within classes, methods, and functions
-   should be one declaration per line. Provide them with default values
-   and don't rely on compilers for default initialization.
-                                                                                
-* Naming conventions:
- - Generalities:
-   In general, names are constructed by using case change to indicate
-   separate words, as in ImageDataSize (standing for "image data size").
-   Underscores are not used. Variable names are choosen carefully with the
-   intention to convey the meaning behind the code. Names are generally
-   spelled out; use of abbreviations is discouraged.
-   [Note: abbreviation are allowable when in common use, and should be in
-    uppercase as in LUT or RGBA.]
-   While this does result in long names, it self-documents the code.
- - Naming Files:
-   Files should have the same name as the class, with a "bbtk" prepended.
-   Header files are named .h, while implementation files are named either
-   .cxx or .txx, depending on whether they are implementations of templated
-   classes. For example, the class bbtk::BlackBox is declared and defined
-   in the files bbtkBlackBox.h and bbtkBlackBox.cxx.
- - Naming Class Data Members, Methods, and Functions:
-   Class data members (aka Attributes) are named beginning with a lower case 'm'
-   (m as 'member'!) followed by capital letter as in mGroupPixel, in order not
-   be confused with methods names.
-   Global functions and class methods, either static or class members, are
-   named beginning with a capital letter, as in GetImageDataSize().
- - Naming Local Variables:
-   Local variables begin in lowercase. There is more flexibility in the
-   naming of local variables although they still should convey some
-   semantics.
- - Naming function parameters:
-   Function parameters begin in lowercase. There is more flexibility in the
-   naming of function parameters although they still should convey some
-   semantics.
-                                                                                 
-* Classes:
- - Don't use the inline keyword when defining an inline function
-   within a class definition.
-   (Any method defined within a .h file is ipso facto considered as 'inline'.
-   Dont write useless stuff!)
- - As stated in the "Naming conventions" section, class data members
-   named beginning with a lower case 'm' followed by capital letter 
-   as in mGroupPixel.
-   But the parameter names of method should be named with a lowercase
-   letter (in order to distinguish at a glance data members, from parameters
-   and also to avoid potential collisions with data members):
-      void A::SetGroupPixel( int groupPixel )
-      {
-         mGroupPixel = groupPixel;
-      }
- - Don't use trailing ';' in inline function definition.
-   use :
-   void A::SetGroupPixel( int groupPixel ){mGroupPixel = groupPixel;}
-     NOT
-   void A::SetGroupPixel( int groupPixel ){mGroupPixel = groupPixel;};
- - Do not repeat the 'virtual' keyword when overriding virtual base methods
-   in declaration of subclasses:
-     class A
-     {
-        virtual void foo(...);
-     };
-     class B : public bbtk::A
-     {
-        void foo(...);          // and NOT: virtual void foo(...);
-     };
-     
-    (when the keyword 'virtual' is used at the parent level, it's propagated 
-     for all the child classes)
-
- - In declaration of subclasses, always preprend the class name with 'bbtk::'
-   in order not to confuse Umbrello ( OpenSource UML diagram generator)
-     class A
-     {
-        ...
-     };
-     class B : public bbtk::A // and NOT: class B: public A
-     {
-        ...   
-     };    
- - The public, protected, private declarations should be at the
-   same indent level as the class. Use :
-     class A
-     {
-     public:
-        void bar(...);
-     protected:
-        void foo(...); 
-     private:
-        void pff(...);
-     };
-     
- - The Data members should be declared at the end of the class declaration :
-     class A
-     {
-     public:
-        void bar(...);
-     protected:
-        void foo(...);
-     private:
-        void pff(...);
-
-     // --- Data members
-     
-     public:
-        int mPublicCounter;
-     protected:
-        int mProtectedCounter;
-     private:
-        int mPrivateCounter;     
-     }; 
- - Method and functions devoided of arguments should not use the void
-   notation. Use :
-     SomeType Header::GetPixelData()
-   and not
-     SomeType Header::GetPixelData(void)
-                                                                                
-* Use of braces:
- - Braces must be used to delimit the scope of an if, for, while, switch, or
-   other control structure. Braces are placed on a line by themselves, and
-   at the same indentation level as the control structure to which they
-   belong:
-      for (i=0; * i&lt;3; i++)
-      {
-         ...
-      }
-   and NOT :
-      for (i=0; * i&lt;3; i++) {
-         ...
-      }   
-   or when using an if:
-      if ( condition )
-      {
-         ...
-      }
-      else if ( other condition )
-      {
-         ...
-      }
-      else
-      {
-        ....
-      }
-    and NOT :
-      if ( condition ) {
-         ...
-      } else if ( other condition ) {
-         ...
-      } else {
-         ....
-      }    
-   You can choose to use braces on a line with a code block when
-   the block consists of a single line:
-      if ( condition ) { foo=1; }
-      else if ( condition2 ) { foo=3; }
-      else { return; }
-   or
-      for (i=0; i&lt;3; ++i) {x[i]=0.0;}
-   Methods and functions should follow the same usage of braces:
-      void File::ParsePixelData()
-      {
-         ...
-      }
-
-* Special layout:
- - Avoid code mixed with comments on a single line. Instead, prepend the
-   logical blocks of code with the concerned comments.
- - Use parentheses around conditions e.g. with an if statement:
-      if ( someLocalVariable == 2 ) { ... }
- - Add spaces around parentheses, or braces. Use
-      if ( someLocalVariable == 2 ) { mClassMember += 1; }
-   and not
-      if (someLocalVariable == 2) {mClassMember += 1;}
- - Add spaces around each side of the assignement operator, and
-   around binary operators used in boolean expression. Use
-      someLocalVariable = mClassMember * 2;
-      if ( someLocalVariable == 2 || mClassMember == 2 ) ...
-   and not
-      someLocalVariable=mClassMember*2;
-      if ( someLocalVariable==2||mClassMember==2 ) ...
-                                                                                
-* Miscelaneous:
- - Don't use underscores. Don't use tabs. Don't use control characters
-   like ^M. Anyhow, cvs is configured to reject such commits.
- - Comments should be in C++ style ("// ...", two slashes, per line). Don't
-   use C style comments ("/* ... */").
- - The last line of a file should terminate with "\n".
- - Returned arguments of methods and functions should not be wrapped with
-   parentheses. Use
-      return iter-&gt;second;
-   but do not use
-      return ( iter-&gt;second );
-                                                                                
-* Debugging and Verbose modes:
-   Never use std::cout. Instead use the bbtkMessage, bbtkDebugMessage, bbtkWarning or bbtkError macros and their variants. Example:
-      #include "bbtkMessageManager.h"
-      ...
-      {
-         bbtkDebugMessageInc("MyClass",9,"Local function name: entering.");
-         ...
-         bbtkDecTab("MyClass",9);
-      }
-    will send the message to std::cout when the Debug messages are compiled 
-    and the Message Level for the category of messages "MyClass" is greater than 9.
-                                                                                
-* Documentation:
-   The Doxygen open-source system is used to generate on-line documentation.
-   Doxygen requires the embedding of simple comments in the code which is in
-   turn extracted and formatted into documentation. See :
-      http://www.stack.nl/~dimitri/doxygen/
-   for more information about Doxygen.
- - Documenting a class:
-   Classes should be documented using the class and brief doxygen commands,
-   followed by the detailed class description:
-      /**
-       * \class Header
-       * \brief Header acts as container of Dicom elements of an image.
-       *
-       * Detailed description of the class is provided here
-       * ...
-       */
-   The key here is that the comment starts with /**, each subsequent line has
-   an aligned *, and the comment block terminates with a */.
- - Documenting class members and inline methods:
-   All the members and the inline methods should be documented within
-   the class declaration ( .h file) as shown in the following example:
-      class Header
-      {
-         /// True when parsing was successfull. False otherwise.
-         bool mReadable = false;
-                                                                                
-         /// \brief The number of lines of the image as interpreted from
-         ///        the various elements encountered at header parsing.
-         int mNumberOfLines = -1;
-                                                                                
-         /// Predicate implemented as accessor around \ref mReadable.
-         bool IsReadable() { return mReadable; }
-      };
- - Documenting a Method:
-   Methods should be documented using the following comment block style
-   as shown in the following example:
-                                                                                
-      /**
-       * \brief  Within the Dicom Elements (parsed with the public and private
-       *         dictionaries), look for the element value representation of
-       *         a given tag.
-       * @param  group  Group number of the searched tag.
-       * @param  elem Element number of the searched tag.
-       * @return Corresponding element value representation when it exists,
-       *         and the string "bbtk::Unfound" otherwise.
-       */
-      std::string Document::GetEntryByNumber(guint16 group, guint16 elem)
-      {
-         ...
-      }
-                                                                                
-* External includes and C style:
- - Only the C++ standard library and the STL includes should be used.
-   When including don't use the .h extension (use #include <iostream>
-   instead of #include <iostream.h>).
-   Note: include the stl header AFTER the bbtk ones (otherwise pragma
-         warnings won't work).
- - Don't use the C standard library. Don't include stdio.h, ctype.h...
-   Don't use printf(), sprinf(), FILE*...
- - Don't use the NULL notation (neither as macro, nor as const int NULL=0).
-   A pointer that doesn't refer to an object should simply be defined as
-      DataPointer *myDataPointer = 0;
-                                                                                
-* Basic types:
- - Assume T is a given type. When declaring or defining with the
-   "pointer to T" notation, the * character must be adjacent to
-   the variable and not the type. That is use
-      T *foo = 0;
-   and not
-      T* foo = 0;
-   nor
-      T * foo = 0;
- - Assume T is a given type. When declaring or defining with the
-   "reference to T" notation, the &amp; character must be adjacent to
-   the variable and not the type. That is use :
-      T &amp;foo = 0;
-   and not
-      T&amp; foo = 0;
-
-   (Doxygen will not have any longer to correct)
-
- - Always define a typedef for a new type and be consistent in usage.
-   Use :
-      typedef Header *HeaderPointer;
-      HeaderPointer myHeaderPointer;
-      
- - One notorious counter example for non using C style inclusion concerns
-   exact-width integers (since there seem to be no equivalent for C++).
-   When using exact-width integers use the typedef names defined by
-   the Basic ISO C99: 7.18 Integer types i.e.
-      int8_t     int16_t     int32_t     int64_t (signed integers)
-   and
-      uint8_t    uint16_t    uint32_t    uint64_t (unsigned integers).
-   Conversion table is then:
-    unsigned char       -&gt; uint8_t;
-    unsigned short      -&gt; uint16_t;
-    unsigned int        -&gt; uint32_t;
-    unsigned long       -&gt; uint32_t;
-    unsigned long long  -&gt; uint64_t;
-    (signed) char       -&gt; int8_t;
-    short               -&gt; int16_t;
-    int                 -&gt; int32_t;
-    long                -&gt; int32_t;
-    long long           -&gt; int64_t;
-   Hence do not use declarations like "unsigned int".
-   With g++, accessing those typedef is achieved by the following
-      #include &lt; stdint.h &gt;
-</iostream.h></iostream></pre>
-
-
-<!--#######################################################################-->
-<hr size="1"><address style=""></address>
-
-</body></html>
diff --git a/src/doxygen/DoxyMainPage.txt.in b/src/doxygen/DoxyMainPage.txt.in
deleted file mode 100644 (file)
index b52ee6f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * \mainpage creaImageIO documentation
-
-\htmlonly 
-
-
-\endhtmlonly
-
-
-
-
-         
- */
diff --git a/src/doxygen/Doxyfile.txt.in b/src/doxygen/Doxyfile.txt.in
deleted file mode 100644 (file)
index 44afa2a..0000000
+++ /dev/null
@@ -1,1358 +0,0 @@
-# Doxyfile 1.5.5
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file 
-# that follow. The default is UTF-8 which is also the encoding used for all 
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
-# iconv built into libc) for the transcoding. See 
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = @DOXYGEN_PROJECT_NAME@
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = @PROJECT_VERSION@
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = @DOXYGEN_OUTPUT@
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, 
-# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), 
-# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, 
-# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, 
-# and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like regular Qt-style comments 
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
-# interpret the first line (until the first dot) of a Qt-style 
-# comment as the brief description. If set to NO, the comments 
-# will behave just like regular Qt-style comments (thus requiring 
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = 
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Java. For instance, namespaces will be presented as packages, qualified 
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
-# sources. Doxygen will then generate output that is tailored for 
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
-# to include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
-# Doxygen will parse them like normal C++ but will assume all classes use public 
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
-# is documented as struct, union, or enum with the name of the typedef. So 
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
-# with name TypeT. When disabled the typedef will appear as a member of a file, 
-# namespace, or class. And the struct will be named TypeS. This can typically 
-# be useful for C code in case the coding convention dictates that all compound 
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = YES
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be 
-# extracted and appear in the documentation as a namespace called 
-# 'anonymous_namespace{file}', where file will be replaced with the base 
-# name of the file that contains the anonymous namespace. By default 
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
-# hierarchy of group names into alphabetical order. If set to NO (the default) 
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from 
-# the version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = @DOXYGEN_LOGFILE@
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = @DOXYGEN_INPUT@
-
-# This tag can be used to specify the character encoding of the source files 
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
-# also the default input encoding. Doxygen uses libiconv (or the iconv built 
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS          = *.h \
-                         *.cxx \
-                         *.txx
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                = @DOXYGEN_EXCLUDE@
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = 
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the 
-# output. The symbol name can be a fully qualified name, a word, or if the 
-# wildcard * is used, a substring. Examples: ANamespace, AClass, 
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = *.cxx
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = 
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = 
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = YES
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 3
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = @DOXYGEN_HTML_OUTPUT@
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = 
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = 
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = 
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files 
-# will be generated that can be used as input for Apple's Xcode 3 
-# integrated development environment, introduced with OSX 10.5 (Leopard). 
-# To create a documentation set, doxygen will generate a Makefile in the 
-# HTML output directory. Running make will produce the docset in that 
-# directory and running "make install" will install the docset in 
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
-# it at startup.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
-# feed. A documentation feed provides an umbrella under which multiple 
-# documentation sets from a single provider (such as a company or product suite) 
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
-# should uniquely identify the documentation set bundle. This should be a 
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
-# documentation will contain sections that can be hidden and shown after the 
-# page has loaded. For this to work a browser that supports 
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = @DOXYGEN_DOC_PREDEFINED@
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see 
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
-# the mscgen tool resides. If left empty the tool is assumed to be found in the 
-# default search path.
-
-MSCGEN_PATH            = 
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = @DOXYGEN_HAVE_DOT@
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
-# doxygen will generate a call dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable call graphs 
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = YES
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
-# doxygen will generate a caller dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable caller 
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = YES
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = "@DOXYGEN_DOT_PATH@"
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen if the 
-# number of direct children of the root node in a graph is already larger than 
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes 
-# that lay further from the root node will be omitted. Note that setting this 
-# option to 1 or 2 may greatly reduce the computation time needed for large 
-# code bases. Also note that the size of a graph can be further restricted by 
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is enabled by default, which results in a transparent 
-# background. Warning: Depending on the platform used, enabling this option 
-# may lead to badly anti-aliased labels on the edges of a graph (i.e. they 
-# become hard to read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/src/icons/database.xpm b/src/icons/database.xpm
deleted file mode 100644 (file)
index 8dc871e..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-/* XPM */
-static const char * database_xpm[] = {
-"48 48 293 2",
-"      c None",
-".     c #9E9FA2",
-"+     c #9C9DA0",
-"@     c #9A9B9E",
-"#     c #999A9D",
-"$     c #97989B",
-"%     c #959699",
-"&     c #939497",
-"*     c #919295",
-"=     c #909194",
-"-     c #8E8F92",
-";     c #8C8D90",
-">     c #8A8B8E",
-",     c #88898C",
-"'     c #87888B",
-")     c #A4A5A8",
-"!     c #A2A3A6",
-"~     c #A0A1A4",
-"{     c #9B9C9F",
-"]     c #949598",
-"^     c #929396",
-"/     c #8B8C8F",
-"(     c #898A8D",
-"_     c #858689",
-":     c #838487",
-"<     c #818285",
-"[     c #A9AAAD",
-"}     c #A8A9AC",
-"|     c #A6A7AA",
-"1     c #A1A2A5",
-"2     c #9FA0A3",
-"3     c #9D9EA1",
-"4     c #96979A",
-"5     c #808184",
-"6     c #7E7F82",
-"7     c #7C7D80",
-"8     c #ADAEB1",
-"9     c #ACADB0",
-"0     c #AAABAE",
-"a     c #B7B8BB",
-"b     c #BDBEC1",
-"c     c #C8C9CB",
-"d     c #CECFD1",
-"e     c #D5D6D8",
-"f     c #D4D5D7",
-"g     c #D4D4D6",
-"h     c #D3D3D5",
-"i     c #C9CACC",
-"j     c #C0C0C2",
-"k     c #B2B3B5",
-"l     c #A8A9AA",
-"m     c #959598",
-"n     c #7A7B7E",
-"o     c #78797C",
-"p     c #ABACAF",
-"q     c #ABACAE",
-"r     c #D2D2D5",
-"s     c #DFE0E2",
-"t     c #E8E8E9",
-"u     c #ECEDEE",
-"v     c #EFEFF0",
-"w     c #F3F3F4",
-"x     c #F0F1F2",
-"y     c #EEEEF0",
-"z     c #ECECEE",
-"A     c #E6E7E9",
-"B     c #E2E2E4",
-"C     c #DDDDDF",
-"D     c #D7D8DA",
-"E     c #D2D2D3",
-"F     c #C5C5C5",
-"G     c #76777A",
-"H     c #C1C2C4",
-"I     c #DBDBDE",
-"J     c #E8E9EA",
-"K     c #F6F6F7",
-"L     c #FBFBFB",
-"M     c #F9FAFA",
-"N     c #F8F8F9",
-"O     c #F4F4F5",
-"P     c #F2F2F3",
-"Q     c #F0F0F1",
-"R     c #EDEEEF",
-"S     c #EBECED",
-"T     c #E9E9EB",
-"U     c #E7E7E9",
-"V     c #E4E5E7",
-"W     c #E2E3E5",
-"X     c #E0E1E3",
-"Y     c #DBDCDF",
-"Z     c #D4D5D6",
-"`     c #CECECE",
-" .    c #ACACAE",
-"..    c #86878A",
-"+.    c #7B7C7F",
-"@.    c #757679",
-"#.    c #A5A6A9",
-"$.    c #A7A8AB",
-"%.    c #AFB0B3",
-"&.    c #D2D2D4",
-"*.    c #E4E5E6",
-"=.    c #F2F3F3",
-"-.    c #F5F6F6",
-";.    c #E6E6E7",
-">.    c #DFE0E1",
-",.    c #DADBDD",
-"'.    c #D5D5D7",
-").    c #D2D3D4",
-"!.    c #D1D1D2",
-"~.    c #D0D0D1",
-"{.    c #D1D2D3",
-"].    c #D3D4D4",
-"^.    c #D4D5D5",
-"/.    c #D6D7D8",
-"(.    c #D7D8DB",
-"_.    c #DADBDE",
-":.    c #C9C9CA",
-"<.    c #929395",
-"[.    c #737477",
-"}.    c #ACADAF",
-"|.    c #EFF0F1",
-"1.    c #F1F1F3",
-"2.    c #EEEEEF",
-"3.    c #E3E3E4",
-"4.    c #D8D9DA",
-"5.    c #D3D4D5",
-"6.    c #CFD0D0",
-"7.    c #CFCFCF",
-"8.    c #CECECF",
-"9.    c #CDCDCE",
-"0.    c #CDCDCD",
-"a.    c #CCCCCC",
-"b.    c #D6D7D9",
-"c.    c #CBCBCC",
-"d.    c #747578",
-"e.    c #727376",
-"f.    c #A3A4A7",
-"g.    c #C0C1C3",
-"h.    c #DFDFE0",
-"i.    c #EAEBEC",
-"j.    c #E0E0E2",
-"k.    c #D3D3D4",
-"l.    c #D0D1D2",
-"m.    c #CFCFD0",
-"n.    c #D4D4D5",
-"o.    c #B6B7B8",
-"p.    c #7D7E81",
-"q.    c #E6E7E8",
-"r.    c #D7D8D9",
-"s.    c #CECFCF",
-"t.    c #D7D7D8",
-"u.    c #D9D9DA",
-"v.    c #D6D6D7",
-"w.    c #7F8083",
-"x.    c #CDCECE",
-"y.    c #CCCDCD",
-"z.    c #D0D0D0",
-"A.    c #D4D4D4",
-"B.    c #DDDEDF",
-"C.    c #BCBDC0",
-"D.    c #D5D6D7",
-"E.    c #DEDFE1",
-"F.    c #CFD0D1",
-"G.    c #CECFD0",
-"H.    c #D1D1D1",
-"I.    c #D8D8D9",
-"J.    c #DDDDDE",
-"K.    c #E1E1E2",
-"L.    c #DEDFE0",
-"M.    c #D8D9D9",
-"N.    c #C3C4C6",
-"O.    c #717275",
-"P.    c #A4A6AB",
-"Q.    c #CACACC",
-"R.    c #D8D8DB",
-"S.    c #D0D1D1",
-"T.    c #D2D2D2",
-"U.    c #D5D5D5",
-"V.    c #D7D8D8",
-"W.    c #DBDBDB",
-"X.    c #DEDFDF",
-"Y.    c #E2E2E3",
-"Z.    c #E5E5E7",
-"`.    c #E2E3E3",
-" +    c #DCDCDD",
-".+    c #AAACB2",
-"++    c #797A7D",
-"@+    c #9D9FA6",
-"#+    c #A8A9AF",
-"$+    c #CCCCCD",
-"%+    c #D5D5D6",
-"&+    c #D7D7D7",
-"*+    c #D8D8D8",
-"=+    c #D9DADA",
-"-+    c #DBDCDC",
-";+    c #DEDEDE",
-">+    c #E1E1E1",
-",+    c #E4E4E4",
-"'+    c #E9E9E9",
-")+    c #E7E7E8",
-"!+    c #E3E4E4",
-"~+    c #AFB0B5",
-"{+    c #A0A2A8",
-"]+    c #707174",
-"^+    c #9C9EA5",
-"/+    c #9EA0A7",
-"(+    c #A4A6AC",
-"_+    c #D9DADB",
-":+    c #DBDBDC",
-"<+    c #E0E1E1",
-"[+    c #E5E5E5",
-"}+    c #E8E8E8",
-"|+    c #EAEAEA",
-"1+    c #E6E6E6",
-"2+    c #DADADB",
-"3+    c #C5C5C8",
-"4+    c #A8AAB0",
-"5+    c #A0A1A8",
-"6+    c #98999C",
-"7+    c #A0A2A9",
-"8+    c #AAABB1",
-"9+    c #CDCDCF",
-"0+    c #DADBDB",
-"a+    c #E0E1E2",
-"b+    c #E3E3E3",
-"c+    c #E4E4E5",
-"d+    c #DFDFDF",
-"e+    c #AEAFB5",
-"f+    c #A2A4AB",
-"g+    c #9D9EA4",
-"h+    c #A3A5AB",
-"i+    c #BBBCC0",
-"j+    c #C2C3C6",
-"k+    c #CCCCCE",
-"l+    c #D9D9D9",
-"m+    c #C7C8CA",
-"n+    c #C0C1C4",
-"o+    c #B2B3B8",
-"p+    c #A5A7AE",
-"q+    c #A1A3AA",
-"r+    c #96979C",
-"s+    c #B6B7BA",
-"t+    c #9FA1A8",
-"u+    c #A5A7AD",
-"v+    c #ACADB3",
-"w+    c #ADAEB4",
-"x+    c #ADAFB5",
-"y+    c #ACAEB3",
-"z+    c #A7A9AF",
-"A+    c #B1B2B5",
-"B+    c #A1A3A9",
-"C+    c #CBCCCE",
-"D+    c #B6B8BC",
-"E+    c #B9BABE",
-"F+    c #D9D9DC",
-"G+    c #8F9093",
-"H+    c #B6B7BB",
-"I+    c #A2A4AA",
-"J+    c #A4A5AC",
-"K+    c #BDBEC2",
-"L+    c #D9D9DB",
-"M+    c #77787B",
-"N+    c #8D8E91",
-"O+    c #C7C8C9",
-"P+    c #B9BBBE",
-"Q+    c #B3B4B8",
-"R+    c #A9ABB0",
-"S+    c #AAACB1",
-"T+    c #C0C0C3",
-"U+    c #97999F",
-"V+    c #94959B",
-"W+    c #B0B1B3",
-"X+    c #D2D3D5",
-"Y+    c #CCCCCF",
-"Z+    c #E1E2E5",
-"`+    c #BCBEC2",
-" @    c #E1E2E4",
-".@    c #DDDEE1",
-"+@    c #BFC0C3",
-"@@    c #8E9095",
-"#@    c #8B8D93",
-"$@    c #9A9BA2",
-"%@    c #999BA2",
-"&@    c #75767A",
-"*@    c #7B7D80",
-"=@    c #78797D",
-"-@    c #747679",
-";@    c #898B90",
-">@    c #898A8F",
-",@    c #86878C",
-"'@    c #96989F",
-")@    c #838589",
-"!@    c #919399",
-"                                                                                                ",
-"                                  . + @ # $ % & * = - ; > , '                                   ",
-"                            ) ! ~ . + { # $ % ] ^ = - ; / ( ' _ : <                             ",
-"                      [ } | ) ! 1 2 3 { # $ 4 ] ^ = - ; / ( ' _ : < 5 6 7                       ",
-"                  8 9 0 } | ) ! 1 0 a b c d e f g h i j k l m _ : < 5 6 7 n o                   ",
-"                0 p p [ } | q b r s t u v w w x y z A B C D E F l > 5 6 7 n o G                 ",
-"              } [ 0 [ } 0 H I J K L M N K O P Q R S T U V W X Y Z `  ...6 +.o G @.              ",
-"            #.$.$.} } %.&.*.=.-.K K K v ;.>.,.'.).E !.~.{.].^./.(._.Z :.<.6 o G @.[.            ",
-"            ) #.| | }.&.U |.x 1.2.3.4.g 5.h ).&.{.!.~.6.7.8.9.0.a.7.f b.c.- n G d.e.            ",
-"            f.f.) ) g.h.i.S u j.'.h k.).&.E {.!.l.~.m.7.` 9.0.a.0.7.E n.5.o.p.G d.e.            ",
-"            1 ! ! f.~.V A q.r.{.{.{.{.!.!.l.~.~.m.7.8.` 0.a.a.0.s.E t.u.v.!.w.G d.e.            ",
-"            ~ ~ 1 1 m.X W 4.~.~.~.~.~.~.6.m.m.s.8.x.0.y.a.0.` z.A.u.B.C 4.E w.@.[.e.            ",
-"            . 2 2 2 C.D.E.l.F.6.6.6.G.8.` ` x.0.0.0.0.` m.H.A.I.J.K.B L.M.N.p.@.[.O.            ",
-"            + 3 3 3 P.Q.R.!.S.!.!.H.S.~.z.m.m.z.H.T.k.U.V.W.X.Y.Z.;.`. +k..+++d.[.O.            ",
-"            { { + + @+#+$+S.!.).5.n.^.%+%+v.&+*+=+-+;+>+,+;.t '+)+!+J.n.~+{+G d.e.]+            ",
-"            # @ @ @ ^+/+(+b ~.E g /.I._+:+J.X.<+Y.[+;.}+|+|+'+1+>+2+3+4+5+@+@.[.e.]+            ",
-"            $ 6+6+6+^+^+@+7+8+C.9+].v.M.0+J.h.a+b+,+c+[+[+b+d+v.N.e+f+/+^+^+d.[.O.]+            ",
-"            4 4 4 $ g+^+^+^+/+7+h+e+i+j+k+{.&+I.l+u.%+~.m+n+o+p+q+/+@+^+^+r+G e.]+]+            ",
-"            ] ] % % s+7+^+^+^+^+@+t+f+u+4+.+v+w+x+x+y+.+z+(+7+@+^+^+^+^+t+A+o O.]+]+            ",
-"            ^ & & & ~.(.B+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+{+C+!.n O.]+]+            ",
-"            * * * * m.X E.D+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+E+F+4.E ++]+]+]+            ",
-"            G+G+G+= C.D.E.l.i H+I+^+^+^+^+^+^+^+^+^+^+^+^+^+^+J+K+L+B L.M.N.M+]+]+]+            ",
-"            N+N+- - P.Q.R.!.S.!.!.O+P+Q+R+I+^+^+^+^+h+S+H+T+).Y.Z.;.`. +k..+[.]+]+]+            ",
-"            ; ; ; ; @+#+$+S.!.).5.n.^.%+%+v.&+*+=+-+;+>+,+;.t '+)+!+J.n.~+{+]+]+]+]+            ",
-"            > > > > ^+/+(+b ~.E g /.I._+:+J.X.<+Y.[+;.}+|+|+'+1+>+2+3+4+5+@+]+]+]+]+            ",
-"            , , , , ^+^+@+7+8+C.9+].v.M.0+J.h.a+b+,+c+[+[+b+d+v.N.e+f+/+^+^+]+]+]+]+            ",
-"            ....' ' U+^+^+^+/+7+h+e+i+j+k+{.&+I.l+u.%+~.m+n+o+p+q+/+@+^+^+V+e.]+]+]+            ",
-"            _ _ _ _ A+5+^+^+^+^+@+t+f+u+4+.+v+w+x+x+y+.+z+(+7+@+^+^+^+^+t+W+@.]+]+]+            ",
-"            : : : : ~.X+B+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+{+Y+!.o ]+]+]+            ",
-"            < < < < m.*.Z+`+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+E+F+4.E o ]+]+]+            ",
-"            5 5 5 5 C.X  @D i H+I+^+^+^+^+^+^+^+^+^+^+^+^+^+^+J+K+L+B L.M.N.G ]+]+]+            ",
-"            6 6 6 6 P.g .@!.S.!.!.O+P+Q+R+I+^+^+^+^+h+S+H+T+).Y.Z.;.`. +k..+[.]+]+]+            ",
-"            7 7 7 7 @+#+(.S.!.).5.n.^.%+%+v.&+*+=+-+;+>+,+;.t '+)+!+J.n.~+{+]+]+]+]+            ",
-"            n +.+.+.^+/+(++@~.E g /.I._+:+J.X.<+Y.[+;.}+|+|+'+1+>+2+3+4+5+@+]+]+]+]+            ",
-"            ++++++++^+^+@+7+8+C.9+].v.M.0+J.h.a+b+,+c+[+[+b+d+v.N.e+f+/+^+^+]+]+]+]+            ",
-"            M+M+M+M+@@^+^+^+/+7+h+e+i+j+k+{.&+I.l+u.%+~.m+n+o+p+q+/+@+^+^+#@]+]+]+]+            ",
-"            @.@.@.@.n $@^+^+^+^+@+t+f+u+4+.+v+w+x+x+y+.+z+(+7+@+^+^+^+^+%@&@]+]+]+]+            ",
-"            [.[.d.d.d.*@%@^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+%@=@]+]+]+]+]+            ",
-"            e.e.e.e.e.e.-@;@^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+^+>@[.]+]+]+]+]+]+            ",
-"              ]+]+]+]+]+]+]+&@,@'@^+^+^+^+^+^+^+^+^+^+^+^+^+^+'@,@&@]+]+]+]+]+]+]+              ",
-"                ]+]+]+]+]+]+]+]+]+=@)@>@!@'@^+^+^+^+'@!@>@)@=@]+]+]+]+]+]+]+]+]+                ",
-"                  ]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+                  ",
-"                    ]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+                    ",
-"                        ]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+                        ",
-"                            ]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+]+                            ",
-"                                    ]+]+]+]+]+]+]+]+]+]+]+]+                                    ",
-"                                                                                                ",
-"                                                                                                "};
diff --git a/src/icons/dicomdir.xpm b/src/icons/dicomdir.xpm
deleted file mode 100644 (file)
index 036df73..0000000
+++ /dev/null
@@ -1,776 +0,0 @@
-/* XPM */
-static const char * dicomdir_xpm[] = {
-"48 48 725 2",
-"      c None",
-".     c #B48400",
-"+     c #B28200",
-"@     c #B08000",
-"#     c #AE7F00",
-"$     c #AC7D00",
-"%     c #A97B00",
-"&     c #A77900",
-"*     c #A57700",
-"=     c #A37500",
-"-     c #A17300",
-";     c #9F7200",
-">     c #BF8E00",
-",     c #BD8C00",
-"'     c #BB8A00",
-")     c #B98800",
-"!     c #B78600",
-"~     c #B08100",
-"{     c #A37600",
-"]     c #A17400",
-"^     c #9D7000",
-"/     c #9B6E00",
-"(     c #C89500",
-"_     c #C59300",
-":     c #C39100",
-"<     c #C19000",
-"[     c #B48500",
-"}     c #BC9210",
-"|     c #BE9515",
-"1     c #BC9213",
-"2     c #BA9012",
-"3     c #B88E11",
-"4     c #B68C10",
-"5     c #B48A0F",
-"6     c #A77A03",
-"7     c #986C00",
-"8     c #966A00",
-"9     c #CC9900",
-"0     c #CA9700",
-"a     c #C69400",
-"b     c #C49200",
-"c     c #C5980E",
-"d     c #D0AC28",
-"e     c #D8B93B",
-"f     c #E0C74C",
-"g     c #E9D55C",
-"h     c #EBD85E",
-"i     c #EAD55A",
-"j     c #E8D256",
-"k     c #E7CF52",
-"l     c #E5CC4D",
-"m     c #E4C948",
-"n     c #E2C643",
-"o     c #E1C340",
-"p     c #DFBF3B",
-"q     c #D9B832",
-"r     c #AB800A",
-"s     c #9D7101",
-"t     c #946800",
-"u     c #CB9800",
-"v     c #CB9D0E",
-"w     c #D8B633",
-"x     c #E9D55D",
-"y     c #F1E572",
-"z     c #F1E370",
-"A     c #F4E98A",
-"B     c #F6EE9D",
-"C     c #F8F0A9",
-"D     c #FAF6BB",
-"E     c #FAF5B8",
-"F     c #FEFCCA",
-"G     c #FFFFCE",
-"H     c #FFFFCB",
-"I     c #FFFFC7",
-"J     c #FFFFC4",
-"K     c #FAF4A8",
-"L     c #F8F09E",
-"M     c #E9D362",
-"N     c #D9B732",
-"O     c #A97F0A",
-"P     c #926700",
-"Q     c #C79500",
-"R     c #C89600",
-"S     c #C99600",
-"T     c #CB9B07",
-"U     c #E0C444",
-"V     c #F4E979",
-"W     c #F5EB81",
-"X     c #F8F1A4",
-"Y     c #FBF8C6",
-"Z     c #FFFFE6",
-"`     c #FFFFE3",
-" .    c #FFFFE0",
-"..    c #FFFFDD",
-"+.    c #FFFFD9",
-"@.    c #FFFFD6",
-"#.    c #FFFFD3",
-"$.    c #FFFFCF",
-"%.    c #FFFFCC",
-"&.    c #FFFFC8",
-"*.    c #FFFFC5",
-"=.    c #FFFFC1",
-"-.    c #FFFFBE",
-";.    c #FFFFBB",
-">.    c #EDDB70",
-",.    c #B58C13",
-"'.    c #906500",
-").    c #CB9A07",
-"!.    c #ECDB64",
-"~.    c #F6ED85",
-"{.    c #FBF6BA",
-"].    c #FEFEEA",
-"^.    c #FFFFEF",
-"/.    c #FFFFEB",
-"(.    c #FFFFE8",
-"_.    c #FFFFE5",
-":.    c #FFFFE1",
-"<.    c #FBF8C2",
-"[.    c #F8F1A9",
-"}.    c #F5EB97",
-"|.    c #F1E27D",
-"1.    c #EFE078",
-"2.    c #E6CE51",
-"3.    c #E5CC4C",
-"4.    c #E4C949",
-"5.    c #E2C744",
-"6.    c #E7CF57",
-"7.    c #E8D15C",
-"8.    c #AF8918",
-"9.    c #9A6E00",
-"0.    c #926600",
-"a.    c #8F6400",
-"b.    c #8D6300",
-"c.    c #E3CA4D",
-"d.    c #F7EF88",
-"e.    c #FDFCE4",
-"f.    c #FFFFF7",
-"g.    c #FFFFF4",
-"h.    c #FFFFF0",
-"i.    c #FEFEE6",
-"j.    c #FCF9C1",
-"k.    c #F8F19C",
-"l.    c #F3E877",
-"m.    c #F0E16D",
-"n.    c #EEDE68",
-"o.    c #ECDA62",
-"p.    c #EBD75D",
-"q.    c #E9D358",
-"r.    c #E7D153",
-"s.    c #E6CD4F",
-"t.    c #E3C745",
-"u.    c #E2C543",
-"v.    c #A97F0C",
-"w.    c #916600",
-"x.    c #C29000",
-"y.    c #CA9D0F",
-"z.    c #F6ED7F",
-"A.    c #FCFBD8",
-"B.    c #FFFFFC",
-"C.    c #FFFFF8",
-"D.    c #FFFEEE",
-"E.    c #FCFABE",
-"F.    c #DDC95E",
-"G.    c #C7A731",
-"H.    c #BD971F",
-"I.    c #AF8208",
-"J.    c #AA7B00",
-"K.    c #B68D12",
-"L.    c #BA9116",
-"M.    c #C8A62A",
-"N.    c #D8BA3D",
-"O.    c #E6CC4E",
-"P.    c #E4CA4B",
-"Q.    c #E3C949",
-"R.    c #E3C847",
-"S.    c #9C6F00",
-"T.    c #9A6D00",
-"U.    c #986B00",
-"V.    c #956A00",
-"W.    c #936800",
-"X.    c #8D6200",
-"Y.    c #8B6100",
-"Z.    c #C18F00",
-"`.    c #D9B836",
-" +    c #F7F190",
-".+    c #FFFFFB",
-"++    c #FFFFFA",
-"@+    c #FFFFF1",
-"#+    c #EBE186",
-"$+    c #B48B12",
-"%+    c #B2850A",
-"&+    c #CBA82B",
-"*+    c #E4CB4C",
-"=+    c #E5CB4C",
-"-+    c #9B6F00",
-";+    c #996D00",
-">+    c #976B00",
-",+    c #956900",
-"'+    c #936700",
-")+    c #916500",
-"!+    c #8B6000",
-"~+    c #895F00",
-"{+    c #BF8D00",
-"]+    c #C08E00",
-"^+    c #E8D45D",
-"/+    c #FBF8C3",
-"(+    c #FFFFF6",
-"_+    c #F6F1A5",
-":+    c #C09A1E",
-"<+    c #E6CE50",
-"[+    c #996C00",
-"}+    c #8E6300",
-"|+    c #8C6200",
-"1+    c #8A6000",
-"2+    c #885E00",
-"3+    c #BE8D00",
-"4+    c #F5EB7B",
-"5+    c #FDFCDD",
-"6+    c #FFFFF2",
-"7+    c #FEFEE5",
-"8+    c #D3BA48",
-"9+    c #BE9922",
-"0+    c #CBAE39",
-"a+    c #D9C14D",
-"b+    c #E1CC59",
-"c+    c #E8D763",
-"d+    c #EFE06B",
-"e+    c #EDDC65",
-"f+    c #ECD960",
-"g+    c #EAD65B",
-"h+    c #DDC348",
-"i+    c #D5B63B",
-"j+    c #C5A024",
-"k+    c #B99015",
-"l+    c #BD961A",
-"m+    c #E7D155",
-"n+    c #A47A0B",
-"o+    c #8C6100",
-"p+    c #8A6101",
-"q+    c #BC8B00",
-"r+    c #C89E16",
-"s+    c #FFFFED",
-"t+    c #FFFFEE",
-"u+    c #FCF8B4",
-"v+    c #E1CF60",
-"w+    c #D7C04F",
-"x+    c #EBDF71",
-"y+    c #F9F388",
-"z+    c #F7F184",
-"A+    c #F4EA7A",
-"B+    c #F2E674",
-"C+    c #F0E36F",
-"D+    c #EFDF6A",
-"E+    c #EDDC64",
-"F+    c #EBD960",
-"G+    c #EAD55B",
-"H+    c #E8D358",
-"I+    c #E8D156",
-"J+    c #E8D357",
-"K+    c #E8D359",
-"L+    c #DAC049",
-"M+    c #D4B942",
-"N+    c #D2B73E",
-"O+    c #D0B339",
-"P+    c #CDAE32",
-"Q+    c #CAA729",
-"R+    c #C59D1A",
-"S+    c #926805",
-"T+    c #D0AD2A",
-"U+    c #F6EE93",
-"V+    c #FFFFE9",
-"W+    c #F8F396",
-"X+    c #F8F185",
-"Y+    c #F8F286",
-"Z+    c #F7F083",
-"`+    c #F6EE80",
-" @    c #E9D458",
-".@    c #E8D257",
-"+@    c #E9D45A",
-"@@    c #E9D65D",
-"#@    c #E9D55B",
-"$@    c #E5CD50",
-"%@    c #E2C746",
-"&@    c #DDBD37",
-"*@    c #CBA51F",
-"=@    c #8F6504",
-"-@    c #8A5F00",
-";@    c #875D00",
-">@    c #BA8900",
-",@    c #BA8A00",
-"'@    c #D5B637",
-")@    c #F8F0A4",
-"!@    c #FEFEDE",
-"~@    c #F5EC7D",
-"{@    c #F4EB7B",
-"]@    c #E4D15D",
-"^@    c #DEC953",
-"/@    c #DEC74F",
-"(@    c #DCC44C",
-"_@    c #DBC149",
-":@    c #DAC046",
-"<@    c #D9BE43",
-"[@    c #DCC247",
-"}@    c #EBD860",
-"|@    c #EAD75F",
-"1@    c #E8D45A",
-"2@    c #E6CF53",
-"3@    c #E3C848",
-"4@    c #DDBC36",
-"5@    c #BB9418",
-"6@    c #8D6403",
-"7@    c #B78700",
-"8@    c #B88800",
-"9@    c #DEC549",
-"0@    c #F7F1A7",
-"a@    c #FCF9C6",
-"b@    c #F3E978",
-"c@    c #EFE372",
-"d@    c #D8C04B",
-"e@    c #C19D25",
-"f@    c #AF8207",
-"g@    c #AE8106",
-"h@    c #BA9117",
-"i@    c #CAA930",
-"j@    c #DFC750",
-"k@    c #EBDA63",
-"l@    c #EBD862",
-"m@    c #E7D054",
-"n@    c #DCBB34",
-"o@    c #AA8111",
-"p@    c #8C6202",
-"q@    c #B68600",
-"r@    c #E0C84D",
-"s@    c #FBF7BF",
-"t@    c #F9F3AD",
-"u@    c #D2B640",
-"v@    c #B2870D",
-"w@    c #D3B63E",
-"x@    c #E9D65E",
-"y@    c #E6D055",
-"z@    c #DBB930",
-"A@    c #986F0A",
-"B@    c #B58500",
-"C@    c #E2CA50",
-"D@    c #FFFFD8",
-"E@    c #F7EFA1",
-"F@    c #CDAE36",
-"G@    c #BE981E",
-"H@    c #E7D055",
-"I@    c #E2C645",
-"J@    c #D3AF29",
-"K@    c #916807",
-"L@    c #B38300",
-"M@    c #FBF8BD",
-"N@    c #FFFFD4",
-"O@    c #F1E580",
-"P@    c #BB9319",
-"Q@    c #C7A52B",
-"R@    c #CBAA30",
-"S@    c #DBC046",
-"T@    c #E4CD52",
-"U@    c #E8D054",
-"V@    c #E6CF51",
-"W@    c #E7D053",
-"X@    c #DEC74E",
-"Y@    c #D8BD46",
-"Z@    c #CCAC34",
-"`@    c #BB941A",
-" #    c #BA9319",
-".#    c #BE981D",
-"+#    c #E0C441",
-"@#    c #C29D21",
-"##    c #8F6605",
-"$#    c #B28300",
-"%#    c #F0E27B",
-"&#    c #BF981E",
-"*#    c #D8BD43",
-"=#    c #E4CE55",
-"-#    c #EBD85F",
-";#    c #E8D155",
-">#    c #E5CD4E",
-",#    c #ECDB65",
-"'#    c #EDDD68",
-")#    c #EAD65E",
-"!#    c #DFC03D",
-"~#    c #B89118",
-"{#    c #8E6504",
-"]#    c #B18100",
-"^#    c #B18200",
-"/#    c #E7D052",
-"(#    c #EDDC6E",
-"_#    c #E9D459",
-":#    c #E9D357",
-"<#    c #E8D255",
-"[#    c #E5CA4B",
-"}#    c #E5CA4A",
-"|#    c #E5CB4B",
-"1#    c #EAD75E",
-"2#    c #EBDB65",
-"3#    c #ECDA65",
-"4#    c #E5CE51",
-"5#    c #DEBE38",
-"6#    c #A88113",
-"7#    c #865C00",
-"8#    c #AF8000",
-"9#    c #E8D154",
-"0#    c #E6CE4F",
-"a#    c #D6B738",
-"b#    c #D5B536",
-"c#    c #D5B434",
-"d#    c #DCBD3E",
-"e#    c #E4CA4A",
-"f#    c #E5CC4E",
-"g#    c #EAD55D",
-"h#    c #EBDA64",
-"i#    c #EDDC67",
-"j#    c #ECDD68",
-"k#    c #DDBC35",
-"l#    c #A57D10",
-"m#    c #8B6001",
-"n#    c #AD7E00",
-"o#    c #FFFFC2",
-"p#    c #FFFFC3",
-"q#    c #E6CD4E",
-"r#    c #D3B336",
-"s#    c #C49F22",
-"t#    c #B98F13",
-"u#    c #B99014",
-"v#    c #C19C22",
-"w#    c #D3B63D",
-"x#    c #E4D05A",
-"y#    c #ECDC67",
-"z#    c #DCBA31",
-"A#    c #936C0B",
-"B#    c #896001",
-"C#    c #855B00",
-"D#    c #E2C542",
-"E#    c #D2B132",
-"F#    c #B18509",
-"G#    c #BB931A",
-"H#    c #D7BD45",
-"I#    c #DBB82F",
-"J#    c #926B0B",
-"K#    c #845B00",
-"L#    c #AB7C00",
-"M#    c #AB7D00",
-"N#    c #E0C13C",
-"O#    c #FFFFBA",
-"P#    c #E1C441",
-"Q#    c #CDA92A",
-"R#    c #C29D23",
-"S#    c #DBB830",
-"T#    c #936B0C",
-"U#    c #885F01",
-"V#    c #845A00",
-"W#    c #DEBD37",
-"X#    c #FFFFB5",
-"Y#    c #FFFFB6",
-"Z#    c #DFC13C",
-"`#    c #AD7F04",
-" $    c #B18408",
-".$    c #B88D10",
-"+$    c #C69F20",
-"@$    c #C59F20",
-"#$    c #D3B02E",
-"$$    c #D2AF2D",
-"%$    c #D3B02D",
-"&$    c #DDBD38",
-"*$    c #E0C23E",
-"=$    c #D6B93C",
-"-$    c #D9BD43",
-";$    c #CFB037",
-">$    c #C3A027",
-",$    c #B78D14",
-"'$    c #B68C12",
-")$    c #DBB932",
-"!$    c #A0780F",
-"~$    c #885E01",
-"{$    c #835A00",
-"]$    c #A87900",
-"^$    c #A87A00",
-"/$    c #A97A00",
-"($    c #D6B22C",
-"_$    c #F9F29A",
-":$    c #FFFFB1",
-"<$    c #DEBE39",
-"[$    c #BB9113",
-"}$    c #C8A322",
-"|$    c #D3B02F",
-"1$    c #E0C340",
-"2$    c #E0C23F",
-"3$    c #E0C13D",
-"4$    c #E2C544",
-"5$    c #E3C94A",
-"6$    c #E6CE52",
-"7$    c #EDDE6B",
-"8$    c #EEDF6C",
-"9$    c #EDDD69",
-"0$    c #EAD860",
-"a$    c #E6D054",
-"b$    c #A68014",
-"c$    c #885E02",
-"d$    c #825900",
-"e$    c #A67800",
-"f$    c #A77A01",
-"g$    c #CEA822",
-"h$    c #F6ED8E",
-"i$    c #FFFFAD",
-"j$    c #DFBE38",
-"k$    c #DFC03B",
-"l$    c #E0C341",
-"m$    c #E1C442",
-"n$    c #E1C542",
-"o$    c #E1C543",
-"p$    c #E5CD4F",
-"q$    c #E7D156",
-"r$    c #EAD760",
-"s$    c #EEE16E",
-"t$    c #EFE16F",
-"u$    c #EBDA65",
-"v$    c #BC961C",
-"w$    c #896105",
-"x$    c #815800",
-"y$    c #A67901",
-"z$    c #CCA51E",
-"A$    c #F6ED8A",
-"B$    c #FFFFA9",
-"C$    c #E3C84A",
-"D$    c #DEBE37",
-"E$    c #DFBF3A",
-"F$    c #E2C745",
-"G$    c #E2C747",
-"H$    c #E4CB4D",
-"I$    c #E6CD51",
-"J$    c #ECDB66",
-"K$    c #EEE06E",
-"L$    c #F0E373",
-"M$    c #F0E474",
-"N$    c #EFE271",
-"O$    c #E3C849",
-"P$    c #CEAA26",
-"Q$    c #8B6409",
-"R$    c #835900",
-"S$    c #A47600",
-"T$    c #A47701",
-"U$    c #C29916",
-"V$    c #ECD966",
-"W$    c #FFFFA4",
-"X$    c #E5CB4F",
-"Y$    c #DFC03C",
-"Z$    c #D8BA3A",
-"`$    c #C7A224",
-" %    c #B88F13",
-".%    c #B58A0E",
-"+%    c #BF9A22",
-"@%    c #CDAF3A",
-"#%    c #DFCC5A",
-"$%    c #F2E879",
-"%%    c #F1E677",
-"&%    c #EFE270",
-"*%    c #98710F",
-"=%    c #835A01",
-"-%    c #805700",
-";%    c #A27400",
-">%    c #A27500",
-",%    c #A37601",
-"'%    c #BA8F0F",
-")%    c #E9D45B",
-"!%    c #FFFFA0",
-"~%    c #DEBF3A",
-"{%    c #D4B233",
-"]%    c #C5A42E",
-"^%    c #E7D866",
-"/%    c #EDDE6A",
-"(%    c #E8D35A",
-"_%    c #DFC13D",
-":%    c #B18B18",
-"<%    c #845C04",
-"[%    c #A07300",
-"}%    c #A17501",
-"|%    c #AF840A",
-"1%    c #FFFF9C",
-"2%    c #DFBE3A",
-"3%    c #CCA829",
-"4%    c #D4BA45",
-"5%    c #E9D65F",
-"6%    c #CDA724",
-"7%    c #865F08",
-"8%    c #A07200",
-"9%    c #A27604",
-"0%    c #D5AC1C",
-"a%    c #FFFF99",
-"b%    c #EFE06C",
-"c%    c #AD8004",
-"d%    c #B99115",
-"e%    c #BD961B",
-"f%    c #C9A72C",
-"g%    c #C9A72D",
-"h%    c #D9BE44",
-"i%    c #D9BF45",
-"j%    c #D9C048",
-"k%    c #DAC149",
-"l%    c #DCC34C",
-"m%    c #DCC650",
-"n%    c #DEC954",
-"o%    c #D6BE49",
-"p%    c #CAAB36",
-"q%    c #BC9720",
-"r%    c #B3880E",
-"s%    c #EAD861",
-"t%    c #DAB72E",
-"u%    c #946D0E",
-"v%    c #815801",
-"w%    c #9E7100",
-"x%    c #9F7302",
-"y%    c #C89C13",
-"z%    c #F6ED7E",
-"A%    c #DDBD36",
-"B%    c #C7A225",
-"C%    c #D2B335",
-"D%    c #DEC346",
-"E%    c #E6CF54",
-"F%    c #EEE16F",
-"G%    c #F0E473",
-"H%    c #F1E676",
-"I%    c #F0E575",
-"J%    c #E4CB4E",
-"K%    c #DCBA32",
-"L%    c #AD8514",
-"M%    c #825A03",
-"N%    c #9C7000",
-"O%    c #9E7101",
-"P%    c #B78B0A",
-"Q%    c #DBB931",
-"R%    c #E1C644",
-"S%    c #E3CA4B",
-"T%    c #EBD962",
-"U%    c #ECDC68",
-"V%    c #EDDF6B",
-"W%    c #EAD862",
-"X%    c #E7D157",
-"Y%    c #BF9718",
-"Z%    c #845C05",
-"`%    c #9B7001",
-" &    c #A47905",
-".&    c #D5AA1A",
-"+&    c #FCFA91",
-"@&    c #DEBF3B",
-"#&    c #DBB72F",
-"$&    c #E8D45B",
-"%&    c #DCBA33",
-"&&    c #D0A71A",
-"*&    c #855D06",
-"=&    c #9C7002",
-"-&    c #BB8F0B",
-";&    c #D9B429",
-">&    c #DAB62D",
-",&    c #D9B52B",
-"'&    c #D8B226",
-")&    c #CBA41F",
-"!&    c #BD9519",
-"~&    c #B48D15",
-"{&    c #AD8411",
-"]&    c #A37B0E",
-"^&    c #9A730C",
-"/&    c #99720C",
-"(&    c #9A730E",
-"_&    c #A98111",
-":&    c #AA8315",
-"<&    c #B28B18",
-"[&    c #BB971F",
-"}&    c #CCA828",
-"|&    c #E1C645",
-"1&    c #E2C646",
-"2&    c #D4A918",
-"3&    c #845D05",
-"4&    c #986D01",
-"5&    c #9E7304",
-"6&    c #C79A0D",
-"7&    c #D7B023",
-"8&    c #D4AB1B",
-"9&    c #C89E17",
-"0&    c #B48A11",
-"a&    c #A0780B",
-"b&    c #9A7107",
-"c&    c #986E05",
-"d&    c #966B03",
-"e&    c #946A02",
-"f&    c #936801",
-"g&    c #8F6501",
-"h&    c #8F6502",
-"i&    c #8F6402",
-"j&    c #8E6505",
-"k&    c #8F6808",
-"l&    c #916A0C",
-"m&    c #A07A13",
-"n&    c #B38D1B",
-"o&    c #C59F22",
-"p&    c #D4AF27",
-"q&    c #D9B328",
-"r&    c #D5AD1E",
-"s&    c #CDA010",
-"t&    c #835B04",
-"u&    c #976C01",
-"v&    c #9C7104",
-"w&    c #B28608",
-"x&    c #B68A0A",
-"y&    c #A27808",
-"z&    c #9A6F05",
-"A&    c #976B02",
-"B&    c #956A01",
-"C&    c #855D02",
-"D&    c #865E04",
-"E&    c #865F07",
-"F&    c #886109",
-"G&    c #97700C",
-"H&    c #A57D0E",
-"I&    c #AC820B",
-"J&    c #8D6505",
-"K&    c #956B01",
-"L&    c #976C03",
-"M&    c #966A01",
-"N&    c #946900",
-"O&    c #805801",
-"P&    c #825A02",
-"                                                                                                ",
-"                                                                                                ",
-"                                        . + @ # $ % & * = - ;                                   ",
-"                              > , ' ) ! . + ~ # $ % & * { ] ; ^ /                               ",
-"                      ( _ : < > , ' ) ! [ } | 1 2 3 4 5 6 ] ; ^ / 7 8                           ",
-"                  9 0 ( a b < c d e f g h i j k l m n o p q r s / 7 8 t                         ",
-"                0 u 0 ( v w x y z A B C D E F G H I J K L M N O / 7 8 t P                       ",
-"              Q R S T U V W X Y Z `  ...+.@.#.$.%.&.*.=.-.;.>.,./ 7 8 t P '.                    ",
-"              a Q ).!.~.{.].^./.(._.:.<.[.}.|.1.x 2.3.4.5.6.7.8.9.7 8 t 0.a.b.                  ",
-"            : _ a c.d.e.f.g.h.i.j.k.l.y m.n.o.p.q.r.s.3.m t.u.v.9.7 8 t w.a.b.                  ",
-"            x.: y.z.A.B.C.D.E.F.G.H.I.J.J.J.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.w.a.X.Y.                ",
-"            Z.x.`. +.+++@+#+$+J.J.J.J.J.J.J.J.J.J.J.J.%+&+*+=+-+;+>+,+'+)+a.X.!+~+              ",
-"          {+]+Z.^+/+f.(+_+J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.:+<+/ [+>+,+P '.}+|+1+2+              ",
-"          , 3+> 4+5+6+7+8+J.J.J.9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+7 8 t P '.}+o+p+2+              ",
-"          q+, r+W s+t+u+v+w+x+y+z+z.A+B+C+D+E+F+G+H+j I+I+J+K+L+M+N+O+P+Q+R+S+1+2+              ",
-"          ' q+T+U+V+V+W+X+Y+X+Z+`+4+l.y m.n.o.h G+ @.@J+q.+@x @@#@.@$@%@&@*@=@-@;@              ",
-"          >@,@'@)@_.!@~@z.`+z.~@{@l.]@^@/@(@_@:@<@[@J+H++@@@}@}@|@1@2@3@4@5@6@~+;@              ",
-"        7@8@) 9@0@:.a@b@V c@d@e@f@J.J.J.J.J.J.J.J.J.J.g@h@i@j@k@l@@@m@3@n@o@p@~+                ",
-"        q@! 7@r@s@..t@y u@f@J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.v@w@x@y@3@z@A@p+2+                ",
-"        [ B@q@C@D D@E@F@J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.G@H@I@J@K@1+2+                ",
-"        L@. [ p.M@N@O@g@J.J.J.g@P@Q@R@S@<@T@U@V@V@W@m++@X@Y@Z@`@ #.#2@+#@###-@;@                ",
-"        + $#L@q.$.$.%#&#Q@*#=#f+-#p.G+q.;#k s.>#s.$@m@K+|@,#'#'#,#)#2@!#~#{#~+;@                ",
-"        ~ ]#^#/#H H (#i g+g+g+i _#:#<#/#<+3.[#}#|#l V@.@1#2#'#'#3#@@4#5#6#p@2+7#                ",
-"        8#8#~ l I I W@9#;#<#;#9#W@k 0#l a#b#c#c#d#e#f#m+g#h#i#j#3#x 4#k#l#m#2+7#                ",
-"        n## # m o#p#l q#s.s.r#s#t#J.J.J.J.J.J.J.J.J.J.u#v#w#x#y#h#x $@z#A#B#;@C#                ",
-"        $ n#n#D#-.-.R.m E#F#J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.G#H#g $@I#J#2+7#K#                ",
-"        L#M#$ N#O#O#P#Q#J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.R#$@S#T#U#7#V#                ",
-"        % J.J.W#X#Y#Z#`#J.J.J.J. $.$+$@$#$$$%$&$*$P#R.=$-$;$>$,$J.'$4#)$!$~$C#{$                ",
-"        ]$^$/$($_$:$<$[$[$}$|$o 1$o o 2$*$*$3$3$o 4$5$6$g 2#7$8$9$0$a$&$b$c$K#d$                ",
-"        e$& f$g$h$i$4@j$k$N#*$o l$P#m$n$m$P#m$o$I@Q.p$q$r$9$s$t$8$u$K+2$v$w$V#x$                ",
-"        * * y$z$A$B$C$D$E$3$o n$4$F$%@G$R.R.Q.5$H$I$q$x J$K$L$M$N$9$x@O$P$Q$R$x$                ",
-"        { S$T$U$V$W$X$5#Y$o 4$Z$`$ %.%J.J.J.J.J.J.J.J. #+%@%#%$%%%&%k@6$)$*%=%-%-%              ",
-"        ;%>%,%'%)%!%f#~%2${%F#J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.I.]%^%/%(%_%:%<%-%-%              ",
-"        [%- }%|%o 1%i#2%3%J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.J.4%5%G$6%7%-%-%              ",
-"        ; ; 8%9%0%a%b%<$c%J.J.J.J.J.d%e%f%g%h%i%j%k%l%m%n%o%p%q%J.J.r%s%H$t%u%v%-%-%            ",
-"          w%w%x%y%B+z%A%`#3 B%C%D%4#4#2@2@E%y@q$K+g r$u$9$F%G%H%I%G%7$x@J%K%L%M%-%-%            ",
-"          N%^ O%P%e#a%Q%5#*$R%G$O$5$Q.O$O$5$S%H$$@6$H@K+x@T%U%7$V%U%W%X%O$n@Y%Z%-%-%-%          ",
-"          / -+`% &.&+&F$Q%4@@&_%_%~%&@n@)$S##&S#K%4@~%2$I@J%q$$&g $&q$J%m$%&&&*&-%-%-%          ",
-"          ;+T.9.=&-& @e+;&>&>&,&'&)&!&~&{&]&^&/&(&_&:&<&[&}&N <$l$|&1&l$<$>&2&3&-%-%-%          ",
-"          7 7 7 4&5&6&q.7&8&9&0&a&b&c&d&e&f&w.'.g&h&i&{#j&k&l&m&n&o&p&q&'&r&s&t&-%-%-%-%        ",
-"            >+>+>+u&v&w&x&y&z&A&B&t W.P 0.)+'.a.}+X.Y.1+~+;@7#C&D&E&F&G&H&I&J&v%-%-%-%-%        ",
-"            ,+,+V.V.K&A&L&M&N&t W.'+P w.'.a.a.b.|+Y.1+~+;@7#C#V#d$x$O&P&t&t&v%-%-%-%-%-%        ",
-"              t t t t t W.W.'+P P w.'.'.a.}+X.|+Y.1+~+;@7#C#V#d$x$-%-%-%-%-%-%-%-%-%-%          ",
-"              P P P P P P 0.w.w.'.'.a.                7#C#V#d$x$-%-%-%-%-%-%-%-%-%-%-%          ",
-"                w.w.)+)+'.'.                                      -%-%-%-%-%-%-%-%              ",
-"                  a.a.a.                                                                        ",
-"                                                                                                ",
-"                                                                                                "};
diff --git a/src/icons/folder.xpm b/src/icons/folder.xpm
deleted file mode 100644 (file)
index c126c5d..0000000
+++ /dev/null
@@ -1,516 +0,0 @@
-/* XPM */
-static const char * folder_xpm[] = {
-"48 48 465 2",
-"      c None",
-".     c #BF8F00",
-"+     c #BD8E00",
-"@     c #BB8D00",
-"#     c #BA8C00",
-"$     c #B88A00",
-"%     c #B78900",
-"&     c #C99700",
-"*     c #C89600",
-"=     c #C79500",
-"-     c #C59400",
-";     c #C49300",
-">     c #C29200",
-",     c #C09000",
-"'     c #BA8B00",
-")     c #B68900",
-"!     c #B58800",
-"~     c #9D7700",
-"{     c #9C7500",
-"]     c #C39200",
-"^     c #D1AA1F",
-"/     c #DCBB33",
-"(     c #E7CC46",
-"_     c #EFD750",
-":     c #FFEE65",
-"<     c #FFEC5F",
-"[     c #E9CC3D",
-"}     c #BB8F05",
-"|     c #B48800",
-"1     c #B38600",
-"2     c #A67D00",
-"3     c #A47B00",
-"4     c #A27A00",
-"5     c #A07900",
-"6     c #9F7800",
-"7     c #9B7500",
-"8     c #9A7400",
-"9     c #987300",
-"0     c #C69400",
-"a     c #DEC240",
-"b     c #EDDB61",
-"c     c #F7EC77",
-"d     c #FFF782",
-"e     c #FFF57C",
-"f     c #FFF376",
-"g     c #FFF271",
-"h     c #FFF06B",
-"i     c #FFEA5A",
-"j     c #DAB82A",
-"k     c #B48700",
-"l     c #B28600",
-"m     c #AD8200",
-"n     c #AC8100",
-"o     c #AA8000",
-"p     c #A97F00",
-"q     c #A77E00",
-"r     c #A57C00",
-"s     c #A37B00",
-"t     c #B28902",
-"u     c #C99E02",
-"v     c #CEA100",
-"w     c #A88000",
-"x     c #C39300",
-"y     c #ECDC66",
-"z     c #FFFC91",
-"A     c #FFFB8C",
-"B     c #FFF987",
-"C     c #FFF170",
-"D     c #ECD03F",
-"E     c #B38700",
-"F     c #B08400",
-"G     c #AE8300",
-"H     c #AB8100",
-"I     c #A87E00",
-"J     c #B18804",
-"K     c #C79E0A",
-"L     c #DDB20E",
-"M     c #F9CC0F",
-"N     c #FFCF0A",
-"O     c #FFCD04",
-"P     c #FFCC00",
-"Q     c #B38A00",
-"R     c #987200",
-"S     c #967100",
-"T     c #C19100",
-"U     c #C69809",
-"V     c #FFFB8E",
-"W     c #FFFA89",
-"X     c #FFF884",
-"Y     c #FFF67F",
-"Z     c #FFF57A",
-"`     c #FFF374",
-" .    c #FFF16F",
-"..    c #FFEF6A",
-"+.    c #FFED64",
-"@.    c #FFEA59",
-"#.    c #FFE853",
-"$.    c #B18500",
-"%.    c #AF8400",
-"&.    c #B18803",
-"*.    c #C59D0F",
-"=.    c #DFB91C",
-"-.    c #F4CE21",
-";.    c #FFD720",
-">.    c #FFD51B",
-",.    c #FFD315",
-"'.    c #FFD110",
-").    c #DFB000",
-"!.    c #977200",
-"~.    c #BF9000",
-"{.    c #FFF988",
-"].    c #FFF986",
-"^.    c #FFF780",
-"/.    c #FFF477",
-"(.    c #FFF272",
-"_.    c #FFF06D",
-":.    c #FFEF68",
-"<.    c #FFED62",
-"[.    c #FFEB5D",
-"}.    c #FFE958",
-"|.    c #FFE752",
-"1.    c #C0970E",
-"2.    c #C9A216",
-"3.    c #DCB925",
-"4.    c #F0CE31",
-"5.    c #FFDE36",
-"6.    c #FFDC31",
-"7.    c #FFDA2B",
-"8.    c #FFD825",
-"9.    c #FFD51A",
-"0.    c #FFD314",
-"a.    c #FFD10F",
-"b.    c #FFCF09",
-"c.    c #F9C600",
-"d.    c #957100",
-"e.    c #8F6C00",
-"f.    c #937000",
-"g.    c #886700",
-"h.    c #FFF781",
-"i.    c #FFF67E",
-"j.    c #FFF57B",
-"k.    c #FFF273",
-"l.    c #FFF16E",
-"m.    c #FFEC60",
-"n.    c #FFEA5B",
-"o.    c #FFE855",
-"p.    c #FFE750",
-"q.    c #FFE54A",
-"r.    c #FFE345",
-"s.    c #FFE140",
-"t.    c #FFDF3A",
-"u.    c #FFDE35",
-"v.    c #FFDC2F",
-"w.    c #FFDA29",
-"x.    c #FFD824",
-"y.    c #FFD61F",
-"z.    c #FFD419",
-"A.    c #FFD213",
-"B.    c #FFD10E",
-"C.    c #FFCF08",
-"D.    c #FFCD02",
-"E.    c #957000",
-"F.    c #B58A00",
-"G.    c #BA8D00",
-"H.    c #C29608",
-"I.    c #D3A717",
-"J.    c #B48C0B",
-"K.    c #866500",
-"L.    c #BB8C00",
-"M.    c #EEDB5B",
-"N.    c #FFF478",
-"O.    c #FFEE66",
-"P.    c #FFEB5C",
-"Q.    c #FFE64D",
-"R.    c #FFE449",
-"S.    c #FFE243",
-"T.    c #FFE13E",
-"U.    c #FFDF38",
-"V.    c #FFDD33",
-"W.    c #FFDB2E",
-"X.    c #FFD928",
-"Y.    c #FFD823",
-"Z.    c #FFD61D",
-"`.    c #FFD417",
-" +    c #FFD212",
-".+    c #FFD00D",
-"++    c #FFCE07",
-"@+    c #FFCC01",
-"#+    c #F1BF00",
-"$+    c #B08500",
-"%+    c #C19406",
-"&+    c #D2A81B",
-"*+    c #E3BB2C",
-"=+    c #F6D13F",
-"-+    c #FFD943",
-";+    c #F6CF36",
-">+    c #D0A718",
-",+    c #B98B00",
-"'+    c #EDD856",
-")+    c #FFEB5E",
-"!+    c #FFE64F",
-"~+    c #FFE346",
-"{+    c #FFE03B",
-"]+    c #FFD926",
-"^+    c #FFD316",
-"/+    c #FFD00B",
-"(+    c #FAC905",
-"_+    c #E2B200",
-":+    c #CFA000",
-"<+    c #C69C17",
-"[+    c #D9B332",
-"}+    c #EFCD4C",
-"|+    c #FFDE5B",
-"1+    c #FFDC51",
-"2+    c #F0CA38",
-"3+    c #DCB21E",
-"4+    c #C69908",
-"5+    c #BC8E00",
-"6+    c #B68A00",
-"7+    c #856500",
-"8+    c #846400",
-"9+    c #DBBC36",
-"0+    c #FFEE67",
-"a+    c #FFEC61",
-"b+    c #FFE54C",
-"c+    c #FFE447",
-"d+    c #FFE03D",
-"e+    c #ECC00F",
-"f+    c #D4A706",
-"g+    c #C19402",
-"h+    c #B88D0B",
-"i+    c #D0AC3D",
-"j+    c #E4C55C",
-"k+    c #FAE27F",
-"l+    c #FFE479",
-"m+    c #F6D75F",
-"n+    c #E7C33C",
-"o+    c #D6AB1B",
-"p+    c #C99B05",
-"q+    c #C69700",
-"r+    c #C49600",
-"s+    c #C19300",
-"t+    c #BE9000",
-"u+    c #A87F00",
-"v+    c #836300",
-"w+    c #D5B42C",
-"x+    c #FFED63",
-"y+    c #FFE448",
-"z+    c #FFE13F",
-"A+    c #FFDC30",
-"B+    c #F5CF21",
-"C+    c #DEB313",
-"D+    c #CB9E09",
-"E+    c #B88B01",
-"F+    c #C6A131",
-"G+    c #DEC26A",
-"H+    c #F1DC90",
-"I+    c #FFEEAA",
-"J+    c #FFEC9F",
-"K+    c #EDD16E",
-"L+    c #D7B33A",
-"M+    c #C99F16",
-"N+    c #C09200",
-"O+    c #C79900",
-"P+    c #C99B00",
-"Q+    c #C99A00",
-"R+    c #C69800",
-"S+    c #C39500",
-"T+    c #BF9100",
-"U+    c #8F6D00",
-"V+    c #826300",
-"W+    c #C69F17",
-"X+    c #FFE956",
-"Y+    c #FFE344",
-"Z+    c #FAD833",
-"`+    c #E7C222",
-" @    c #D4AB14",
-".@    c #BD9005",
-"+@    c #BD951D",
-"@@    c #D4B861",
-"#@    c #E7D493",
-"$@    c #FAEEBF",
-"%@    c #FFF3C3",
-"&@    c #F5E4A3",
-"*@    c #E2C76E",
-"=@    c #CBA634",
-"-@    c #B88D09",
-";@    c #B78A00",
-">@    c #CA9B00",
-",@    c #CC9D00",
-"'@    c #CB9C00",
-")@    c #C89900",
-"!@    c #BF9810",
-"~@    c #F1D033",
-"{@    c #DEB821",
-"]@    c #C69C0E",
-"^@    c #B88D0F",
-"/@    c #CBAC50",
-"(@    c #DEC98B",
-"_@    c #F5ECCF",
-":@    c #FFFAE4",
-"<@    c #FFF8DB",
-"[@    c #F1E1AA",
-"}@    c #D9BD64",
-"|@    c #C19A23",
-"1@    c #BD8F00",
-"2@    c #CD9E00",
-"3@    c #CE9F00",
-"4@    c #FFE751",
-"5@    c #E2BF29",
-"6@    c #C19B2A",
-"7@    c #D4B965",
-"8@    c #ECDEB2",
-"9@    c #FFFCF2",
-"0@    c #FFFDF3",
-"a@    c #FAF5DF",
-"b@    c #E2CE8F",
-"c@    c #CFB053",
-"d@    c #B78D0D",
-"e@    c #C09300",
-"f@    c #816200",
-"g@    c #AC8200",
-"h@    c #FADF46",
-"i@    c #FFE241",
-"j@    c #D0B04C",
-"k@    c #FFF6D3",
-"l@    c #FFF8DA",
-"m@    c #FFF9E1",
-"n@    c #F1E4BA",
-"o@    c #D9C073",
-"p@    c #C59700",
-"q@    c #D0A100",
-"r@    c #AE8500",
-"s@    c #816100",
-"t@    c #EACA33",
-"u@    c #D9B31D",
-"v@    c #C19B24",
-"w@    c #FFF4C8",
-"x@    c #FFF5CE",
-"y@    c #FAEFC7",
-"z@    c #C6A235",
-"A@    c #B98C00",
-"B@    c #C29400",
-"C@    c #916D00",
-"D@    c #E4C22B",
-"E@    c #C1960A",
-"F@    c #D9BC5E",
-"G@    c #FFF3C2",
-"H@    c #FFF4C7",
-"I@    c #C6A132",
-"J@    c #C59600",
-"K@    c #CE9E00",
-"L@    c #BA8E00",
-"M@    c #826200",
-"N@    c #806100",
-"O@    c #D2AD1B",
-"P@    c #FFDE37",
-"Q@    c #F5D129",
-"R@    c #F1DC93",
-"S@    c #FFF1BA",
-"T@    c #E2C976",
-"U@    c #B68800",
-"V@    c #C29300",
-"W@    c #C79800",
-"X@    c #CB9D00",
-"Y@    c #A17B00",
-"Z@    c #CCA515",
-"`@    c #FFDB2D",
-" #    c #DEB517",
-".#    c #BD9315",
-"+#    c #FFEEAC",
-"@#    c #FFEFB0",
-"##    c #BC9316",
-"$#    c #866600",
-"%#    c #B8920A",
-"&#    c #C19507",
-"*#    c #D4B245",
-"=#    c #FFEDA3",
-"-#    c #ECD37C",
-";#    c #D1A100",
-">#    c #D0A000",
-",#    c #AE8400",
-"'#    c #A07800",
-")#    c #B18A06",
-"!#    c #FFD722",
-"~#    c #FFD721",
-"{#    c #F5CC1B",
-"]#    c #F1D77A",
-"^#    c #FFEB99",
-"/#    c #CFAC3A",
-"(#    c #BB8E00",
-"_#    c #927000",
-":#    c #9E7700",
-"<#    c #FFD51C",
-"[#    c #DEB20E",
-"}#    c #BD9211",
-"|#    c #FFE88C",
-"1#    c #FAE285",
-"2#    c #BC8F00",
-"3#    c #F2C713",
-"4#    c #CB9E05",
-"5#    c #D4AF37",
-"6#    c #FFE681",
-"7#    c #DEBC49",
-"8#    c #9E7800",
-"9#    c #997300",
-"0#    c #E5B90B",
-"a#    c #FACB0C",
-"b#    c #E7C64F",
-"c#    c #FFE475",
-"d#    c #BD920F",
-"e#    c #8C6B00",
-"f#    c #D8AC05",
-"g#    c #E3B304",
-"h#    c #B98D06",
-"i#    c #FFE066",
-"j#    c #EDCA4D",
-"k#    c #B88B00",
-"l#    c #C49500",
-"m#    c #AA8100",
-"n#    c #CA9E01",
-"o#    c #D1A921",
-"p#    c #FFDE58",
-"q#    c #D3AA21",
-"r#    c #936F00",
-"s#    c #BB9200",
-"t#    c #FAC800",
-"u#    c #E9C234",
-"v#    c #FAD747",
-"w#    c #AC8300",
-"x#    c #906D00",
-"y#    c #AB8400",
-"z#    c #E3B200",
-"A#    c #BC8F04",
-"B#    c #FFD940",
-"C#    c #E2B823",
-"D#    c #8E6C00",
-"E#    c #9C7800",
-"F#    c #D3A713",
-"G#    c #FFD733",
-"H#    c #C69906",
-"I#    c #C89A00",
-"J#    c #C29500",
-"K#    c #AF8500",
-"L#    c #8C6A00",
-"M#    c #E9BE1D",
-"N#    c #EFC31E",
-"O#    c #997400",
-"P#    c #8A6800",
-"Q#    c #E1B100",
-"R#    c #FFD21E",
-"S#    c #D6A90B",
-"T#    c #B28800",
-"U#    c #D9AB00",
-"V#    c #CA9C05",
-"W#    c #FFD014",
-"X#    c #B28700",
-"Y#    c #AB8500",
-"Z#    c #CB9D02",
-"`#    c #EEBD07",
-" $    c #B18600",
-".$    c #977100",
-"+$    c #E3B300",
-"@$    c #AD8300",
-"#$    c #9A7500",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                        . + @ # $ %                                                             ",
-"          & * = - ; > , . + @ ' $ ) !                           ~ {                             ",
-"      * * * = - ; ] ^ / ( _ : < [ } | 1               2 3 4 5 6 ~ 7 8 9                         ",
-"      - 0 - a b c d e f g h : < i j k l     m n o p q r s 4 t u v w 8 9                         ",
-"    ] x ; y z A B d e f C h : < i D E l F G m H o I J K L M N O P P Q R S                       ",
-"    T T U V A W X Y Z `  ...+.< @.#.l $.%.G &.*.=.-.;.>.,.'.N O P P ).!.S                       ",
-"      ~.~.{.].X ^.e /.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.;.9.0.a.b.O P P c.!.d.      e.f.6 R g.      ",
-"      + + h.^.i.j./.k.l...: m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.P P P S E.E.6 p F.G.H.I.J.K.    ",
-"      L.L.M.Z N.f (.l.h O.<.P.}.#.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+P P #+r $+@ %+&+*+=+-+;+>+K.    ",
-"      ,+,+'+k.g C _...O.<.)+@.o.!+q.~+s.{+5.6.7.]+;.>.^+'./+(+_+:+,+) <+[+}+|+1+2+3+4+5+6+7+8+  ",
-"      % % 9+_.h ..0++.a+[.@.o.p.b+c+S.d+U.V.W.w.Y.y.z.e+f+g+1 h+i+j+k+l+m+n+o+p+q+r+s+t+u+8+v+  ",
-"      ! ! w+O.: x+a+)+n.}.o.p.b+y+S.z+t.u.A+7.B+C+D+E+1 F+G+H+I+J+K+L+M+N+r+O+P+Q+R+S+T+U+8+V+  ",
-"      1 1 W+< )+[.n.@.X+#.!+b+c+Y+z+{+Z+`+ @.@1 +@@@#@$@%@&@*@=@-@;@@ T+S+O+>@,@'@)@r+;@7+v+    ",
-"      $.$.!@}.}.X+o.|.p.Q.q.~+S.~@{@]@1 ^@/@(@_@:@<@[@}@|@1 1 k ! ,+1@s+q+>@2@3@2@Q+r+~ 8+V+    ",
-"      G G G |.4@p.!+b+q.c+Y+5@1 1 6@7@8@9@0@a@b@c@d@1 1 1 1 1 k % G.T+S+)@,@:+:+2@Q+e@g.v+f@    ",
-"        g@g@h@q.R.y+~+Y+i@~@1 j@k@l@m@n@o@6@1 1 1 1 1 1 1 1 k ! $ 5+N+p@>@3@q@:+,@)@r@8+V+s@    ",
-"        o o t@Y+S.i@s.T.{+u@v@w@x@y@z@1 1 1 1 1 1 1 1 1 1 1 k ) A@t+B@)@,@:+q@:+'@R+C@v+f@      ",
-"        I I D@d+d+{+t.U.u.E@F@G@H@I@1 1 1 1 1 1 1 1 1 1 1 1 ! ;@@ N+J@P+K@q@q@K@P+L@v+M@N@      ",
-"        2 2 O@P@5.u.V.6.Q@1 R@S@T@1 1 1 1 1 1 1 1 1 1 1 1 k U@,+1@V@W@X@:+q@:+,@)@Y@V+s@N@      ",
-"        3 3 Z@A+v.W.`@7. #.#+#@###1 1 1 1 1 1 1 1 1 1 1 k ! ;@@ N+J@Q+2@q@q@3@>@p@$#f@N@        ",
-"        4 4 %#w.w.X.]+8.&#*#=#-#1 1 1 1 1 1 1 1 k k k ! ) $ @ T+S+)@,@:+;#>#2@)@,#f@N@N@        ",
-"        '#'#)#Y.!#~#;.{#1 ]#^#/#1 1 1 1 1 k k k ! ) % $ ,+(#t+B@R+>@K@q@q@3@'@q+_#N@N@N@        ",
-"        :#~ ~ <#<#9.z.[#}#|#1#1 1 1 k k k ! ) ;@$ ,+G.(#1@T+B@q+P+,@:+q@:+,@)@2#N@N@N@          ",
-"        7 7 7 3#,.0.A.4#5#6#7#k k k ! ) ;@$ ,+G.(#1@t+T+s+S+q+Q+X@3@:+:+K@>@p@8#N@N@N@          ",
-"          9#9#0#B..+a#1 b#c#d#! ) ;@$ ,+G.(#1@t+N+s+B@S+J@W@Q+'@2@3@3@K@'@O+S+e#N@N@N@          ",
-"          !.!.f#C.++g#h#i#j#;@k#,+G.(#1@t+T+s+B@S+J@q+W@)@>@X@2@2@K@2@'@)@l#m#N@N@N@            ",
-"          E.E.n#@+P ,@o#p#q#G.(#1@t+T+s+B@S+J@q+W@)@Q+>@'@X@,@,@,@'@Q+W@l#q N@N@N@N@            ",
-"          r#r#s#P t#% u#v#(#1@T+N+B@S+r+q+W@)@Q+>@'@'@'@'@>@>@Q+)@R+t+w#g.N@N@N@N@              ",
-"          C@x#y#P z#A#B#C#t+N+B@r+p@W@)@Q+>@>@'@'@>@>@Q+)@O+S+,#!.N@N@N@N@N@N@N@N@              ",
-"          e.D#E#P 2@F#G#H#s+S+p@O+I#>@>@>@>@>@>@Q+)@W@J#K#9 s@N@N@N@N@N@N@N@N@N@                ",
-"          L#L#L#P k#M#N#N+S+q+)@Q+>@>@>@P+Q+)@W@p@K#O#M@f@N@N@N@N@N@N@N@N@N@N@                  ",
-"          P#P#P#Q#,+R#S#V@r+R+)@Q+Q+I#)@W@p@T#~ $#f@s@N@N@N@N@N@N@N@N@N@N@                      ",
-"          g.g.g.U#V#W#t+s+S+J@q+R+R+p@X#~ $#M@f@N@N@N@N@N@N@N@N@N@N@                            ",
-"            K.K.Y#Z#`#5+t+N+V@B@ $~ $#M@f@s@N@N@N@N@N@N@N@N@                                    ",
-"            8+8+8+.$+$G.5+@$#$7+f@s@N@N@N@N@N@N@N@N@N@                                          ",
-"              f@f@f@f@f@s@N@N@N@N@N@N@N@N@N@N@N@                                                ",
-"              N@N@N@N@N@N@N@N@N@N@N@N@N@N@                                                      ",
-"                N@N@N@N@N@N@N@N@N@N@                                                            ",
-"                    N@N@N@                                                                      ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                "};
diff --git a/src/icons/image.xpm b/src/icons/image.xpm
deleted file mode 100644 (file)
index c4fde0c..0000000
+++ /dev/null
@@ -1,622 +0,0 @@
-/* XPM */
-static const char * image_xpm[] = {
-"48 48 571 2",
-"      c None",
-".     c #BC8B00",
-"+     c #BB8900",
-"@     c #B98800",
-"#     c #B88700",
-"$     c #B68500",
-"%     c #B58400",
-"&     c #B38200",
-"*     c #B28100",
-"=     c #B08000",
-"-     c #AF7E00",
-";     c #AD7D00",
-">     c #AC7C00",
-",     c #AA7A00",
-"'     c #A97900",
-")     c #A77800",
-"!     c #A67700",
-"~     c #A57500",
-"{     c #A37400",
-"]     c #A27300",
-"^     c #A07100",
-"/     c #9F7000",
-"(     c #9D6F00",
-"_     c #9C6D00",
-":     c #9A6C00",
-"<     c #996B00",
-"[     c #976900",
-"}     c #966800",
-"|     c #946700",
-"1     c #936500",
-"2     c #916400",
-"3     c #906300",
-"4     c #8E6100",
-"5     c #8D6000",
-"6     c #8B5F00",
-"7     c #BD8B00",
-"8     c #BC8A00",
-"9     c #BA8900",
-"0     c #B88600",
-"a     c #A47500",
-"b     c #8A5D00",
-"c     c #BB8A00",
-"d     c #B78600",
-"e     c #B68400",
-"f     c #B48300",
-"g     c #B18100",
-"h     c #B07F00",
-"i     c #A67600",
-"j     c #A17200",
-"k     c #9E7000",
-"l     c #9D6E00",
-"m     c #996A00",
-"n     c #885C00",
-"o     c #BA8800",
-"p     c #C19000",
-"q     c #DFAC00",
-"r     c #F2C000",
-"s     c #F8C500",
-"t     c #F6C300",
-"u     c #F4C100",
-"v     c #F1BE00",
-"w     c #EFBC00",
-"x     c #ECB900",
-"y     c #EAB700",
-"z     c #E8B500",
-"A     c #E5B200",
-"B     c #E3B000",
-"C     c #E1AE00",
-"D     c #DEAC00",
-"E     c #DCA900",
-"F     c #D9A700",
-"G     c #D7A500",
-"H     c #D5A200",
-"I     c #D2A000",
-"J     c #D09E00",
-"K     c #CE9B00",
-"L     c #CB9900",
-"M     c #C99700",
-"N     c #C79400",
-"O     c #C49200",
-"P     c #C29000",
-"Q     c #C08D00",
-"R     c #926500",
-"S     c #8B5E00",
-"T     c #875A00",
-"U     c #C59300",
-"V     c #FDD63E",
-"W     c #FDEDA8",
-"X     c #FFFDEB",
-"Y     c #FEFBE2",
-"Z     c #FEFAD9",
-"`     c #FEF9D1",
-" .    c #FDF7C8",
-"..    c #FCF6C0",
-"+.    c #FCF4B9",
-"@.    c #FBF3B0",
-"#.    c #FAF1A8",
-"$.    c #F9EFA0",
-"%.    c #F8ED98",
-"&.    c #F7EB92",
-"*.    c #F6E88B",
-"=.    c #F4E683",
-"-.    c #F3E47C",
-";.    c #F1E175",
-">.    c #E8CF54",
-",.    c #E7CD4F",
-"'.    c #E3C644",
-").    c #DBB82F",
-"!.    c #D9B62E",
-"~.    c #D4AC22",
-"{.    c #CDA217",
-"].    c #CBA117",
-"^.    c #B98600",
-"/.    c #855900",
-"(.    c #BE8D00",
-"_.    c #F5C200",
-":.    c #FBDC5C",
-"<.    c #FFFFFF",
-"[.    c #FFFEF5",
-"}.    c #FEFCE4",
-"|.    c #FEFADA",
-"1.    c #FCF4BC",
-"2.    c #F8E790",
-"3.    c #F7E58B",
-"4.    c #F3DB6E",
-"5.    c #EFD154",
-"6.    c #EECF50",
-"7.    c #E9C438",
-"8.    c #E4BB24",
-"9.    c #E2B922",
-"0.    c #DBAA08",
-"a.    c #D7A400",
-"b.    c #D09D00",
-"c.    c #C99600",
-"d.    c #C28F00",
-"e.    c #B18000",
-"f.    c #865A00",
-"g.    c #F9D23B",
-"h.    c #FFFEF3",
-"i.    c #FFFEF7",
-"j.    c #F7F4E4",
-"k.    c #C2A558",
-"l.    c #976C09",
-"m.    c #8C5F00",
-"n.    c #8F6200",
-"o.    c #926400",
-"p.    c #936600",
-"q.    c #946600",
-"r.    c #956700",
-"s.    c #956800",
-"t.    c #966900",
-"u.    c #9B6E00",
-"v.    c #A97A00",
-"w.    c #B38100",
-"x.    c #875B00",
-"y.    c #EBB800",
-"z.    c #FBE99E",
-"A.    c #F7F3DE",
-"B.    c #9D761C",
-"C.    c #895D00",
-"D.    c #8A5E00",
-"E.    c #976A00",
-"F.    c #986A00",
-"G.    c #B68300",
-"H.    c #AC7B00",
-"I.    c #845800",
-"J.    c #F0BD00",
-"K.    c #FEFBE0",
-"L.    c #FEFBE4",
-"M.    c #C2A456",
-"N.    c #AF912F",
-"O.    c #E9E17C",
-"P.    c #FFFD97",
-"Q.    c #FFFB95",
-"R.    c #FFF893",
-"S.    c #FEF690",
-"T.    c #FEF48E",
-"U.    c #FEF28C",
-"V.    c #FEF08A",
-"W.    c #FEED88",
-"X.    c #FEEB85",
-"Y.    c #FDE983",
-"Z.    c #FDE681",
-"`.    c #FDE47F",
-" +    c #FDE27D",
-".+    c #FDE07A",
-"++    c #FDDE78",
-"@+    c #FCDB76",
-"#+    c #FCD974",
-"$+    c #FCD772",
-"%+    c #FCD56F",
-"&+    c #FCD26D",
-"*+    c #E9BD57",
-"=+    c #B88A21",
-"-+    c #B68401",
-";+    c #B48303",
-">+    c #B17F01",
-",+    c #AF7F00",
-"'+    c #EEBB00",
-")+    c #FEFADC",
-"!+    c #966B09",
-"~+    c #AF902E",
-"{+    c #FFFDC7",
-"]+    c #FFFFF8",
-"^+    c #FFFFF0",
-"/+    c #FFFEEA",
-"(+    c #FFFEE3",
-"_+    c #FFFDDC",
-":+    c #FFFDD5",
-"<+    c #FFFCCF",
-"[+    c #FFFBC8",
-"}+    c #FFFAC2",
-"|+    c #FFF9BC",
-"1+    c #FEF8B6",
-"2+    c #FEF7B0",
-"3+    c #FEF5AA",
-"4+    c #FEF4A5",
-"5+    c #FEF29F",
-"6+    c #FEF19A",
-"7+    c #FEEF95",
-"8+    c #FEED90",
-"9+    c #FDE887",
-"0+    c #FDDC78",
-"a+    c #FBCE69",
-"b+    c #B98B20",
-"c+    c #9B6D00",
-"d+    c #B78605",
-"e+    c #B7880A",
-"f+    c #B28205",
-"g+    c #AE7D00",
-"h+    c #FDF8D1",
-"i+    c #FDF9D5",
-"j+    c #E9DB77",
-"k+    c #FFFCC0",
-"l+    c #FFFFF3",
-"m+    c #FFFFF6",
-"n+    c #FFFEED",
-"o+    c #FFFEE7",
-"p+    c #FFFEE1",
-"q+    c #FFFDDB",
-"r+    c #FFFDD4",
-"s+    c #F3EBB4",
-"t+    c #BF9D3E",
-"u+    c #A57A0C",
-"v+    c #CEB45A",
-"w+    c #FEF6B0",
-"x+    c #FEF199",
-"y+    c #FEEE94",
-"z+    c #FEEC8F",
-"A+    c #FEEB8A",
-"B+    c #FDE986",
-"C+    c #E9B953",
-"D+    c #B98A0B",
-"E+    c #BC9016",
-"F+    c #B4850B",
-"G+    c #E9B600",
-"H+    c #FDF7CA",
-"I+    c #FDF7CC",
-"J+    c #8C6000",
-"K+    c #FEF58F",
-"L+    c #FFFEE2",
-"M+    c #FFFEEB",
-"N+    c #FFFEEC",
-"O+    c #FEFABD",
-"P+    c #FEF593",
-"Q+    c #FEF38D",
-"R+    c #FEF18B",
-"S+    c #FEEF89",
-"T+    c #F8E57F",
-"U+    c #A87B08",
-"V+    c #A17300",
-"W+    c #9E6F00",
-"X+    c #C1992E",
-"Y+    c #FDDF79",
-"Z+    c #FCDC77",
-"`+    c #FCDA75",
-" @    c #FCD873",
-".@    c #FCD671",
-"+@    c #FCD46E",
-"@@    c #FCD16C",
-"#@    c #FBCF6A",
-"$@    c #FBCB66",
-"%@    c #BA8C10",
-"&@    c #BF9720",
-"*@    c #B68810",
-"=@    c #E6B300",
-"-@    c #FCF5C3",
-";@    c #F8E9A0",
-">@    c #FFFEDF",
-",@    c #FEF8B8",
-"'@    c #FEF08B",
-")@    c #C5A132",
-"!@    c #A07200",
-"~@    c #9F7100",
-"{@    c #EBC961",
-"]@    c #FCDC76",
-"^@    c #FCDA74",
-"/@    c #FCD570",
-"(@    c #FCD36E",
-"_@    c #FBCD68",
-":@    c #FBCA65",
-"<@    c #BB8F16",
-"[@    c #C49E2C",
-"}@    c #B88B16",
-"|@    c #A87800",
-"1@    c #A87900",
-"2@    c #FBF4BC",
-"3@    c #F5E38D",
-"4@    c #FFFDD7",
-"5@    c #FAF5CB",
-"6@    c #CDAD3F",
-"7@    c #BC9522",
-"8@    c #D2B244",
-"9@    c #F8E67F",
-"0@    c #FEED87",
-"a@    c #FEEB86",
-"b@    c #AD8211",
-"c@    c #9C6E00",
-"d@    c #CBA43C",
-"e@    c #FCDB75",
-"f@    c #EFC863",
-"g@    c #BB9029",
-"h@    c #AE811B",
-"i@    c #D4A843",
-"j@    c #FBCC67",
-"k@    c #BD921B",
-"l@    c #C7A438",
-"m@    c #B98F1B",
-"n@    c #E0AD00",
-"o@    c #FAF2B4",
-"p@    c #EDD05A",
-"q@    c #FAF4C2",
-"r@    c #B89127",
-"s@    c #A57600",
-"t@    c #B58B19",
-"u@    c #FDEA85",
-"v@    c #CBA33B",
-"w@    c #E9C25D",
-"x@    c #9C6F07",
-"y@    c #B98C27",
-"z@    c #FBC964",
-"A@    c #BF9623",
-"B@    c #CBAB43",
-"C@    c #BA9120",
-"D@    c #DDAB00",
-"E@    c #F9F0AD",
-"F@    c #EBCE57",
-"G@    c #D3B964",
-"H@    c #DBBC52",
-"I@    c #FDE781",
-"J@    c #AC8010",
-"K@    c #CAA23A",
-"L@    c #B68B23",
-"M@    c #E7B652",
-"N@    c #C29C2D",
-"O@    c #CEB04D",
-"P@    c #BB9124",
-"Q@    c #DBA800",
-"R@    c #F8EEA5",
-"S@    c #E2B929",
-"T@    c #916300",
-"U@    c #FDE782",
-"V@    c #BC9730",
-"W@    c #BD9628",
-"X@    c #C29B2F",
-"Y@    c #E3BD57",
-"Z@    c #9B6F07",
-"`@    c #C59532",
-" #    c #C6A239",
-".#    c #D0B355",
-"+#    c #BA9126",
-"@#    c #D8A500",
-"##    c #F7EC9E",
-"$#    c #DEB21D",
-"%#    c #FDE57F",
-"&#    c #BA952E",
-"*#    c #B78E1F",
-"=#    c #FDE27C",
-"-#    c #EBCC64",
-";#    c #FCD46F",
-">#    c #C9A846",
-",#    c #D3B85F",
-"'#    c #B99127",
-")#    c #F5EA98",
-"!#    c #D5A300",
-"~#    c #C5A542",
-"{#    c #D4AF45",
-"]#    c #FDDF7A",
-"^#    c #AE8317",
-"/#    c #F6CC66",
-"(#    c #AD811B",
-"_#    c #D9A845",
-":#    c #CEB055",
-"<#    c #D5BC68",
-"[#    c #B99129",
-"}#    c #F0DF7E",
-"|#    c #E7D47E",
-"1#    c #EAC962",
-"2#    c #D8B34B",
-"3#    c #BB8E28",
-"4#    c #F4C25E",
-"5#    c #AB7B00",
-"6#    c #D3B965",
-"7#    c #D8C174",
-"8#    c #B8902B",
-"9#    c #CF9D00",
-"0#    c #EAD368",
-"a#    c #C3A13C",
-"b#    c #A77B0F",
-"c#    c #9A6C07",
-"d#    c #A67814",
-"e#    c #A07213",
-"f#    c #AC7D00",
-"g#    c #D7C074",
-"h#    c #DAC57E",
-"i#    c #B78F2C",
-"j#    c #CC9A00",
-"k#    c #E1C34A",
-"l#    c #CD9A00",
-"m#    c #E4BE57",
-"n#    c #D1A13F",
-"o#    c #AE7E00",
-"p#    c #DCC885",
-"q#    c #DDCA89",
-"r#    c #B68F2E",
-"s#    c #CA9700",
-"t#    c #DCBB3E",
-"u#    c #BA8F23",
-"v#    c #A57719",
-"w#    c #E1D094",
-"x#    c #DFCE93",
-"y#    c #B58E30",
-"z#    c #C79500",
-"A#    c #D0A71E",
-"B#    c #AE8116",
-"C#    c #9A6D0F",
-"D#    c #E5D6A3",
-"E#    c #E0D099",
-"F#    c #B68F32",
-"G#    c #C99B0E",
-"H#    c #996C00",
-"I#    c #AD7F17",
-"J#    c #B48515",
-"K#    c #B6880D",
-"L#    c #EADFB5",
-"M#    c #DFCE9A",
-"N#    c #B58D31",
-"O#    c #C18F00",
-"P#    c #AF8118",
-"Q#    c #A67810",
-"R#    c #9A6C06",
-"S#    c #946706",
-"T#    c #B98917",
-"U#    c #B48400",
-"V#    c #C9A84C",
-"W#    c #F0E7C6",
-"X#    c #DAC790",
-"Y#    c #B28A2B",
-"Z#    c #BF8D00",
-"`#    c #AA7B00",
-" $    c #AB7C00",
-".$    c #B38300",
-"+$    c #BC9019",
-"@$    c #ECE0BB",
-"#$    c #EFE6C8",
-"$$    c #CFB676",
-"%$    c #A97E1E",
-"&$    c #906200",
-"*$    c #AA7900",
-"=$    c #B28200",
-"-$    c #B98A0D",
-";$    c #CAA94D",
-">$    c #ECE1BE",
-",$    c #F4EFD9",
-"'$    c #E1D1A9",
-")$    c #BD9A49",
-"!$    c #996C0B",
-"~$    c #B98700",
-"{$    c #B98701",
-"]$    c #BA8803",
-"^$    c #BA8A05",
-"/$    c #BB8C07",
-"($    c #BC8D0A",
-"_$    c #BD8F0C",
-":$    c #BD8F0E",
-"<$    c #BD9010",
-"[$    c #BE9113",
-"}$    c #BE9317",
-"|$    c #BF951B",
-"1$    c #C09720",
-"2$    c #C39C29",
-"3$    c #C5A030",
-"4$    c #C6A237",
-"5$    c #CAA842",
-"6$    c #CCAD4B",
-"7$    c #CEB155",
-"8$    c #D2B964",
-"9$    c #D5BD6E",
-"0$    c #D8C279",
-"a$    c #DDCA8A",
-"b$    c #E1D198",
-"c$    c #E4D5A3",
-"d$    c #EBE1BA",
-"e$    c #F2EBD0",
-"f$    c #F0E8CF",
-"g$    c #E2D2AC",
-"h$    c #C6A863",
-"i$    c #AA7E1C",
-"j$    c #885C01",
-"k$    c #B78501",
-"l$    c #B98906",
-"m$    c #BB8B0A",
-"n$    c #BC8F0E",
-"o$    c #BF9314",
-"p$    c #C09618",
-"q$    c #C1981C",
-"r$    c #C39C21",
-"s$    c #C59F27",
-"t$    c #C7A32E",
-"u$    c #C9A736",
-"v$    c #CBAA3D",
-"w$    c #CCAD43",
-"x$    c #CEB049",
-"y$    c #CFB250",
-"z$    c #D1B658",
-"A$    c #D3B960",
-"B$    c #D5BC67",
-"C$    c #D7C071",
-"D$    c #D9C379",
-"E$    c #DBC681",
-"F$    c #DECC8E",
-"G$    c #E0CF97",
-"H$    c #E1D19D",
-"I$    c #E2D2A2",
-"J$    c #DECC9C",
-"K$    c #D1B97E",
-"L$    c #BE9B4D",
-"M$    c #AA7F1E",
-"N$    c #8B5F05",
-"O$    c #A27200",
-"P$    c #AE7C00",
-"Q$    c #B48201",
-"R$    c #B68606",
-"S$    c #B8890A",
-"T$    c #B98B0E",
-"U$    c #BC9013",
-"V$    c #BC9216",
-"W$    c #BE9419",
-"X$    c #BF971E",
-"Y$    c #C09922",
-"Z$    c #C5A02F",
-"`$    c #C5A233",
-" %    c #C5A236",
-".%    c #C5A339",
-"+%    c #C5A33C",
-"@%    c #C5A33F",
-"#%    c #C5A442",
-"$%    c #C5A446",
-"%%    c #C4A448",
-"&%    c #C4A44C",
-"*%    c #C4A550",
-"=%    c #C4A552",
-"-%    c #C5A656",
-";%    c #C6A75B",
-">%    c #C6A85D",
-",%    c #C3A458",
-"'%    c #B6913D",
-")%    c #9E7317",
-"!%    c #895C02",
-"~%    c #895C00",
-"{%    c #885B00",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"              . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6               ",
-"            7 8 9 @ 0 $ % & * = - ; > , ' ) ! a { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 b             ",
-"          8 c + @ # d e f & g h - ; > , ' ) i a { j ^ k l _ : m [ } | 1 2 3 4 5 6 b n           ",
-"        o o o @ p q r s t u v w x y z A B C D E F G H I J K L M N O P Q 7 e i R S b n T         ",
-"      0 # # # U s V W X Y Z `  ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].Q 7 + ^.& 1 b n T /.      ",
-"      $ $ $ (._.:.<.[.X }.|.` 1.2.3.4.5.6.7.8.9.0.a.H I b.K L c.N O d.Q 7 + ^.e e.4 n f./.      ",
-"      f % % F g.h.i.j.k.l.b S m.5 4 4 n.3 3 2 o.R p.q.q.| r.s.s.} } t.u.v.0 0 e w./ x.f./.      ",
-"      & & & y.z.X A.B.C.D.6 m.5 4 n.n.3 2 o.1 p.q.| r.s.} t.[ [ E.F.F.F.F.k e G.w.H.x.f.I.      ",
-"      e.e.g J.K.L.M.C.D.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+%+&+*+=+: : ' -+;+>+T /.I.      ",
-"      ,+,+,+'+Z )+!+D.~+Q.{+]+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+/ d+e+f+f./.I.      ",
-"      ; ; g+y.h+i+D.6 j+k+l+m+l+n+o+p+q+r+s+t+j u+v+w+3+4+5+x+y+z+A+B+#+C+l l D+E+F+f.I.I.      ",
-"      > > > G+H+I+6 J+K+L+M+N+O+P+Q+R+S+T+U+V+^ / W+X+Y+Z+`+ @.@+@@@#@a+$@k k %@&@*@/.I.I.      ",
-"      , , , =@-@;@J+5 Q+>@L+,@Q+U.'@S+W.)@] !@~@k ( _ {@]@^@$+/@(@@@#@_@:@^ ^ <@[@}@/.I.I.      ",
-"      |@1@1@B 2@3@5 4 V.4@5@6@7@8@9@0@a@b@j ^ k ( c@c+d@e@ @f@g@h@i@a+j@:@] ] k@l@m@I.I.I.      ",
-"      ! ! ! n@o@p@4 n.0@q@r@! s@a t@u@Y.j ^ / W+l c+: v@#+w@x@| p.R y@$@z@{ { A@B@C@I.I.I.      ",
-"      ~ s@s@D@E@F@n.3 u@G@s@s@a { { H@I@J@/ W+l _ : < K@ @L@r.q.1 2 3 M@z@s@s@N@O@P@I.I.I.      ",
-"      { { { Q@R@S@n.T@U@V@a { { ] V+W@`.X@W+l _ c+: < Y@.@Z@q.p.o.T@n.`@z@! !  #.#+#I.I.I.      ",
-"      j j j @###$#3 2 %#&#{ ] V+j ^ *#=#-#l _ c+: < F.f@;#| p.R 2 3 n.`@z@|@|@>#,#'#I.I.I.      ",
-"      ~@^ ^ H )#!#2 R =#~#j j ^ ~@/ {#]#^#c+: : < F.[ x@/#(#R 2 3 n.4 _#z@v.v.:#<#[#I.I.I.      ",
-"      W+W+W+I }#I 2 1 Y+|#^ ~@/ k ( 1#2#c+: < F.F.t.} r.3#i@o.3 n.4 5 4#z@5#5#6#7#8#I.I.I.      ",
-"      _ c@c@9#0#b.R p.]@a#k W+( l c@b#b#: < F.E.t.s.| q.c#d#3 n.4 5 J+e#z@; f#g#h#i#I.I.I.      ",
-"      : : : j#k#l#R q.m#( l c@_ c+c+: < < F.[ } s.| p.1 o.3 n.n.4 J+6 D.n#o#o#p#q#r#I.I.I.      ",
-"      F.m m s#t#s#1 q.u#_ c+c+: : < < F.[ t.} r.q.p.R 2 3 n.4 4 5 6 D.C.v#= = w#x#y#I.I.I.      ",
-"      [ [ [ z#A#z#p.| B#: : < < F.F.[ t.} s.| q.1 R 2 3 n.4 5 5 6 D.C.n C#g g D#E#F#I.I.I.      ",
-"      r.r.r.O G#O H#r.I#< F.F.E.[ t.} s.r.q.p.R o.T@3 n.4 5 J+6 D.C.n x.J#& K#L#M#N#I.I.I.      ",
-"      p.p.p.O#d.d.5#r.t.P#Q#t.} s.r.| R#p.1 o.2 3 n.n.4 S#m.6 D.C.n C#T#U#U#V#W#X#Y#I.I.I.      ",
-"      2 2 2 @ Z#Z#. ( t.F.< : _ ( k ^ j ] a s@! |@v.`# $; o#,+= * .$f % $ +$@$#$$$%$I.I.I.      ",
-"      &$3 3 ' 8 8 8 o *$l < c+c@( / ^ j { a s@! |@v.`#> ; o#= g =$f % -$;$>$,$'$)$!$I.I.I.      ",
-"      4 4 4 p.$ ~$~$~${$]$^$/$($_$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$I.I.I.      ",
-"      m.m.m.m.q.& e e k$l$m$n$o$p$q$r$s$t$u$v$w$x$y$z$A$B$C$D$E$F$G$H$I$J$K$L$M$N$I.I.I.I.      ",
-"      D.D.D.D.D.n.O$P$Q$R$S$T$U$V$W$X$Y$2$Z$`$ %.%+%@%#%$%%%&%*%=%-%;%>%,%'%)%!%I.I.I.I.I.      ",
-"        ~%~%~%~%~%n n n {%x.x.T f.f././.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.        ",
-"          x.x.T T T T f.f.f./././.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.          ",
-"            /././././.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.            ",
-"              I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.              ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                "};
diff --git a/src/icons/patient.xpm b/src/icons/patient.xpm
deleted file mode 100644 (file)
index fdaf6c1..0000000
+++ /dev/null
@@ -1,738 +0,0 @@
-/* XPM */
-static const char * patient_xpm[] = {
-"48 48 687 2",
-"      c None",
-".     c #E7903C",
-"+     c #E38D39",
-"@     c #DE8936",
-"#     c #D98533",
-"$     c #D58130",
-"%     c #D07D2D",
-"&     c #F59D45",
-"*     c #F19A43",
-"=     c #ED9640",
-"-     c #E9923D",
-";     c #E48E3A",
-">     c #DF8A37",
-",     c #DB8634",
-"'     c #D68231",
-")     c #D17E2E",
-"!     c #CD7A2B",
-"~     c #C87528",
-"{     c #C37125",
-"]     c #FBA34A",
-"^     c #F8A047",
-"/     c #F39C44",
-"(     c #EF9841",
-"_     c #EA933E",
-":     c #E58F3B",
-"<     c #E89D45",
-"[     c #E49942",
-"}     c #D78231",
-"|     c #D27E2E",
-"1     c #C87628",
-"2     c #BF6D22",
-"3     c #FCA34A",
-"4     c #FDA54B",
-"5     c #F9A048",
-"6     c #F49C45",
-"7     c #F5B65A",
-"8     c #FBD572",
-"9     c #FFE284",
-"0     c #FFE18A",
-"a     c #FFDC83",
-"b     c #FFD06F",
-"c     c #F7B554",
-"d     c #E0923A",
-"e     c #BA691F",
-"f     c #F59E46",
-"g     c #F9A148",
-"h     c #F7A44A",
-"i     c #FCDD7B",
-"j     c #FFF3A2",
-"k     c #FFFBD4",
-"l     c #FFFFE0",
-"m     c #FFFFD9",
-"n     c #FFFFD1",
-"o     c #FFFFC9",
-"p     c #FFF4AE",
-"q     c #FFD275",
-"r     c #F1A646",
-"s     c #C77627",
-"t     c #B5651B",
-"u     c #F29B44",
-"v     c #F6A24A",
-"w     c #FDE784",
-"x     c #FFFDD0",
-"y     c #FFFFF3",
-"z     c #FFFFEC",
-"A     c #FFFFE4",
-"B     c #FFF6C2",
-"C     c #FFECA7",
-"D     c #FFE99F",
-"E     c #FFF0A9",
-"F     c #FFFFB9",
-"G     c #FFE48D",
-"H     c #F4A543",
-"I     c #C37224",
-"J     c #B9681E",
-"K     c #B4641B",
-"L     c #EC953F",
-"M     c #F09942",
-"N     c #FBDC7A",
-"O     c #FFFDCA",
-"P     c #FFFFFD",
-"Q     c #FFFEF0",
-"R     c #FFF5BA",
-"S     c #FFE684",
-"T     c #FFDC76",
-"U     c #FFD46E",
-"V     c #FFCD67",
-"W     c #FFC660",
-"X     c #FFC460",
-"Y     c #FFE189",
-"Z     c #FFDE81",
-"`     c #EF9D3E",
-" .    c #B96A1E",
-"..    c #AF5F17",
-"+.    c #E8923D",
-"@.    c #EB943F",
-"#.    c #F1AA50",
-"$.    c #FFFEF2",
-"%.    c #FFF29D",
-"&.    c #FFE983",
-"*.    c #FFE27C",
-"=.    c #FFDB75",
-"-.    c #FFD36D",
-";.    c #FFCB65",
-">.    c #FFC55F",
-",.    c #FFC15B",
-"'.    c #FFBF59",
-").    c #FFD474",
-"!.    c #FFC561",
-"~.    c #CC7C2A",
-"{.    c #B3641A",
-"].    c #AE5E17",
-"^.    c #E28C39",
-"/.    c #E6903C",
-"(.    c #F7CB6A",
-"_.    c #FFF8C8",
-":.    c #FFFFED",
-"<.    c #FFF1A0",
-"[.    c #FFE57F",
-"}.    c #FFDE78",
-"|.    c #FFD872",
-"1.    c #FFD16B",
-"2.    c #FFC963",
-"3.    c #FFC45E",
-"4.    c #FFC35D",
-"5.    c #FFC25C",
-"6.    c #FFC25D",
-"7.    c #EB983A",
-"8.    c #B3651C",
-"9.    c #AD5D16",
-"0.    c #A85913",
-"a.    c #E08B38",
-"b.    c #FFE17F",
-"c.    c #FFFFE1",
-"d.    c #FFF5BF",
-"e.    c #FFE37D",
-"f.    c #FFDF79",
-"g.    c #FFDA74",
-"h.    c #FFC761",
-"i.    c #FFAF49",
-"j.    c #B3671E",
-"k.    c #AB5C15",
-"l.    c #A75812",
-"m.    c #DA8634",
-"n.    c #DC8735",
-"o.    c #E59B44",
-"p.    c #FFE28B",
-"q.    c #FFFFDB",
-"r.    c #FFE184",
-"s.    c #FFDD77",
-"t.    c #FFD973",
-"u.    c #FFCF69",
-"v.    c #FFC862",
-"w.    c #FFCC66",
-"x.    c #FFB44E",
-"y.    c #C67726",
-"z.    c #AA5C15",
-"A.    c #A55711",
-"B.    c #D88332",
-"C.    c #E29640",
-"D.    c #FFDD84",
-"E.    c #FFFAC6",
-"F.    c #FFD670",
-"G.    c #FFD56F",
-"H.    c #FFD26C",
-"I.    c #FFCE68",
-"J.    c #FFCA64",
-"K.    c #FFB852",
-"L.    c #C67827",
-"M.    c #A85A14",
-"N.    c #A35510",
-"O.    c #D3802F",
-"P.    c #DF923C",
-"Q.    c #FFD87D",
-"R.    c #FFEFAC",
-"S.    c #FFD771",
-"T.    c #C47525",
-"U.    c #A65812",
-"V.    c #A1530F",
-"W.    c #CE7B2C",
-"X.    c #CF7C2D",
-"Y.    c #D07E2D",
-"Z.    c #FFCC6B",
-"`.    c #FFE392",
-" +    c #FFD06A",
-".+    c #FFE17B",
-"++    c #FFE680",
-"@+    c #FFB54F",
-"#+    c #AC611A",
-"$+    c #A45610",
-"%+    c #9F520D",
-"&+    c #C97729",
-"*+    c #CB782A",
-"=+    c #CC7A2A",
-"-+    c #F5B251",
-";+    c #FFE592",
-">+    c #FFE47E",
-",+    c #FFEA84",
-"'+    c #F2A443",
-")+    c #A75C15",
-"!+    c #9D500C",
-"~+    c #C77427",
-"{+    c #E1943C",
-"]+    c #FFCF6F",
-"^+    c #FFE882",
-"/+    c #FFEE88",
-"(+    c #FFF08A",
-"_+    c #D3842E",
-":+    c #A45611",
-"<+    c #9F510D",
-"[+    c #C27024",
-"}+    c #C87829",
-"|+    c #FBB956",
-"1+    c #FFCA65",
-"2+    c #FFEF89",
-"3+    c #FFF28C",
-"4+    c #FFF38D",
-"5+    c #FAAE4A",
-"6+    c #AD6218",
-"7+    c #A0530E",
-"8+    c #9C4F0B",
-"9+    c #BE6C21",
-"0+    c #C06F23",
-"a+    c #D68833",
-"b+    c #FFBD57",
-"c+    c #FFEB85",
-"d+    c #FFBB55",
-"e+    c #C67A28",
-"f+    c #A25510",
-"g+    c #994C09",
-"h+    c #BC6D22",
-"i+    c #E89A3D",
-"j+    c #FFE781",
-"k+    c #FFE07A",
-"l+    c #FFBE58",
-"m+    c #E29237",
-"n+    c #A45812",
-"o+    c #9A4D0A",
-"p+    c #94761D",
-"q+    c #B6651C",
-"r+    c #B6661C",
-"s+    c #B86A20",
-"t+    c #E39438",
-"u+    c #FFB751",
-"v+    c #DC8D34",
-"w+    c #9D510D",
-"x+    c #57640A",
-"y+    c #137909",
-"z+    c #3FA51F",
-"A+    c #9B6E1A",
-"B+    c #B16219",
-"C+    c #B1621A",
-"D+    c #B3651B",
-"E+    c #C97A29",
-"F+    c #EF9F3F",
-"G+    c #FFB953",
-"H+    c #EC9D3E",
-"I+    c #C07223",
-"J+    c #81550A",
-"K+    c #167C0B",
-"L+    c #13790A",
-"M+    c #117708",
-"N+    c #42A821",
-"O+    c #40A620",
-"P+    c #45A01E",
-"Q+    c #A66217",
-"R+    c #AC5D16",
-"S+    c #AC5F17",
-"T+    c #B76A1F",
-"U+    c #C27423",
-"V+    c #C07222",
-"W+    c #B2651B",
-"X+    c #A35712",
-"Y+    c #A0520E",
-"Z+    c #915009",
-"`+    c #217C0C",
-" @    c #117709",
-".@    c #0E7407",
-"+@    c #42A921",
-"@@    c #62AF25",
-"#@    c #A07120",
-"$@    c #A75912",
-"%@    c #A65711",
-"&@    c #A55712",
-"*@    c #A25410",
-"=@    c #9F530E",
-"-@    c #9B4E0A",
-";@    c #845F0B",
-">@    c #3B9E11",
-",@    c #1FA210",
-"'@    c #1A880D",
-")@    c #147A0A",
-"!@    c #0C7206",
-"~@    c #3EA41F",
-"{@    c #3FA520",
-"]@    c #45AD23",
-"^@    c #62D131",
-"/@    c #AAE890",
-"(@    c #EBF2E0",
-"_@    c #C39E6F",
-":@    c #A2540F",
-"<@    c #9B4E0B",
-"[@    c #6A7A10",
-"}@    c #31AC14",
-"|@    c #29B215",
-"1@    c #26B115",
-"2@    c #23AE12",
-"3@    c #1B970F",
-"4@    c #3CA21E",
-"5@    c #3DA31E",
-"6@    c #45AC22",
-"7@    c #68D534",
-"8@    c #C4F0B0",
-"9@    c #FBFEFA",
-"0@    c #F5FDF4",
-"a@    c #CAF1BC",
-"b@    c #86C959",
-"c@    c #7C8519",
-"d@    c #8D6510",
-"e@    c #9B4D0A",
-"f@    c #88610D",
-"g@    c #6F7D12",
-"h@    c #41AB18",
-"i@    c #30B518",
-"j@    c #2CB417",
-"k@    c #2BB316",
-"l@    c #2CB418",
-"m@    c #2CB41A",
-"n@    c #28B217",
-"o@    c #1A9B0F",
-"p@    c #107608",
-"q@    c #0B7106",
-"r@    c #096F05",
-"s@    c #389E1C",
-"t@    c #399F1D",
-"u@    c #3CA31E",
-"v@    c #5CCC2E",
-"w@    c #ABE891",
-"x@    c #F7FEF5",
-"y@    c #B0E99B",
-"z@    c #58CD2C",
-"A@    c #54CB2A",
-"B@    c #50C828",
-"C@    c #4BC525",
-"D@    c #46C323",
-"E@    c #42C021",
-"F@    c #3DBD1F",
-"G@    c #39BB1C",
-"H@    c #34B81A",
-"I@    c #2FB518",
-"J@    c #2BB215",
-"K@    c #2FB71B",
-"L@    c #34BA1F",
-"M@    c #36BB21",
-"N@    c #29B319",
-"O@    c #178A0D",
-"P@    c #0C7207",
-"Q@    c #096F04",
-"R@    c #369C1B",
-"S@    c #379D1B",
-"T@    c #49B825",
-"U@    c #74D64F",
-"V@    c #EBFCE8",
-"W@    c #EDFCEA",
-"X@    c #90DE73",
-"Y@    c #56CC2B",
-"Z@    c #53CA2A",
-"`@    c #4CC626",
-" #    c #48C324",
-".#    c #43C122",
-"+#    c #3FBE20",
-"@#    c #3BBC1D",
-"##    c #37B91B",
-"$#    c #32B719",
-"%#    c #2DB417",
-"&#    c #29B114",
-"*#    c #2BB417",
-"=#    c #33B91D",
-"-#    c #3ABE24",
-";#    c #41C329",
-">#    c #3ABF24",
-",#    c #23AD16",
-"'#    c #0F7808",
-")#    c #086E04",
-"!#    c #066C03",
-"~#    c #329819",
-"{#    c #33991A",
-"]#    c #37A01C",
-"^#    c #BCEDAE",
-"/#    c #E2F9DE",
-"(#    c #A4E590",
-"_#    c #50C928",
-":#    c #4FC827",
-"<#    c #4DC626",
-"[#    c #4AC525",
-"}#    c #43C121",
-"|#    c #3BBC1E",
-"1#    c #37BA1C",
-"2#    c #33B71A",
-"3#    c #2AB215",
-"4#    c #26B013",
-"5#    c #2AB317",
-"6#    c #33B91F",
-"7#    c #41C328",
-"8#    c #4CCB31",
-"9#    c #48C82F",
-"0#    c #32BA20",
-"a#    c #16910D",
-"b#    c #086E05",
-"c#    c #056B03",
-"d#    c #309618",
-"e#    c #319718",
-"f#    c #3EB21F",
-"g#    c #6BD04E",
-"h#    c #D6F7D1",
-"i#    c #BDEDB2",
-"j#    c #49C425",
-"k#    c #48C424",
-"l#    c #47C324",
-"m#    c #45C223",
-"n#    c #40BF20",
-"o#    c #3DBD1E",
-"p#    c #3ABB1D",
-"q#    c #36B91B",
-"r#    c #2FB517",
-"s#    c #27B013",
-"t#    c #24AF12",
-"u#    c #29B217",
-"v#    c #36BC21",
-"w#    c #47C82D",
-"x#    c #56D238",
-"y#    c #54D137",
-"z#    c #40C42A",
-"A#    c #1DA712",
-"B#    c #0A7005",
-"C#    c #046A02",
-"D#    c #2C9216",
-"E#    c #2D9317",
-"F#    c #2E9417",
-"G#    c #3DBB1E",
-"H#    c #96E086",
-"I#    c #CCF4C6",
-"J#    c #63CC49",
-"K#    c #41BF20",
-"L#    c #39BB1D",
-"M#    c #30B618",
-"N#    c #2DB416",
-"O#    c #26AF13",
-"P#    c #2BB419",
-"Q#    c #3CBF25",
-"R#    c #50CE34",
-"S#    c #60D93F",
-"T#    c #4DCC33",
-"U#    c #24B117",
-"V#    c #0B7807",
-"W#    c #036902",
-"X#    c #016701",
-"Y#    c #2A9015",
-"Z#    c #2B9115",
-"`#    c #2D9B17",
-" $    c #38BA1C",
-".$    c #AEEAA6",
-"+$    c #9FE393",
-"@$    c #35B91B",
-"#$    c #24AE12",
-"$$    c #22AD11",
-"%$    c #22AE12",
-"&$    c #27B116",
-"*$    c #33BA1F",
-"=$    c #46C72D",
-"-$    c #5ED73D",
-";$    c #6CE147",
-">$    c #69DE45",
-",$    c #53D138",
-"'$    c #2AB51C",
-")$    c #0C8107",
-"!$    c #036901",
-"~$    c #006600",
-"{$    c #278D14",
-"]$    c #288E14",
-"^$    c #2CA317",
-"/$    c #34B81C",
-"($    c #B5EEAF",
-"_$    c #67CE55",
-":$    c #37BA1D",
-"<$    c #35B81B",
-"[$    c #32B71A",
-"}$    c #31B618",
-"|$    c #2EB518",
-"1$    c #2CB316",
-"2$    c #28B114",
-"3$    c #27B014",
-"4$    c #25AF13",
-"5$    c #24AF13",
-"6$    c #24B014",
-"7$    c #28B317",
-"8$    c #31B91F",
-"9$    c #41C42A",
-"0$    c #57D239",
-"a$    c #6CE148",
-"b$    c #76E74E",
-"c$    c #6EE249",
-"d$    c #57D33A",
-"e$    c #2DB71E",
-"f$    c #0D8A09",
-"g$    c #026801",
-"h$    c #258B12",
-"i$    c #258B13",
-"j$    c #2AA116",
-"k$    c #33B81C",
-"l$    c #AEEDA6",
-"m$    c #4AC533",
-"n$    c #3BBE22",
-"o$    c #38BB20",
-"p$    c #34B91D",
-"q$    c #31B71B",
-"r$    c #2EB51A",
-"s$    c #2AB217",
-"t$    c #29B216",
-"u$    c #28B216",
-"v$    c #30B81D",
-"w$    c #38BD23",
-"x$    c #45C62D",
-"y$    c #56D239",
-"z$    c #6ADF46",
-"A$    c #7AEB52",
-"B$    c #7DEC53",
-"C$    c #70E34A",
-"D$    c #55D138",
-"E$    c #2BB61D",
-"F$    c #0C8909",
-"G$    c #016700",
-"H$    c #228811",
-"I$    c #238911",
-"J$    c #269A15",
-"K$    c #33B91E",
-"L$    c #87DF7A",
-"M$    c #46C62B",
-"N$    c #47C62B",
-"O$    c #44C429",
-"P$    c #3FC126",
-"Q$    c #3BBF23",
-"R$    c #37BC21",
-"S$    c #35BB20",
-"T$    c #32BA1E",
-"U$    c #32B91E",
-"V$    c #33BA1E",
-"W$    c #34BA20",
-"X$    c #37BD22",
-"Y$    c #3CC026",
-"Z$    c #44C62C",
-"`$    c #4FCD34",
-" %    c #5DD73E",
-".%    c #7CEC52",
-"+%    c #83F158",
-"@%    c #7DED54",
-"#%    c #4CCC33",
-"$%    c #24B118",
-"%%    c #098106",
-"&%    c #1F8510",
-"*%    c #208610",
-"=%    c #249012",
-"-%    c #2CB51B",
-";%    c #60D04C",
-">%    c #4FCC32",
-",%    c #54D036",
-"'%    c #55D137",
-")%    c #52CF35",
-"!%    c #4BCA30",
-"~%    c #47C82E",
-"{%    c #46C72C",
-"]%    c #4ACA31",
-"^%    c #4FCE34",
-"/%    c #60D940",
-"(%    c #6BE047",
-"_%    c #76E84E",
-":%    c #80EE55",
-"<%    c #85F259",
-"[%    c #82F057",
-"}%    c #73E64D",
-"|%    c #5BD63D",
-"1%    c #3DC128",
-"2%    c #19A910",
-"3%    c #047003",
-"4%    c #1D830E",
-"5%    c #1D830F",
-"6%    c #23A014",
-"7%    c #36BC23",
-"8%    c #50CC37",
-"9%    c #58D33A",
-"0%    c #5FD83E",
-"a%    c #61D940",
-"b%    c #62DA40",
-"c%    c #61DA40",
-"d%    c #63DA41",
-"e%    c #65DC43",
-"f%    c #72E54C",
-"g%    c #77E950",
-"h%    c #7FEE55",
-"i%    c #74E64D",
-"j%    c #46C82F",
-"k%    c #26B31A",
-"l%    c #0C8F08",
-"m%    c #1A800D",
-"n%    c #1B810D",
-"o%    c #1E8710",
-"p%    c #20A514",
-"q%    c #35BB22",
-"r%    c #4BCA31",
-"s%    c #58D43B",
-"t%    c #66DD43",
-"u%    c #69DF46",
-"v%    c #70E44B",
-"w%    c #77E84F",
-"x%    c #7AEA51",
-"y%    c #7CEC53",
-"z%    c #7EED54",
-"A%    c #7FED54",
-"B%    c #6BE148",
-"C%    c #5BD53C",
-"D%    c #44C72E",
-"E%    c #29B51C",
-"F%    c #119C0B",
-"G%    c #036C02",
-"H%    c #187E0C",
-"I%    c #1A800C",
-"J%    c #1E840F",
-"K%    c #1E9A12",
-"L%    c #27B31A",
-"M%    c #3BC128",
-"N%    c #66DD44",
-"O%    c #6EE34A",
-"P%    c #71E54C",
-"Q%    c #75E74E",
-"R%    c #74E74E",
-"S%    c #67DD44",
-"T%    c #5CD63D",
-"U%    c #4DCD34",
-"V%    c #39BF26",
-"W%    c #22B017",
-"X%    c #0F950A",
-"Y%    c #046D02",
-"Z%    c #157B0B",
-"`%    c #1B8810",
-" &    c #1C9E11",
-".&    c #24AF18",
-"+&    c #31BA21",
-"@&    c #3EC32A",
-"#&    c #49CA31",
-"$&    c #53D037",
-"%&    c #59D43B",
-"&&    c #5CD73E",
-"*&    c #5ED73E",
-"=&    c #5AD53C",
-"-&    c #55D239",
-";&    c #41C52C",
-">&    c #34BB22",
-",&    c #25B219",
-"'&    c #16A20E",
-")&    c #0A7E07",
-"!&    c #026802",
-"~&    c #147A09",
-"{&    c #157B0A",
-"]&    c #177D0D",
-"^&    c #188C0E",
-"/&    c #1A9911",
-"(&    c #1FA414",
-"_&    c #23B017",
-":&    c #28B41B",
-"<&    c #20AF16",
-"[&    c #19A311",
-"}&    c #11910B",
-"|&    c #0A7C07",
-"1&    c #0F7508",
-"2&    c #12780A",
-"3&    c #13790B",
-"4&    c #11830B",
-"5&    c #12830B",
-"6&    c #11820A",
-"7&    c #0F8109",
-"8&    c #0C7808",
-"9&    c #066C04",
-"0&    c #0D7307",
-"a&    c #0D7306",
-"b&    c #0B7105",
-"c&    c #056B02",
-"d&    c #076D03",
-"                                                                                                ",
-"                                                                                                ",
-"                                        . + @ # $ %                                             ",
-"                                  & * = - ; > , ' ) ! ~ {                                       ",
-"                                ] ^ / ( _ : < [ } | ! 1 { 2                                     ",
-"                              3 4 5 6 7 8 9 0 a b c d 1 { 2 e                                   ",
-"                            f g g h i j k l m n o p q r s 2 e t                                 ",
-"                            u & v w x y z A B C D E F G H I J K                                 ",
-"                          L ( M N O P Q R S T U V W X Y Z `  .K ..                              ",
-"                          +.@.#.j y $.%.&.*.=.-.;.>.,.'.).!.~.{.].                              ",
-"                        ^.; /.(._.:.<.&.[.}.|.1.2.3.4.5.5.6.7.8.9.0.                            ",
-"                        @ a.^.b.c.d.[.e.f.g.U V h.4.3.h.2.3.i.j.k.l.                            ",
-"                        m.n.o.p.q.r.s.T t.U u.2.>.3.v.V 1.w.x.y.z.A.                            ",
-"                        ' B.C.D.E.F.F.G.H.I.J.W 3.h.I.G.|.1.K.L.M.N.                            ",
-"                        | O.P.Q.R.u.u.V w.2.h.W v.V S.}.f.-.K.T.U.V.                            ",
-"                        W.X.Y.Z.`.J.;.J.J.2.2.;. +S..+++*.-.@+#+$+%+                            ",
-"                        &+*+=+-+;+h.2.w.V V  +G.=.>+,+,+.+w.'+)+V.!+                            ",
-"                          ~+s {+]+h.V 1.G.|.T *.^+/+(+&.=.,._+:+<+                              ",
-"                          [+{ }+|+1+H.g..+++,+2+3+4+/+*.I.5+6+7+8+                              ",
-"                          9+2 0+a+b+I.=.>+c+2+3+3+/+>+U d+e+f+!+g+                              ",
-"                            e e h+i+'.1.}.++,+,+j+k+-.l+m+n+!+o+                                ",
-"                            p+q+r+s+t+K.v.U t.t.U v.u+v+n+w+o+x+y+                              ",
-"                            z+A+B+C+D+E+F+x.G+G+x.H+I+f+w+o+J+K+L+M+                            ",
-"                          N+O+P+Q+9.R+R+S+T+U+V+W+X+Y+8+g+Z+`+K+L+ @.@                          ",
-"                        N+N+O++@@@#@$@l.%@&@:+*@=@!+-@g+;@>@,@'@)@M+.@!@                        ",
-"                      ~@{@{@]@^@/@(@_@:@V.Y+<+!+<@g+g+[@}@|@1@2@3@y+.@!@                        ",
-"                      4@5@6@7@8@9@0@a@b@c@d@e@g+f@g@h@i@j@k@l@m@n@o@p@q@r@                      ",
-"                    s@t@u@v@w@x@x@y@z@A@B@C@D@E@F@G@H@I@J@l@K@L@M@N@O@P@Q@                      ",
-"                    R@S@T@U@V@W@X@Y@Z@B@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#!#                    ",
-"                  ~#{#]#B@^#/#(#_#:#<#[#D@}#+#|#1#2#I@3#4#5#6#7#8#9#0#a#b#c#                    ",
-"                  d#e#f#g#h#i#j#k#l#m#}#n#o#p#q#$#r#J@s#t#u#v#w#x#y#z#A#B#C#                    ",
-"                D#E#F#G#H#I#J#K#n#+#F@|#L###H@M#N#3#O#2@2@P#Q#R#S#S#T#U#V#W#X#                  ",
-"                Y#Z#`# $.$+$L# $ $1#@$H@$#I@N#3#s##$$$%$&$*$=$-$;$>$,$'$)$!$~$                  ",
-"                {$]$^$/$($_$:$<$[$}$|$1$3#2$3$4$#$5$6$7$8$9$0$a$b$c$d$e$f$g$~$                  ",
-"                h$i$j$k$l$m$n$o$p$q$r$l@s$t$u$u$n@P#v$w$x$y$z$A$B$C$D$E$F$G$~$                  ",
-"                H$I$J$K$L$M$N$O$P$Q$R$S$T$U$V$W$X$Y$Z$`$ %c$.%+%@%z$#%$%%%G$~$                  ",
-"                &%*%=%-%;%>%,%'%)%>%!%~%=${%~%]%^%y$/%(%_%:%<%[%}%|%1%2%3%~$~$                  ",
-"                4%5%*%6%7%8%9%0%a%b%a%c%c%d%e%>$a$f%g%@%[%+%h%i%/%j%k%l%X#~$~$                  ",
-"                  m%n%o%p%q%r%s%/%t%u%a$c$v%i%w%x%y%z%A%B$w%B%C%D%E%F%G%~$~$                    ",
-"                  H%H%I%J%K%L%M%#%9%/%N%(%O%P%i%Q%R%f%c$S%T%U%V%W%X%Y%G$~$~$                    ",
-"                    Z%K+K+H%`% &.&+&@&#&$&%&&&*& %=&-&T#;&>&,&'&)&!&~$~$~$                      ",
-"                      y+y+y+~&{&]&^&/&(&_&:&E$e$e$E$k%<&[&}&|&C#G$~$~$~$                        ",
-"                        p@p@p@p@1&p@p@ @2&3&4&5&6&7&8&B#9&C#G$~$~$~$~$                          ",
-"                            0&0&a&!@!@q@B#b&B#r@)#9&c&!$X#~$~$~$~$~$                            ",
-"                                B#B#r@Q@)#d&!#c#C#!$g$~$~$~$~$~$                                ",
-"                                      !#c#C#W#g$X#~$~$~$~$                                      ",
-"                                                                                                ",
-"                                                                                                "};
diff --git a/src/icons/root.xpm b/src/icons/root.xpm
deleted file mode 100644 (file)
index 3b66419..0000000
+++ /dev/null
@@ -1,884 +0,0 @@
-/* XPM */
-static const char * root_xpm[] = {
-"48 48 833 2",
-"      c None",
-".     c #B10505",
-"+     c #B00505",
-"@     c #B50404",
-"#     c #B40404",
-"$     c #B20405",
-"%     c #AE0505",
-"&     c #AC0506",
-"*     c #B90304",
-"=     c #B70404",
-"-     c #C91F14",
-";     c #B90D0A",
-">     c #AE0506",
-",     c #AC0606",
-"'     c #AA0606",
-")     c #A80607",
-"!     c #BD0303",
-"~     c #BB0303",
-"{     c #BC0807",
-"]     c #E54E34",
-"^     c #F9AB98",
-"/     c #F9AC99",
-"(     c #E96C57",
-"_     c #C8261C",
-":     c #B10908",
-"<     c #AB0606",
-"[     c #A90606",
-"}     c #A70607",
-"|     c #A50707",
-"1     c #C20202",
-"2     c #C00202",
-"3     c #BE0203",
-"4     c #C6140D",
-"5     c #F16F53",
-"6     c #FBBEAE",
-"7     c #FDCFC1",
-"8     c #FCC6B7",
-"9     c #FBBDAD",
-"0     c #FBB5A4",
-"a     c #F38771",
-"b     c #D94938",
-"c     c #B4110C",
-"d     c #A30708",
-"e     c #A10708",
-"f     c #C50101",
-"g     c #C30202",
-"h     c #C10202",
-"i     c #D42819",
-"j     c #F37859",
-"k     c #FDDAD0",
-"l     c #FEDBD0",
-"m     c #FCCABC",
-"n     c #F37356",
-"o     c #F16649",
-"p     c #F5917B",
-"q     c #F9AA96",
-"r     c #F9A792",
-"s     c #F48D77",
-"t     c #E05441",
-"u     c #BD1911",
-"v     c #A30707",
-"w     c #9F0808",
-"x     c #9D0809",
-"y     c #C80101",
-"z     c #C60101",
-"A     c #C40102",
-"B     c #D72A1A",
-"C     c #FBA085",
-"D     c #FFEEE9",
-"E     c #FEE5DD",
-"F     c #FCC5B5",
-"G     c #F57553",
-"H     c #F15B37",
-"I     c #EF5734",
-"J     c #EE5331",
-"K     c #EC4D2E",
-"L     c #EF6D52",
-"M     c #F48972",
-"N     c #F79781",
-"O     c #F3846E",
-"P     c #DD4B39",
-"Q     c #B1110D",
-"R     c #9B0809",
-"S     c #990909",
-"T     c #C70101",
-"U     c #E6472C",
-"V     c #FCA487",
-"W     c #FFF1EC",
-"X     c #FFEBE5",
-"Y     c #FDCCBD",
-"Z     c #F66D46",
-"`     c #F4623B",
-" .    c #F36038",
-"..    c #F25E35",
-"+.    c #F05B32",
-"@.    c #EE552F",
-"#.    c #EC4E2D",
-"$.    c #E94729",
-"%.    c #E95037",
-"&.    c #EF6E58",
-"*.    c #F4866F",
-"=.    c #F0745D",
-"-.    c #D73B2B",
-";.    c #AD100D",
-">.    c #97090A",
-",.    c #95090A",
-"'.    c #E5462B",
-").    c #FDA082",
-"!.    c #FFECE5",
-"~.    c #FFEAE3",
-"{.    c #FDB9A3",
-"].    c #F86C41",
-"^.    c #F6693D",
-"/.    c #F5673A",
-"(.    c #F46737",
-"_.    c #F46735",
-":.    c #F36532",
-"<.    c #F16030",
-"[.    c #EE582D",
-"}.    c #EB4E2A",
-"|.    c #E84627",
-"1.    c #E53E24",
-"2.    c #E44029",
-"3.    c #EB604A",
-"4.    c #F1745D",
-"5.    c #EA5A45",
-"6.    c #C72117",
-"7.    c #9C0A0A",
-"8.    c #96090A",
-"9.    c #940A0A",
-"0.    c #920A0B",
-"a.    c #E44229",
-"b.    c #FB9879",
-"c.    c #FFE1D6",
-"d.    c #FFE2D8",
-"e.    c #FDB79F",
-"f.    c #F96F43",
-"g.    c #F86B3F",
-"h.    c #F76B3D",
-"i.    c #F66D39",
-"j.    c #F66F36",
-"k.    c #F67234",
-"l.    c #F67232",
-"m.    c #F46D31",
-"n.    c #F2652F",
-"o.    c #EE5B2C",
-"p.    c #EB4F28",
-"q.    c #E74525",
-"r.    c #E43C21",
-"s.    c #E1331E",
-"t.    c #E03422",
-"u.    c #E95540",
-"v.    c #EC5E47",
-"w.    c #DD3627",
-"x.    c #A60D0B",
-"y.    c #900A0B",
-"z.    c #BF0202",
-"A.    c #E13E26",
-"B.    c #F98E70",
-"C.    c #FED4C7",
-"D.    c #FED8CA",
-"E.    c #FCAF98",
-"F.    c #F96D42",
-"G.    c #F76C3D",
-"H.    c #F76E3A",
-"I.    c #F77237",
-"J.    c #F77635",
-"K.    c #F77933",
-"L.    c #F77932",
-"M.    c #F67631",
-"N.    c #F4702F",
-"O.    c #F1682D",
-"P.    c #EE5D2A",
-"Q.    c #EA5127",
-"R.    c #E64623",
-"S.    c #E33B20",
-"T.    c #DF311C",
-"U.    c #DC2918",
-"V.    c #DF3525",
-"W.    c #E8513B",
-"X.    c #E13B2A",
-"Y.    c #B5120E",
-"Z.    c #910A0B",
-"`.    c #8F0A0B",
-" +    c #8D0B0C",
-".+    c #BC0303",
-"++    c #DD3923",
-"@+    c #F78467",
-"#+    c #FDC7B7",
-"$+    c #FDCBBB",
-"%+    c #FBA68D",
-"&+    c #F6673F",
-"*+    c #F66B3C",
-"=+    c #F66E39",
-"-+    c #F87834",
-";+    c #F67731",
-">+    c #F37530",
-",+    c #F67830",
-"'+    c #F5752F",
-")+    c #F4702D",
-"!+    c #F26A2C",
-"~+    c #EF6029",
-"{+    c #EB5426",
-"]+    c #E74822",
-"^+    c #E33C1D",
-"/+    c #DF3119",
-"(+    c #DC2715",
-"_+    c #D92214",
-":+    c #E03726",
-"<+    c #E23C2A",
-"[+    c #BB0E0B",
-"}+    c #8A0B0C",
-"|+    c #B90303",
-"1+    c #CE2115",
-"2+    c #F2684A",
-"3+    c #FCBAA8",
-"4+    c #FCBFAC",
-"5+    c #F99C84",
-"6+    c #F4613B",
-"7+    c #F5643A",
-"8+    c #F66C38",
-"9+    c #F67136",
-"0+    c #F77535",
-"a+    c #F77634",
-"b+    c #F47231",
-"c+    c #DA521F",
-"d+    c #D24A1B",
-"e+    c #E35D25",
-"f+    c #F16D2D",
-"g+    c #F3702D",
-"h+    c #F36F2C",
-"i+    c #F26B2A",
-"j+    c #EF6328",
-"k+    c #EC5925",
-"l+    c #E84D21",
-"m+    c #E3411D",
-"n+    c #DF3418",
-"o+    c #DB2913",
-"p+    c #D71E0F",
-"q+    c #DA2919",
-"r+    c #E03322",
-"s+    c #BB0F0A",
-"t+    c #8F0E0D",
-"u+    c #8C0E0D",
-"v+    c #880E0D",
-"w+    c #B60404",
-"x+    c #CA1F14",
-"y+    c #EE593C",
-"z+    c #FAA993",
-"A+    c #FBB29E",
-"B+    c #F79279",
-"C+    c #F05A36",
-"D+    c #F25E37",
-"E+    c #F36336",
-"F+    c #F46936",
-"G+    c #F56F35",
-"H+    c #F77334",
-"I+    c #F77533",
-"J+    c #F36F31",
-"K+    c #D4461C",
-"L+    c #C63514",
-"M+    c #C23113",
-"N+    c #C33515",
-"O+    c #CA4019",
-"P+    c #E35B25",
-"Q+    c #F26A2A",
-"R+    c #F16A29",
-"S+    c #EF6527",
-"T+    c #ED5D25",
-"U+    c #E95221",
-"V+    c #E5471D",
-"W+    c #E13A18",
-"X+    c #DD2E13",
-"Y+    c #D9240F",
-"Z+    c #D92311",
-"`+    c #DC2C19",
-" @    c #AC150B",
-".@    c #91150F",
-"+@    c #8C120E",
-"@@    c #87100E",
-"#@    c #BD100C",
-"$@    c #E7482F",
-"%@    c #F69179",
-"&@    c #FAA690",
-"*@    c #F89981",
-"=@    c #EE5431",
-"-@    c #F05832",
-";@    c #F15F33",
-">@    c #F36633",
-",@    c #F46D33",
-"'@    c #F67432",
-")@    c #F36E30",
-"!@    c #D2441B",
-"~@    c #C02D12",
-"{@    c #B9210E",
-"]@    c #B41B0D",
-"^@    c #B41E0E",
-"/@    c #B82711",
-"(@    c #BE3315",
-"_@    c #CA431B",
-":@    c #E45B24",
-"<@    c #F06727",
-"[@    c #EF6626",
-"}@    c #ED6124",
-"|@    c #EB5921",
-"1@    c #E74E1E",
-"2@    c #E34419",
-"3@    c #E03915",
-"4@    c #DD3011",
-"5@    c #DB2D12",
-"6@    c #D72911",
-"7@    c #A11F11",
-"8@    c #901810",
-"9@    c #89120E",
-"0@    c #AF0707",
-"a@    c #B00706",
-"b@    c #B30A08",
-"c@    c #DF3922",
-"d@    c #F27B62",
-"e@    c #F7937A",
-"f@    c #EC5432",
-"g@    c #ED542F",
-"h@    c #F05B30",
-"i@    c #F26430",
-"j@    c #F46B31",
-"k@    c #F57131",
-"l@    c #F57231",
-"m@    c #F26C2F",
-"n@    c #D1431B",
-"o@    c #BF2B11",
-"p@    c #B51B0D",
-"q@    c #AD110A",
-"r@    c #A90E09",
-"s@    c #A80F09",
-"t@    c #AB150C",
-"u@    c #AF1D0F",
-"v@    c #B52A12",
-"w@    c #BC3616",
-"x@    c #CD471C",
-"y@    c #E35822",
-"z@    c #EE6324",
-"A@    c #ED6223",
-"B@    c #EC5E21",
-"C@    c #EA581F",
-"D@    c #E7511C",
-"E@    c #E44919",
-"F@    c #E13E15",
-"G@    c #DE3513",
-"H@    c #BA2911",
-"I@    c #941F12",
-"J@    c #8A1510",
-"K@    c #AF0C08",
-"L@    c #B21009",
-"M@    c #D6301B",
-"N@    c #ED6145",
-"O@    c #F78F74",
-"P@    c #F68F73",
-"Q@    c #ED5B38",
-"R@    c #EC532B",
-"S@    c #EE5A2C",
-"T@    c #F1632E",
-"U@    c #F26A2E",
-"V@    c #F16A2E",
-"W@    c #D0431B",
-"X@    c #BD2A12",
-"Y@    c #AC110A",
-"Z@    c #C75C57",
-"`@    c #FFE1D7",
-" #    c #DC8E86",
-".#    c #AE2521",
-"+#    c #A3100A",
-"@#    c #A7170D",
-"##    c #AB2010",
-"$#    c #B22C13",
-"%#    c #BA3817",
-"&#    c #CA471C",
-"*#    c #E15420",
-"=#    c #EB5B21",
-"-#    c #EC5F21",
-";#    c #EB5D20",
-">#    c #E9581D",
-",#    c #E64E1A",
-"'#    c #E14015",
-")#    c #C13013",
-"!#    c #962213",
-"~#    c #891610",
-"{#    c #AF140B",
-"]#    c #B1150B",
-"^#    c #C52913",
-"/#    c #E74A26",
-"(#    c #F58463",
-"_#    c #F78C6C",
-":#    c #EF653D",
-"<#    c #ED5729",
-"[#    c #F0642B",
-"}#    c #F26B2D",
-"|#    c #F36F2D",
-"1#    c #F36E2D",
-"2#    c #EB6329",
-"3#    c #CC3F19",
-"4#    c #BC2A12",
-"5#    c #B31C0D",
-"6#    c #AA110A",
-"7#    c #D88882",
-"8#    c #FFE7DD",
-"9#    c #FFE3D9",
-"0#    c #FFDFD3",
-"a#    c #FFDBCE",
-"b#    c #DA8A80",
-"c#    c #AA2421",
-"d#    c #9F120C",
-"e#    c #A3190F",
-"f#    c #A82111",
-"g#    c #AE2D14",
-"h#    c #B53818",
-"i#    c #C4441B",
-"j#    c #D94E1D",
-"k#    c #E8541D",
-"l#    c #EA581E",
-"m#    c #E9561D",
-"n#    c #B33115",
-"o#    c #942113",
-"p#    c #871510",
-"q#    c #AF160C",
-"r#    c #B5200F",
-"s#    c #DF441E",
-"t#    c #F16E44",
-"u#    c #F78861",
-"v#    c #F4784A",
-"w#    c #EE6128",
-"x#    c #F06529",
-"y#    c #F1692B",
-"z#    c #F26C2C",
-"A#    c #F36D2C",
-"B#    c #F26B2C",
-"C#    c #E75D27",
-"D#    c #C63B17",
-"E#    c #B01A0D",
-"F#    c #AE1E18",
-"G#    c #E9B5AF",
-"H#    c #FFEBE3",
-"I#    c #FFE7DF",
-"J#    c #FFDFD4",
-"K#    c #FFDBCF",
-"L#    c #FFD7C9",
-"M#    c #FFD3C3",
-"N#    c #DF9285",
-"O#    c #B23D36",
-"P#    c #9B130D",
-"Q#    c #9E190F",
-"R#    c #A32212",
-"S#    c #A92B14",
-"T#    c #AF3618",
-"U#    c #B83F1A",
-"V#    c #CC451A",
-"W#    c #D94418",
-"X#    c #D34017",
-"Y#    c #BA3616",
-"Z#    c #9C2A16",
-"`#    c #8E1C12",
-" $    c #85120F",
-".$    c #AD180D",
-"+$    c #BD2B13",
-"@$    c #E85021",
-"#$    c #F57E51",
-"$$    c #F88758",
-"%$    c #F16D2C",
-"&$    c #F26D29",
-"*$    c #F26D2A",
-"=$    c #F26C2A",
-"-$    c #F06729",
-";$    c #DC5221",
-">$    c #C03516",
-",$    c #B62611",
-"'$    c #AD190D",
-")$    c #B73A34",
-"!$    c #F3D5CF",
-"~$    c #FFEFE8",
-"{$    c #FFEBE4",
-"]$    c #FFE7DE",
-"^$    c #FFCFBE",
-"/$    c #FFCBB8",
-"($    c #E4998A",
-"_$    c #BC544A",
-":$    c #96120D",
-"<$    c #981910",
-"[$    c #9C2012",
-"}$    c #A12714",
-"|$    c #A52E16",
-"1$    c #A53017",
-"2$    c #A12E16",
-"3$    c #9A2715",
-"4$    c #901D12",
-"5$    c #82100F",
-"6$    c #AA180D",
-"7$    c #BB2B13",
-"8$    c #E74D1F",
-"9$    c #F57B4E",
-"0$    c #F3733A",
-"a$    c #F16B28",
-"b$    c #F16A28",
-"c$    c #F06627",
-"d$    c #E85D24",
-"e$    c #CC431B",
-"f$    c #BB3014",
-"g$    c #B22210",
-"h$    c #AA170C",
-"i$    c #CC736D",
-"j$    c #FFF3EE",
-"k$    c #FFF1EB",
-"l$    c #FFEEE8",
-"m$    c #FFEAE2",
-"n$    c #FFE6DD",
-"o$    c #FFDED3",
-"p$    c #FFD6C8",
-"q$    c #FFCBB9",
-"r$    c #FFC8B4",
-"s$    c #F1B3A1",
-"t$    c #C66E63",
-"u$    c #9E2A24",
-"v$    c #911710",
-"w$    c #921A11",
-"x$    c #921B11",
-"y$    c #901C12",
-"z$    c #8B1911",
-"A$    c #861410",
-"B$    c #83100F",
-"C$    c #A8190E",
-"D$    c #AF2211",
-"E$    c #C73817",
-"F$    c #E2562A",
-"G$    c #E55925",
-"H$    c #E55A22",
-"I$    c #E45922",
-"J$    c #DF5320",
-"K$    c #D2481D",
-"L$    c #BD3616",
-"M$    c #B42A13",
-"N$    c #AC1E0F",
-"O$    c #AB2219",
-"P$    c #E2AAA5",
-"Q$    c #FFF1ED",
-"R$    c #FFEFE9",
-"S$    c #FFE9E1",
-"T$    c #FFE5DC",
-"U$    c #FFDED2",
-"V$    c #FFDACD",
-"W$    c #FFD6C7",
-"X$    c #FFD2C2",
-"Y$    c #FFCEBD",
-"Z$    c #FFCAB7",
-"`$    c #FFC7B3",
-" %    c #FFC6B3",
-".%    c #FFC9B5",
-"+%    c #FFCDBB",
-"@%    c #FFD2C1",
-"#%    c #DA968B",
-"$%    c #B45750",
-"%%    c #8D1B18",
-"&%    c #84100F",
-"*%    c #A5190E",
-"=%    c #AD2411",
-"-%    c #B42C13",
-";%    c #B83315",
-">%    c #BA3516",
-",%    c #B93416",
-"'%    c #B62F14",
-")%    c #B12812",
-"!%    c #A6170D",
-"~%    c #BE544D",
-"{%    c #F9E0DA",
-"]%    c #FFF0EB",
-"^%    c #FFECE6",
-"/%    c #FFE9E2",
-"(%    c #FFE6DE",
-"_%    c #FFE0D5",
-":%    c #FFDCCF",
-"<%    c #FFD8CB",
-"[%    c #FFD5C6",
-"}%    c #FFD1C1",
-"|%    c #FFC9B6",
-"1%    c #FFC5B2",
-"2%    c #FFC6B1",
-"3%    c #FFC7B4",
-"4%    c #FFCCB9",
-"5%    c #FFD1C0",
-"6%    c #FFD4C5",
-"7%    c #FBC2B0",
-"8%    c #A03F3E",
-"9%    c #952B2B",
-"0%    c #912322",
-"a%    c #A0160E",
-"b%    c #A4190F",
-"c%    c #A61D10",
-"d%    c #A71E10",
-"e%    c #A41A0F",
-"f%    c #A1160E",
-"g%    c #AA2C26",
-"h%    c #E7B1A9",
-"i%    c #FFEDE6",
-"j%    c #FFE4DA",
-"k%    c #FFD3C4",
-"l%    c #FFD0BF",
-"m%    c #FFCCBA",
-"n%    c #FFC8B5",
-"o%    c #FFC4B0",
-"p%    c #FFC3AF",
-"q%    c #FFC7B2",
-"r%    c #FFCFBF",
-"s%    c #FFCAB8",
-"t%    c #B15A58",
-"u%    c #9E3938",
-"v%    c #902221",
-"w%    c #A31910",
-"x%    c #9F150E",
-"y%    c #9D140D",
-"z%    c #AE3830",
-"A%    c #DA9188",
-"B%    c #FFE2D6",
-"C%    c #FFE8E0",
-"D%    c #FFC3AE",
-"E%    c #FFC2AD",
-"F%    c #FFC5B0",
-"G%    c #FFCEBE",
-"H%    c #C2706B",
-"I%    c #9F3D3C",
-"J%    c #912423",
-"K%    c #B01717",
-"L%    c #B11717",
-"M%    c #B31717",
-"N%    c #FFDCD0",
-"O%    c #FFE4DB",
-"P%    c #FFD9CC",
-"Q%    c #FFC5B1",
-"R%    c #FFC2AC",
-"S%    c #FFC1AB",
-"T%    c #FFCEBC",
-"U%    c #C87A73",
-"V%    c #A04040",
-"W%    c #912625",
-"X%    c #AD1616",
-"Y%    c #AF1716",
-"Z%    c #FFE2D7",
-"`%    c #E8AB9D",
-" &    c #E19E90",
-".&    c #F7BCA9",
-"+&    c #FFC4AF",
-"@&    c #FFC0AA",
-"#&    c #FFC0A9",
-"$&    c #FFD4C4",
-"%&    c #FFCDBC",
-"&&    c #D79084",
-"*&    c #A04342",
-"=&    c #912727",
-"-&    c #AB1616",
-";&    c #AC1616",
-">&    c #FFDDD1",
-",&    c #F0C0B5",
-"'&    c #CA837B",
-")&    c #A44843",
-"!&    c #8E2524",
-"~&    c #861A19",
-"{&    c #AC4F47",
-"]&    c #FFBEA7",
-"^&    c #FFC6B2",
-"/&    c #FFCCBB",
-"(&    c #FFD5C5",
-"_&    c #D79086",
-":&    c #A14545",
-"<&    c #912928",
-"[&    c #891D1C",
-"}&    c #A81615",
-"|&    c #A91615",
-"1&    c #FAC7B9",
-"2&    c #FFD5C7",
-"3&    c #FFD9CB",
-"4&    c #B3605B",
-"5&    c #FFBDA5",
-"6&    c #FFBCA5",
-"7&    c #FFBFA8",
-"8&    c #FFCFBD",
-"9&    c #EBAA99",
-"0&    c #A14646",
-"a&    c #912A29",
-"b&    c #861918",
-"c&    c #A51515",
-"d&    c #A61515",
-"e&    c #E9A195",
-"f&    c #E1A79B",
-"g&    c #E89D89",
-"h&    c #FFBBA4",
-"i&    c #ECA999",
-"j&    c #A04747",
-"k&    c #902A29",
-"l&    c #851918",
-"m&    c #A11414",
-"n&    c #A21514",
-"o&    c #A31615",
-"p&    c #E8A092",
-"q&    c #E1A598",
-"r&    c #E1927F",
-"s&    c #FFBBA3",
-"t&    c #FFBFA9",
-"u&    c #FFD7C8",
-"v&    c #9E4645",
-"w&    c #8E2928",
-"x&    c #841717",
-"y&    c #9E1413",
-"z&    c #9F1515",
-"A&    c #A11717",
-"B&    c #D07369",
-"C&    c #E1A397",
-"D&    c #CA7567",
-"E&    c #FFD8CA",
-"F&    c #EBA897",
-"G&    c #9C4544",
-"H&    c #8D2828",
-"I&    c #841716",
-"J&    c #9C1514",
-"K&    c #9E1A19",
-"L&    c #C55F57",
-"M&    c #FFD2C3",
-"N&    c #E1A497",
-"O&    c #C36D62",
-"P&    c #EAA594",
-"Q&    c #9A4140",
-"R&    c #8C2726",
-"S&    c #831615",
-"T&    c #991514",
-"U&    c #9C1A19",
-"V&    c #B2413F",
-"W&    c #FFD0C0",
-"X&    c #BB675E",
-"Y&    c #FFDDD2",
-"Z&    c #DE9586",
-"`&    c #973B3A",
-" *    c #8A2322",
-".*    c #831514",
-"+*    c #961414",
-"@*    c #991B1B",
-"#*    c #9F2726",
-"$*    c #F9C1AF",
-"%*    c #FFDED1",
-"&*    c #E1ABA2",
-"**    c #FFDACC",
-"=*    c #D18174",
-"-*    c #933433",
-";*    c #881F1E",
-">*    c #821312",
-",*    c #931413",
-"'*    c #961A19",
-")*    c #9C2726",
-"!*    c #DD9287",
-"~*    c #FFE3DA",
-"{*    c #E1B1AA",
-"]*    c #A44A46",
-"^*    c #FFBCA4",
-"/*    c #AE5752",
-"(*    c #8F2C2B",
-"_*    c #811110",
-":*    c #8E1212",
-"<*    c #911818",
-"[*    c #982424",
-"}*    c #B85853",
-"|*    c #E1B4AD",
-"1*    c #A44B47",
-"2*    c #FFC1AA",
-"3*    c #F3A68E",
-"4*    c #953737",
-"5*    c #8B2423",
-"6*    c #80100F",
-"7*    c #8B1211",
-"8*    c #8D1615",
-"9*    c #921F1E",
-"0*    c #992C2B",
-"a*    c #E8A495",
-"b*    c #F0CBC3",
-"c*    c #A44A45",
-"d*    c #FFB399",
-"e*    c #B85E54",
-"f*    c #861B1A",
-"g*    c #800F0E",
-"h*    c #891312",
-"i*    c #8C1817",
-"j*    c #912221",
-"k*    c #9E3937",
-"l*    c #D68B7F",
-"m*    c #FFBEA8",
-"n*    c #EEA691",
-"o*    c #E1907C",
-"p*    c #B0554C",
-"q*    c #8E2A29",
-"r*    c #881E1D",
-"s*    c #841110",
-"t*    c #861413",
-"u*    c #8A1918",
-"v*    c #8E2221",
-"w*    c #942D2C",
-"x*    c #A0423F",
-"y*    c #C4756D",
-"z*    c #D89488",
-"A*    c #EAAEA0",
-"B*    c #F5BFAF",
-"C*    c #993632",
-"D*    c #BF7169",
-"E*    c #B7655D",
-"F*    c #9B4342",
-"G*    c #973A39",
-"H*    c #91302F",
-"I*    c #871D1C",
-"J*    c #811211",
-"K*    c #81100F",
-"L*    c #831312",
-"M*    c #851716",
-"N*    c #881C1B",
-"O*    c #8C2423",
-"P*    c #902B2A",
-"Q*    c #943332",
-"R*    c #973939",
-"S*    c #9A3E3D",
-"T*    c #9B4241",
-"U*    c #8C2524",
-"V*    c #923231",
-"W*    c #902E2D",
-"X*    c #851817",
-"Y*    c #8A2221",
-"Z*    c #8B2524",
-"`*    c #8D2727",
-" =    c #8C2625",
-".=    c #8B2424",
-"+=    c #8B2322",
-"@=    c #89201F",
-"#=    c #871C1B",
-"                                                                                                ",
-"                                      . +                                                       ",
-"                                    @ # $ + % &                                                 ",
-"                                  * = @ - ; + > , ' )                                           ",
-"                                ! ~ { ] ^ / ( _ : < [ } |                                       ",
-"                            1 2 3 4 5 6 7 8 9 0 a b c } | d e                                   ",
-"                          f g h i j k l m n o p q r s t u v e w x                               ",
-"                        y z A B C D E F G H I J K L M N O P Q w x R S                           ",
-"                      y T f U V W X Y Z `  ...+.@.#.$.%.&.*.=.-.;.R S >.,.                      ",
-"                    z z f '.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.                    ",
-"                  g g g a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.9.0.y.                  ",
-"                z.2 2 A.B.C.D.E.F.g.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +                ",
-"              .+.+! ++@+#+$+%+&+^.*+=+I.J.-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+`. +}+              ",
-"              * |+1+2+3+4+5+6+7+/.8+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+            ",
-"            @ w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+i+R+S+T+U+V+W+X+Y+Z+`+ @.@+@@@          ",
-"          . $ #@$@%@&@*@=@-@;@>@,@l.'@)@!@~@{@]@^@/@(@_@:@S+<@[@}@|@1@2@3@4@5@6@7@8@9@          ",
-"        0@a@b@c@d@*@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@}@z@A@B@C@D@E@F@G@H@I@J@          ",
-"        K@L@M@N@O@P@Q@R@S@T@U@N.N.V@W@X@]@Y@Z@`@ #.#+#@###$#%#&#*#=#B@-#;#>#,#'#)#!#~#          ",
-"      {#]#^#/#(#_#:#<#P.[#}#|#1#2#3#4#5#6#7#8#9#0#a#b#c#d#e#f#g#h#i#j#k#l#m#,#F@n#o#p#          ",
-"      q#r#s#t#u#v#w#x#y#z#A#B#C#D#H@E#F#G#H#I#9#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#Z#`# $          ",
-"      .$+$@$#$$$%$&$*$*$=$-$;$>$,$'$)$!$~${$]$9#0#a#L#M#^$/$($_$:$<$[$}$|$1$2$3$4$p#5$          ",
-"      6$7$8$9$0$a$a$b$c$d$e$f$g$h$i$j$k$l$m$n$d.o$a#p$M#^$q$r$r$s$t$u$v$w$x$y$z$A$B$            ",
-"      C$D$E$F$G$H$I$J$K$L$M$N$O$P$j$Q$R$!.S$T$c.U$V$W$X$Y$Z$`$ %.%+%@%#%$%%%&%5$5$              ",
-"        *%=%-%;%>%,%'%)%##!%~%{%]%]%D ^%/%(%9#_%:%<%[%}%+%|%1%2%3%4%5%6%X$7%8%9%0%              ",
-"          a%b%c%d%c%e%f%g%h%m$!.i%^%{$/%]$j%c.U$V$L#k%l%m%n%o%p%q%/$r%6%X$s%t%u%v%              ",
-"              w%x%y%z%A%B%T$C%S$/%S$C%n$j%`@0#K#<%[%X$Y$s%`$D%E%F%|%G%k%M#q$H%I%J%              ",
-"              K%L%M%N%0#c.9#O%T$n$T$O%9#c.0#N%P%p$M#l%m%|%Q%R%S%D%r$T%k%k%m%U%V%W%              ",
-"              X%Y%K%P%:%U$_%c.Z%Z%Z%c._%U$:%P%L#6%}%`% &.&+&@&#&R%`$+%k%$&%&&&*&=&              ",
-"              -&;&X%p$<%a#N%>&U$o$U$>&N%a#,&'&)&!&~&~&~&~&{&]&]&@&^&/&k%(&T%_&:&<&[&            ",
-"              }&}&|&1&2&L#3&V$a#a#a#V$3&4&~&~&~&~&~&~&~&~&~&5&6&7&^&+%$&[%8&9&0&a&b&            ",
-"              c&c&d&e&X$6%[%p$L#L#L#p$f&~&~&~&~&~&~&~&~&~&~&g&h&7&^&T%[%W$r%i&j&k&l&            ",
-"              m&n&o&p&l%}%M#$&$&6%$&M#q&~&~&~&~&~&~&~&~&~&~&r&s&t&3%l%p$u&^$9&v&w&x&            ",
-"              y&z&A&B&Y$l%X$M#$&k%M#X$C&~&~&~&~&~&~&~&~&~&~&D&]&D%q$6%P%E&^$F&G&H&I&            ",
-"                J&K&L&/&l%M&6%[%[%6%M&N&~&~&~&~&~&~&~&~&~&~&O&D%|%}%<%:%E&%&P&Q&R&S&            ",
-"                T&U&V&m%W&6%L#<%<%E&u&f&~&~&~&~&~&~&~&~&~&~&X&m%@%<%Y&>&L#s%Z&`& *.*            ",
-"                +*@*#*$*}%p$a#%*o$U$>&&*~&~&~&~&~&~&~&~&~&~&)&[%**U$J#N%M#+&=*-*;*>*            ",
-"                ,*'*)*!*W&L#N%c.9#j%~*{*~&~&~&~&~&~&~&~&~&~&]*:%U$J#>&L#4%^*/*(*~&_*            ",
-"                :*<*[*}*4%k%V$J#9#T$n$|*~&~&~&~&~&~&~&~&~&~&1*N%N%V$[%+%2*3*4*5*I&6*            ",
-"                7*8*9*0*a*T%6%V$0#Z%9#b*~&~&~&~&~&~&~&~&~&~&c*W$k%^$n%7&d*e*w&f*>*g*            ",
-"                  h*i*j*k*l*/$l%[%E&V$K#~&~&~&~&~&~&~&~&~&~&~&n%+&m*n*o*p*q*r*S&_*              ",
-"                  s*t*u*v*w*x*y*z*A*B*%&~&~&~&~&~&~&~&~&~&~&C*D*E*F*G*H*R&I*I&J*g*              ",
-"                    K*L*M*N*O*P*Q*R*S*T*~&~&~&~&~&~&~&~&~&~&U*V*W*H&5*r*X*.*J*6*                ",
-"                      6*_*>*I&~&r*Y*Z*`*U* = = = =Z*.=+=Y*Y*;*I*~&x&S&>*_*6*g*                  ",
-"                          g*_*>*.*X*~&r*@=@=@=@=@=r*r*#=~&X*.*>*_*g*g*g*g*g*                    ",
-"                                  g*g*g*g*g*g*g*g*g*g*g*g*g*g*g*g*g*g*                          ",
-"                                              g*g*g*g*g*g*                                      ",
-"                                                                                                ",
-"                                                                                                "};
diff --git a/src/icons/series.xpm b/src/icons/series.xpm
deleted file mode 100644 (file)
index 749ceee..0000000
+++ /dev/null
@@ -1,937 +0,0 @@
-/* XPM */
-static const char * series_xpm[] = {
-"48 48 886 2",
-"      c None",
-".     c #007CBA",
-"+     c #007AB7",
-"@     c #0078B5",
-"#     c #0077B2",
-"$     c #0075AF",
-"%     c #0073AD",
-"&     c #0071AA",
-"*     c #0070A8",
-"=     c #006EA5",
-"-     c #006CA3",
-";     c #006AA0",
-">     c #00699E",
-",     c #0083C4",
-"'     c #0081C2",
-")     c #007FBF",
-"!     c #007EBD",
-"~     c #0079B5",
-"{     c #0075B0",
-"]     c #0072AB",
-"^     c #006BA0",
-"/     c #00679B",
-"(     c #006598",
-"_     c #0087CA",
-":     c #0085C7",
-"<     c #0083C5",
-"[     c #0080BF",
-"}     c #148BC6",
-"|     c #2D9AD1",
-"1     c #37A1D6",
-"2     c #47ABDE",
-"3     c #43A9DC",
-"4     c #50B3E4",
-"5     c #4FB4E6",
-"6     c #4AB1E5",
-"7     c #44AEE3",
-"8     c #329FD6",
-"9     c #2B99D0",
-"0     c #1481B8",
-"a     c #01699E",
-"b     c #006496",
-"c     c #0086C9",
-"d     c #0087CB",
-"e     c #0086CA",
-"f     c #2499D3",
-"g     c #48AEE0",
-"h     c #6BC3EF",
-"i     c #77C9F2",
-"j     c #90D3F5",
-"k     c #A2DBF7",
-"l     c #ADDFF8",
-"m     c #B7E4FA",
-"n     c #B3E3FA",
-"o     c #AFE0F9",
-"p     c #AADFF9",
-"q     c #A5DCF8",
-"r     c #A1DBF8",
-"s     c #94D5F5",
-"t     c #3FAAE1",
-"u     c #1480B6",
-"v     c #006293",
-"w     c #0085C8",
-"x     c #1E97D3",
-"y     c #62BEEB",
-"z     c #8AD2F6",
-"A     c #ADE0F9",
-"B     c #D5F0FD",
-"C     c #E6F7FF",
-"D     c #E2F5FF",
-"E     c #DEF4FF",
-"F     c #DAF3FF",
-"G     c #D6F1FF",
-"H     c #D2F0FF",
-"I     c #C7ECFE",
-"J     c #ACDFF9",
-"K     c #A7DDF8",
-"L     c #A2DBF8",
-"M     c #A4DDF9",
-"N     c #A0DCF9",
-"O     c #2C92C5",
-"P     c #006395",
-"Q     c #006090",
-"R     c #0084C6",
-"S     c #1E97D2",
-"T     c #7DCDF6",
-"U     c #BCE6FB",
-"V     c #EDF8FE",
-"W     c #F0FAFF",
-"X     c #ECF9FF",
-"Y     c #E8F7FF",
-"Z     c #C9EBFC",
-"`     c #A9DEF8",
-" .    c #88D0F4",
-"..    c #75C7F0",
-"+.    c #61BEEC",
-"@.    c #5ABAEA",
-"#.    c #55B7E8",
-"$.    c #46AFE3",
-"%.    c #42ACE1",
-"&.    c #268DC1",
-"*.    c #005E8E",
-"=.    c #0082C3",
-"-.    c #5EBBEA",
-";.    c #C7EAFB",
-">.    c #FAFDFF",
-",.    c #F6FCFF",
-"'.    c #EBF9FF",
-").    c #ADE1FB",
-"!.    c #88D2F7",
-"~.    c #7CCDF5",
-"{.    c #76CAF3",
-"].    c #70C6F1",
-"^.    c #6AC3EF",
-"/.    c #63BFED",
-"(.    c #5CBBEB",
-"_.    c #57B9E9",
-":.    c #52B5E7",
-"<.    c #4EB3E5",
-"[.    c #4AB1E4",
-"}.    c #47AFE3",
-"|.    c #228BC0",
-"1.    c #00679A",
-"2.    c #006192",
-"3.    c #005E8D",
-"4.    c #0080C0",
-"5.    c #0F8BC9",
-"6.    c #8FD5F8",
-"7.    c #FCFEFF",
-"8.    c #D0EEFE",
-"9.    c #97DAFC",
-"0.    c #8CD6FB",
-"a.    c #86D2F9",
-"b.    c #80CFF7",
-"c.    c #79CBF4",
-"d.    c #73C8F2",
-"e.    c #6BC4F0",
-"f.    c #65C0EE",
-"g.    c #5EBCEB",
-"h.    c #58B9E9",
-"i.    c #54B7E8",
-"j.    c #51B4E7",
-"k.    c #4CB1E4",
-"l.    c #177FB3",
-"m.    c #00669A",
-"n.    c #006597",
-"o.    c #005F8F",
-"p.    c #005C8B",
-"q.    c #3DA6DB",
-"r.    c #B4E3FA",
-"s.    c #F7FCFF",
-"t.    c #E9F7FF",
-"u.    c #96DBFE",
-"v.    c #95DBFE",
-"w.    c #8FD7FC",
-"x.    c #88D3F9",
-"y.    c #81D0F7",
-"z.    c #7ACCF5",
-"A.    c #6DC4F0",
-"B.    c #60BDEC",
-"C.    c #5DB4D9",
-"D.    c #73A89F",
-"E.    c #869E73",
-"F.    c #919856",
-"G.    c #91862E",
-"H.    c #867B26",
-"I.    c #AF8000",
-"J.    c #AD7E00",
-"K.    c #AA7C00",
-"L.    c #A87900",
-"M.    c #A57700",
-"N.    c #8F7211",
-"O.    c #846F17",
-"P.    c #9E7100",
-"Q.    c #54B4E4",
-"R.    c #D5EFFD",
-"S.    c #F2FBFF",
-"T.    c #B2E3FC",
-"U.    c #92D9FD",
-"V.    c #91D9FC",
-"W.    c #86D3F9",
-"X.    c #6CC4F0",
-"Y.    c #77B8C1",
-"Z.    c #98A566",
-"`.    c #AF982C",
-" +    c #BF8E00",
-".+    c #BD8C00",
-"++    c #BA8900",
-"@+    c #B78700",
-"#+    c #B58500",
-"$+    c #B28300",
-"%+    c #B08000",
-"&+    c #AB7C00",
-"*+    c #A87A00",
-"=+    c #A37500",
-"-+    c #A07300",
-";+    c #9B6E00",
-">+    c #986C00",
-",+    c #007DBC",
-"'+    c #70C5F1",
-")+    c #EDF9FF",
-"!+    c #8ED6F9",
-"~+    c #8BD5FA",
-"{+    c #83D1F8",
-"]+    c #77CAF4",
-"^+    c #8DB8A6",
-"/+    c #BE9D1E",
-"(+    c #C79500",
-"_+    c #C59300",
-":+    c #C29000",
-"<+    c #C69B14",
-"[+    c #D0AD2C",
-"}+    c #D5B637",
-"|+    c #DEC347",
-"1+    c #DBC043",
-"2+    c #E4CC4F",
-"3+    c #E6CD4F",
-"4+    c #E4CA49",
-"5+    c #E2C643",
-"6+    c #D5B432",
-"7+    c #CFAD2A",
-"8+    c #B88F13",
-"9+    c #9E7201",
-"0+    c #966A00",
-"a+    c #0782BE",
-"b+    c #89D1F5",
-"c+    c #E7F7FF",
-"d+    c #D3EFFD",
-"e+    c #82D0F7",
-"f+    c #7DCEF6",
-"g+    c #A9A95B",
-"h+    c #CB9800",
-"i+    c #CA9700",
-"j+    c #D3AD24",
-"k+    c #E0C548",
-"l+    c #EEDF6A",
-"m+    c #F1E576",
-"n+    c #F4EA90",
-"o+    c #F7EFA2",
-"p+    c #F8F2AC",
-"q+    c #FAF5B7",
-"r+    c #FAF4B3",
-"s+    c #F9F3AF",
-"t+    c #F9F2AA",
-"u+    c #F8F1A5",
-"v+    c #F8F0A1",
-"w+    c #F5EB94",
-"x+    c #E0C13E",
-"y+    c #B68E14",
-"z+    c #936800",
-"A+    c #007BB9",
-"B+    c #1A8EC7",
-"C+    c #8BD2F4",
-"D+    c #BAE5FB",
-"E+    c #92B598",
-"F+    c #C89500",
-"G+    c #C99600",
-"H+    c #D3AA1E",
-"I+    c #EBD961",
-"J+    c #F5ED89",
-"K+    c #F9F3AD",
-"L+    c #FDFBD5",
-"M+    c #FFFFE6",
-"N+    c #FFFFE2",
-"O+    c #FFFFDE",
-"P+    c #FFFFDA",
-"Q+    c #FFFFD6",
-"R+    c #FFFFD2",
-"S+    c #FEFCC6",
-"T+    c #F9F3AB",
-"U+    c #F8F2A7",
-"V+    c #F8F1A2",
-"W+    c #F9F4A4",
-"X+    c #F9F3A0",
-"Y+    c #C5A22D",
-"Z+    c #956A00",
-"`+    c #906500",
-" @    c #0079B6",
-".@    c #198BC5",
-"+@    c #A3DBF7",
-"@@    c #DDF4FF",
-"#@    c #74C9F3",
-"$@    c #71C7F2",
-"%@    c #BA991E",
-"&@    c #C69400",
-"*@    c #D2AA1E",
-"=@    c #F5EB7C",
-"-@    c #FBF7BC",
-";@    c #FEFEED",
-">@    c #FFFFF0",
-",@    c #FFFFEC",
-"'@    c #FFFFE8",
-")@    c #FCF9C9",
-"!@    c #F8F2A9",
-"~@    c #F3E888",
-"{@    c #F0E174",
-"]@    c #ECD960",
-"^@    c #E9D459",
-"/@    c #E7D054",
-"(@    c #E3C746",
-"_@    c #E2C441",
-":@    c #C19D26",
-"<@    c #936700",
-"[@    c #8E6300",
-"}@    c #0078B4",
-"|@    c #2F9BD1",
-"1@    c #9DD8F6",
-"2@    c #D7F2FF",
-"3@    c #8CD2F4",
-"4@    c #6DC5F0",
-"5@    c #85B3A5",
-"6@    c #C39100",
-"7@    c #E9D55D",
-"8@    c #FBF8C7",
-"9@    c #FFFFFA",
-"0@    c #FFFFF6",
-"a@    c #FFFEEB",
-"b@    c #FBF7AD",
-"c@    c #F7F087",
-"d@    c #F5EB7B",
-"e@    c #F3E775",
-"f@    c #F1E36F",
-"g@    c #EFDF69",
-"h@    c #ECDA62",
-"i@    c #EAD65C",
-"j@    c #E8D356",
-"k@    c #E7CF52",
-"l@    c #E5CC4D",
-"m@    c #E4CA4A",
-"n@    c #E3C846",
-"o@    c #C09B22",
-"p@    c #9A6E00",
-"q@    c #986B00",
-"r@    c #956900",
-"s@    c #926700",
-"t@    c #8D6300",
-"u@    c #2C99CF",
-"v@    c #97D6F5",
-"w@    c #7ECBF1",
-"x@    c #9DA159",
-"y@    c #C99C0F",
-"z@    c #F7F08F",
-"A@    c #FFFFFC",
-"B@    c #FDFCD0",
-"C@    c #FBF896",
-"D@    c #FAF58B",
-"E@    c #F8F185",
-"F@    c #F6ED7F",
-"G@    c #F4E978",
-"H@    c #F1E572",
-"I@    c #EFE06B",
-"J@    c #EDDC64",
-"K@    c #EBD75E",
-"L@    c #E8D358",
-"M@    c #E6CE50",
-"N@    c #E5CB4C",
-"O@    c #B28C17",
-"P@    c #9A6D00",
-"Q@    c #976B00",
-"R@    c #8F6400",
-"S@    c #8D6200",
-"T@    c #8B6000",
-"U@    c #0076B1",
-"V@    c #0076B2",
-"W@    c #2996CD",
-"X@    c #CDEEFF",
-"Y@    c #6AC1ED",
-"Z@    c #B3941D",
-"`@    c #C08F00",
-" #    c #DABD3D",
-".#    c #FAF6B4",
-"+#    c #FFFFF7",
-"@#    c #FEFEE9",
-"##    c #FDFC95",
-"$#    c #FDFC94",
-"%#    c #FBF78E",
-"&#    c #F8F387",
-"*#    c #F6EE80",
-"=#    c #F4E979",
-"-#    c #F2E572",
-";#    c #EFE16C",
-">#    c #EDDC65",
-",#    c #EBD85F",
-"'#    c #EAD459",
-")#    c #E7D155",
-"!#    c #E6CE51",
-"~#    c #BC9823",
-"{#    c #996D00",
-"]#    c #946800",
-"^#    c #926600",
-"/#    c #8A6000",
-"(#    c #885E00",
-"_#    c #2694CB",
-":#    c #A9DEF9",
-"<#    c #C8EDFF",
-"[#    c #56B8E9",
-"}#    c #57B8E9",
-"|#    c #5CB5DA",
-"1#    c #BF8D00",
-"2#    c #E3CC53",
-"3#    c #FFFFF2",
-"4#    c #FCF9B2",
-"5#    c #FCF991",
-"6#    c #FBF990",
-"7#    c #FAF68B",
-"8#    c #F8F286",
-"9#    c #EAD55A",
-"0#    c #E8D256",
-"a#    c #E7D154",
-"b#    c #E8D155",
-"c#    c #C1A02B",
-"d#    c #916600",
-"e#    c #8E6301",
-"f#    c #8A6101",
-"g#    c #875D00",
-"h#    c #0074AE",
-"i#    c #2391C9",
-"j#    c #A4DCF8",
-"k#    c #C3EBFF",
-"l#    c #4DB3E6",
-"m#    c #69AAAD",
-"n#    c #BC8B00",
-"o#    c #F0E270",
-"p#    c #FFFFED",
-"q#    c #F9F48D",
-"r#    c #F9F48A",
-"s#    c #F7EF82",
-"t#    c #F3E776",
-"u#    c #F1E370",
-"v#    c #EFDF6A",
-"w#    c #EDDB64",
-"x#    c #EAD75E",
-"y#    c #E9D55A",
-"z#    c #E8D257",
-"A#    c #E8D45A",
-"B#    c #E9D45A",
-"C#    c #E6D053",
-"D#    c #E3C94A",
-"E#    c #DFC13D",
-"F#    c #D8B227",
-"G#    c #946C07",
-"H#    c #8A5F00",
-"I#    c #0072AC",
-"J#    c #0073AC",
-"K#    c #208FC7",
-"L#    c #9EDAF8",
-"M#    c #BDE9FF",
-"N#    c #47B0E4",
-"O#    c #49B0E4",
-"P#    c #799F81",
-"Q#    c #BE9007",
-"R#    c #F4EA89",
-"S#    c #FFFFE7",
-"T#    c #FDFBD3",
-"U#    c #F6EF81",
-"V#    c #F7F083",
-"W#    c #F5EC7D",
-"X#    c #F3E978",
-"Y#    c #F0E16C",
-"Z#    c #EEDD67",
-"`#    c #EBD75D",
-" $    c #E9D45B",
-".$    c #EAD65D",
-"+$    c #EAD75F",
-"@$    c #E7D258",
-"#$    c #E5CC4E",
-"$$    c #CDA622",
-"%$    c #8F6605",
-"&$    c #895F00",
-"*$    c #1C8DC5",
-"=$    c #90D4F5",
-"-$    c #B8E7FF",
-";$    c #40ACE1",
-">$    c #42ADE1",
-",$    c #42ADE2",
-"'$    c #43AEE2",
-")$    c #7D9A71",
-"!$    c #B98800",
-"~$    c #C79E1A",
-"{$    c #F4E98A",
-"]$    c #FAF6BA",
-"^$    c #F4EA7A",
-"/$    c #F4EB7B",
-"($    c #F3E877",
-"_$    c #F0E26E",
-":$    c #EEDE68",
-"<$    c #EDDB63",
-"[$    c #EBD85E",
-"}$    c #EAD55B",
-"|$    c #E9D458",
-"1$    c #E9D358",
-"2$    c #EBD860",
-"3$    c #EBD962",
-"4$    c #EAD860",
-"5$    c #E5CD4F",
-"6$    c #DFC03D",
-"7$    c #BD961B",
-"8$    c #8D6403",
-"9$    c #0070A9",
-"0$    c #198AC3",
-"a$    c #73C5EE",
-"b$    c #B2E6FF",
-"c$    c #3BA9E0",
-"d$    c #3DAAE0",
-"e$    c #3FABE1",
-"f$    c #989038",
-"g$    c #C59C19",
-"h$    c #FFFFDD",
-"i$    c #F8F1A6",
-"j$    c #F2E674",
-"k$    c #E9D55B",
-"l$    c #EBDA63",
-"m$    c #EBDA64",
-"n$    c #E9D55C",
-"o$    c #E5CD50",
-"p$    c #DEBE39",
-"q$    c #AB8312",
-"r$    c #8C6202",
-"s$    c #006FA6",
-"t$    c #006FA7",
-"u$    c #0E7FB8",
-"v$    c #6EC3ED",
-"w$    c #ACE3FF",
-"x$    c #37A7DE",
-"y$    c #3AA8DF",
-"z$    c #3EAAE0",
-"A$    c #978E38",
-"B$    c #D0AF2F",
-"C$    c #F6ED9D",
-"D$    c #FFFFD7",
-"E$    c #F4E98C",
-"F$    c #EEDD66",
-"G$    c #E9D257",
-"H$    c #E8D255",
-"I$    c #EAD861",
-"J$    c #ECDB65",
-"K$    c #ECDC66",
-"L$    c #DCBB34",
-"M$    c #9C740C",
-"N$    c #0B7AB3",
-"O$    c #61BCEB",
-"P$    c #A7E1FF",
-"Q$    c #3CA9DF",
-"R$    c #39A7DF",
-"S$    c #3DA9E0",
-"T$    c #40ABE1",
-"U$    c #968E39",
-"V$    c #B48400",
-"W$    c #CEAC2C",
-"X$    c #F5EB97",
-"Y$    c #F1E37E",
-"Z$    c #E7D053",
-"`$    c #E7CF51",
-" %    c #E7D055",
-".%    c #ECDB66",
-"+%    c #ECDC67",
-"@%    c #E4CB4D",
-"#%    c #D4B12D",
-"$%    c #926908",
-"%%    c #006DA3",
-"&%    c #0674AB",
-"*%    c #45AEE2",
-"=%    c #A2DFFE",
-"-%    c #50B3E5",
-";%    c #3AA8DE",
-">%    c #45ADE2",
-",%    c #B18100",
-"'%    c #B28200",
-")%    c #CCA929",
-"!%    c #F9F4AE",
-"~%    c #FFFFCD",
-"{%    c #EDDB69",
-"]%    c #EAD65B",
-"^%    c #E7D052",
-"/%    c #E6CD50",
-"(%    c #E6CD4E",
-"_%    c #E5CB4D",
-":%    c #E5CD4E",
-"<%    c #E8D359",
-"[%    c #E8D45B",
-"}%    c #E3C848",
-"|%    c #CBA726",
-"1%    c #8F6706",
-"2%    c #865C00",
-"3%    c #006BA1",
-"4%    c #006CA2",
-"5%    c #026EA3",
-"6%    c #2FA2DB",
-"7%    c #9DDEFE",
-"8%    c #4EB2E5",
-"9%    c #43ACE1",
-"0%    c #48AFE3",
-"a%    c #B08100",
-"b%    c #CBA626",
-"c%    c #F9F3A9",
-"d%    c #FFFFC8",
-"e%    c #E8D154",
-"f%    c #E6CE4F",
-"g%    c #E5CC4C",
-"h%    c #E4C94A",
-"i%    c #E4C948",
-"j%    c #E3C948",
-"k%    c #E7D256",
-"l%    c #EBD963",
-"m%    c #E8D35A",
-"n%    c #E1C645",
-"o%    c #BF991F",
-"p%    c #8E6505",
-"q%    c #006A9F",
-"r%    c #026DA1",
-"s%    c #168DC9",
-"t%    c #8AD5F9",
-"u%    c #3BA8DE",
-"v%    c #4AB0E3",
-"w%    c #AE7F00",
-"x%    c #C9A323",
-"y%    c #F8F1A4",
-"z%    c #FFFFC3",
-"A%    c #E5CB4B",
-"B%    c #E4C949",
-"C%    c #E2C542",
-"D%    c #E1C542",
-"E%    c #E3C745",
-"F%    c #E4CA4B",
-"G%    c #E9D65D",
-"H%    c #E1C443",
-"I%    c #BA931B",
-"J%    c #8D6304",
-"K%    c #855B00",
-"L%    c #016A9F",
-"M%    c #0D81BB",
-"N%    c #71C6F0",
-"O%    c #37A6DD",
-"P%    c #40ABE0",
-"Q%    c #46AEE2",
-"R%    c #AC7D00",
-"S%    c #AC7E00",
-"T%    c #C7A01F",
-"U%    c #F8F09E",
-"V%    c #FFFFBD",
-"W%    c #E3C847",
-"X%    c #E3C644",
-"Y%    c #E2C541",
-"Z%    c #E1C33F",
-"`%    c #E0C33F",
-" &    c #E1C442",
-".&    c #E1C341",
-"+&    c #B9931A",
-"@&    c #8C6304",
-"#&    c #845B00",
-"$&    c #00689C",
-"%&    c #01689D",
-"&&    c #0670A6",
-"*&    c #3EABE0",
-"=&    c #83D0F7",
-"-&    c #30A2DB",
-";&    c #39A7DE",
-">&    c #3FAAE0",
-",&    c #AA7B00",
-"'&    c #C59E1C",
-")&    c #F5EB90",
-"!&    c #FFFFB8",
-"~&    c #E1C440",
-"{&    c #E2C442",
-"]&    c #E2C543",
-"^&    c #E1C441",
-"/&    c #E0C23F",
-"(&    c #E0C23E",
-"_&    c #ECDB64",
-":&    c #E0C442",
-"<&    c #B9931B",
-"[&    c #8C6305",
-"}&    c #835A00",
-"|&    c #03699D",
-"1&    c #0D88C5",
-"2&    c #89D3F9",
-"3&    c #36A6DD",
-"4&    c #2FA1DA",
-"5&    c #33A4DC",
-"6&    c #A97A00",
-"7&    c #C29A18",
-"8&    c #EEDD73",
-"9&    c #FFFFB2",
-"0&    c #DFC03A",
-"a&    c #E1C340",
-"b&    c #E0C23D",
-"c&    c #E0C340",
-"d&    c #E1C543",
-"e&    c #E6CF53",
-"f&    c #EDDE69",
-"g&    c #E2C746",
-"h&    c #C6A021",
-"i&    c #8C6407",
-"j&    c #825900",
-"k&    c #006699",
-"l&    c #016699",
-"m&    c #0670A5",
-"n&    c #299DD7",
-"o&    c #52B5E6",
-"p&    c #1F99D5",
-"q&    c #1E98D5",
-"r&    c #A67800",
-"s&    c #A77900",
-"t&    c #B88D0E",
-"u&    c #EDDC6E",
-"v&    c #FFFFAC",
-"w&    c #DEBD37",
-"x&    c #DFBF3A",
-"y&    c #DFC13C",
-"z&    c #E2C645",
-"A&    c #E3C949",
-"B&    c #EDDE6B",
-"C&    c #EEE06E",
-"D&    c #E5CC4F",
-"E&    c #D3AF2A",
-"F&    c #8D6609",
-"G&    c #845A00",
-"H&    c #815800",
-"I&    c #006497",
-"J&    c #016698",
-"K&    c #056FA4",
-"L&    c #0A7DB6",
-"M&    c #0B7BB3",
-"N&    c #086C9E",
-"O&    c #917513",
-"P&    c #B3870B",
-"Q&    c #EAD661",
-"R&    c #FFFFA7",
-"S&    c #DFC03C",
-"T&    c #DFBE39",
-"U&    c #E0C13D",
-"V&    c #E3C849",
-"W&    c #E4CC4E",
-"X&    c #E6CE52",
-"Y&    c #EAD760",
-"Z&    c #EDDD6A",
-"`&    c #EFE271",
-" *    c #F0E473",
-".*    c #EFE270",
-"+*    c #ECDC68",
-"@*    c #DCBB35",
-"#*    c #99720F",
-"$*    c #845B01",
-"%*    c #016496",
-"&*    c #026597",
-"**    c #7A7025",
-"=*    c #A37600",
-"-*    c #AB7F06",
-";*    c #E2C545",
-">*    c #FFFFA2",
-",*    c #DEBF3A",
-"'*    c #E4CA4C",
-")*    c #E5CE51",
-"!*    c #E6CF52",
-"~*    c #E7D257",
-"{*    c #F1E677",
-"]*    c #F2E87A",
-"^*    c #F1E778",
-"/*    c #EEE16F",
-"(*    c #E0C341",
-"_*    c #B18C19",
-":*    c #855D04",
-"<*    c #805700",
-"[*    c #006294",
-"}*    c #796F25",
-"|*    c #A27400",
-"1*    c #A37702",
-"2*    c #DCB82F",
-"3*    c #FEFE9D",
-"4*    c #E5CB4E",
-"5*    c #E7CF54",
-"6*    c #E7D156",
-"7*    c #EBDA65",
-"8*    c #EDDF6B",
-"9*    c #F0E373",
-"0*    c #F3EA7E",
-"a*    c #F3E97C",
-"b*    c #F0E474",
-"c*    c #CDA825",
-"d*    c #876008",
-"e*    c #006191",
-"f*    c #006091",
-"g*    c #6B6C2F",
-"h*    c #A17502",
-"i*    c #C99F16",
-"j*    c #F9F58A",
-"k*    c #EBD75F",
-"l*    c #DEC03B",
-"m*    c #E6CF54",
-"n*    c #E6D055",
-"o*    c #E8D55C",
-"p*    c #EAD65F",
-"q*    c #EDDD69",
-"r*    c #F2E97B",
-"s*    c #F0E575",
-"t*    c #DBB830",
-"u*    c #946D0E",
-"v*    c #815801",
-"w*    c #9F7201",
-"x*    c #BB8F0D",
-"y*    c #F1E471",
-"z*    c #DDBD38",
-"A*    c #E2C747",
-"B*    c #EFE16F",
-"C*    c #AD8514",
-"D*    c #825A02",
-"E*    c #9C7000",
-"F*    c #9D7101",
-"G*    c #A67A06",
-"H*    c #DBB930",
-"I*    c #DEBE3A",
-"J*    c #E2C646",
-"K*    c #E4CB4C",
-"L*    c #EAD862",
-"M*    c #DDBC36",
-"N*    c #BF9718",
-"O*    c #835C04",
-"P*    c #9D7103",
-"Q*    c #C5970D",
-"R*    c #F9F489",
-"S*    c #DDBD36",
-"T*    c #DBB82F",
-"U*    c #DCBA34",
-"V*    c #D9B52B",
-"W*    c #D3AE26",
-"X*    c #CCA622",
-"Y*    c #C8A11F",
-"Z*    c #BE981D",
-"`*    c #BE981E",
-" =    c #C8A322",
-".=    c #CDA927",
-"+=    c #D5B22E",
-"@=    c #E3CA4B",
-"#=    c #DBB932",
-"$=    c #D4AA19",
-"%=    c #845D05",
-"&=    c #996C00",
-"*=    c #996E01",
-"==    c #A57A06",
-"-=    c #D7B22A",
-";=    c #D6AD1F",
-">=    c #D5AD1E",
-",=    c #C69D19",
-"'=    c #B58B12",
-")=    c #A57C0D",
-"!=    c #9B7209",
-"~=    c #996F07",
-"{=    c #976D06",
-"]=    c #956B05",
-"^=    c #946A05",
-"/=    c #946B07",
-"(=    c #936B08",
-"_=    c #936B0A",
-":=    c #946E0E",
-"<=    c #A78015",
-"[=    c #B9941E",
-"}=    c #C7A326",
-"|=    c #D6B22B",
-"1=    c #DAB72E",
-"2=    c #D7B023",
-"3=    c #D2A512",
-"4=    c #986C01",
-"5=    c #A47805",
-"6=    c #B68A0A",
-"7=    c #B3880B",
-"8=    c #9E7508",
-"9=    c #996F05",
-"0=    c #976B02",
-"a=    c #956A01",
-"b=    c #8C6100",
-"c=    c #896001",
-"d=    c #895F02",
-"e=    c #896105",
-"f=    c #8A6207",
-"g=    c #8A640A",
-"h=    c #98710E",
-"i=    c #AB8210",
-"j=    c #AD830D",
-"k=    c #9C7107",
-"l=    c #966B01",
-"m=    c #966A01",
-"n=    c #916500",
-"o=    c #815901",
-"p=    c #835B04",
-"q=    c #815902",
-"r=    c #8B6100",
-"s=    c #835900",
-"                                                                                                ",
-"                                                                                                ",
-"                            . + @ # $ % & * = - ; >                                             ",
-"                    , ' ) ! . + ~ # { % ] * = - ^ > / (                                         ",
-"                _ : < ' [ } | 1 2 3 4 5 6 7 8 9 0 a / ( b                                       ",
-"            c d e : f g h i j k l m n o p q r s t u / ( b v                                     ",
-"            w c x y z A B C D E F G H I J K L M N O / ( P v Q                                   ",
-"          < R S T U V W X Y Z `  ...+.@.#.5 6 $.%.&./ ( P v Q *.                                ",
-"          =.< -.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.( P 2.Q 3.                                ",
-"        4.' 5.6.7.>.8.9.0.a.b.c.d.e.f.g.h.i.j.<.k.l.m.n.P 2.o.3.p.                              ",
-"        ) 4.q.r.s.t.u.v.w.x.y.z.d.A.f.B.@.C.D.E.F.G.H.I.J.K.L.M.N.O.P.                          ",
-"        ! ) Q.R.S.T.U.V.0.W.b.c.d.X.Y.Z.`. +.+++@+#+$+%+J.&+*+M.=+-+P.;+>+                      ",
-"        ,+! '+X )+!+~+~+x.{+T ]+^+/+(+_+:+ +<+[+}+|+1+2+3+4+5+6+7+8+9+;+>+0+                    ",
-"        . a+b+c+d+e+{+{+y.f+c.g+h+i+(+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+;+>+0+z+                  ",
-"      + A+B+C+D D+z.~.~.z.]+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+;+>+Z+z+`+                ",
-"       @+ .@+@@@K d.#@#@d.$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@3+4+(@_@:@;+>+Z+<@`+[@              ",
-"      }@~ |@1@2@3@X.4@4@X.5@6@_+7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@`+t@              ",
-"      # }@u@v@H w@f.f.f.f.x@:+y@z@A@9@B@C@D@E@F@G@H@I@J@K@L@/@M@l@N@O@P@Q@r@s@R@S@T@            ",
-"      U@V@W@o X@Y@g.g.g.g.Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#k@!#M@~#{#Q@]#^#R@S@/#(#          ",
-"      $ { _#:#<##.[#}#}#|#.+1#2#L+3#4#5#6#7#8#F@G@H@I@J@,#9#0#a#/@b#c#>+0+z+d#[@e#f#g#          ",
-"      % h#i#j#k#l#5 5 5 m#n#.+o#,@p#q#r#r#&#s#=@t#u#v#w#x#y#z#z#L@A#B#L@C#D#E#F#G#H#g#          ",
-"      I#J#K#L#M#$.N#O#O#P#++Q#R#S#T#U#V#V#*#W#X#-#Y#Z#h@`#^@L@L@ $.$+$.$@$#$x+$$%$&$            ",
-"      & ] *$=$-$;$>$,$'$)$!$~${$N+]$^$d@/$^$($-#_$:$<$[$}$|$1$B#.$2$3$4$A#5$6$7$8$&$            ",
-"      * 9$0$a$b$c$d$e$;$f$@+g$o+h$i$-#j$j$-#u#Y#:$w#,#k$L@0#1$k$+$l$m$3$n$o$p$q$r$(#            ",
-"      s$t$u$v$w$x$y$d$z$A$#+B$C$D$E$I@Y#Y#I@g@F$h@[$^@G$H$)#z#k$I$J$K$m$n$5$L$M$f#(#            ",
-"      = = N$O$P$Q$R$S$T$U$V$W$X$R+Y$J@>#>#J@h@,#i@^@b#Z$`$k@ %y#I+.%+%m$n$@%#%$%H#g#            ",
-"      - %%&%*%=%-%;%T$>%,%'%)%!%~%{%`#K@K@`#]%^@0#^%/%(%_%:%k@<%4$J$+%m$[%}%|%1%&$2%            ",
-"      3%4%5%6%7%8%Q$9%0%I.a%b%c%d%e%H$0#0#H$e%k@f%g%h%i%j%m@5$k%+$J$K$l%m%n%o%p%(#2%            ",
-"      q%; r%s%t%g.u%9%v%J.w%x%y%z%l@(%3+3+(%l@A%B%(@5+C%D%E%F%/@G%m$.%l%<%H%I%J%g#K%            ",
-"        > L%M%h N%O%P%Q%R%S%T%U%V%(@W%B%4+j%W%(@X%Y%Z%Z%`% &}%!#n$m$.%l$m%.&+&@&g##&            ",
-"        $&%&&&*&=&-&;&>&,&&+'&)&!&~&{&C%]&]&5+{&^&/&(&E#(&^&}%!#n$m$+%_& $:&<&[&2%}&            ",
-"        1./ |&1&2&3&4&5&*+6&7&8&9&0&E#Z%a&^&.&^&a&`%b&(&c&d&m@e&+$.%f&+%G%g&h&i&K%j&            ",
-"        ( k&l&m&n&o&p&q&r&s&t&u&v&w&x&y&/&.& &D%]& & &d&z&A&5$@$3$B&C&B&I$D&E&F&G&H&            ",
-"        I&I&n.J&K&L&M&N&O&M.P&Q&R&S&T&U&^&]&g&W%V&A&D#F%W&X&z#Y&Z&`& *.*+*@$@*#*$*H&            ",
-"          P P P %*&*&*%***=*-*;*>*D&,*c&z&A&'*#$5$)*!*/@~* $4$+*`&{*]*^*/*Y&(*_*:*<*            ",
-"          v [*[*[*v v v }*|*1*2*3*4*S&d&V&W&o$!*5*6*~*m%n$Y&7*8*9*]*0*a*b*.%@%c*d*<*<*          ",
-"            2.2.2.2.e*f*g*-+h*i*j*k*l*d&D#2+X&m*n*)#@$<%o*p*l$q*`&^*r*r*s*q*e&t*u*v*<*          ",
-"              Q Q Q       P.w*x*I@y*z*c&A*F%D&5$o$o$)*e&n*@$7@l%q*B* * */*m$e&@*C*D*<*          ",
-"                          E*F*G*`%V#H*I*/&d&J*z&H%(*/&/&:&g&K*e&[%I$J$.%L*<%'*M*N*O*<*<*        ",
-"                          p@;+P*Q*R*S*T*U*U*T*V*W*X*Y*Z*`* =.=+=M*/&A*@%D&@=(*#=$=%=<*<*        ",
-"                          >+&=*===-=!*;=>=,='=)=!=~={=]=^=/=(=_=:=<=[=}=|=1=V*2=3=O*<*<*<*      ",
-"                          Q@Q@Q@4=5=6=7=8=9=0=a=z+s@d#`+R@t@b=/#c=d=e=f=g=h=i=j=k=v*<*<*<*      ",
-"                            r@Z+Z+l=0=0=m=]#z+s@^#n=R@[@S@b=/#&$g#2%G&j&o=D*O*p=q=<*<*<*<*      ",
-"                            z+]#]#]#z+z+<@s@^#n=`+R@[@S@r=/#&$g#2%#&s=H&<*<*<*<*<*<*<*<*        ",
-"                              ^#s@^#^#d#n=`+                        H&<*<*<*<*<*<*<*<*          ",
-"                                `+`+`+                                      <*<*<*              ",
-"                                                                                                ",
-"                                                                                                "};
diff --git a/src/icons/study.xpm b/src/icons/study.xpm
deleted file mode 100644 (file)
index d16c3d1..0000000
+++ /dev/null
@@ -1,587 +0,0 @@
-/* XPM */
-static const char * study_xpm[] = {
-"48 48 536 2",
-"      c None",
-".     c #9D9EA1",
-"+     c #9B9C9F",
-"@     c #9A9B9E",
-"#     c #999A9D",
-"$     c #97989B",
-"%     c #96979A",
-"&     c #949598",
-"*     c #939497",
-"=     c #919295",
-"-     c #909194",
-";     c #8F9093",
-">     c #8D8E91",
-",     c #8C8D90",
-"'     c #8A8B8E",
-")     c #898A8D",
-"!     c #87888B",
-"~     c #A3A4A7",
-"{     c #A1A2A5",
-"]     c #A0A1A4",
-"^     c #9FA0A3",
-"/     c #9C9DA0",
-"(     c #98999C",
-"_     c #959699",
-":     c #929396",
-"<     c #8E8F92",
-"[     c #8B8C8F",
-"}     c #88898C",
-"|     c #86878A",
-"1     c #858689",
-"2     c #838487",
-"3     c #828386",
-"4     c #808184",
-"5     c #7F8083",
-"6     c #A7A8AB",
-"7     c #A6A7AA",
-"8     c #A5A6A9",
-"9     c #A4A5A8",
-"0     c #A2A3A6",
-"a     c #9E9FA2",
-"b     c #848588",
-"c     c #818285",
-"d     c #7E7F82",
-"e     c #7C7D80",
-"f     c #ABACAF",
-"g     c #AAABAE",
-"h     c #A8A9AC",
-"i     c #ADAEB1",
-"j     c #B0B1B3",
-"k     c #BCBDBF",
-"l     c #BABBBE",
-"m     c #C7C8C9",
-"n     c #CACBCD",
-"o     c #C9CACC",
-"p     c #C8C9CB",
-"q     c #C8C9CA",
-"r     c #C7C8CA",
-"s     c #C2C3C4",
-"t     c #B2B3B6",
-"u     c #B2B3B5",
-"v     c #B1B2B4",
-"w     c #9C9D9F",
-"x     c #7F8082",
-"y     c #7B7C7F",
-"z     c #797A7D",
-"A     c #ACADB0",
-"B     c #A9AAAD",
-"C     c #BABBBD",
-"D     c #D7D8DA",
-"E     c #E5E5E7",
-"F     c #E8E9EA",
-"G     c #EAEAEB",
-"H     c #EBECED",
-"I     c #EBEBEC",
-"J     c #ECEDEE",
-"K     c #EAEAEC",
-"L     c #E9E9EB",
-"M     c #E7E8EA",
-"N     c #E4E5E7",
-"O     c #E2E2E5",
-"P     c #E0E1E3",
-"Q     c #DEDFE0",
-"R     c #DCDDDF",
-"S     c #DADBDD",
-"T     c #D9DADC",
-"U     c #CECFD1",
-"V     c #C0C1C3",
-"W     c #A7A8AA",
-"X     c #7D7E81",
-"Y     c #78797C",
-"Z     c #D6D7D8",
-"`     c #EEEFF0",
-" .    c #F3F4F4",
-"..    c #F6F6F7",
-"+.    c #F5F5F6",
-"@.    c #F4F4F5",
-"#.    c #F3F3F4",
-"$.    c #F1F2F3",
-"%.    c #F0F0F2",
-"&.    c #EFEFF1",
-"*.    c #EEEEEF",
-"=.    c #E8E9EB",
-"-.    c #E6E6E8",
-";.    c #E3E4E6",
-">.    c #E1E2E5",
-",.    c #E1E2E4",
-"'.    c #E0E1E4",
-").    c #DFE0E3",
-"!.    c #D1D1D3",
-"~.    c #E6E6E7",
-"{.    c #F0F0F1",
-"].    c #FAFAFA",
-"^.    c #F9F9FA",
-"/.    c #F8F9F9",
-"(.    c #F7F8F8",
-"_.    c #F6F7F7",
-":.    c #F2F2F3",
-"<.    c #EDEEEF",
-"[.    c #E9E9EA",
-"}.    c #E5E6E7",
-"|.    c #E2E3E4",
-"1.    c #E1E2E3",
-"2.    c #DDDEE0",
-"3.    c #DCDDDE",
-"4.    c #DBDCDE",
-"5.    c #DBDCDD",
-"6.    c #DADBDC",
-"7.    c #DDDEDF",
-"8.    c #DEDFE1",
-"9.    c #E2E2E4",
-"0.    c #E6E7E8",
-"a.    c #D7D8D9",
-"b.    c #7A7B7E",
-"c.    c #76777A",
-"d.    c #B1B2B5",
-"e.    c #FBFBFC",
-"f.    c #FCFCFC",
-"g.    c #FDFDFD",
-"h.    c #F1F1F2",
-"i.    c #EAEBEB",
-"j.    c #E4E5E6",
-"k.    c #E0E1E2",
-"l.    c #DFE0E1",
-"m.    c #D9DADB",
-"n.    c #D8D9DB",
-"o.    c #D8D9DA",
-"p.    c #DFE0E0",
-"q.    c #E6E7E9",
-"r.    c #D1D2D4",
-"s.    c #CFD0D2",
-"t.    c #FBFBFB",
-"u.    c #FCFCFD",
-"v.    c #FEFEFE",
-"w.    c #F7F7F8",
-"x.    c #EBECEC",
-"y.    c #E1DDD8",
-"z.    c #E0CCB8",
-"A.    c #DFCAB7",
-"B.    c #DDCEC0",
-"C.    c #E4E4E6",
-"D.    c #E8E8EA",
-"E.    c #E9EAEB",
-"F.    c #AFB0B2",
-"G.    c #E7E8E8",
-"H.    c #F9F9F9",
-"I.    c #FAFAFB",
-"J.    c #E8E9E9",
-"K.    c #EAB989",
-"L.    c #ED9640",
-"M.    c #E58F3B",
-"N.    c #DC8735",
-"O.    c #D37F2F",
-"P.    c #CC8340",
-"Q.    c #D5BCA5",
-"R.    c #ECECED",
-"S.    c #C6C7C9",
-"T.    c #EEEFEF",
-"U.    c #E2E3E5",
-"V.    c #F1AF6D",
-"W.    c #FBA249",
-"X.    c #F5AD52",
-"Y.    c #F6C46D",
-"Z.    c #F8CC77",
-"`.    c #E79D44",
-" +    c #CD7B2B",
-".+    c #C06F23",
-"++    c #C79B72",
-"@+    c #E5E6E6",
-"#+    c #EDEDEE",
-"$+    c #E4BF9A",
-"%+    c #F69E46",
-"&+    c #FBC269",
-"*+    c #FFFCD6",
-"=+    c #FFFCD8",
-"-+    c #FFF5BC",
-";+    c #FFF1AC",
-">+    c #F9CC73",
-",+    c #C87626",
-"'+    c #B6661C",
-")+    c #CDB5A0",
-"!+    c #9B9C9E",
-"~+    c #838486",
-"{+    c #909193",
-"]+    c #B4B5B7",
-"^+    c #E7E7E8",
-"/+    c #DDDDDF",
-"(+    c #E3E4E5",
-"_+    c #F3F4F5",
-":+    c #E3E3E5",
-"<+    c #E69B51",
-"[+    c #F2AB51",
-"}+    c #FFFCD7",
-"|+    c #FFFBC7",
-"1+    c #FFE882",
-"2+    c #FFD872",
-"3+    c #FFC963",
-"4+    c #FFCC6C",
-"5+    c #F4B658",
-"6+    c #B5641B",
-"7+    c #B4743B",
-"8+    c #AAABAD",
-"9+    c #E8E8E9",
-"0+    c #98999B",
-"a+    c #B3B4B6",
-"b+    c #F0F1F2",
-"c+    c #E18B38",
-"d+    c #F6C870",
-"e+    c #FFF8C7",
-"f+    c #FFE983",
-"g+    c #FFE07A",
-"h+    c #FFD36D",
-"i+    c #FFCA64",
-"j+    c #FFFFA1",
-"k+    c #BD6B1F",
-"l+    c #A95A13",
-"m+    c #A8A9AB",
-"n+    c #ABABAD",
-"o+    c #A3A4A6",
-"p+    c #B9BABC",
-"q+    c #E7E7E9",
-"r+    c #D98433",
-"s+    c #F8CF7A",
-"t+    c #FFE592",
-"u+    c #FFD973",
-"v+    c #FFD46E",
-"w+    c #FFCC66",
-"x+    c #FFCB65",
-"y+    c #FFD16B",
-"z+    c #C67323",
-"A+    c #A55711",
-"B+    c #D5D2D0",
-"C+    c #A6A7A9",
-"D+    c #B8B9BB",
-"E+    c #BEBFC2",
-"F+    c #C1C2C4",
-"G+    c #C4C5C7",
-"H+    c #BCBCBE",
-"I+    c #A2A3A5",
-"J+    c #7E7F81",
-"K+    c #7E7E81",
-"L+    c #DFDFE1",
-"M+    c #ECECEE",
-"N+    c #D07C2D",
-"O+    c #F1BA63",
-"P+    c #FFD97F",
-"Q+    c #FFD06A",
-"R+    c #FFCE68",
-"S+    c #FFCF69",
-"T+    c #FFDC76",
-"U+    c #B5661B",
-"V+    c #A1530F",
-"W+    c #D5D6D8",
-"X+    c #D4D5D7",
-"Y+    c #D6D7D9",
-"Z+    c #D9D9DB",
-"`+    c #EFEFF0",
-" @    c #CA8849",
-".@    c #D68734",
-"+@    c #FFD06E",
-"@@    c #FFD771",
-"#@    c #FFDF79",
-"$@    c #FFE781",
-"%@    c #FFF18B",
-"&@    c #F5B351",
-"*@    c #A55611",
-"=@    c #AC713F",
-"-@    c #D4D5D6",
-";@    c #AEAFB1",
-">@    c #C5C6C8",
-",@    c #C99B72",
-"'@    c #C06E22",
-")@    c #F2AD4C",
-"!@    c #FFEB85",
-"~@    c #FFF28C",
-"{@    c #FFEA84",
-"]@    c #FFCD67",
-"^@    c #BF6F20",
-"/@    c #9F510D",
-"(@    c #BB9A7E",
-"_@    c #D5D6D7",
-":@    c #D3D4D6",
-"<@    c #EFF0F0",
-"[@    c #E5E5E8",
-"}@    c #CBD3CC",
-"|@    c #65A43C",
-"1@    c #BB6A1D",
-"2@    c #E3973C",
-"3@    c #F8B955",
-"4@    c #C57423",
-"5@    c #895209",
-"6@    c #699B5E",
-"7@    c #C8D0CB",
-"8@    c #B6B7B9",
-"9@    c #999A9C",
-"0@    c #88898B",
-"a@    c #B5B6B8",
-"b@    c #DEDEDF",
-"c@    c #C2C3C6",
-"d@    c #5AAD42",
-"e@    c #43A921",
-"f@    c #7E7E1B",
-"g@    c #AD5E16",
-"h@    c #AC5D16",
-"i@    c #AA5B14",
-"j@    c #A3540F",
-"k@    c #9D500C",
-"l@    c #994C09",
-"m@    c #37730B",
-"n@    c #117709",
-"o@    c #3E8B3A",
-"p@    c #ABACAE",
-"q@    c #86B979",
-"r@    c #3DA31E",
-"s@    c #41A821",
-"t@    c #7CCD4F",
-"u@    c #BD9360",
-"v@    c #A1530E",
-"w@    c #9E500C",
-"x@    c #9A4D0A",
-"y@    c #93530A",
-"z@    c #4E9413",
-"A@    c #29B118",
-"B@    c #14820A",
-"C@    c #0C7206",
-"D@    c #7AA77A",
-"E@    c #D2D3D5",
-"F@    c #ACACAE",
-"G@    c #DBDCDF",
-"H@    c #DDDEE1",
-"I@    c #C8CFC9",
-"J@    c #3F9F26",
-"K@    c #389E1C",
-"L@    c #67CB41",
-"M@    c #E1F8D9",
-"N@    c #83DC60",
-"O@    c #67AC23",
-"P@    c #738A18",
-"Q@    c #6E8716",
-"R@    c #638B14",
-"S@    c #37B018",
-"T@    c #32B81C",
-"U@    c #40C227",
-"V@    c #31B41F",
-"W@    c #0C7506",
-"X@    c #20791D",
-"Y@    c #939496",
-"Z@    c #B7B7B9",
-"`@    c #BFC0C2",
-" #    c #C4C4C6",
-".#    c #C9C9CB",
-"+#    c #C0C0C2",
-"@#    c #A4A5A7",
-"##    c #97989A",
-"$#    c #94BB8E",
-"%#    c #309618",
-"&#    c #39A41C",
-"*#    c #A5E593",
-"=#    c #8FDD76",
-"-#    c #4EC727",
-";#    c #4AC525",
-">#    c #44C122",
-",#    c #3CBD1E",
-"'#    c #34B81A",
-")#    c #2BB316",
-"!#    c #32B81D",
-"~#    c #53CF35",
-"{#    c #52CF35",
-"]#    c #148D0B",
-"^#    c #056B03",
-"/#    c #AABEAC",
-"(#    c #D6D6D8",
-"_#    c #E7E8E9",
-":#    c #F2F3F3",
-"<#    c #ADAEB0",
-"[#    c #D7D8DB",
-"}#    c #DADBDE",
-"|#    c #69A95D",
-"1#    c #2B9116",
-"2#    c #36AD1C",
-"3#    c #ACE9A1",
-"4#    c #3EBE1F",
-"5#    c #3DBD1E",
-"6#    c #3ABC1D",
-"7#    c #36B91B",
-"8#    c #30B518",
-"9#    c #29B115",
-"0#    c #27B115",
-"a#    c #3CBF25",
-"b#    c #69DF45",
-"c#    c #67DE45",
-"d#    c #1CA112",
-"e#    c #036902",
-"f#    c #90B192",
-"g#    c #F1F2F2",
-"h#    c #D5D6D9",
-"i#    c #509D43",
-"j#    c #268C13",
-"k#    c #31AF1B",
-"l#    c #7AD769",
-"m#    c #3EBF23",
-"n#    c #39BC1F",
-"o#    c #33B81B",
-"p#    c #2FB619",
-"q#    c #2EB61A",
-"r#    c #31B81D",
-"s#    c #3FC227",
-"t#    c #5FD83E",
-"u#    c #82F057",
-"v#    c #6BE148",
-"w#    c #016701",
-"x#    c #699D6B",
-"y#    c #DADADC",
-"z#    c #EDEEEE",
-"A#    c #77787B",
-"B#    c #4D9A42",
-"C#    c #218710",
-"D#    c #2AA618",
-"E#    c #63D44C",
-"F#    c #5AD439",
-"G#    c #55D137",
-"H#    c #4CCB30",
-"I#    c #4AC92F",
-"J#    c #51CE34",
-"K#    c #5ED83E",
-"L#    c #72E54C",
-"M#    c #84F158",
-"N#    c #80EF56",
-"O#    c #53D138",
-"P#    c #0E8F09",
-"Q#    c #006600",
-"R#    c #93B394",
-"S#    c #D7D7D9",
-"T#    c #E0E0E2",
-"U#    c #F4F4F4",
-"V#    c #E1E1E3",
-"W#    c #DCDDE0",
-"X#    c #61A15B",
-"Y#    c #1B810D",
-"Z#    c #1C850E",
-"`#    c #2EAF1D",
-" $    c #53D036",
-".$    c #63DB41",
-"+$    c #6CE147",
-"@$    c #71E44B",
-"#$    c #77E950",
-"$$    c #7BEB52",
-"%$    c #51CF36",
-"&$    c #1FA614",
-"*$    c #016A00",
-"=$    c #B1C5B3",
-"-$    c #DEDEE0",
-";$    c #F7F7F7",
-">$    c #ABC5AB",
-",$    c #157B0B",
-"'$    c #167C0B",
-")$    c #177D0B",
-"!$    c #188F0E",
-"~$    c #27A819",
-"{$    c #43C52C",
-"]$    c #4BCB32",
-"^$    c #4CCC33",
-"/$    c #4ACA31",
-"($    c #40C42B",
-"_$    c #27AC1A",
-":$    c #0E8B09",
-"<$    c #468C47",
-"[$    c #EAEBEC",
-"}$    c #E0E0E3",
-"|$    c #5C9C59",
-"1$    c #117708",
-"2$    c #107608",
-"3$    c #0F7507",
-"4$    c #0E7708",
-"5$    c #10820A",
-"6$    c #0F8008",
-"7$    c #066C03",
-"8$    c #036901",
-"9$    c #2B7E2C",
-"0$    c #D9DFDA",
-"a$    c #F5F5F5",
-"b$    c #F6F6F6",
-"c$    c #F4F5F5",
-"d$    c #E4E4E5",
-"e$    c #818284",
-"f$    c #92B891",
-"g$    c #268021",
-"h$    c #0B7105",
-"i$    c #0A7005",
-"j$    c #096F05",
-"k$    c #086E04",
-"l$    c #0F6E0F",
-"m$    c #76AA77",
-"n$    c #BED1BF",
-"o$    c #86B386",
-"p$    c #69A369",
-"q$    c #3D893C",
-"r$    c #3C883C",
-"s$    c #5A995A",
-"t$    c #77AB78",
-"u$    c #B4CDB5",
-"v$    c #F0F1F1",
-"w$    c #ECEDED",
-"x$    c #DCDCDE",
-"y$    c #BBBBBD",
-"z$    c #C1C2C3",
-"A$    c #E5E5E6",
-"B$    c #D3D4D5",
-"C$    c #C1C2C5",
-"D$    c #B9BABB",
-"E$    c #C9CACB",
-"F$    c #CACACC",
-"G$    c #CACBCC",
-"H$    c #B5B5B8",
-"I$    c #B3B4B7",
-"J$    c #949597",
-"K$    c #828385",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                  . + @ # $ % & * = - ; > , ' ) !                               ",
-"                          ~ { ] ^ . / @ # ( % _ * : = ; < , [ ) } | 1 2 3 4 5                   ",
-"                    6 7 8 9 0 { ^ a / + @ ( $ _ & : = ; < , [ ) } | 1 b 3 c 5 d e               ",
-"              f f g h 6 8 9 ~ { ] a i j k l m n o p q r s t u v w / | | b 2 4 x e y z           ",
-"            A i A g B 6 7 f C p D E F G H I J J H K L M N O P Q R S T U V W 1 c X y z Y         ",
-"          g f f f g f V Z F `  ...+.@.#.$.%.&.*.J H K =.M -.N ;.>.,.,.'.).R !.$ 4 e z Y         ",
-"        6 h B B A n ~.{.].].^./.(._.:.<.[.}.|.1.2.3.4.5.6.T S 4.S 7.8.9.N 0.,.a.% d b.Y c.      ",
-"        7 6 6 d.7.$.e.f.g.f.^.h.i.j.k.k.l.8.Q 7.R 3.4.5.6.T m.n.o.T 5.p.|.}.q.P r.} y Y c.      ",
-"      9 9 8 8 s.@.t.u.v.w.x.y.z.A.B.k.l.l.Q Q 7.R 3.4.5.6.T m.n.D T 4.l.C.D.E.}.p.j X Y c.      ",
-"      0 ~ ~ F.G.H.I.^.J.l.K.L.M.N.O.P.Q.Q Q 7.7.3.4.5.S 6.T n.o.D m.4.l.E G R.E.|.!.d Y c.c.    ",
-"      ] { 0 S.T.(./.U.Q V.W.X.Y.Z.`. +.+++7.7.3.3.5.S 6.T m.n.o.D o.4.l.@+I #+R.E 3.[ z c.c.    ",
-"      ^ ^ ] m.+...J 7.$+%+&+*+=+-+;+>+,+'+)+3.4.5.S 6.T C !+} c.c.c.~+{+]+3.*.#+^+/+$ Y c.c.    ",
-"    / . . B (+#._+:+3.<+[+}+|+1+2+3+4+5+6+7+5.5.S 6.T + c.c.c.c.c.c.c.c.c.c.8+*.9+2.0+z c.c.    ",
-"    + + / a+-.b+%.S 5.c+d+e+f+g+h+3+i+j+k+l+S 6.T m.m+c.c.c.c.c.c.c.c.c.c.c.c.n+F Q o+z c.c.    ",
-"    # # @ p+F ` q+T 6.r+s+t+u+v+w+x+u+y+z+A+B+m.n.n.e c.c.e & C+D+E+F+G+H+I+J+K+[.L+i z c.c.    ",
-"    $ ( ( r E.M+1.n.m.N+O+P+Q+R+S+T+1+Q+U+V+n.o.o.D 3 ] G+Z W+W+X+Y+Z+Q j.H `+T.[.l.i z c.c.    ",
-"    _ % % S.E.K 3.D o. @.@+@@@#@$@%@1+&@*@=@D D a.Y+Y+Z W+W+X+X+-@W+m.2.E H `+`+E.l.;@z c.c.    ",
-"    & & & >@q+M n.Y+a.,@'@)@u+!@~@{@]@^@/@(@Y+Y+Z W+W+_@X+X+-@:@:@X+n.2.}.R.<@`+E.l.;@z c.c.    ",
-"    : : : G+N [@W+W+}@|@'+1@2@x+y+3@4@/@5@6@7@W+_@X+X+X+8@9@0@c.c.c.3 {+a@b@{.<@E.l.;@z c.c.    ",
-"    - - = c@U.U.X+X+d@e@f@g@h@i@U+j@k@l@m@n@o@X+-@:@:@# c.c.c.c.c.c.c.c.c.c.p@<@E.L+i z c.c.    ",
-"    < ; ; F+).P :@q@r@s@t@u@j@v@w@x@y@z@A@B@C@D@:@E@9 c.c.c.c.c.c.c.c.c.c.c.c.F@[.Q m+z c.c.    ",
-"    , > > k G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@E@r.e c.c.e Y@9 Z@`@ #.#+#@#d J+F 7.##Y c.c.    ",
-"    ' [ [ ;@n.G@$#%#&#*#=#-#;#>#,#'#)#!#~#{#]#^#/#r.c a V r.E@:@(#6.k._#T.:##.{._#R _ Y c.c.    ",
-"    ) ) ) <#[#}#|#1#2#3#4#5#6#7#8#9#0#a#b#c#d#e#f#r.r.r.E@E@:@W+m.Q j.x.g#@.#.`+~.4.; Y c.c.    ",
-"    ! ! ! # h#}#i#j#k#l#m#n#o#p#q#r#s#t#u#v#d#w#x#E@E@:@X+W+a.y#Q (+E.<@@.+.#.z#(+y#X A#c.c.    ",
-"    1 1 | & W+G@B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#W+Z S#o.T 3.T#j.E.`+U#..+.:.I V#o y A#c.c.    ",
-"      2 b 1 s.W#X#Y#Z#`# $.$b#+$@$#$$$@$%$&$*$Q#=$6.5.3.-$T#:+^+I <@U#_.;$@.`+^+7.v z c.c.c.    ",
-"      3 3 2 l G@>$,$'$)$!$~${$]$^$/$($_$:$*$Q#<$T#V#9.(+}.9+I *.g#@._.;$+.h.[$1.m.} Y c.c.      ",
-"      4 4 4 $ o.}$|$1$1$1$2$3$4$5$6$7$8$Q#Q#9$0$9+F G x.#+`+h.#.a$b$b$c$h.x.d$4.f z A#c.c.      ",
-"      d d x e$k 2.l.f$g$h$i$j$k$7$e#w#Q#l$m$#+z#*.T.`+{.h.:.#.@.c$@.:#`+G (+3.D+y A#c.c.c.      ",
-"      e e e X | q R k.j.n$o$p$q$r$s$t$u$`+<@{.{.v$v$h.g#:.:.:.g#v$*.[$~.k.5.<#y A#c.c.c.        ",
-"        b.b.e X | a@5.l.d$^+E.I R.#+z#*.*.*.*.T.*.*.z##+w$R.I [.0.d$T#x$y$' b.A#c.c.c.c.        ",
-"        Y z z b.y 5 9@z$3.l.1.(+A$~.0.0.0.0.0.-.}.A$j.(+|.V#l.2.B$C$8+1 y Y A#c.c.c.c.          ",
-"          A#A#A#A#Y b.e | ^ d.D$p E$F$G$G$F$o E$p H$I$u W @ J$K$5 e b.Y A#c.c.c.c.c.            ",
-"            c.c.c.c.A#A#Y b.y e K+x x x x x x x K+X e y y b.z Y Y A#A#c.c.c.c.c.c.              ",
-"              c.c.c.c.c.c.A#A#Y Y Y z z z z z Y Y Y Y A#A#A#c.c.c.c.c.c.c.c.c.                  ",
-"                c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.                      ",
-"                      c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.                                  ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                ",
-"                                                                                                "};
diff --git a/src/treelistctrl.cpp b/src/treelistctrl.cpp
deleted file mode 100644 (file)
index c376204..0000000
+++ /dev/null
@@ -1,4791 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        treelistctrl.cpp
-// Purpose:     multi column tree control implementation
-// Author:      Robert Roebling
-// Maintainer:  Otto Wyss
-// Created:     01/02/97
-// RCS-ID:      $Id: treelistctrl.cpp,v 1.4 2009/03/20 14:43:12 davila Exp $
-// Copyright:   (c) 2004 Robert Roebling, Julian Smart, Alberto Griggio,
-//              Vadim Zeitlin, Otto Wyss
-// Licence:     wxWindows
-/////////////////////////////////////////////////////////////////////////////
-
-// ===========================================================================
-// declarations
-// ===========================================================================
-
-// ---------------------------------------------------------------------------
-// headers
-// ---------------------------------------------------------------------------
-
-
-
-
-#if defined(__GNUG__) && !defined(__APPLE__)
-  #pragma implementation "treelistctrl.h"
-#endif
-
-
-
-#include <wx/treebase.h>
-#include <wx/timer.h>
-#include <wx/textctrl.h>
-#include <wx/imaglist.h>
-#include <wx/settings.h>
-#include <wx/dcclient.h>
-#include <wx/dcscreen.h>
-#include <wx/scrolwin.h>
-
-
-
-
-//#include "wx/treelistctrl.h"
-#include "treelistctrl.h"
-
-#ifdef __WXMAC__
-    #include "wx/mac/private.h"
-#endif
-
-
-// ---------------------------------------------------------------------------
-// array types
-// ---------------------------------------------------------------------------
-
-class  wxTreeListItem;
-
-#if !wxCHECK_VERSION(2, 5, 0)
-WX_DEFINE_ARRAY(wxTreeListItem *, wxArrayTreeListItems);
-#else
-WX_DEFINE_ARRAY_PTR(wxTreeListItem *, wxArrayTreeListItems);
-#endif
-
-#include <wx/dynarray.h>
-WX_DECLARE_OBJARRAY(wxTreeListColumnInfo, wxArrayTreeListColumnInfo);
-#include <wx/arrimpl.cpp>
-WX_DEFINE_OBJARRAY(wxArrayTreeListColumnInfo);
-
-#if !wxCHECK_VERSION(2, 3, 3)
-WX_DEFINE_ARRAY(short, wxArrayShort);
-#endif
-
-
-// --------------------------------------------------------------------------
-// constants
-// --------------------------------------------------------------------------
-
-static const int NO_IMAGE = -1;
-
-static const int LINEHEIGHT = 10;
-static const int LINEATROOT = 5;
-static const int MARGIN = 2;
-static const int MININDENT = 16;
-static const int BTNWIDTH = 9;
-static const int BTNHEIGHT = 9;
-static const int EXTRA_WIDTH = 4;
-static const int EXTRA_HEIGHT = 4;
-static const int HEADER_OFFSET_X = 1;
-static const int HEADER_OFFSET_Y = 1;
-
-static const int DRAG_TIMER_TICKS = 250; // minimum drag wait time in ms
-static const int FIND_TIMER_TICKS = 500; // minimum find wait time in ms
-static const int RENAME_TIMER_TICKS = 250; // minimum rename wait time in ms
-
-const  wxChar* wxTreeListCtrlNameStr = _T("treelistctrl");
-
-static wxTreeListColumnInfo wxInvalidTreeListColumnInfo;
-
-
-// ---------------------------------------------------------------------------
-// private classes
-// ---------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-//  wxTreeListHeaderWindow (internal)
-//-----------------------------------------------------------------------------
-
-class  CREAIMAGEIO_EXPORT wxTreeListHeaderWindow : public wxWindow
-{
-protected:
-    wxTreeListMainWindow *m_owner;
-    const wxCursor *m_currentCursor;
-    const wxCursor *m_resizeCursor;
-    bool m_isDragging;
-
-    // column being resized
-    int m_column;
-
-    // divider line position in logical (unscrolled) coords
-    int m_currentX;
-
-    // minimal position beyond which the divider line can't be dragged in
-    // logical coords
-    int m_minX;
-
-    wxArrayTreeListColumnInfo m_columns;
-
-    // total width of the columns
-    int m_total_col_width;
-
-
-public:
-    wxTreeListHeaderWindow();
-
-    wxTreeListHeaderWindow( wxWindow *win,
-                            wxWindowID id,
-                            wxTreeListMainWindow *owner,
-                            const wxPoint &pos = wxDefaultPosition,
-                            const wxSize &size = wxDefaultSize,
-                            long style = 0,
-                            const wxString &name = _T("wxtreelistctrlcolumntitles") );
-
-    virtual ~wxTreeListHeaderWindow();
-
-    void DoDrawRect( wxDC *dc, int x, int y, int w, int h );
-    void DrawCurrent();
-    void AdjustDC(wxDC& dc);
-
-    void OnPaint( wxPaintEvent &event );
-    void OnMouse( wxMouseEvent &event );
-    void OnSetFocus( wxFocusEvent &event );
-
-    // total width of all columns
-    int GetWidth() const { return m_total_col_width; }
-
-    // column manipulation
-    int GetColumnCount() const { return m_columns.GetCount(); }
-
-    void AddColumn (const wxTreeListColumnInfo& colInfo);
-
-    void InsertColumn (int before, const wxTreeListColumnInfo& colInfo);
-
-    void RemoveColumn (int column);
-
-    // column information manipulation
-    const wxTreeListColumnInfo& GetColumn (int column) const{
-        wxCHECK_MSG ((column >= 0) && (column < GetColumnCount()),
-                     wxInvalidTreeListColumnInfo, _T("Invalid column"));
-        return m_columns[column];
-    }
-    wxTreeListColumnInfo& GetColumn (int column) {
-        wxCHECK_MSG ((column >= 0) && (column < GetColumnCount()),
-                     wxInvalidTreeListColumnInfo, _T("Invalid column"));
-        return m_columns[column];
-    }
-    void SetColumn (int column, const wxTreeListColumnInfo& info);
-
-    wxString GetColumnText (int column) const {
-        wxCHECK_MSG ((column >= 0) && (column < GetColumnCount()),
-                     wxEmptyString, _T("Invalid column"));
-        return m_columns[column].GetText();
-    }
-    void SetColumnText (int column, const wxString& text) {
-        wxCHECK_RET ((column >= 0) && (column < GetColumnCount()),
-                     _T("Invalid column"));
-        m_columns[column].SetText (text);
-    }
-
-    int GetColumnAlignment (int column) const {
-        wxCHECK_MSG ((column >= 0) && (column < GetColumnCount()),
-                     wxALIGN_LEFT, _T("Invalid column"));
-        return m_columns[column].GetAlignment();
-    }
-    void SetColumnAlignment (int column, int flag) {
-        wxCHECK_RET ((column >= 0) && (column < GetColumnCount()),
-                     _T("Invalid column"));
-        m_columns[column].SetAlignment (flag);
-    }
-
-    int GetColumnWidth (int column) const {
-        wxCHECK_MSG ((column >= 0) && (column < GetColumnCount()),
-                     -1, _T("Invalid column"));
-        return m_columns[column].GetWidth();
-    }
-    void SetColumnWidth (int column, int width);
-
-    bool IsColumnEditable (int column) const {
-        wxCHECK_MSG ((column >= 0) && (column < GetColumnCount()),
-                     false, _T("Invalid column"));
-        return m_columns[column].IsEditable();
-    }
-
-    bool IsColumnShown (int column) const {
-        wxCHECK_MSG ((column >= 0) && (column < GetColumnCount()),
-                     true, _T("Invalid column"));
-        return m_columns[column].IsShown();
-    }
-
-    // needs refresh
-    bool m_dirty;
-
-private:
-    // common part of all ctors
-    void Init();
-
-    void SendListEvent(wxEventType type, wxPoint pos);
-
-//EED
-//    DECLARE_DYNAMIC_CLASS(wxTreeListHeaderWindow)
-    DECLARE_CLASS(wxTreeListHeaderWindow)
-    DECLARE_EVENT_TABLE()
-};
-
-
-// this is the "true" control
-class  wxTreeListMainWindow: public wxScrolledWindow
-{
-public:
-    // creation
-    // --------
-    wxTreeListMainWindow() { Init(); }
-
-    wxTreeListMainWindow (wxTreeListCtrl *parent, wxWindowID id = -1,
-               const wxPoint& pos = wxDefaultPosition,
-               const wxSize& size = wxDefaultSize,
-               long style = wxTR_DEFAULT_STYLE,
-               const wxValidator &validator = wxDefaultValidator,
-               const wxString& name = _T("wxtreelistmainwindow"))
-    {
-        Init();
-        Create (parent, id, pos, size, style, validator, name);
-    }
-
-    virtual ~wxTreeListMainWindow();
-
-    bool Create(wxTreeListCtrl *parent, wxWindowID id = -1,
-                const wxPoint& pos = wxDefaultPosition,
-                const wxSize& size = wxDefaultSize,
-                long style = wxTR_DEFAULT_STYLE,
-                const wxValidator &validator = wxDefaultValidator,
-                const wxString& name = _T("wxtreelistctrl"));
-
-    // accessors
-    // ---------
-
-    // return true if this is a virtual list control
-    bool IsVirtual() const { return HasFlag(wxTR_VIRTUAL); }
-
-    // get the total number of items in the control
-    size_t GetCount() const;
-
-    // indent is the number of pixels the children are indented relative to
-    // the parents position. SetIndent() also redraws the control
-    // immediately.
-    unsigned int GetIndent() const { return m_indent; }
-    void SetIndent(unsigned int indent);
-
-    // see wxTreeListCtrl for the meaning
-    unsigned int GetLineSpacing() const { return m_linespacing; }
-    void SetLineSpacing(unsigned int spacing);
-
-    // image list: these functions allow to associate an image list with
-    // the control and retrieve it. Note that when assigned with
-    // SetImageList, the control does _not_ delete
-    // the associated image list when it's deleted in order to allow image
-    // lists to be shared between different controls. If you use
-    // AssignImageList, the control _does_ delete the image list.
-
-    // The normal image list is for the icons which correspond to the
-    // normal tree item state (whether it is selected or not).
-    // Additionally, the application might choose to show a state icon
-    // which corresponds to an app-defined item state (for example,
-    // checked/unchecked) which are taken from the state image list.
-    wxImageList *GetImageList() const { return m_imageListNormal; }
-    wxImageList *GetStateImageList() const { return m_imageListState; }
-    wxImageList *GetButtonsImageList() const { return m_imageListButtons; }
-
-    void SetImageList(wxImageList *imageList);
-    void SetStateImageList(wxImageList *imageList);
-    void SetButtonsImageList(wxImageList *imageList);
-    void AssignImageList(wxImageList *imageList);
-    void AssignStateImageList(wxImageList *imageList);
-    void AssignButtonsImageList(wxImageList *imageList);
-
-    // Functions to work with tree ctrl items.
-
-    // accessors
-    // ---------
-
-    // retrieve item's label
-    wxString GetItemText (const wxTreeItemId& item) const
-    { return GetItemText (item, GetMainColumn()); }
-    wxString GetItemText (const wxTreeItemId& item, int column) const;
-    wxString GetItemText (wxTreeItemData* item, int column) const;
-
-    // get one of the images associated with the item (normal by default)
-    int GetItemImage (const wxTreeItemId& item,
-                      wxTreeItemIcon which = wxTreeItemIcon_Normal) const
-    { return GetItemImage (item, GetMainColumn(), which); }
-    int GetItemImage (const wxTreeItemId& item, int column,
-                      wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
-
-    // get the data associated with the item
-    wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
-
-    bool GetItemBold(const wxTreeItemId& item) const;
-    wxColour GetItemTextColour(const wxTreeItemId& item) const;
-    wxColour GetItemBackgroundColour(const wxTreeItemId& item) const;
-    wxFont GetItemFont(const wxTreeItemId& item) const;
-
-    // modifiers
-    // ---------
-
-    // set item's label
-    void SetItemText (const wxTreeItemId& item, const wxString& text)
-    { SetItemText (item, GetMainColumn(), text); }
-    void SetItemText (const wxTreeItemId& item, int column, const wxString& text);
-
-    // get one of the images associated with the item (normal by default)
-    void SetItemImage (const wxTreeItemId& item, int image,
-                       wxTreeItemIcon which = wxTreeItemIcon_Normal)
-    { SetItemImage (item, GetMainColumn(), image, which); }
-    void SetItemImage (const wxTreeItemId& item, int column, int image,
-                       wxTreeItemIcon which = wxTreeItemIcon_Normal);
-
-    // associate some data with the item
-    void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);
-
-    // force appearance of [+] button near the item. This is useful to
-    // allow the user to expand the items which don't have any children now
-    // - but instead add them only when needed, thus minimizing memory
-    // usage and loading time.
-    void SetItemHasChildren(const wxTreeItemId& item, bool has = true);
-
-    // the item will be shown in bold
-    void SetItemBold(const wxTreeItemId& item, bool bold = true);
-
-    // set the item's text colour
-    void SetItemTextColour(const wxTreeItemId& item, const wxColour& colour);
-
-    // set the item's background colour
-    void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& colour);
-
-    // set the item's font (should be of the same height for all items)
-    void SetItemFont(const wxTreeItemId& item, const wxFont& font);
-
-    // set the window font
-    virtual bool SetFont( const wxFont &font );
-
-    // set the styles.  No need to specify a GetWindowStyle here since
-    // the base wxWindow member function will do it for us
-    void SetWindowStyle(const long styles);
-
-    // item status inquiries
-    // ---------------------
-
-    // is the item visible (it might be outside the view or not expanded)?
-    bool IsVisible(const wxTreeItemId& item, bool fullRow) const;
-    // does the item has any children?
-    bool HasChildren(const wxTreeItemId& item) const;
-    // is the item expanded (only makes sense if HasChildren())?
-    bool IsExpanded(const wxTreeItemId& item) const;
-    // is this item currently selected (the same as has focus)?
-    bool IsSelected(const wxTreeItemId& item) const;
-    // is item text in bold font?
-    bool IsBold(const wxTreeItemId& item) const;
-        // does the layout include space for a button?
-
-    // number of children
-    // ------------------
-
-    // if 'recursively' is false, only immediate children count, otherwise
-    // the returned number is the number of all items in this branch
-    size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = true);
-
-    // navigation
-    // ----------
-
-    // wxTreeItemId.IsOk() will return false if there is no such item
-
-    // get the root tree item
-    wxTreeItemId GetRootItem() const { return m_rootItem; }
-
-    // get the item currently selected, only if a single item is selected
-  //    wxTreeItemId GetSelection() const { return m_selectItem; }
-  wxTreeItemId GetCurrent() const { return m_curItem; }
-
-    // get all the items currently selected, return count of items
-    size_t GetSelections(wxArrayTreeItemIds&) const;
-
-  // returns the number of currently selected items
-  size_t GetSelectionSize() const;
-   
-    // get the parent of this item (may return NULL if root)
-    wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
-
-    // for this enumeration function you must pass in a "cookie" parameter
-    // which is opaque for the application but is necessary for the library
-    // to make these functions reentrant (i.e. allow more than one
-    // enumeration on one and the same object simultaneously). Of course,
-    // the "cookie" passed to GetFirstChild() and GetNextChild() should be
-    // the same!
-
-    // get child of this item
-#if !wxCHECK_VERSION(2, 5, 0)
-    wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& cookie) const;
-    wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const;
-    wxTreeItemId GetPrevChild(const wxTreeItemId& item, long& cookie) const;
-    wxTreeItemId GetLastChild(const wxTreeItemId& item, long& cookie) const;
-#else
-    wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
-    wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
-    wxTreeItemId GetPrevChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
-    wxTreeItemId GetLastChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
-#endif
-
-    // get sibling of this item
-    wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
-    wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
-
-    // get item in the full tree (currently only for internal use)
-    wxTreeItemId GetNext(const wxTreeItemId& item, bool fulltree = true) const;
-    wxTreeItemId GetPrev(const wxTreeItemId& item, bool fulltree = true) const;
-
-    // get expanded item, see IsExpanded()
-    wxTreeItemId GetFirstExpandedItem() const;
-    wxTreeItemId GetNextExpanded(const wxTreeItemId& item) const;
-    wxTreeItemId GetPrevExpanded(const wxTreeItemId& item) const;
-
-    // get visible item, see IsVisible()
-    wxTreeItemId GetFirstVisibleItem(bool fullRow) const;
-    wxTreeItemId GetNextVisible(const wxTreeItemId& item, bool fullRow) const;
-    wxTreeItemId GetPrevVisible(const wxTreeItemId& item, bool fullRow) const;
-
-    // operations
-    // ----------
-
-    // add the root node to the tree
-    wxTreeItemId AddRoot (const wxString& text,
-                          int image = -1, int selectedImage = -1,
-                          wxTreeItemData *data = NULL);
-
-    // insert a new item in as the first child of the parent
-    wxTreeItemId PrependItem(const wxTreeItemId& parent,
-                             const wxString& text,
-                             int image = -1, int selectedImage = -1,
-                             wxTreeItemData *data = NULL);
-
-    // insert a new item after a given one
-    wxTreeItemId InsertItem(const wxTreeItemId& parent,
-                            const wxTreeItemId& idPrevious,
-                            const wxString& text,
-                            int image = -1, int selectedImage = -1,
-                            wxTreeItemData *data = NULL);
-
-    // insert a new item before the one with the given index
-    wxTreeItemId InsertItem(const wxTreeItemId& parent,
-                            size_t index,
-                            const wxString& text,
-                            int image = -1, int selectedImage = -1,
-                            wxTreeItemData *data = NULL);
-
-    // insert a new item in as the last child of the parent
-    wxTreeItemId AppendItem(const wxTreeItemId& parent,
-                            const wxString& text,
-                            int image = -1, int selectedImage = -1,
-                            wxTreeItemData *data = NULL);
-
-    // delete this item and associated data if any
-    void Delete(const wxTreeItemId& item);
-    // delete all children (but don't delete the item itself)
-    // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
-    void DeleteChildren(const wxTreeItemId& item);
-    // delete the root and all its children from the tree
-    // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
-    void DeleteRoot();
-
-    // expand this item
-    void Expand(const wxTreeItemId& item);
-    // expand this item and all subitems recursively
-    void ExpandAll(const wxTreeItemId& item);
-    // collapse the item without removing its children
-    void Collapse(const wxTreeItemId& item);
-    // collapse the item and remove all children
-    void CollapseAndReset(const wxTreeItemId& item);
-    // toggles the current state
-    void Toggle(const wxTreeItemId& item);
-
-  // remove the selection from currently selected item (if any)
-  //  void Unselect(wxTreeListItem* item);
-  //  void Unselect();
-    void UnselectAll();
-    // select this item
-    void SelectItem(const wxTreeItemId& item, const wxTreeItemId& prev = (wxTreeItemId*)NULL,
-                    bool unselect_others = true);
-    void SelectAll();
-  void RemoveFromSelection( wxTreeListItem *item );
-  void AddToSelection( wxTreeListItem *item );
-
-    // make sure this item is visible (expanding the parent item and/or
-    // scrolling to this item if necessary)
-    void EnsureVisible(const wxTreeItemId& item);
-    // scroll to this item (but don't expand its parent)
-    void ScrollTo(const wxTreeItemId& item);
-    void AdjustMyScrollbars();
-
-    // The first function is more portable (because easier to implement
-    // on other platforms), but the second one returns some extra info.
-    wxTreeItemId HitTest (const wxPoint& point)
-        { int flags; int column; return HitTest (point, flags, column); }
-    wxTreeItemId HitTest (const wxPoint& point, int& flags)
-        { int column; return HitTest (point, flags, column); }
-    wxTreeItemId HitTest (const wxPoint& point, int& flags, int& column);
-
-
-    // get the bounding rectangle of the item (or of its label only)
-    bool GetBoundingRect(const wxTreeItemId& item,
-                         wxRect& rect,
-                         bool textOnly = false) const;
-
-    // Start editing the item label: this (temporarily) replaces the item
-    // with a one line edit control. The item will be selected if it hadn't
-    // been before.
-    void EditLabel (const wxTreeItemId& item, int column);
-
-    // sorting
-    // this function is called to compare 2 items and should return -1, 0
-    // or +1 if the first item is less than, equal to or greater than the
-    // second one. The base class version performs alphabetic comparaison
-    // of item labels (GetText)
-    virtual int OnCompareItems(const wxTreeItemId& item1,
-                               const wxTreeItemId& item2);
-    // sort the children of this item using OnCompareItems
-    //
-    // NB: this function is not reentrant and not MT-safe (FIXME)!
-    void SortChildren(const wxTreeItemId& item);
-
-    // searching
-    wxTreeItemId FindItem (const wxTreeItemId& item, const wxString& str, int mode = 0);
-
-    // implementation only from now on
-
-    // overridden base class virtuals
-    virtual bool SetBackgroundColour(const wxColour& colour);
-    virtual bool SetForegroundColour(const wxColour& colour);
-
-    // drop over item
-    void SetDragItem (const wxTreeItemId& item = (wxTreeItemId*)NULL);
-
-    // callbacks
-    void OnPaint( wxPaintEvent &event );
-    void OnSetFocus( wxFocusEvent &event );
-    void OnKillFocus( wxFocusEvent &event );
-    void OnChar( wxKeyEvent &event );
-    void OnMouse( wxMouseEvent &event );
-    void OnIdle( wxIdleEvent &event );
-    void OnScroll(wxScrollWinEvent& event);
-
-    // implementation helpers
-    void SendDeleteEvent(wxTreeListItem *itemBeingDeleted);
-
-    int GetColumnCount() const
-    { return m_owner->GetHeaderWindow()->GetColumnCount(); }
-
-    void SetMainColumn (int column)
-    { if ((column >= 0) && (column < GetColumnCount())) m_main_column = column; }
-
-    int GetMainColumn() const { return m_main_column; }
-
-    int GetBestColumnWidth (int column, wxTreeItemId parent = wxTreeItemId());
-    int GetItemWidth (int column, wxTreeListItem *item);
-    wxFont GetItemFont (wxTreeListItem *item);
-
-    void SetFocus();
-
-protected:
-    wxTreeListCtrl* m_owner;
-
-    int m_main_column;
-
-    friend class wxTreeListItem;
-    friend class wxTreeListRenameTimer;
-    friend class wxEditTextCtrl;
-
-    wxFont               m_normalFont;
-    wxFont               m_boldFont;
-
-    wxTreeListItem       *m_rootItem; // root item
-    wxTreeListItem       *m_curItem; // current item, either selected or marked
-    wxTreeListItem       *m_shiftItem; // item, where the shift key was pressed
-    wxTreeListItem       *m_editItem; // item, which is currently edited
-  //    wxTreeListItem       *m_selectItem; // current selected item, not with wxTR_MULTIPLE
-  // LG  
-  wxArrayTreeListItems   m_selected; // currently selected items
-
-    int                  m_curColumn;
-
-    int                  m_btnWidth, m_btnWidth2;
-    int                  m_btnHeight, m_btnHeight2;
-    int                  m_imgWidth, m_imgWidth2;
-    int                  m_imgHeight, m_imgHeight2;
-    unsigned short       m_indent;
-    int                  m_lineHeight;
-    unsigned short       m_linespacing;
-    wxPen                m_dottedPen;
-    wxBrush             *m_hilightBrush,
-                        *m_hilightUnfocusedBrush;
-    bool                 m_hasFocus;
-public:
-    bool                 m_dirty;
-protected:
-    bool                 m_ownsImageListNormal,
-                         m_ownsImageListState,
-                         m_ownsImageListButtons;
-    bool                 m_isDragging; // true between BEGIN/END drag events
-    bool                 m_renameAccept;
-    bool                 m_lastOnSame;  // last click on the same item as prev
-    bool                 m_left_down_selection;
-
-    wxImageList         *m_imageListNormal,
-                        *m_imageListState,
-                        *m_imageListButtons;
-
-    int                  m_dragCount;
-    wxTimer             *m_dragTimer;
-    wxTreeListItem      *m_dragItem;
-
-    wxTimer             *m_renameTimer;
-    wxString             m_renameRes;
-
-    // char navigation
-    wxTimer             *m_findTimer;
-    wxString             m_findStr;
-
-    // the common part of all ctors
-    void Init();
-
-    // misc helpers
-    wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
-                              size_t previous,
-                              const wxString& text,
-                              int image, int selectedImage,
-                              wxTreeItemData *data);
-    bool HasButtons(void) const
-        { return (m_imageListButtons) || HasFlag (wxTR_TWIST_BUTTONS|wxTR_HAS_BUTTONS); }
-
-protected:
-    void CalculateLineHeight();
-    int  GetLineHeight(wxTreeListItem *item) const;
-    void PaintLevel( wxTreeListItem *item, wxDC& dc, int level, int &y,
-                     int x_maincol);
-    void PaintItem( wxTreeListItem *item, wxDC& dc);
-
-    void CalculateLevel( wxTreeListItem *item, wxDC &dc, int level, int &y,
-                         int x_maincol);
-    void CalculatePositions();
-    void CalculateSize( wxTreeListItem *item, wxDC &dc );
-
-    void RefreshSubtree (wxTreeListItem *item);
-    void RefreshLine (wxTreeListItem *item);
-
-    // redraw all selected items
-    void RefreshSelected();
-
-    // RefreshSelected() recursive helper
-    void RefreshSelectedUnder (wxTreeListItem *item);
-
-    void OnRenameTimer();
-    void OnRenameAccept();
-
-  void FillArray(wxTreeListItem*, wxArrayTreeItemIds&) const;
-    bool SelectAllChildrenUntilLast (wxTreeListItem *crt_item, wxTreeListItem *last_item);
-    bool SelectNextChildren (wxTreeListItem *crt_item, wxTreeListItem *last_item);
-  //    void UnselectAllChildren (wxTreeListItem *item );
-
-private:
-    DECLARE_EVENT_TABLE()
-    DECLARE_DYNAMIC_CLASS(wxTreeListMainWindow)
-};
-
-
-// timer used for enabling in-place edit
-class  wxTreeListRenameTimer: public wxTimer
-{
-public:
-    wxTreeListRenameTimer( wxTreeListMainWindow *owner );
-
-    void Notify();
-
-private:
-    wxTreeListMainWindow   *m_owner;
-};
-
-// control used for in-place edit
-class  wxEditTextCtrl: public wxTextCtrl
-{
-public:
-    wxEditTextCtrl (wxWindow *parent,
-                    const wxWindowID id,
-                    bool *accept,
-                    wxString *res,
-                    wxTreeListMainWindow *owner,
-                    const wxString &value = wxEmptyString,
-                    const wxPoint &pos = wxDefaultPosition,
-                    const wxSize &size = wxDefaultSize,
-                    int style = 0,
-                    const wxValidator& validator = wxDefaultValidator,
-                    const wxString &name = wxTextCtrlNameStr );
-
-    void OnChar( wxKeyEvent &event );
-    void OnKeyUp( wxKeyEvent &event );
-    void OnKillFocus( wxFocusEvent &event );
-
-private:
-    bool               *m_accept;
-    wxString           *m_res;
-    wxTreeListMainWindow  *m_owner;
-    wxString            m_startValue;
-    bool                m_finished;
-
-    DECLARE_EVENT_TABLE()
-};
-
-// a tree item
-class  wxTreeListItem
-{
-public:
-    // ctors & dtor
-    wxTreeListItem() { m_data = NULL; }
-    wxTreeListItem( wxTreeListMainWindow *owner,
-                    wxTreeListItem *parent,
-                    const wxArrayString& text,
-                    int image,
-                    int selImage,
-                    wxTreeItemData *data );
-
-    ~wxTreeListItem();
-
-    // trivial accessors
-    wxArrayTreeListItems& GetChildren() { return m_children; }
-
-    const wxString GetText() const
-    {
-        return GetText(0);
-    }
-    const wxString GetText (int column) const
-    {
-        if(m_text.GetCount() > 0)
-        {
-            if( IsVirtual() )   return m_owner->GetItemText( m_data, column );
-            else                return m_text[column];
-        }
-        return wxEmptyString;
-    }
-
-    int GetImage (wxTreeItemIcon which = wxTreeItemIcon_Normal) const
-        { return m_images[which]; }
-    int GetImage (int column, wxTreeItemIcon which=wxTreeItemIcon_Normal) const
-    {
-        if(column == m_owner->GetMainColumn()) return m_images[which];
-        if(column < (int)m_col_images.GetCount()) return m_col_images[column];
-        return NO_IMAGE;
-    }
-
-    wxTreeItemData *GetData() const { return m_data; }
-
-    // returns the current image for the item (depending on its
-    // selected/expanded/whatever state)
-    int GetCurrentImage() const;
-
-    void SetText (const wxString &text );
-    void SetText (int column, const wxString& text)
-    {
-        if (column < (int)m_text.GetCount()) {
-            m_text[column] = text;
-        }else if (column < m_owner->GetColumnCount()) {
-            int howmany = m_owner->GetColumnCount();
-            for (int i = m_text.GetCount(); i < howmany; ++i) m_text.Add (wxEmptyString);
-            m_text[column] = text;
-        }
-    }
-    void SetImage (int image, wxTreeItemIcon which) { m_images[which] = image; }
-    void SetImage (int column, int image, wxTreeItemIcon which)
-    {
-        if (column == m_owner->GetMainColumn()) {
-            m_images[which] = image;
-        }else if (column < (int)m_col_images.GetCount()) {
-            m_col_images[column] = image;
-        }else if (column < m_owner->GetColumnCount()) {
-            int howmany = m_owner->GetColumnCount();
-            for (int i = m_col_images.GetCount(); i < howmany; ++i) m_col_images.Add (NO_IMAGE);
-            m_col_images[column] = image;
-        }
-    }
-
-    void SetData(wxTreeItemData *data) { m_data = data; }
-
-    void SetHasPlus(bool has = true) { m_hasPlus = has; }
-
-    void SetBold(bool bold) { m_isBold = bold; }
-
-    int GetX() const { return m_x; }
-    int GetY() const { return m_y; }
-
-    void SetX (int x) { m_x = x; }
-    void SetY (int y) { m_y = y; }
-
-    int  GetHeight() const { return m_height; }
-    int  GetWidth()  const { return m_width; }
-
-    void SetHeight (int height) { m_height = height; }
-    void SetWidth (int width) { m_width = width; }
-
-    int GetTextX() const { return m_text_x; }
-    void SetTextX (int text_x) { m_text_x = text_x; }
-
-    wxTreeListItem *GetItemParent() const { return m_parent; }
-
-    // operations
-    // deletes all children notifying the treectrl about it if !NULL
-    // pointer given
-    void DeleteChildren(wxTreeListMainWindow *tree = NULL);
-
-    // get count of all children (and grand children if 'recursively')
-    size_t GetChildrenCount(bool recursively = true) const;
-
-    void Insert(wxTreeListItem *child, size_t index)
-    { m_children.Insert(child, index); }
-
-    void GetSize( int &x, int &y, const wxTreeListMainWindow* );
-
-    // return the item at given position (or NULL if no item), onButton is
-    // true if the point belongs to the item's button, otherwise it lies
-    // on the button's label
-    wxTreeListItem *HitTest (const wxPoint& point,
-                             const wxTreeListMainWindow *,
-                             int &flags, int& column, int level);
-
-    void Expand() { m_isCollapsed = false; }
-    void Collapse() { m_isCollapsed = true; }
-
-    void SetSelected( bool set = true ) { m_hasHilight = set; }
-
-    // status inquiries
-    bool HasChildren() const { return !m_children.IsEmpty(); }
-    bool IsSelected()  const { return m_hasHilight != 0; }
-    bool IsExpanded()  const { return !m_isCollapsed; }
-    bool HasPlus()     const { return m_hasPlus || HasChildren(); }
-    bool IsBold()      const { return m_isBold != 0; }
-    bool IsVirtual()   const { return m_owner->IsVirtual(); }
-
-    // attributes
-    // get them - may be NULL
-    wxTreeItemAttr *GetAttributes() const { return m_attr; }
-    // get them ensuring that the pointer is not NULL
-    wxTreeItemAttr& Attr()
-    {
-        if ( !m_attr )
-        {
-            m_attr = new wxTreeItemAttr;
-            m_ownsAttr = true;
-        }
-        return *m_attr;
-    }
-    // set them
-    void SetAttributes(wxTreeItemAttr *attr)
-    {
-        if ( m_ownsAttr ) delete m_attr;
-        m_attr = attr;
-        m_ownsAttr = false;
-    }
-    // set them and delete when done
-    void AssignAttributes(wxTreeItemAttr *attr)
-    {
-        SetAttributes(attr);
-        m_ownsAttr = true;
-    }
-
-private:
-    wxTreeListMainWindow  *m_owner;        // control the item belongs to
-
-    // since there can be very many of these, we save size by chosing
-    // the smallest representation for the elements and by ordering
-    // the members to avoid padding.
-    wxArrayString      m_text;    // labels to be rendered for item
-
-    wxTreeItemData     *m_data;         // user-provided data
-
-    wxArrayTreeListItems m_children; // list of children
-    wxTreeListItem  *m_parent;       // parent of this item
-
-    wxTreeItemAttr     *m_attr;         // attributes???
-
-    // tree ctrl images for the normal, selected, expanded and
-    // expanded+selected states
-    short               m_images[wxTreeItemIcon_Max];
-    wxArrayShort m_col_images; // images for the various columns (!= main)
-
-    // main column item positions
-    wxCoord             m_x;            // (virtual) offset from left (vertical line)
-    wxCoord             m_y;            // (virtual) offset from top
-    wxCoord             m_text_x;       // item offset from left
-    short               m_width;        // width of this item
-    unsigned char       m_height;       // height of this item
-
-    // use bitfields to save size
-    int                 m_isCollapsed :1;
-    int                 m_hasHilight  :1; // same as focused
-    int                 m_hasPlus     :1; // used for item which doesn't have
-                                          // children but has a [+] button
-    int                 m_isBold      :1; // render the label in bold font
-    int                 m_ownsAttr    :1; // delete attribute when done
-};
-
-// ===========================================================================
-// implementation
-// ===========================================================================
-
-// ---------------------------------------------------------------------------
-// wxTreeListRenameTimer (internal)
-// ---------------------------------------------------------------------------
-
-wxTreeListRenameTimer::wxTreeListRenameTimer( wxTreeListMainWindow *owner )
-{
-    m_owner = owner;
-}
-
-void wxTreeListRenameTimer::Notify()
-{
-    m_owner->OnRenameTimer();
-}
-
-//-----------------------------------------------------------------------------
-// wxEditTextCtrl (internal)
-//-----------------------------------------------------------------------------
-
-BEGIN_EVENT_TABLE (wxEditTextCtrl,wxTextCtrl)
-    EVT_CHAR           (wxEditTextCtrl::OnChar)
-    EVT_KEY_UP         (wxEditTextCtrl::OnKeyUp)
-    EVT_KILL_FOCUS     (wxEditTextCtrl::OnKillFocus)
-END_EVENT_TABLE()
-
-wxEditTextCtrl::wxEditTextCtrl (wxWindow *parent,
-                                const wxWindowID id,
-                                bool *accept,
-                                wxString *res,
-                                wxTreeListMainWindow *owner,
-                                const wxString &value,
-                                const wxPoint &pos,
-                                const wxSize &size,
-                                int style,
-                                const wxValidator& validator,
-                                const wxString &name)
-    : wxTextCtrl (parent, id, value, pos, size, style|wxSIMPLE_BORDER, validator, name)
-{
-    m_res = res;
-    m_accept = accept;
-    m_owner = owner;
-    (*m_accept) = false;
-    (*m_res) = wxEmptyString;
-    m_startValue = value;
-    m_finished = false;
-}
-
-void wxEditTextCtrl::OnChar( wxKeyEvent &event )
-{
-    if (event.GetKeyCode() == WXK_RETURN)
-    {
-        (*m_accept) = true;
-        (*m_res) = GetValue();
-
-        if ((*m_res) != m_startValue)
-            m_owner->OnRenameAccept();
-
-        if (!wxPendingDelete.Member(this))
-            wxPendingDelete.Append(this);
-
-        m_finished = true;
-        m_owner->SetFocus(); // This doesn't work. TODO.
-
-        return;
-    }
-    if (event.GetKeyCode() == WXK_ESCAPE)
-    {
-        (*m_accept) = false;
-        (*m_res) = wxEmptyString;
-
-        if (!wxPendingDelete.Member(this))
-            wxPendingDelete.Append(this);
-
-        m_finished = true;
-        m_owner->SetFocus(); // This doesn't work. TODO.
-
-        return;
-    }
-    event.Skip();
-}
-
-void wxEditTextCtrl::OnKeyUp( wxKeyEvent &event )
-{
-    if (m_finished)
-    {
-        event.Skip();
-        return;
-    }
-
-    // auto-grow the textctrl:
-    wxSize parentSize = m_owner->GetSize();
-    wxPoint myPos = GetPosition();
-    wxSize mySize = GetSize();
-    int sx, sy;
-    GetTextExtent(GetValue() + _T("M"), &sx, &sy);
-    if (myPos.x + sx > parentSize.x) sx = parentSize.x - myPos.x;
-    if (mySize.x > sx) sx = mySize.x;
-    SetSize(sx, -1);
-
-    event.Skip();
-}
-
-void wxEditTextCtrl::OnKillFocus( wxFocusEvent &event )
-{
-    if (m_finished)
-    {
-        event.Skip();
-        return;
-    }
-
-    if (!wxPendingDelete.Member(this))
-        wxPendingDelete.Append(this);
-
-    (*m_accept) = true;
-    (*m_res) = GetValue();
-
-    if ((*m_res) != m_startValue)
-        m_owner->OnRenameAccept();
-}
-
-//-----------------------------------------------------------------------------
-//  wxTreeListHeaderWindow
-//-----------------------------------------------------------------------------
-
-
-
-//EED
-//IMPLEMENT_DYNAMIC_CLASS(wxTreeListHeaderWindow,wxNotifyEvent);
-IMPLEMENT_CLASS(wxTreeListHeaderWindow,wxNotifyEvent);
-
-BEGIN_EVENT_TABLE(wxTreeListHeaderWindow,wxWindow)
-    EVT_PAINT         (wxTreeListHeaderWindow::OnPaint)
-    EVT_MOUSE_EVENTS  (wxTreeListHeaderWindow::OnMouse)
-    EVT_SET_FOCUS     (wxTreeListHeaderWindow::OnSetFocus)
-END_EVENT_TABLE()
-
-
-
-
-void wxTreeListHeaderWindow::Init()
-{
-    m_currentCursor = (wxCursor *) NULL;
-    m_isDragging = false;
-    m_dirty = false;
-    m_total_col_width = 0;
-}
-
-wxTreeListHeaderWindow::wxTreeListHeaderWindow()
-{
-    Init();
-
-    m_owner = (wxTreeListMainWindow *) NULL;
-    m_resizeCursor = (wxCursor *) NULL;
-}
-
-wxTreeListHeaderWindow::wxTreeListHeaderWindow( wxWindow *win,
-                                                wxWindowID id,
-                                                wxTreeListMainWindow *owner,
-                                                const wxPoint& pos,
-                                                const wxSize& size,
-                                                long style,
-                                                const wxString &name )
-    : wxWindow( win, id, pos, size, style, name )
-{
-    Init();
-
-    m_owner = owner;
-    m_resizeCursor = new wxCursor(wxCURSOR_SIZEWE);
-
-#if !wxCHECK_VERSION(2, 5, 0)
-    SetBackgroundColour (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_BTNFACE));
-#else
-    SetBackgroundColour (wxSystemSettings::GetColour (wxSYS_COLOUR_BTNFACE));
-#endif
-}
-
-wxTreeListHeaderWindow::~wxTreeListHeaderWindow()
-{
-    delete m_resizeCursor;
-}
-
-void wxTreeListHeaderWindow::DoDrawRect( wxDC *dc, int x, int y, int w, int h )
-{
-#if !wxCHECK_VERSION(2, 5, 0)
-    wxPen pen (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_BTNSHADOW ), 1, wxSOLID);
-#else
-    wxPen pen (wxSystemSettings::GetColour (wxSYS_COLOUR_BTNSHADOW ), 1, wxSOLID);
-#endif
-
-    const int m_corner = 1;
-
-    dc->SetBrush( *wxTRANSPARENT_BRUSH );
-#if defined( __WXMAC__  )
-    dc->SetPen (pen);
-#else // !GTK, !Mac
-    dc->SetPen( *wxBLACK_PEN );
-#endif
-    dc->DrawLine( x+w-m_corner+1, y, x+w, y+h );  // right (outer)
-    dc->DrawRectangle( x, y+h, w+1, 1 );          // bottom (outer)
-
-#if defined( __WXMAC__  )
-
- // EED
- //   wxPen pen( wxColour( 0x88 , 0x88 , 0x88 ), 1, wxSOLID );
-   pen.SetColour( wxColour( 0x88 , 0x88 , 0x88 )  );
-#endif
-    dc->SetPen( pen );
-    dc->DrawLine( x+w-m_corner, y, x+w-1, y+h );  // right (inner)
-    dc->DrawRectangle( x+1, y+h-1, w-2, 1 );      // bottom (inner)
-
-    dc->SetPen( *wxWHITE_PEN );
-    dc->DrawRectangle( x, y, w-m_corner+1, 1 );   // top (outer)
-    dc->DrawRectangle( x, y, 1, h );              // left (outer)
-    dc->DrawLine( x, y+h-1, x+1, y+h-1 );
-    dc->DrawLine( x+w-1, y, x+w-1, y+1 );
-}
-
-// shift the DC origin to match the position of the main window horz
-// scrollbar: this allows us to always use logical coords
-void wxTreeListHeaderWindow::AdjustDC(wxDC& dc)
-{
-    int xpix;
-    m_owner->GetScrollPixelsPerUnit( &xpix, NULL );
-    int x;
-    m_owner->GetViewStart( &x, NULL );
-
-    // account for the horz scrollbar offset
-    dc.SetDeviceOrigin( -x * xpix, 0 );
-}
-
-void wxTreeListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
-{
-#ifdef __WXGTK__
-    wxClientDC dc( this );
-#else
-    wxPaintDC dc( this );
-#endif
-
-    PrepareDC( dc );
-    AdjustDC( dc );
-    dc.SetFont( GetFont() );
-
-    // width and height of the entire header window
-    int w, h;
-    GetClientSize( &w, &h );
-    m_owner->CalcUnscrolledPosition(w, 0, &w, NULL);
-    dc.SetBackgroundMode(wxTRANSPARENT);
-
-    // do *not* use the listctrl colour for headers - one day we will have a
-    // function to set it separately
-    //dc.SetTextForeground( *wxBLACK );
-#if !wxCHECK_VERSION(2, 5, 0)
-    dc.SetTextForeground (wxSystemSettings::GetSystemColour( wxSYS_COLOUR_WINDOWTEXT ));
-#else
-    dc.SetTextForeground (wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ));
-#endif
-
-    int x = HEADER_OFFSET_X;
-
-    int numColumns = GetColumnCount();
-    for ( int i = 0; i < numColumns && x < w; i++ )
-    {
-        if (!IsColumnShown (i)) continue; // do next colume if not shown
-
-        wxTreeListColumnInfo& column = GetColumn(i);
-        int wCol = column.GetWidth();
-
-        // the width of the rect to draw: make it smaller to fit entirely
-        // inside the column rect
-        int cw = wCol - 2;
-
-        dc.SetPen( *wxWHITE_PEN );
-        DoDrawRect( &dc, x, HEADER_OFFSET_Y, cw, h-2 );
-
-        // if we have an image, draw it on the right of the label
-        int image = column.GetImage(); //item.m_image;
-        int ix = -2, iy = 0;
-        wxImageList* imageList = m_owner->GetImageList();
-        if ((image != -1) && imageList) {
-            imageList->GetSize (image, ix, iy);
-        }
-
-        // extra margins around the text label
-        int text_width = 0;
-        int text_x = x;
-        int image_offset = cw - ix - 1;
-
-        switch(column.GetAlignment()) {
-        case wxALIGN_LEFT:
-            text_x += EXTRA_WIDTH;
-            cw -= ix + 2;
-            break;
-        case wxALIGN_RIGHT:
-            dc.GetTextExtent (column.GetText(), &text_width, NULL);
-            text_x += cw - text_width - EXTRA_WIDTH - MARGIN;
-            image_offset = 0;
-            break;
-        case wxALIGN_CENTER:
-            dc.GetTextExtent(column.GetText(), &text_width, NULL);
-            text_x += (cw - text_width)/2 + ix + 2;
-            image_offset = (cw - text_width - ix - 2)/2 - MARGIN;
-            break;
-        }
-
-        // draw the image
-        if ((image != -1) && imageList) {
-            imageList->Draw (image, dc, x + image_offset/*cw - ix - 1*/,
-                             HEADER_OFFSET_Y + (h - 4 - iy)/2,
-                             wxIMAGELIST_DRAW_TRANSPARENT);
-        }
-
-        // draw the text clipping it so that it doesn't overwrite the column boundary
-        wxDCClipper clipper(dc, x, HEADER_OFFSET_Y, cw, h - 4 );
-        dc.DrawText (column.GetText(), text_x, HEADER_OFFSET_Y + EXTRA_HEIGHT );
-
-        // next column
-        x += wCol;
-    }
-
-    int more_w = m_owner->GetSize().x - x - HEADER_OFFSET_X;
-    if (more_w > 0) {
-        DoDrawRect (&dc, x, HEADER_OFFSET_Y, more_w, h-2 );
-    }
-
-}
-
-void wxTreeListHeaderWindow::DrawCurrent()
-{
-    int x1 = m_currentX;
-    int y1 = 0;
-    ClientToScreen (&x1, &y1);
-
-    int x2 = m_currentX-1;
-#ifdef __WXMSW__
-    ++x2; // but why ????
-#endif
-    int y2 = 0;
-    m_owner->GetClientSize( NULL, &y2 );
-    m_owner->ClientToScreen( &x2, &y2 );
-
-    wxScreenDC dc;
-    dc.SetLogicalFunction (wxINVERT);
-    dc.SetPen (wxPen (*wxBLACK, 2, wxSOLID));
-    dc.SetBrush (*wxTRANSPARENT_BRUSH);
-
-    AdjustDC(dc);
-    dc.DrawLine (x1, y1, x2, y2);
-    dc.SetLogicalFunction (wxCOPY);
-    dc.SetPen (wxNullPen);
-    dc.SetBrush (wxNullBrush);
-}
-
-void wxTreeListHeaderWindow::OnMouse (wxMouseEvent &event) {
-
-    // we want to work with logical coords
-    int x;
-    m_owner->CalcUnscrolledPosition(event.GetX(), 0, &x, NULL);
-    int y = event.GetY();
-
-    if (m_isDragging) {
-
-        SendListEvent (wxEVT_COMMAND_LIST_COL_DRAGGING, event.GetPosition());
-
-        // we don't draw the line beyond our window, but we allow dragging it
-        // there
-        int w = 0;
-        GetClientSize( &w, NULL );
-        m_owner->CalcUnscrolledPosition(w, 0, &w, NULL);
-        w -= 6;
-
-        // erase the line if it was drawn
-        if (m_currentX < w) DrawCurrent();
-
-        if (event.ButtonUp()) {
-            m_isDragging = false;
-            if (HasCapture()) ReleaseMouse();
-            m_dirty = true;
-            SetColumnWidth (m_column, m_currentX - m_minX);
-            Refresh();
-            SendListEvent (wxEVT_COMMAND_LIST_COL_END_DRAG, event.GetPosition());
-        }else{
-            m_currentX = wxMax (m_minX + 7, x);
-
-            // draw in the new location
-            if (m_currentX < w) DrawCurrent();
-        }
-
-    }else{ // not dragging
-
-        m_minX = 0;
-        bool hit_border = false;
-
-        // end of the current column
-        int xpos = 0;
-
-        // find the column where this event occured
-        int countCol = GetColumnCount();
-        for (int column = 0; column < countCol; column++) {
-            if (!IsColumnShown (column)) continue; // do next if not shown
-
-            xpos += GetColumnWidth (column);
-            m_column = column;
-            if ((abs (x-xpos) < 3) && (y < 22)) {
-                // near the column border
-                hit_border = true;
-                break;
-            }
-
-            if (x < xpos) {
-                // inside the column
-                break;
-            }
-
-            m_minX = xpos;
-        }
-
-        if (event.LeftDown() || event.RightUp()) {
-            if (hit_border && event.LeftDown()) {
-                m_isDragging = true;
-                CaptureMouse();
-                m_currentX = x;
-                DrawCurrent();
-                SendListEvent (wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, event.GetPosition());
-            }else{ // click on a column
-                wxEventType evt = event.LeftDown()? wxEVT_COMMAND_LIST_COL_CLICK:
-                                                    wxEVT_COMMAND_LIST_COL_RIGHT_CLICK;
-                SendListEvent (evt, event.GetPosition());
-            }
-        }else if (event.LeftDClick() && hit_border) {
-            SetColumnWidth (m_column, m_owner->GetBestColumnWidth (m_column));
-            Refresh();
-
-        }else if (event.Moving()) {
-            bool setCursor;
-            if (hit_border) {
-                setCursor = m_currentCursor == wxSTANDARD_CURSOR;
-                m_currentCursor = m_resizeCursor;
-            }else{
-                setCursor = m_currentCursor != wxSTANDARD_CURSOR;
-                m_currentCursor = wxSTANDARD_CURSOR;
-            }
-            if (setCursor) SetCursor (*m_currentCursor);
-        }
-
-    }
-}
-
-void wxTreeListHeaderWindow::OnSetFocus (wxFocusEvent &WXUNUSED(event)) {
-    m_owner->SetFocus();
-}
-
-void wxTreeListHeaderWindow::SendListEvent (wxEventType type, wxPoint pos) {
-    wxWindow *parent = GetParent();
-    wxListEvent le (type, parent->GetId());
-    le.SetEventObject (parent);
-    le.m_pointDrag = pos;
-
-    // the position should be relative to the parent window, not
-    // this one for compatibility with MSW and common sense: the
-    // user code doesn't know anything at all about this header
-    // window, so why should it get positions relative to it?
-    le.m_pointDrag.y -= GetSize().y;
-    le.m_col = m_column;
-    parent->GetEventHandler()->ProcessEvent (le);
-}
-
-void wxTreeListHeaderWindow::AddColumn (const wxTreeListColumnInfo& colInfo) {
-    m_columns.Add (colInfo);
-    m_total_col_width += colInfo.GetWidth();
-    m_owner->AdjustMyScrollbars();
-    m_owner->m_dirty = true;
-}
-
-void wxTreeListHeaderWindow::SetColumnWidth (int column, int width) {
-    wxCHECK_RET ((column >= 0) && (column < GetColumnCount()), _T("Invalid column"));
-    m_total_col_width -= m_columns[column].GetWidth();
-    m_columns[column].SetWidth(width);
-    m_total_col_width += width;
-    m_owner->AdjustMyScrollbars();
-    m_owner->m_dirty = true;
-}
-
-void wxTreeListHeaderWindow::InsertColumn (int before, const wxTreeListColumnInfo& colInfo) {
-    wxCHECK_RET ((before >= 0) && (before < GetColumnCount()), _T("Invalid column"));
-    m_columns.Insert (colInfo, before);
-    m_total_col_width += colInfo.GetWidth();
-    m_owner->AdjustMyScrollbars();
-    m_owner->m_dirty = true;
-}
-
-void wxTreeListHeaderWindow::RemoveColumn (int column) {
-    wxCHECK_RET ((column >= 0) && (column < GetColumnCount()), _T("Invalid column"));
-    m_total_col_width -= m_columns[column].GetWidth();
-    m_columns.RemoveAt (column);
-    m_owner->AdjustMyScrollbars();
-    m_owner->m_dirty = true;
-}
-
-void wxTreeListHeaderWindow::SetColumn (int column, const wxTreeListColumnInfo& info) {
-    wxCHECK_RET ((column >= 0) && (column < GetColumnCount()), _T("Invalid column"));
-    int w = m_columns[column].GetWidth();
-    m_columns[column] = info;
-    if (w != info.GetWidth()) {
-        m_total_col_width += info.GetWidth() - w;
-        m_owner->AdjustMyScrollbars();
-    }
-    m_owner->m_dirty = true;
-}
-
-// ---------------------------------------------------------------------------
-// wxTreeListItem
-// ---------------------------------------------------------------------------
-
-wxTreeListItem::wxTreeListItem (wxTreeListMainWindow *owner,
-                                wxTreeListItem *parent,
-                                const wxArrayString& text,
-                                int image, int selImage,
-                                wxTreeItemData *data)
-              : m_text (text) {
-
-    m_images[wxTreeItemIcon_Normal] = image;
-    m_images[wxTreeItemIcon_Selected] = selImage;
-    m_images[wxTreeItemIcon_Expanded] = NO_IMAGE;
-    m_images[wxTreeItemIcon_SelectedExpanded] = NO_IMAGE;
-
-    m_data = data;
-    m_x = 0;
-    m_y = 0;
-    m_text_x = 0;
-
-    m_isCollapsed = true;
-    m_hasHilight = false;
-    m_hasPlus = false;
-    m_isBold = false;
-
-    m_owner = owner;
-    m_parent = parent;
-
-    m_attr = (wxTreeItemAttr *)NULL;
-    m_ownsAttr = false;
-
-    // We don't know the height here yet.
-    m_width = 0;
-    m_height = 0;
-}
-
-wxTreeListItem::~wxTreeListItem() {
-    delete m_data;
-    if (m_ownsAttr) delete m_attr;
-
-    wxASSERT_MSG( m_children.IsEmpty(), _T("please call DeleteChildren() before destructor"));
-}
-
-void wxTreeListItem::DeleteChildren (wxTreeListMainWindow *tree) {
-    size_t count = m_children.Count();
-    for (size_t n = 0; n < count; n++) {
-        wxTreeListItem *child = m_children[n];
-        if (tree) {
-            tree->SendDeleteEvent (child);
-           // LG 
-           tree->RemoveFromSelection(child);
-           /*
-           if (child->IsSelected())
-             {
-               tree->Unselect(child);
-             }
-           */
-           //            if (tree->m_selectItem == child) tree->m_selectItem = (wxTreeListItem*)NULL;
-        }
-        child->DeleteChildren (tree);
-        delete child;
-    }
-    m_children.Empty();
-}
-
-void wxTreeListItem::SetText (const wxString &text) {
-    if (m_text.GetCount() > 0) {
-        m_text[0] = text;
-    }else{
-        m_text.Add (text);
-    }
-}
-
-size_t wxTreeListItem::GetChildrenCount (bool recursively) const {
-    size_t count = m_children.Count();
-    if (!recursively) return count;
-
-    size_t total = count;
-    for (size_t n = 0; n < count; ++n) {
-        total += m_children[n]->GetChildrenCount();
-    }
-    return total;
-}
-
-void wxTreeListItem::GetSize (int &x, int &y, const wxTreeListMainWindow *theButton) {
-    int bottomY = m_y + theButton->GetLineHeight (this);
-    if (y < bottomY) y = bottomY;
-    int width = m_x +  m_width;
-    if ( x < width ) x = width;
-
-    if (IsExpanded()) {
-        size_t count = m_children.Count();
-        for (size_t n = 0; n < count; ++n ) {
-            m_children[n]->GetSize (x, y, theButton);
-        }
-    }
-}
-
-wxTreeListItem *wxTreeListItem::HitTest (const wxPoint& point,
-                                         const wxTreeListMainWindow *theCtrl,
-                                         int &flags, int& column, int level) {
-
-    // for a hidden root node, don't evaluate it, but do evaluate children
-    if (!theCtrl->HasFlag(wxTR_HIDE_ROOT) || (level > 0)) {
-
-        // reset any previous hit infos
-        flags = 0;
-        column = -1;
-        wxTreeListHeaderWindow* header_win = theCtrl->m_owner->GetHeaderWindow();
-
-        // check for right of all columns (outside)
-        if (point.x > header_win->GetWidth()) return (wxTreeListItem*) NULL;
-
-        // evaluate if y-pos is okay
-        int h = theCtrl->GetLineHeight (this);
-        if ((point.y >= m_y) && (point.y <= m_y + h)) {
-
-            int maincol = theCtrl->GetMainColumn();
-
-            // check for above/below middle
-            int y_mid = m_y + h/2;
-            if (point.y < y_mid) {
-                flags |= wxTREE_HITTEST_ONITEMUPPERPART;
-            }else{
-                flags |= wxTREE_HITTEST_ONITEMLOWERPART;
-            }
-
-            // check for button hit
-            if (HasPlus() && theCtrl->HasButtons()) {
-                int bntX = m_x - theCtrl->m_btnWidth2;
-                int bntY = y_mid - theCtrl->m_btnHeight2;
-                if ((point.x >= bntX) && (point.x <= (bntX + theCtrl->m_btnWidth)) &&
-                    (point.y >= bntY) && (point.y <= (bntY + theCtrl->m_btnHeight))) {
-                    flags |= wxTREE_HITTEST_ONITEMBUTTON;
-                    column = maincol;
-                    return this;
-                }
-            }
-
-            // check for image hit
-            if (theCtrl->m_imgWidth > 0) {
-                int imgX = m_text_x - theCtrl->m_imgWidth - MARGIN;
-                int imgY = y_mid - theCtrl->m_imgHeight2;
-                if ((point.x >= imgX) && (point.x <= (imgX + theCtrl->m_imgWidth)) &&
-                    (point.y >= imgY) && (point.y <= (imgY + theCtrl->m_imgHeight))) {
-                    flags |= wxTREE_HITTEST_ONITEMICON;
-                    column = maincol;
-                    return this;
-                }
-            }
-
-            // check for label hit
-            if ((point.x >= m_text_x) && (point.x <= (m_text_x + m_width))) {
-                flags |= wxTREE_HITTEST_ONITEMLABEL;
-                column = maincol;
-                return this;
-            }
-
-            // check for indent hit after button and image hit
-            if (point.x < m_x) {
-                flags |= wxTREE_HITTEST_ONITEMINDENT;
-                column = -1; // considered not belonging to main column
-                return this;
-            }
-
-            // check for right of label
-            int end = 0;
-            for (int i = 0; i <= maincol; ++i) end += header_win->GetColumnWidth (i);
-            if ((point.x > (m_text_x + m_width)) && (point.x <= end)) {
-                flags |= wxTREE_HITTEST_ONITEMRIGHT;
-                column = -1; // considered not belonging to main column
-                return this;
-            }
-
-            // else check for each column except main
-            int x = 0;
-            for (int j = 0; j < theCtrl->GetColumnCount(); ++j) {
-                if (!header_win->IsColumnShown(j)) continue;
-                int w = header_win->GetColumnWidth (j);
-                if ((j != maincol) && (point.x >= x && point.x < x+w)) {
-                    flags |= wxTREE_HITTEST_ONITEMCOLUMN;
-                    column = j;
-                    return this;
-                }
-                x += w;
-            }
-
-            // no special flag or column found
-            return this;
-
-        }
-
-        // if children not expanded, return no item
-        if (!IsExpanded()) return (wxTreeListItem*) NULL;
-    }
-
-    // in any case evaluate children
-    wxTreeListItem *child;
-    size_t count = m_children.Count();
-    for (size_t n = 0; n < count; n++) {
-        child = m_children[n]->HitTest (point, theCtrl, flags, column, level+1);
-        if (child) return child;
-    }
-
-    // not found
-    return (wxTreeListItem*) NULL;
-}
-
-int wxTreeListItem::GetCurrentImage() const {
-    int image = NO_IMAGE;
-    if (IsExpanded()) {
-        if (IsSelected()) {
-            image = GetImage (wxTreeItemIcon_SelectedExpanded);
-        }else{
-            image = GetImage (wxTreeItemIcon_Expanded);
-        }
-    }else{ // not expanded
-        if (IsSelected()) {
-            image = GetImage (wxTreeItemIcon_Selected);
-        }else{
-            image = GetImage (wxTreeItemIcon_Normal);
-        }
-    }
-
-    // maybe it doesn't have the specific image, try the default one instead
-    if (image == NO_IMAGE) image = GetImage();
-
-    return image;
-}
-
-// ---------------------------------------------------------------------------
-// wxTreeListMainWindow implementation
-// ---------------------------------------------------------------------------
-
-IMPLEMENT_DYNAMIC_CLASS(wxTreeListMainWindow, wxScrolledWindow)
-
-BEGIN_EVENT_TABLE(wxTreeListMainWindow, wxScrolledWindow)
-    EVT_PAINT          (wxTreeListMainWindow::OnPaint)
-    EVT_MOUSE_EVENTS   (wxTreeListMainWindow::OnMouse)
-    EVT_CHAR           (wxTreeListMainWindow::OnChar)
-    EVT_SET_FOCUS      (wxTreeListMainWindow::OnSetFocus)
-    EVT_KILL_FOCUS     (wxTreeListMainWindow::OnKillFocus)
-    EVT_IDLE           (wxTreeListMainWindow::OnIdle)
-    EVT_SCROLLWIN      (wxTreeListMainWindow::OnScroll)
-END_EVENT_TABLE()
-
-
-// ---------------------------------------------------------------------------
-// construction/destruction
-// ---------------------------------------------------------------------------
-
-void wxTreeListMainWindow::Init() {
-
-    m_rootItem = (wxTreeListItem*)NULL;
-    m_curItem = (wxTreeListItem*)NULL;
-    m_shiftItem = (wxTreeListItem*)NULL;
-    m_editItem = (wxTreeListItem*)NULL;
-    // LG 
-    //    m_selectItem = (wxTreeListItem*)NULL;
-
-    m_curColumn = -1; // no current column
-
-    m_hasFocus = false;
-    m_dirty = false;
-
-    m_lineHeight = LINEHEIGHT;
-    m_indent = MININDENT; // min. indent
-    m_linespacing = 4;
-
-#if !wxCHECK_VERSION(2, 5, 0)
-    m_hilightBrush = new wxBrush (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_HIGHLIGHT), wxSOLID);
-    m_hilightUnfocusedBrush = new wxBrush (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_BTNSHADOW), wxSOLID);
-#else
-    m_hilightBrush = new wxBrush (wxSystemSettings::GetColour (wxSYS_COLOUR_HIGHLIGHT), wxSOLID);
-    m_hilightUnfocusedBrush = new wxBrush (wxSystemSettings::GetColour (wxSYS_COLOUR_BTNSHADOW), wxSOLID);
-#endif
-
-    m_imageListNormal = (wxImageList *) NULL;
-    m_imageListButtons = (wxImageList *) NULL;
-    m_imageListState = (wxImageList *) NULL;
-    m_ownsImageListNormal = m_ownsImageListButtons =
-    m_ownsImageListState = false;
-
-    m_imgWidth = 0, m_imgWidth2 = 0;
-    m_imgHeight = 0, m_imgHeight2 = 0;
-    m_btnWidth = 0, m_btnWidth2 = 0;
-    m_btnHeight = 0, m_btnHeight2 = 0;
-
-    m_dragCount = 0;
-    m_isDragging = false;
-    m_dragTimer = new wxTimer (this, -1);
-    m_dragItem = (wxTreeListItem*)NULL;
-
-    m_renameTimer = new wxTreeListRenameTimer (this);
-    m_lastOnSame = false;
-    m_left_down_selection = false;
-
-    m_findTimer = new wxTimer (this, -1);
-
-#if defined( __WXMAC__ ) && defined(__WXMAC_CARBON__)
-    m_normalFont.MacCreateThemeFont (kThemeViewsFont);
-#else
-    m_normalFont = wxSystemSettings::GetFont (wxSYS_DEFAULT_GUI_FONT);
-#endif
-    m_boldFont = wxFont( m_normalFont.GetPointSize(),
-                         m_normalFont.GetFamily(),
-                         m_normalFont.GetStyle(),
-                         wxBOLD,
-                         m_normalFont.GetUnderlined(),
-                         m_normalFont.GetFaceName(),
-                         m_normalFont.GetEncoding());
-}
-
-bool wxTreeListMainWindow::Create (wxTreeListCtrl *parent,
-                                   wxWindowID id,
-                                   const wxPoint& pos,
-                                   const wxSize& size,
-                                   long style,
-                                   const wxValidator &validator,
-                                   const wxString& name) {
-
-#ifdef __WXMAC__
-    if (style & wxTR_HAS_BUTTONS) style |= wxTR_MAC_BUTTONS;
-    if (style & wxTR_HAS_BUTTONS) style &= ~wxTR_HAS_BUTTONS;
-    style &= ~wxTR_LINES_AT_ROOT;
-    style |= wxTR_NO_LINES;
-
-    int major,minor;
-    wxGetOsVersion( &major, &minor );
-    if (major < 10) style |= wxTR_ROW_LINES;
-#endif
-
-    wxScrolledWindow::Create (parent, id, pos, size, style|wxHSCROLL|wxVSCROLL, name);
-
-#if wxUSE_VALIDATORS
-    SetValidator(validator);
-#endif
-
-#if !wxCHECK_VERSION(2, 5, 0)
-    SetBackgroundColour (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_LISTBOX));
-#else
-    SetBackgroundColour (wxSystemSettings::GetColour (wxSYS_COLOUR_LISTBOX));
-#endif
-
-#ifdef __WXMSW__
-    {
-        int i, j;
-        wxBitmap bmp(8, 8);
-        wxMemoryDC bdc;
-        bdc.SelectObject(bmp);
-        bdc.SetPen(*wxGREY_PEN);
-        bdc.DrawRectangle(-1, -1, 10, 10);
-        for (i = 0; i < 8; i++) {
-            for (j = 0; j < 8; j++) {
-                if (!((i + j) & 1)) {
-                    bdc.DrawPoint(i, j);
-                }
-            }
-        }
-
-        m_dottedPen = wxPen(bmp, 1);
-    }
-#else
-//?    m_dottedPen = wxPen( *wxGREY_PEN, 1, wxDOT );  // too slow under XFree86
-    m_dottedPen = wxPen( _T("grey"), 0, 0 ); // Bitmap based pen is not supported by GTK!
-#endif
-
-    m_owner = parent;
-    m_main_column = 0;
-
-    return true;
-}
-
-wxTreeListMainWindow::~wxTreeListMainWindow() {
-    delete m_hilightBrush;
-    delete m_hilightUnfocusedBrush;
-
-    delete m_dragTimer;
-    delete m_renameTimer;
-    delete m_findTimer;
-    if (m_ownsImageListNormal) delete m_imageListNormal;
-    if (m_ownsImageListState) delete m_imageListState;
-    if (m_ownsImageListButtons) delete m_imageListButtons;
-
-    DeleteRoot();
-}
-
-
-//-----------------------------------------------------------------------------
-// accessors
-//-----------------------------------------------------------------------------
-
-size_t wxTreeListMainWindow::GetCount() const {
-    return m_rootItem == NULL? 0: m_rootItem->GetChildrenCount();
-}
-
-void wxTreeListMainWindow::SetIndent (unsigned int indent) {
-    m_indent = wxMax (MININDENT, indent);
-    m_dirty = true;
-}
-
-void wxTreeListMainWindow::SetLineSpacing (unsigned int spacing) {
-    m_linespacing = spacing;
-    m_dirty = true;
-    CalculateLineHeight();
-}
-
-size_t wxTreeListMainWindow::GetChildrenCount (const wxTreeItemId& item,
-                                               bool recursively) {
-    wxCHECK_MSG (item.IsOk(), 0u, _T("invalid tree item"));
-    return ((wxTreeListItem*)item.m_pItem)->GetChildrenCount (recursively);
-}
-
-void wxTreeListMainWindow::SetWindowStyle (const long styles) {
-    // right now, just sets the styles.  Eventually, we may
-    // want to update the inherited styles, but right now
-    // none of the parents has updatable styles
-    m_windowStyle = styles;
-    m_dirty = true;
-}
-
-//-----------------------------------------------------------------------------
-// functions to work with tree items
-//-----------------------------------------------------------------------------
-
-int wxTreeListMainWindow::GetItemImage (const wxTreeItemId& item, int column,
-                                        wxTreeItemIcon which) const {
-    wxCHECK_MSG (item.IsOk(), -1, _T("invalid tree item"));
-    return ((wxTreeListItem*) item.m_pItem)->GetImage (column, which);
-}
-
-wxTreeItemData *wxTreeListMainWindow::GetItemData (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), NULL, _T("invalid tree item"));
-    return ((wxTreeListItem*) item.m_pItem)->GetData();
-}
-
-bool wxTreeListMainWindow::GetItemBold (const wxTreeItemId& item) const {
-    wxCHECK_MSG(item.IsOk(), false, _T("invalid tree item"));
-    return ((wxTreeListItem *)item.m_pItem)->IsBold();
-}
-
-wxColour wxTreeListMainWindow::GetItemTextColour (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), wxNullColour, _T("invalid tree item"));
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    return pItem->Attr().GetTextColour();
-}
-
-wxColour wxTreeListMainWindow::GetItemBackgroundColour (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), wxNullColour, _T("invalid tree item"));
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    return pItem->Attr().GetBackgroundColour();
-}
-
-wxFont wxTreeListMainWindow::GetItemFont (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), wxNullFont, _T("invalid tree item"));
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    return pItem->Attr().GetFont();
-}
-
-void wxTreeListMainWindow::SetItemImage (const wxTreeItemId& item, int column,
-                                         int image, wxTreeItemIcon which) {
-    wxCHECK_RET (item.IsOk(), _T("invalid tree item"));
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    pItem->SetImage (column, image, which);
-    wxClientDC dc (this);
-    CalculateSize (pItem, dc);
-    RefreshLine (pItem);
-}
-
-void wxTreeListMainWindow::SetItemData (const wxTreeItemId& item,
-                                        wxTreeItemData *data) {
-    wxCHECK_RET (item.IsOk(), _T("invalid tree item"));
-    ((wxTreeListItem*) item.m_pItem)->SetData(data);
-}
-
-void wxTreeListMainWindow::SetItemHasChildren (const wxTreeItemId& item,
-                                               bool has) {
-    wxCHECK_RET (item.IsOk(), _T("invalid tree item"));
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    pItem->SetHasPlus (has);
-    RefreshLine (pItem);
-}
-
-void wxTreeListMainWindow::SetItemBold (const wxTreeItemId& item, bool bold) {
-    wxCHECK_RET (item.IsOk(), _T("invalid tree item"));
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    if (pItem->IsBold() != bold) { // avoid redrawing if no real change
-        pItem->SetBold (bold);
-        RefreshLine (pItem);
-    }
-}
-
-void wxTreeListMainWindow::SetItemTextColour (const wxTreeItemId& item,
-                                              const wxColour& colour) {
-    wxCHECK_RET (item.IsOk(), _T("invalid tree item"));
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    pItem->Attr().SetTextColour (colour);
-    RefreshLine (pItem);
-}
-
-void wxTreeListMainWindow::SetItemBackgroundColour (const wxTreeItemId& item,
-                                                    const wxColour& colour) {
-    wxCHECK_RET (item.IsOk(), _T("invalid tree item"));
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    pItem->Attr().SetBackgroundColour (colour);
-    RefreshLine (pItem);
-}
-
-void wxTreeListMainWindow::SetItemFont (const wxTreeItemId& item,
-                                        const wxFont& font) {
-    wxCHECK_RET (item.IsOk(), _T("invalid tree item"));
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    pItem->Attr().SetFont (font);
-    RefreshLine (pItem);
-}
-
-bool wxTreeListMainWindow::SetFont (const wxFont &font) {
-    wxScrolledWindow::SetFont (font);
-    m_normalFont = font;
-    m_boldFont = wxFont (m_normalFont.GetPointSize(),
-                         m_normalFont.GetFamily(),
-                         m_normalFont.GetStyle(),
-                         wxBOLD,
-                         m_normalFont.GetUnderlined(),
-                         m_normalFont.GetFaceName());
-    CalculateLineHeight();
-    return true;
-}
-
-
-// ----------------------------------------------------------------------------
-// item status inquiries
-// ----------------------------------------------------------------------------
-
-bool wxTreeListMainWindow::IsVisible (const wxTreeItemId& item, bool fullRow) const {
-    wxCHECK_MSG (item.IsOk(), false, _T("invalid tree item"));
-
-    // An item is only visible if it's not a descendant of a collapsed item
-    wxTreeListItem *pItem = (wxTreeListItem*) item.m_pItem;
-    wxTreeListItem* parent = pItem->GetItemParent();
-    while (parent) {
-        if (parent == m_rootItem && HasFlag(wxTR_HIDE_ROOT)) break;
-        if (!parent->IsExpanded()) return false;
-        parent = parent->GetItemParent();
-    }
-
-    wxSize clientSize = GetClientSize();
-    wxRect rect;
-    if ((!GetBoundingRect (item, rect)) ||
-        ((!fullRow && rect.GetWidth() == 0) || rect.GetHeight() == 0) ||
-        (rect.GetBottom() < 0 || rect.GetTop() > clientSize.y) ||
-        (!fullRow && (rect.GetRight() < 0 || rect.GetLeft() > clientSize.x))) return false;
-
-    return true;
-}
-
-bool wxTreeListMainWindow::HasChildren (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), false, _T("invalid tree item"));
-
-    // consider that the item does have children if it has the "+" button: it
-    // might not have them (if it had never been expanded yet) but then it
-    // could have them as well and it's better to err on this side rather than
-    // disabling some operations which are restricted to the items with
-    // children for an item which does have them
-    return ((wxTreeListItem*) item.m_pItem)->HasPlus();
-}
-
-bool wxTreeListMainWindow::IsExpanded (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), false, _T("invalid tree item"));
-    return ((wxTreeListItem*) item.m_pItem)->IsExpanded();
-}
-
-bool wxTreeListMainWindow::IsSelected (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), false, _T("invalid tree item"));
-    return ((wxTreeListItem*) item.m_pItem)->IsSelected();
-}
-
-bool wxTreeListMainWindow::IsBold (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), false, _T("invalid tree item"));
-    return ((wxTreeListItem*) item.m_pItem)->IsBold();
-}
-
-// ----------------------------------------------------------------------------
-// navigation
-// ----------------------------------------------------------------------------
-
-wxTreeItemId wxTreeListMainWindow::GetItemParent (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-    return ((wxTreeListItem*) item.m_pItem)->GetItemParent();
-}
-
-#if !wxCHECK_VERSION(2, 5, 0)
-wxTreeItemId wxTreeListMainWindow::GetFirstChild (const wxTreeItemId& item,
-                                                  long& cookie) const {
-#else
-wxTreeItemId wxTreeListMainWindow::GetFirstChild (const wxTreeItemId& item,
-                                                  wxTreeItemIdValue& cookie) const {
-#endif
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-    wxArrayTreeListItems& children = ((wxTreeListItem*) item.m_pItem)->GetChildren();
-    cookie = 0;
-    return (!children.IsEmpty())? wxTreeItemId(children.Item(0)): wxTreeItemId();
-}
-
-#if !wxCHECK_VERSION(2, 5, 0)
-wxTreeItemId wxTreeListMainWindow::GetNextChild (const wxTreeItemId& item,
-                                                 long& cookie) const {
-#else
-wxTreeItemId wxTreeListMainWindow::GetNextChild (const wxTreeItemId& item,
-                                                 wxTreeItemIdValue& cookie) const {
-#endif
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-    wxArrayTreeListItems& children = ((wxTreeListItem*) item.m_pItem)->GetChildren();
-    // it's ok to cast cookie to long, we never have indices which overflow "void*"
-    long *pIndex = ((long*)&cookie);
-    return ((*pIndex)+1 < (long)children.Count())? wxTreeItemId(children.Item(++(*pIndex))): wxTreeItemId();
-}
-
-#if !wxCHECK_VERSION(2, 5, 0)
-wxTreeItemId wxTreeListMainWindow::GetPrevChild (const wxTreeItemId& item,
-                                                 long& cookie) const {
-#else
-wxTreeItemId wxTreeListMainWindow::GetPrevChild (const wxTreeItemId& item,
-                                                 wxTreeItemIdValue& cookie) const {
-#endif
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-    wxArrayTreeListItems& children = ((wxTreeListItem*) item.m_pItem)->GetChildren();
-    // it's ok to cast cookie to long, we never have indices which overflow "void*"
-    long *pIndex = (long*)&cookie;
-    return ((*pIndex)-1 >= 0)? wxTreeItemId(children.Item(--(*pIndex))): wxTreeItemId();
-}
-
-#if !wxCHECK_VERSION(2, 5, 0)
-wxTreeItemId wxTreeListMainWindow::GetLastChild (const wxTreeItemId& item,
-                                                 long& cookie) const {
-#else
-wxTreeItemId wxTreeListMainWindow::GetLastChild (const wxTreeItemId& item,
-                                                 wxTreeItemIdValue& cookie) const {
-#endif
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-    wxArrayTreeListItems& children = ((wxTreeListItem*) item.m_pItem)->GetChildren();
-    // it's ok to cast cookie to long, we never have indices which overflow "void*"
-    long *pIndex = ((long*)&cookie);
-    (*pIndex) = children.Count();
-    return (!children.IsEmpty())? wxTreeItemId(children.Last()): wxTreeItemId();
-}
-
-wxTreeItemId wxTreeListMainWindow::GetNextSibling (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-
-    // get parent
-    wxTreeListItem *i = (wxTreeListItem*) item.m_pItem;
-    wxTreeListItem *parent = i->GetItemParent();
-    if (!parent) return wxTreeItemId(); // root item doesn't have any siblings
-
-    // get index
-    wxArrayTreeListItems& siblings = parent->GetChildren();
-    size_t index = siblings.Index (i);
-    wxASSERT (index != wxNOT_FOUND); // I'm not a child of my parent?
-    return (index < siblings.Count()-1)? wxTreeItemId(siblings[index+1]): wxTreeItemId();
-}
-
-wxTreeItemId wxTreeListMainWindow::GetPrevSibling (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-
-    // get parent
-    wxTreeListItem *i = (wxTreeListItem*) item.m_pItem;
-    wxTreeListItem *parent = i->GetItemParent();
-    if (!parent) return wxTreeItemId(); // root item doesn't have any siblings
-
-    // get index
-    wxArrayTreeListItems& siblings = parent->GetChildren();
-    size_t index = siblings.Index(i);
-    wxASSERT (index != wxNOT_FOUND); // I'm not a child of my parent?
-    return (index >= 1)? wxTreeItemId(siblings[index-1]): wxTreeItemId();
-}
-
-// Only for internal use right now, but should probably be public
-wxTreeItemId wxTreeListMainWindow::GetNext (const wxTreeItemId& item, bool fulltree) const {
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-
-    // if there are any children, return first child
-    if (fulltree || ((wxTreeListItem*)item.m_pItem)->IsExpanded()) {
-        wxArrayTreeListItems& children = ((wxTreeListItem*)item.m_pItem)->GetChildren();
-        if (children.GetCount() > 0) return children.Item (0);
-    }
-
-    // get sibling of this item or of the ancestors instead
-    wxTreeItemId next;
-    wxTreeItemId parent = item;
-    do {
-        next = GetNextSibling (parent);
-        parent = GetItemParent (parent);
-    } while (!next.IsOk() && parent.IsOk());
-    return next;
-}
-
-// Only for internal use right now, but should probably be public
-wxTreeItemId wxTreeListMainWindow::GetPrev (const wxTreeItemId& item, bool fulltree) const {
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-
-    // if there are any children, return last child
-    if (fulltree || ((wxTreeListItem*)item.m_pItem)->IsExpanded()) {
-        wxArrayTreeListItems& children = ((wxTreeListItem*)item.m_pItem)->GetChildren();
-        if (children.GetCount() > 0) return children.Item (children.GetCount()-1);
-    }
-
-    // get sibling of this item or of the ancestors instead
-    wxTreeItemId next;
-    wxTreeItemId parent = item;
-    do {
-        next = GetPrevSibling (parent);
-        parent = GetItemParent (parent);
-    } while (!next.IsOk() && parent.IsOk());
-    return next;
-}
-
-wxTreeItemId wxTreeListMainWindow::GetFirstExpandedItem() const {
-    return GetNextExpanded (GetRootItem());
-}
-
-wxTreeItemId wxTreeListMainWindow::GetNextExpanded (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-    return GetNext (item, false);
-}
-
-wxTreeItemId wxTreeListMainWindow::GetPrevExpanded (const wxTreeItemId& item) const {
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-    return GetPrev (item, false);
-}
-
-wxTreeItemId wxTreeListMainWindow::GetFirstVisibleItem (bool fullRow) const {
-    return GetNextVisible (GetRootItem(), fullRow);
-}
-
-wxTreeItemId wxTreeListMainWindow::GetNextVisible (const wxTreeItemId& item, bool fullRow) const {
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-    wxTreeItemId id = GetNext (item, false);
-    while (id.IsOk()) {
-        if (IsVisible (id, fullRow)) return id;
-        id = GetNext (id, false);
-    }
-    return wxTreeItemId();
-}
-
-wxTreeItemId wxTreeListMainWindow::GetPrevVisible (const wxTreeItemId& item, bool fullRow) const {
-    wxCHECK_MSG (item.IsOk(), wxTreeItemId(), _T("invalid tree item"));
-    wxTreeItemId id = GetPrev (item, true);
-    while (id.IsOk()) {
-        if (IsVisible (id, fullRow)) return id;
-        id = GetPrev(id, true);
-    }
-    return wxTreeItemId();
-}
-
-// ----------------------------------------------------------------------------
-// operations
-// ----------------------------------------------------------------------------
-
-wxTreeItemId wxTreeListMainWindow::DoInsertItem (const wxTreeItemId& parentId,
-                                                 size_t previous,
-                                                 const wxString& text,
-                                                 int image, int selImage,
-                                                 wxTreeItemData *data) {
-    wxTreeListItem *parent = (wxTreeListItem*)parentId.m_pItem;
-    wxCHECK_MSG (parent, wxTreeItemId(), _T("item must have a parent, at least root!") );
-    m_dirty = true; // do this first so stuff below doesn't cause flicker
-
-    wxArrayString arr;
-    arr.Alloc (GetColumnCount());
-    for (int i = 0; i < (int)GetColumnCount(); ++i) arr.Add (wxEmptyString);
-    arr[m_main_column] = text;
-    wxTreeListItem *item = new wxTreeListItem (this, parent, arr, image, selImage, data);
-    if (data != NULL) {
-#if !wxCHECK_VERSION(2, 5, 0)
-        data->SetId ((long)item);
-#else
-        data->SetId (item);
-#endif
-    }
-    parent->Insert (item, previous);
-
-    return item;
-}
-
-wxTreeItemId wxTreeListMainWindow::AddRoot (const wxString& text,
-                                            int image, int selImage,
-                                            wxTreeItemData *data) {
-    wxCHECK_MSG(!m_rootItem, wxTreeItemId(), _T("tree can have only one root"));
-    wxCHECK_MSG(GetColumnCount(), wxTreeItemId(), _T("Add column(s) before adding the root item"));
-    m_dirty = true; // do this first so stuff below doesn't cause flicker
-
-    wxArrayString arr;
-    arr.Alloc (GetColumnCount());
-    for (int i = 0; i < (int)GetColumnCount(); ++i) arr.Add (wxEmptyString);
-    arr[m_main_column] = text;
-    m_rootItem = new wxTreeListItem (this, (wxTreeListItem *)NULL, arr, image, selImage, data);
-    if (data != NULL) {
-#if !wxCHECK_VERSION(2, 5, 0)
-        data->SetId((long)m_rootItem);
-#else
-        data->SetId(m_rootItem);
-#endif
-    }
-    if (HasFlag(wxTR_HIDE_ROOT)) {
-        // if we will hide the root, make sure children are visible
-        m_rootItem->SetHasPlus();
-        m_rootItem->Expand();
-#if !wxCHECK_VERSION(2, 5, 0)
-        long cookie = 0;
-#else
-        wxTreeItemIdValue cookie = 0;
-#endif
-        m_curItem = (wxTreeListItem*)GetFirstChild (m_rootItem, cookie).m_pItem;
-    }
-    return m_rootItem;
-}
-
-wxTreeItemId wxTreeListMainWindow::PrependItem (const wxTreeItemId& parent,
-                                                const wxString& text,
-                                                int image, int selImage,
-                                                wxTreeItemData *data) {
-    return DoInsertItem (parent, 0u, text, image, selImage, data);
-}
-
-wxTreeItemId wxTreeListMainWindow::InsertItem (const wxTreeItemId& parentId,
-                                               const wxTreeItemId& idPrevious,
-                                               const wxString& text,
-                                               int image, int selImage,
-                                               wxTreeItemData *data) {
-    wxTreeListItem *parent = (wxTreeListItem*)parentId.m_pItem;
-    wxCHECK_MSG (parent, wxTreeItemId(), _T("item must have a parent, at least root!") );
-
-    int index = parent->GetChildren().Index((wxTreeListItem*) idPrevious.m_pItem);
-    wxASSERT_MSG( index != wxNOT_FOUND,
-                  _T("previous item in wxTreeListMainWindow::InsertItem() is not a sibling") );
-
-    return DoInsertItem (parentId, ++index, text, image, selImage, data);
-}
-
-wxTreeItemId wxTreeListMainWindow::InsertItem (const wxTreeItemId& parentId,
-                                               size_t before,
-                                               const wxString& text,
-                                               int image, int selImage,
-                                               wxTreeItemData *data) {
-    wxTreeListItem *parent = (wxTreeListItem*)parentId.m_pItem;
-    wxCHECK_MSG (parent, wxTreeItemId(), _T("item must have a parent, at least root!") );
-
-    return DoInsertItem (parentId, before, text, image, selImage, data);
-}
-
-wxTreeItemId wxTreeListMainWindow::AppendItem (const wxTreeItemId& parentId,
-                                               const wxString& text,
-                                               int image, int selImage,
-                                               wxTreeItemData *data) {
-    wxTreeListItem *parent = (wxTreeListItem*) parentId.m_pItem;
-    wxCHECK_MSG (parent, wxTreeItemId(), _T("item must have a parent, at least root!") );
-
-    return DoInsertItem (parent, parent->GetChildren().Count(), text, image, selImage, data);
-}
-
-void wxTreeListMainWindow::SendDeleteEvent (wxTreeListItem *item) {
-    // send event to user code
-    wxTreeEvent event (wxEVT_COMMAND_TREE_DELETE_ITEM, m_owner->GetId());
-#if !wxCHECK_VERSION(2, 5, 0)
-    event.SetItem ((long)item);
-#else
-    event.SetItem (item);
-#endif
-    event.SetEventObject (m_owner);
-    m_owner->ProcessEvent (event);
-}
-
-void wxTreeListMainWindow::Delete (const wxTreeItemId& itemId) {
-    wxTreeListItem *item = (wxTreeListItem*) itemId.m_pItem;
-    wxCHECK_RET (item != m_rootItem, _T("invalid item, root may not be deleted this way!"));
-    m_dirty = true; // do this first so stuff below doesn't cause flicker
-
-    // don't stay with invalid m_shiftItem or we will crash in the next call to OnChar()
-    bool changeKeyCurrent = false;
-    wxTreeListItem *itemKey = m_shiftItem;
-    while (itemKey) {
-        if (itemKey == item) { // m_shiftItem is a descendant of the item being deleted
-            changeKeyCurrent = true;
-            break;
-        }
-        itemKey = itemKey->GetItemParent();
-    }
-
-    wxTreeListItem *parent = item->GetItemParent();
-    if (parent) {
-        parent->GetChildren().Remove (item);  // remove by value
-    }
-    if (changeKeyCurrent)  m_shiftItem = parent;
-
-    SendDeleteEvent (item);
-    // LG
-    RemoveFromSelection(item);
-    //    if (item->IsSelected()) Unselect(item);
-    //if (m_selectItem == item) m_selectItem = (wxTreeListItem*)NULL;
-    item->DeleteChildren (this);
-    delete item;
-}
-
-void wxTreeListMainWindow::DeleteChildren (const wxTreeItemId& itemId) {
-    wxTreeListItem *item = (wxTreeListItem*) itemId.m_pItem;
-    m_dirty = true; // do this first so stuff below doesn't cause flicker
-
-    item->DeleteChildren (this);
-}
-
-void wxTreeListMainWindow::DeleteRoot() {
-    if (m_rootItem) {
-        m_dirty = true;
-        SendDeleteEvent (m_rootItem);
-        m_curItem = (wxTreeListItem*)NULL;
-       // LG
-        // m_selectItem= (wxTreeListItem*)NULL;
-       UnselectAll();
-        m_rootItem->DeleteChildren (this);
-        delete m_rootItem;
-        m_rootItem = NULL;
-    }
-}
-
-void wxTreeListMainWindow::Expand (const wxTreeItemId& itemId) {
-    wxTreeListItem *item = (wxTreeListItem*) itemId.m_pItem;
-    wxCHECK_RET (item, _T("invalid item in wxTreeListMainWindow::Expand") );
-
-    if (!item->HasPlus() || item->IsExpanded()) return;
-
-    // send event to user code
-    wxTreeEvent event (wxEVT_COMMAND_TREE_ITEM_EXPANDING, m_owner->GetId());
-#if !wxCHECK_VERSION(2, 5, 0)
-    event.SetItem ((long)item);
-#else
-    event.SetItem (item);
-#endif
-    event.SetEventObject (m_owner);
-    if (m_owner->ProcessEvent (event) && !event.IsAllowed()) return; // expand canceled
-
-    item->Expand();
-    m_dirty = true;
-
-    // send event to user code
-    event.SetEventType (wxEVT_COMMAND_TREE_ITEM_EXPANDED);
-    m_owner->ProcessEvent (event);
-}
-
-void wxTreeListMainWindow::ExpandAll (const wxTreeItemId& itemId) {
-    Expand (itemId);
-    if (!IsExpanded (itemId)) return;
-#if !wxCHECK_VERSION(2, 5, 0)
-    long cookie;
-#else
-    wxTreeItemIdValue cookie;
-#endif
-    wxTreeItemId child = GetFirstChild (itemId, cookie);
-    while (child.IsOk()) {
-        ExpandAll (child);
-        child = GetNextChild (itemId, cookie);
-    }
-}
-
-void wxTreeListMainWindow::Collapse (const wxTreeItemId& itemId) {
-    wxTreeListItem *item = (wxTreeListItem*) itemId.m_pItem;
-    wxCHECK_RET (item, _T("invalid item in wxTreeListMainWindow::Collapse") );
-
-    if (!item->HasPlus() || !item->IsExpanded()) return;
-
-    // send event to user code
-    wxTreeEvent event (wxEVT_COMMAND_TREE_ITEM_COLLAPSING, m_owner->GetId() );
-#if !wxCHECK_VERSION(2, 5, 0)
-    event.SetItem ((long)item);
-#else
-    event.SetItem (item);
-#endif
-    event.SetEventObject (m_owner);
-    if (m_owner->ProcessEvent (event) && !event.IsAllowed()) return; // collapse canceled
-
-    item->Collapse();
-    m_dirty = true;
-
-    // send event to user code
-    event.SetEventType (wxEVT_COMMAND_TREE_ITEM_COLLAPSED);
-    ProcessEvent (event);
-}
-
-void wxTreeListMainWindow::CollapseAndReset (const wxTreeItemId& item) {
-    Collapse (item);
-    DeleteChildren (item);
-}
-
-void wxTreeListMainWindow::Toggle (const wxTreeItemId& itemId) {
-    if (IsExpanded (itemId)) {
-        Collapse (itemId);
-    }else{
-        Expand (itemId);
-    }
-}
-/*
-void wxTreeListMainWindow::Unselect() {
-    if (m_selectItem) {
-        m_selectItem->SetHilight (false);
-        RefreshLine (m_selectItem);
-        m_selectItem = (wxTreeListItem*)NULL;
-    }
-}
-*/
-// LG 19/09/08 : Added 
-/*
-void wxTreeListMainWindow::Unselect(wxTreeListItem* item) 
-{
-    if (item->IsSelected()) {
-        item->SetSelected (false);
-        RefreshLine (item);
-       m_selected.Remove(item);
-       // LG : TODO  : Remove from array
-       //        if (item == m_selectItem) m_selectItem = (wxTreeListItem*)NULL;
-    }
-}
-*/
-/*
-void wxTreeListMainWindow::UnselectAllChildren (wxTreeListItem *item) {
-    if (item->IsSelected()) {
-        item->SetHilight (false);
-        RefreshLine (item);
-        if (item == m_selectItem) m_selectItem = (wxTreeListItem*)NULL;
-    }
-    if (item->HasChildren()) {
-        wxArrayTreeListItems& children = item->GetChildren();
-        size_t count = children.Count();
-        for (size_t n = 0; n < count; ++n) {
-            UnselectAllChildren (children[n]);
-        }
-    }
-}
-*/
-void wxTreeListMainWindow::UnselectAll() {
-  
-  size_t count = m_selected.Count();
-  for (size_t n = 0; n < count; ++n) 
-    {
-      m_selected[n]->SetSelected (false);
-      RefreshLine (m_selected[n]);
-    }
-  m_selected.Empty();
-  
-  //UnselectAllChildren ((wxTreeListItem*)GetRootItem().m_pItem);
-}
-
-// Recursive function !
-// To stop we must have crt_item<last_item
-// Algorithm :
-// Tag all next children, when no more children,
-// Move to parent (not to tag)
-// Keep going... if we found last_item, we stop.
-bool wxTreeListMainWindow::SelectNextChildren (wxTreeListItem *crt_item,
-                                              wxTreeListItem *last_item) {
-    wxTreeListItem *parent = crt_item->GetItemParent();
-
-    if (!parent) {// This is root item
-        return SelectAllChildrenUntilLast (crt_item, last_item);
-    }
-
-    wxArrayTreeListItems& children = parent->GetChildren();
-    int index = children.Index(crt_item);
-    wxASSERT (index != wxNOT_FOUND); // I'm not a child of my parent?
-
-    if ((parent->HasChildren() && parent->IsExpanded()) ||
-        ((parent == (wxTreeListItem*)GetRootItem().m_pItem) && HasFlag(wxTR_HIDE_ROOT))) {
-        size_t count = children.Count();
-        for (size_t n = (index+1); n < count; ++n) {
-            if (SelectAllChildrenUntilLast (children[n], last_item)) return true;
-        }
-    }
-
-    return SelectNextChildren (parent, last_item);
-}
-
- bool wxTreeListMainWindow::SelectAllChildrenUntilLast (wxTreeListItem *crt_item,
-                                                       wxTreeListItem *last_item) {
-   if (!crt_item->IsSelected())
-     {
-       // LG : Send event to user to know is selection is accepted 
-       // send event to the user code
-       wxTreeEvent event( wxEVT_COMMAND_TREE_SEL_CHANGING, m_owner->GetId() );
-#if !wxCHECK_VERSION(2, 5, 0)
-       event.SetItem ((long)crt_item);
-#else
-       event.SetItem (crt_item);
-#endif
-       event.SetEventObject (m_owner);
-       if (m_owner->GetEventHandler()->ProcessEvent (event) && event.IsAllowed())
-        {    
-          AddToSelection(crt_item);
-        }
-     }
-
-    if (crt_item==last_item) return true;
-
-    if (crt_item->HasChildren() && crt_item->IsExpanded()) {
-        wxArrayTreeListItems& children = crt_item->GetChildren();
-        size_t count = children.Count();
-        for (size_t n = 0; n < count; ++n) {
-         if (SelectAllChildrenUntilLast (children[n], last_item)) return true;
-        }
-    }
-
-    return false;
-}
-
- void wxTreeListMainWindow::RemoveFromSelection( wxTreeListItem *item )
- {
-   if (!item->IsSelected()) return;
-   item->SetSelected(false);
-   m_selected.Remove(item);
-   RefreshLine(item);
-   
- }
- void wxTreeListMainWindow::AddToSelection( wxTreeListItem *item )
- {
-   if (item->IsSelected()) return;
-   item->SetSelected(true);
-   m_selected.Add(item);
-   RefreshLine(item);
- }
-
-void wxTreeListMainWindow::SelectItem (const wxTreeItemId& itemId,
-                                       const wxTreeItemId& lastId,
-                                       bool unselect_others) {
-    wxCHECK_RET (itemId.IsOk(), _T("invalid tree item") );
-
-    bool is_single = !HasFlag(wxTR_MULTIPLE);
-    wxTreeListItem *item = (wxTreeListItem*) itemId.m_pItem;
-
-        
-    // single selection requires unselect others
-    if (is_single) unselect_others = true;
-
-    // unselect all if unselect other items
-    bool unselected = false; // see that UnselectAll is done only once
-    if (unselect_others) {
-      /*
-        if (is_single) {
-            Unselect(); // to speed up thing
-        }else{
-      */
-            UnselectAll();
-            unselected = true;
-           //        }
-    }
-
-    // LG : Update current item
-    wxTreeListItem *old_curItem = m_curItem;
-    m_curItem = item;
-    if (old_curItem) RefreshLine (old_curItem);
-    
-    // select item or item range
-    if (lastId.IsOk() && (itemId != lastId)) 
-      {
-
-
-        if (!unselected) UnselectAll();
-        wxTreeListItem *last = (wxTreeListItem*) lastId.m_pItem;
-
-       // LG : Update current item
-       //      wxTreeListItem *old_curItem = m_curItem;
-       //      m_curItem = last;
-       //      if (old_curItem) RefreshLine (old_curItem);
-
-        // ensure that the position of the item it calculated in any case
-        if (m_dirty) CalculatePositions();
-
-        // select item range according Y-position
-        if (last->GetY() < item->GetY()) {
-            if (!SelectAllChildrenUntilLast (last, item)) {
-                SelectNextChildren (last, item);
-            }
-        }else{
-            if (!SelectAllChildrenUntilLast (item, last)) {
-                SelectNextChildren (item, last);
-            }
-        }
-
-    }
-    else
-      {
-
-       // send event to the user code
-       wxTreeEvent event( wxEVT_COMMAND_TREE_SEL_CHANGING, m_owner->GetId() );
-#if !wxCHECK_VERSION(2, 5, 0)
-       event.SetItem ((long)item);
-       event.SetOldItem ((long)m_curItem);
-#else
-       event.SetItem (item);
-       event.SetOldItem (m_curItem);
-#endif
-       event.SetEventObject (m_owner);
-       
-
-
-       if (m_owner->GetEventHandler()->ProcessEvent (event) && 
-           event.IsAllowed())
-         {
-           // select item according its old selection
-           if (item->IsSelected())
-             RemoveFromSelection(item);
-           else 
-             AddToSelection(item);
-         }
-    }
-
-    // send event to user code
-    wxTreeEvent event( wxEVT_COMMAND_TREE_SEL_CHANGED, m_owner->GetId() );
-    m_owner->GetEventHandler()->ProcessEvent (event);
-}
-
-void wxTreeListMainWindow::SelectAll() {
-    wxCHECK_RET (HasFlag(wxTR_MULTIPLE), _T("invalid tree style"));
-
-#if !wxCHECK_VERSION(2, 5, 0)
-    long cookie = 0;
-#else
-    wxTreeItemIdValue cookie = 0;
-#endif
-    wxTreeItemId root = GetRootItem();
-    wxTreeListItem *first = (wxTreeListItem *)GetFirstChild (root, cookie).m_pItem;
-    wxTreeListItem *last = (wxTreeListItem *)GetLastChild (root, cookie).m_pItem;
-    if (!SelectAllChildrenUntilLast (first, last)) {
-        SelectNextChildren (first, last);
-    }
-
-    // send event to user code
-    wxTreeEvent event( wxEVT_COMMAND_TREE_SEL_CHANGED, m_owner->GetId() );
-    m_owner->GetEventHandler()->ProcessEvent (event);
-}
-
-void wxTreeListMainWindow::FillArray (wxTreeListItem *item,
-                                      wxArrayTreeItemIds &array) const {
-    if (item->IsSelected()) array.Add (wxTreeItemId(item));
-
-    if (item->HasChildren()) {
-        wxArrayTreeListItems& children = item->GetChildren();
-        size_t count = children.GetCount();
-        for (size_t n = 0; n < count; ++n) FillArray (children[n], array);
-    }
-}
-
-
-// returns the number of currently selected items
- size_t wxTreeListMainWindow::GetSelectionSize() const
- {
-   return m_selected.GetCount();
- }
-
-size_t wxTreeListMainWindow::GetSelections (wxArrayTreeItemIds &array) const {
-  /* 
-     LG : NOT OK AS IS NOT IN TREE ORDER
-    array.Empty();
-    size_t count = m_selected.GetCount();
-    for (size_t n = 0; n < count; ++n) array.Add(m_selected[n]);
-  */
-    wxTreeItemId idRoot = GetRootItem();
-    if (idRoot.IsOk()) FillArray ((wxTreeListItem*) idRoot.m_pItem, array);
-    return array.Count();
-}
-
-void wxTreeListMainWindow::EnsureVisible (const wxTreeItemId& item) {
-    if (!item.IsOk()) return; // do nothing if no item
-
-    // first expand all parent branches
-    wxTreeListItem *gitem = (wxTreeListItem*) item.m_pItem;
-    wxTreeListItem *parent = gitem->GetItemParent();
-    while (parent) {
-        Expand (parent);
-        parent = parent->GetItemParent();
-    }
-
-    ScrollTo (item);
-    RefreshLine (gitem);
-}
-
-void wxTreeListMainWindow::ScrollTo (const wxTreeItemId &item) {
-    if (!item.IsOk()) return; // do nothing if no item
-
-    // ensure that the position of the item it calculated in any case
-    if (m_dirty) CalculatePositions();
-
-    wxTreeListItem *gitem = (wxTreeListItem*) item.m_pItem;
-
-    // now scroll to the item
-    int item_y = gitem->GetY();
-
-    int xUnit, yUnit;
-    GetScrollPixelsPerUnit (&xUnit, &yUnit);
-    int start_x = 0;
-    int start_y = 0;
-    GetViewStart (&start_x, &start_y);
-    start_y *= yUnit;
-
-    int client_h = 0;
-    int client_w = 0;
-    GetClientSize (&client_w, &client_h);
-
-    int x = 0;
-    int y = 0;
-    m_rootItem->GetSize (x, y, this);
-    x = m_owner->GetHeaderWindow()->GetWidth();
-    y += yUnit + 2; // one more scrollbar unit + 2 pixels
-    int x_pos = GetScrollPos( wxHORIZONTAL );
-
-    if (item_y < start_y+3) {
-        // going down, item should appear at top
-        SetScrollbars (xUnit, yUnit, xUnit ? x/xUnit : 0, yUnit ? y/yUnit : 0, x_pos, yUnit ? item_y/yUnit : 0);
-    }else if (item_y+GetLineHeight(gitem) > start_y+client_h) {
-        // going up, item should appear at bottom
-        item_y += yUnit + 2;
-        SetScrollbars (xUnit, yUnit, xUnit ? x/xUnit : 0, yUnit ? y/yUnit : 0, x_pos, yUnit ? (item_y+GetLineHeight(gitem)-client_h)/yUnit : 0 );
-    }
-}
-
-// FIXME: tree sorting functions are not reentrant and not MT-safe!
-static wxTreeListMainWindow *s_treeBeingSorted = NULL;
-
-static int LINKAGEMODE tree_ctrl_compare_func(wxTreeListItem **item1,
-                                  wxTreeListItem **item2)
-{
-    wxCHECK_MSG (s_treeBeingSorted, 0, _T("bug in wxTreeListMainWindow::SortChildren()") );
-
-    return s_treeBeingSorted->OnCompareItems(*item1, *item2);
-}
-
-int wxTreeListMainWindow::OnCompareItems(const wxTreeItemId& item1,
-                               const wxTreeItemId& item2)
-{
-    return m_owner->OnCompareItems (item1, item2);
-}
-
-void wxTreeListMainWindow::SortChildren (const wxTreeItemId& itemId) {
-    wxCHECK_RET (itemId.IsOk(), _T("invalid tree item"));
-
-    wxTreeListItem *item = (wxTreeListItem*) itemId.m_pItem;
-
-    wxCHECK_RET (!s_treeBeingSorted,
-                 _T("wxTreeListMainWindow::SortChildren is not reentrant") );
-
-    wxArrayTreeListItems& children = item->GetChildren();
-    if ( children.Count() > 1 ) {
-        m_dirty = true;
-        s_treeBeingSorted = this;
-        children.Sort(tree_ctrl_compare_func);
-        s_treeBeingSorted = NULL;
-    }
-}
-
-wxTreeItemId wxTreeListMainWindow::FindItem (const wxTreeItemId& item, const wxString& str, int mode) {
-    wxString itemText;
-    // determine start item
-    wxTreeItemId next = item;
-    if (next.IsOk()) {
-        if (mode & wxTL_MODE_NAV_LEVEL) {
-            next = GetNextSibling (next);
-        }else if (mode & wxTL_MODE_NAV_VISIBLE) { //
-            next = GetNextVisible (next, false);
-        }else if (mode & wxTL_MODE_NAV_EXPANDED) {
-            next = GetNextExpanded (next);
-        }else{ // (mode & wxTL_MODE_NAV_FULLTREE) default
-            next = GetNext (next, true);
-        }
-    }
-
-#if !wxCHECK_VERSION(2, 5, 0)
-    long cookie = 0;
-#else
-    wxTreeItemIdValue cookie = 0;
-#endif
-    if (!next.IsOk()) {
-        next = (wxTreeListItem*)GetRootItem().m_pItem;
-        if (HasFlag(wxTR_HIDE_ROOT)) {
-            next = (wxTreeListItem*)GetFirstChild (GetRootItem().m_pItem, cookie).m_pItem;
-        }
-    }
-    if (!next.IsOk()) return (wxTreeItemId*)NULL;
-
-    // start checking the next items
-    while (next.IsOk() && (next != item)) {
-        if (mode & wxTL_MODE_FIND_PARTIAL) {
-            itemText = GetItemText (next).Mid (0, str.Length());
-        }else{
-            itemText = GetItemText (next);
-        }
-        if (mode & wxTL_MODE_FIND_NOCASE) {
-            if (itemText.CmpNoCase (str) == 0) return next;
-        }else{
-            if (itemText.Cmp (str) == 0) return next;
-        }
-        if (mode & wxTL_MODE_NAV_LEVEL) {
-            next = GetNextSibling (next);
-        }else if (mode & wxTL_MODE_NAV_VISIBLE) { //
-            next = GetNextVisible (next, false);
-        }else if (mode & wxTL_MODE_NAV_EXPANDED) {
-            next = GetNextExpanded (next);
-        }else{ // (mode & wxTL_MODE_NAV_FULLTREE) default
-            next = GetNext (next, true);
-        }
-        if (!next.IsOk() && item.IsOk()) {
-            next = (wxTreeListItem*)GetRootItem().m_pItem;
-            if (HasFlag(wxTR_HIDE_ROOT)) {
-                next = (wxTreeListItem*)GetNextChild (GetRootItem().m_pItem, cookie).m_pItem;
-            }
-        }
-    }
-    return (wxTreeItemId*)NULL;
-}
-
-void wxTreeListMainWindow::SetDragItem (const wxTreeItemId& item) {
-    wxTreeListItem *prevItem = m_dragItem;
-    m_dragItem = (wxTreeListItem*) item.m_pItem;
-    if (prevItem) RefreshLine (prevItem);
-    if (m_dragItem) RefreshLine (m_dragItem);
-}
-
-void wxTreeListMainWindow::CalculateLineHeight() {
-    wxClientDC dc (this);
-    dc.SetFont (m_normalFont);
-    m_lineHeight = (int)(dc.GetCharHeight() + m_linespacing);
-
-    if (m_imageListNormal) {
-        // Calculate a m_lineHeight value from the normal Image sizes.
-        // May be toggle off. Then wxTreeListMainWindow will spread when
-        // necessary (which might look ugly).
-        int n = m_imageListNormal->GetImageCount();
-        for (int i = 0; i < n ; i++) {
-            int width = 0, height = 0;
-            m_imageListNormal->GetSize(i, width, height);
-            if (height > m_lineHeight) m_lineHeight = height + m_linespacing;
-        }
-    }
-
-    if (m_imageListButtons) {
-        // Calculate a m_lineHeight value from the Button image sizes.
-        // May be toggle off. Then wxTreeListMainWindow will spread when
-        // necessary (which might look ugly).
-        int n = m_imageListButtons->GetImageCount();
-        for (int i = 0; i < n ; i++) {
-            int width = 0, height = 0;
-            m_imageListButtons->GetSize(i, width, height);
-            if (height > m_lineHeight) m_lineHeight = height + m_linespacing;
-        }
-    }
-
-    if (m_lineHeight < 30) { // add 10% space if greater than 30 pixels
-        m_lineHeight += 2; // minimal 2 pixel space
-    }else{
-        m_lineHeight += m_lineHeight / 10; // otherwise 10% space
-    }
-}
-
-void wxTreeListMainWindow::SetImageList (wxImageList *imageList) {
-    if (m_ownsImageListNormal) delete m_imageListNormal;
-    m_imageListNormal = imageList;
-    m_ownsImageListNormal = false;
-    m_dirty = true;
-    CalculateLineHeight();
-}
-
-void wxTreeListMainWindow::SetStateImageList (wxImageList *imageList) {
-    if (m_ownsImageListState) delete m_imageListState;
-    m_imageListState = imageList;
-    m_ownsImageListState = false;
-}
-
-void wxTreeListMainWindow::SetButtonsImageList (wxImageList *imageList) {
-    if (m_ownsImageListButtons) delete m_imageListButtons;
-    m_imageListButtons = imageList;
-    m_ownsImageListButtons = false;
-    m_dirty = true;
-    CalculateLineHeight();
-}
-
-void wxTreeListMainWindow::AssignImageList (wxImageList *imageList) {
-    SetImageList(imageList);
-    m_ownsImageListNormal = true;
-}
-
-void wxTreeListMainWindow::AssignStateImageList (wxImageList *imageList) {
-    SetStateImageList(imageList);
-    m_ownsImageListState = true;
-}
-
-void wxTreeListMainWindow::AssignButtonsImageList (wxImageList *imageList) {
-    SetButtonsImageList(imageList);
-    m_ownsImageListButtons = true;
-}
-
-// ----------------------------------------------------------------------------
-// helpers
-// ----------------------------------------------------------------------------
-
-void wxTreeListMainWindow::AdjustMyScrollbars() {
-    if (m_rootItem) {
-        int xUnit, yUnit;
-        GetScrollPixelsPerUnit (&xUnit, &yUnit);
-        if (xUnit == 0) xUnit = GetCharWidth();
-        if (yUnit == 0) yUnit = m_lineHeight;
-        int x = 0, y = 0;
-        m_rootItem->GetSize (x, y, this);
-        y += yUnit + 2; // one more scrollbar unit + 2 pixels
-        int x_pos = GetScrollPos (wxHORIZONTAL);
-        int y_pos = GetScrollPos (wxVERTICAL);
-        x = m_owner->GetHeaderWindow()->GetWidth() + 2;
-        if (x < GetClientSize().GetWidth()) x_pos = 0;
-        SetScrollbars (xUnit, yUnit, x/xUnit, y/yUnit, x_pos, y_pos);
-    }else{
-        SetScrollbars (0, 0, 0, 0);
-    }
-}
-
-int wxTreeListMainWindow::GetLineHeight (wxTreeListItem *item) const {
-    if (GetWindowStyleFlag() & wxTR_HAS_VARIABLE_ROW_HEIGHT) {
-        return item->GetHeight();
-    }else{
-        return m_lineHeight;
-    }
-}
-
-void wxTreeListMainWindow::PaintItem (wxTreeListItem *item, wxDC& dc) {
-
-    wxTreeItemAttr *attr = item->GetAttributes();
-
-    dc.SetFont (GetItemFont (item));
-
-    wxColour colText;
-    if (attr && attr->HasTextColour()) {
-        colText = attr->GetTextColour();
-    }else{
-        colText = GetForegroundColour();
-    }
-#if !wxCHECK_VERSION(2, 5, 0)
-    wxColour colTextHilight = wxSystemSettings::GetSystemColour (wxSYS_COLOUR_HIGHLIGHTTEXT);
-#else
-    wxColour colTextHilight = wxSystemSettings::GetColour (wxSYS_COLOUR_HIGHLIGHTTEXT);
-#endif
-
-    int total_w = m_owner->GetHeaderWindow()->GetWidth();
-    int total_h = GetLineHeight(item);
-    int off_h = HasFlag(wxTR_ROW_LINES) ? 1 : 0;
-    //    std::cout << "off_h="<<off_h<<std::endl;
-
-    wxDCClipper clipper (dc, 0, item->GetY(), total_w, total_h); // only within line
-
-    int text_w = 0, text_h = 0;
-    dc.GetTextExtent( item->GetText(GetMainColumn()), &text_w, &text_h );
-
-    // determine background and show it
-    wxColour colBg;
-    if (attr && attr->HasBackgroundColour()) {
-        colBg = attr->GetBackgroundColour();
-    }else{
-        colBg = m_backgroundColour;
-    }
-    dc.SetBrush (wxBrush (colBg, wxSOLID));
-    dc.SetPen (*wxTRANSPARENT_PEN);
-    if (HasFlag (wxTR_FULL_ROW_HIGHLIGHT)) {
-        if (item == m_dragItem) {
-            dc.SetBrush (*m_hilightBrush);
-#ifndef __WXMAC__ // don't draw rect outline if we already have the background color
-            dc.SetPen ((item == m_dragItem)? *wxBLACK_PEN: *wxTRANSPARENT_PEN);
-#endif // !__WXMAC__
-            dc.SetTextForeground (colTextHilight);
-        }else if (item->IsSelected()) {
-            if (!m_isDragging && m_hasFocus) {
-                dc.SetBrush (*m_hilightBrush);
-#ifndef __WXMAC__ // don't draw rect outline if we already have the background color
-               // LG : dc.SetPen (*wxBLACK_PEN);
-               dc.SetPen (*wxTRANSPARENT_PEN);
-#endif // !__WXMAC__
-            }else{
-                dc.SetBrush (*m_hilightUnfocusedBrush);
-#ifndef __WXMAC__ // don't draw rect outline if we already have the background color
-               dc.SetPen (*wxTRANSPARENT_PEN);
-#endif // !__WXMAC__
-            }
-            dc.SetTextForeground (colTextHilight);
-        }
-       // LG
-       else if (item == m_curItem) {
-         dc.SetPen (m_hasFocus? *wxBLACK_PEN: *wxTRANSPARENT_PEN);
-       }
-       else{
-            dc.SetTextForeground (colText);
-        }
-       // LG 
-       dc.DrawRectangle (0, item->GetY() + off_h, total_w, total_h - off_h);
-    }else{
-        dc.SetTextForeground (colText);
-    }
-
-    int text_extraH = (total_h > text_h) ? (total_h - text_h)/2 : 0;
-    int img_extraH = (total_h > m_imgHeight)? (total_h-m_imgHeight)/2: 0;
-    int x_colstart = 0;
-    for (int i = 0; i < GetColumnCount(); ++i ) {
-        if (!m_owner->GetHeaderWindow()->IsColumnShown(i)) continue;
-
-        int col_w = m_owner->GetHeaderWindow()->GetColumnWidth(i);
-        wxDCClipper clipper (dc, x_colstart, item->GetY(), col_w, total_h); // only within column
-
-        int x = 0;
-        int image = NO_IMAGE;
-        int image_w = 0;
-        if(i == GetMainColumn()) {
-            x = item->GetX() + MARGIN;
-            if (HasButtons()) {
-                x += (m_btnWidth-m_btnWidth2) + LINEATROOT;
-            }else{
-                x -= m_indent/2;
-            }
-            if (m_imageListNormal) image = item->GetCurrentImage();
-        }else{
-            x = x_colstart + MARGIN;
-            image = item->GetImage(i);
-        }
-        if (image != NO_IMAGE) image_w = m_imgWidth + MARGIN;
-
-        // honor text alignment
-        wxString text = item->GetText(i);
-        int w = 0;
-        switch ( m_owner->GetHeaderWindow()->GetColumn(i).GetAlignment() ) {
-        case wxALIGN_LEFT:
-            // nothing to do, already left aligned
-            break;
-        case wxALIGN_RIGHT:
-            dc.GetTextExtent (text, &text_w, NULL);
-            w = col_w - (image_w + text_w + MARGIN);
-            x += (w > 0)? w: 0;
-            break;
-        case wxALIGN_CENTER:
-            dc.GetTextExtent(text, &text_w, NULL);
-            w = (col_w - (image_w + text_w + MARGIN))/2;
-            x += (w > 0)? w: 0;
-            break;
-        }
-        int text_x = x + image_w;
-        if (i == GetMainColumn()) item->SetTextX (text_x);
-
-        if (!HasFlag (wxTR_FULL_ROW_HIGHLIGHT)) {
-            if (i == GetMainColumn()) {
-                if (item == m_dragItem) {
-                    dc.SetBrush (*m_hilightBrush);
-#ifndef __WXMAC__ // don't draw rect outline if we already have the background color
-                    dc.SetPen ((item == m_dragItem)? *wxBLACK_PEN: *wxTRANSPARENT_PEN);
-#endif // !__WXMAC__
-                    dc.SetTextForeground (colTextHilight);
-                }else if (item->IsSelected()) {
-                    if (!m_isDragging && m_hasFocus) {
-                        dc.SetBrush (*m_hilightBrush);
-#ifndef __WXMAC__ // don't draw rect outline if we already have the background color
-                        dc.SetPen (*wxBLACK_PEN);
-#endif // !__WXMAC__
-                    }else{
-                        dc.SetBrush (*m_hilightUnfocusedBrush);
-#ifndef __WXMAC__ // don't draw rect outline if we already have the background color
-                      dc.SetPen (*wxTRANSPARENT_PEN);
-#endif // !__WXMAC__
-                    }
-                    dc.SetTextForeground (colTextHilight);
-                }
-               // LG 
-               else if (item == m_curItem) {
-                 dc.SetPen (m_hasFocus? *wxBLACK_PEN: *wxTRANSPARENT_PEN);
-               }
-               else{
-                 dc.SetTextForeground (colText);
-                }
-               dc.DrawRectangle (text_x, item->GetY() + off_h, text_w, total_h - off_h);
-            }else{
-                dc.SetTextForeground (colText);
-            }
-        }
-
-        dc.SetBackgroundMode (wxTRANSPARENT);
-
-        if (image != NO_IMAGE) {
-            int y = item->GetY() + img_extraH;
-            m_imageListNormal->Draw (image, dc, x, y, wxIMAGELIST_DRAW_TRANSPARENT );
-        }
-        int text_y = item->GetY() + text_extraH;
-        dc.DrawText (text, (wxCoord)text_x, (wxCoord)text_y);
-
-        x_colstart += col_w;
-    }
-
-    // restore normal font
-    dc.SetFont( m_normalFont );
-}
-
-// Now y stands for the top of the item, whereas it used to stand for middle !
-void wxTreeListMainWindow::PaintLevel (wxTreeListItem *item, wxDC &dc,
-                                       int level, int &y, int x_maincol) {
-
-    // Handle hide root (only level 0)
-  // LG : test
-  //  int nth = 2;
-  //if (HasFlag(wxTR_HIDE_ROOT) && (level < nth)) {  
-  if (HasFlag(wxTR_HIDE_ROOT) && (level == 0)) {
-  
-        wxArrayTreeListItems& children = item->GetChildren();
-        for (size_t n = 0; n < children.Count(); n++) {
-            PaintLevel (children[n], dc, 1, y, x_maincol);
-        }
-        // end after expanding root
-        return;
-    }
-
-    // calculate position of vertical lines
-    int x = x_maincol + MARGIN; // start of column
-    if (HasFlag(wxTR_LINES_AT_ROOT)) x += LINEATROOT; // space for lines at root
-    if (HasButtons()) {
-        x += (m_btnWidth-m_btnWidth2); // half button space
-    }else{
-        x += (m_indent-m_indent/2);
-    }
-    if (HasFlag(wxTR_HIDE_ROOT)) {
-      // LG 
-      //        x += m_indent * (level-nth); // indent but not level 1
-      x += m_indent * (level-1); // indent but not level 1
-
-    }else{
-        x += m_indent * level; // indent according to level
-    }
-
-    // set position of vertical line
-    item->SetX (x);
-    item->SetY (y);
-
-    int h = GetLineHeight (item);
-    int y_top = y;
-    int y_mid = y_top + (h/2);
-    y += h;
-
-    int exposed_x = dc.LogicalToDeviceX(0);
-    int exposed_y = dc.LogicalToDeviceY(y_top);
-
-    if (IsExposed(exposed_x, exposed_y, 10000, h)) { // 10000 = very much
-
-        if (HasFlag(wxTR_ROW_LINES)) { // horizontal lines between rows
-            //dc.DestroyClippingRegion();
-            int total_width = m_owner->GetHeaderWindow()->GetWidth();
-            // if the background colour is white, choose a
-            // contrasting color for the lines
-            dc.SetPen (*((GetBackgroundColour() == *wxWHITE)?
-                        wxMEDIUM_GREY_PEN : wxWHITE_PEN));
-            dc.DrawLine(0, y_top, total_width, y_top);
-            dc.DrawLine(0, y_top+h, total_width, y_top+h);
-        }
-
-        // draw item
-        PaintItem (item, dc);
-
-        // restore DC objects
-        dc.SetBrush(*wxWHITE_BRUSH);
-        dc.SetPen(m_dottedPen);
-
-        // clip to the column width
-        int clip_width = m_owner->GetHeaderWindow()->
-                            GetColumn(m_main_column).GetWidth();
-        wxDCClipper clipper(dc, x_maincol, y_top, clip_width, 10000);
-
-        if (!HasFlag(wxTR_NO_LINES)) { // connection lines
-
-            // draw the horizontal line here
-            dc.SetPen(m_dottedPen);
-            int x2 = x - m_indent;
-            if (x2 < (x_maincol + MARGIN)) x2 = x_maincol + MARGIN;
-            int x3 = x + (m_btnWidth-m_btnWidth2);
-            if (HasButtons()) {
-                if (item->HasPlus()) {
-                    dc.DrawLine (x2, y_mid, x - m_btnWidth2, y_mid);
-                    dc.DrawLine (x3, y_mid, x3 + LINEATROOT, y_mid);
-                }else{
-                    dc.DrawLine (x2, y_mid, x3 + LINEATROOT, y_mid);
-                }
-            }else{
-                dc.DrawLine (x2, y_mid, x - m_indent/2, y_mid);
-            }
-        }
-
-        if (item->HasPlus() && HasButtons()) { // should the item show a button?
-
-            if (m_imageListButtons) {
-
-                // draw the image button here
-                int image = wxTreeItemIcon_Normal;
-                if (item->IsExpanded()) image = wxTreeItemIcon_Expanded;
-                if (item->IsSelected()) image += wxTreeItemIcon_Selected - wxTreeItemIcon_Normal;
-                int xx = x - m_btnWidth2 + MARGIN;
-                int yy = y_mid - m_btnHeight2;
-                dc.SetClippingRegion(xx, yy, m_btnWidth, m_btnHeight);
-                m_imageListButtons->Draw (image, dc, xx, yy, wxIMAGELIST_DRAW_TRANSPARENT);
-                dc.DestroyClippingRegion();
-
-            }else if (HasFlag (wxTR_TWIST_BUTTONS)) {
-
-                // draw the twisty button here
-                dc.SetPen(*wxBLACK_PEN);
-                dc.SetBrush(*m_hilightBrush);
-                wxPoint button[3];
-                if (item->IsExpanded()) {
-                    button[0].x = x - (m_btnWidth2+1);
-                    button[0].y = y_mid - (m_btnHeight/3);
-                    button[1].x = x + (m_btnWidth2+1);
-                    button[1].y = button[0].y;
-                    button[2].x = x;
-                    button[2].y = button[0].y + (m_btnHeight2+1);
-                }else{
-                    button[0].x = x - (m_btnWidth/3);
-                    button[0].y = y_mid - (m_btnHeight2+1);
-                    button[1].x = button[0].x;
-                    button[1].y = y_mid + (m_btnHeight2+1);
-                    button[2].x = button[0].x + (m_btnWidth2+1);
-                    button[2].y = y_mid;
-                }
-                dc.DrawPolygon(3, button);
-
-            }else{ // if (HasFlag(wxTR_HAS_BUTTONS))
-
-                // draw the plus sign here
-                dc.SetPen(*wxGREY_PEN);
-                dc.SetBrush(*wxWHITE_BRUSH);
-                dc.DrawRectangle (x-m_btnWidth2, y_mid-m_btnHeight2, m_btnWidth, m_btnHeight);
-                dc.SetPen(*wxBLACK_PEN);
-                dc.DrawLine (x-(m_btnWidth2-2), y_mid, x+(m_btnWidth2-1), y_mid);
-                if (!item->IsExpanded()) { // change "-" to "+"
-                    dc.DrawLine (x, y_mid-(m_btnHeight2-2), x, y_mid+(m_btnHeight2-1));
-                }
-
-            }
-
-        }
-
-    }
-
-    // restore DC objects
-    dc.SetBrush(*wxWHITE_BRUSH);
-    dc.SetPen(m_dottedPen);
-    dc.SetTextForeground(*wxBLACK);
-
-    if (item->IsExpanded())
-    {
-        wxArrayTreeListItems& children = item->GetChildren();
-
-        // clip to the column width
-        int clip_width = m_owner->GetHeaderWindow()->
-                            GetColumn(m_main_column).GetWidth();
-
-        // process lower levels
-        int oldY;
-        if (m_imgWidth > 0) {
-            oldY = y_mid + m_imgHeight2;
-        }else{
-            oldY = y_mid + h/2;
-        }
-        int y2;
-        for (size_t n = 0; n < children.Count(); ++n) {
-
-            y2 = y + h/2;
-            PaintLevel (children[n], dc, level+1, y, x_maincol);
-
-            // draw vertical line
-            wxDCClipper clipper(dc, x_maincol, y_top, clip_width, 10000);
-            if (!HasFlag (wxTR_NO_LINES)) {
-                x = item->GetX();
-                dc.DrawLine (x, oldY, x, y2);
-                oldY = y2;
-            }
-        }
-    }
-}
-
-
-// ----------------------------------------------------------------------------
-// wxWindows callbacks
-// ----------------------------------------------------------------------------
-
-void wxTreeListMainWindow::OnPaint (wxPaintEvent &WXUNUSED(event)) {
-
-    wxPaintDC dc (this);
-    PrepareDC (dc);
-
-    if (!m_rootItem || (GetColumnCount() <= 0)) return;
-
-    // calculate button size
-    if (m_imageListButtons) {
-        m_imageListButtons->GetSize (0, m_btnWidth, m_btnHeight);
-    }else if (HasButtons()) {
-        m_btnWidth = BTNWIDTH;
-        m_btnHeight = BTNHEIGHT;
-    }
-    m_btnWidth2 = m_btnWidth/2;
-    m_btnHeight2 = m_btnHeight/2;
-
-    // calculate image size
-    if (m_imageListNormal) {
-        m_imageListNormal->GetSize (0, m_imgWidth, m_imgHeight);
-    }
-    m_imgWidth2 = m_imgWidth/2;
-    m_imgHeight2 = m_imgHeight/2;
-
-    // calculate indent size
-    if (m_imageListButtons) {
-        m_indent = wxMax (MININDENT, m_btnWidth + MARGIN);
-    }else if (HasButtons()) {
-        m_indent = wxMax (MININDENT, m_btnWidth + LINEATROOT);
-    }
-
-    // set default values
-    dc.SetFont( m_normalFont );
-    dc.SetPen( m_dottedPen );
-
-    // calculate column start and paint
-    int x_maincol = 0;
-    int i = 0;
-    for (i = 0; i < (int)GetMainColumn(); ++i) {
-        if (!m_owner->GetHeaderWindow()->IsColumnShown(i)) continue;
-        x_maincol += m_owner->GetHeaderWindow()->GetColumnWidth (i);
-    }
-    int y = 0;
-    PaintLevel (m_rootItem, dc, 0, y, x_maincol);
-}
-
-void wxTreeListMainWindow::OnSetFocus (wxFocusEvent &event) {
-
-    m_hasFocus = true;
-    RefreshSelected();
-    if (m_curItem) RefreshLine (m_curItem);
-    event.Skip();
-}
-
-void wxTreeListMainWindow::OnKillFocus( wxFocusEvent &event )
-{
-    m_hasFocus = false;
-    RefreshSelected();
-    if (m_curItem) RefreshLine (m_curItem);
-    event.Skip();
-}
-
-void wxTreeListMainWindow::OnChar (wxKeyEvent &event) {
-    // send event to user code
-    wxTreeEvent nevent (wxEVT_COMMAND_TREE_KEY_DOWN, m_owner->GetId());
-    nevent.SetKeyEvent (event);
-    nevent.SetEventObject (m_owner);
-    if (m_owner->GetEventHandler()->ProcessEvent (nevent)) return; // handled in user code
-
-    // determine first current if none
-    bool curItemSet = false;
-    if (!m_curItem) {
-        m_curItem = (wxTreeListItem*)GetRootItem().m_pItem;
-        if (HasFlag(wxTR_HIDE_ROOT)) {
-#if !wxCHECK_VERSION(2, 5, 0)
-            long cookie = 0;
-#else
-            wxTreeItemIdValue cookie = 0;
-#endif
-            m_curItem = (wxTreeListItem*)GetFirstChild (m_curItem, cookie).m_pItem;
-        }
-        curItemSet = true;
-    }
-    if (!m_curItem) return; // do nothing if empty tree
-
-    // remember item at shift down
-    if (HasFlag(wxTR_MULTIPLE) && event.ShiftDown()) {
-        if (!m_shiftItem) m_shiftItem = m_curItem;
-    }else{
-        m_shiftItem = (wxTreeListItem*)NULL;
-    }
-
-    // process all cases
-    wxTreeItemId newItem = (wxTreeItemId*)NULL;
-    switch (event.GetKeyCode()) {
-
-        // '+': Expand subtree
-        case '+':
-        case WXK_ADD: {
-            if (m_curItem->HasPlus() && !IsExpanded (m_curItem)) Expand (m_curItem);
-        }break;
-
-        // '-': collapse subtree
-        case '-':
-        case WXK_SUBTRACT: {
-            if (m_curItem->HasPlus() && IsExpanded (m_curItem)) Collapse (m_curItem);
-        }break;
-
-        // '*': expand/collapse all subtrees // TODO: Mak it more useful
-        case '*':
-        case WXK_MULTIPLY: {
-            if (m_curItem->HasPlus() && !IsExpanded (m_curItem)) {
-                ExpandAll (m_curItem);
-            }else if (m_curItem->HasPlus()) {
-                Collapse (m_curItem); // TODO: CollapseAll
-            }
-        }break;
-
-        // ' ': toggle current item
-        case ' ': {
-            SelectItem (m_curItem, (wxTreeListItem*)NULL, false);
-        }break;
-
-        // <RETURN>: activate current item
-        case WXK_RETURN: {
-            wxTreeEvent aevent (wxEVT_COMMAND_TREE_ITEM_ACTIVATED, m_owner->GetId());
-#if !wxCHECK_VERSION(2, 5, 0)
-            aevent.SetItem ((long)m_curItem);
-#else
-            aevent.SetItem (m_curItem);
-#endif
-            aevent.SetEventObject (m_owner);
-            m_owner->GetEventHandler()->ProcessEvent (aevent);
-        }break;
-
-        // <BKSP>: go to the parent without collapsing
-        case WXK_BACK: {
-            newItem = GetItemParent (m_curItem);
-            if ((newItem == GetRootItem()) && HasFlag(wxTR_HIDE_ROOT)) {
-                newItem = GetPrevSibling (m_curItem); // get sibling instead of root
-            }
-        }break;
-
-        // <UP>: go to the previous sibling or to the last of its children, to the parent
-        case WXK_UP: {
-            newItem = GetPrevSibling (m_curItem);
-            if (newItem) {
-#if !wxCHECK_VERSION(2, 5, 0)
-                long cookie = 0;
-#else
-                wxTreeItemIdValue cookie = 0;
-#endif
-                while (IsExpanded (newItem) && HasChildren (newItem)) {
-                    newItem = GetLastChild (newItem, cookie);
-                }
-            }else {
-                newItem = GetItemParent (m_curItem);
-                if ((newItem == GetRootItem()) && HasFlag(wxTR_HIDE_ROOT)) {
-                    newItem = (wxTreeItemId*)NULL; // don't go to root if it is hidden
-                }
-            }
-        }break;
-
-        // <LEFT>: if expanded collapse subtree, else go to the parent
-        case WXK_LEFT: {
-            if (IsExpanded (m_curItem)) {
-                Collapse (m_curItem);
-            }else{
-                newItem = GetItemParent (m_curItem);
-                if ((newItem == GetRootItem()) && HasFlag(wxTR_HIDE_ROOT)) {
-                    newItem = GetPrevSibling (m_curItem); // go to sibling if it is hidden
-                }
-            }
-        }break;
-
-        // <RIGHT>: if possible expand subtree, else go go to the first child
-        case WXK_RIGHT: {
-            if (m_curItem->HasPlus() && !IsExpanded (m_curItem)) {
-                Expand (m_curItem);
-            }else{
-                if (IsExpanded (m_curItem) && HasChildren (m_curItem)) {
-#if !wxCHECK_VERSION(2, 5, 0)
-                    long cookie = 0;
-#else
-                    wxTreeItemIdValue cookie = 0;
-#endif
-                    newItem = GetFirstChild (m_curItem, cookie);
-                }
-            }
-        }break;
-
-        // <DOWN>: if expanded go to the first child, else to the next sibling, ect
-        case WXK_DOWN: {
-            if (curItemSet) {
-                newItem = m_curItem;
-            }else{
-                if (IsExpanded (m_curItem) && HasChildren (m_curItem)) {
-#if !wxCHECK_VERSION(2, 5, 0)
-                    long cookie = 0;
-#else
-                    wxTreeItemIdValue cookie = 0;
-#endif
-                    newItem = GetFirstChild( m_curItem, cookie );
-                }
-                if (!newItem) {
-                    wxTreeItemId parent = m_curItem;
-                    do {
-                        newItem = GetNextSibling (parent);
-                        parent = GetItemParent (parent);
-                    } while (!newItem && parent);
-                }
-            }
-        }break;
-
-        // <END>: go to last item of the root
-        case WXK_END: {
-#if !wxCHECK_VERSION(2, 5, 0)
-            long cookie = 0;
-#else
-            wxTreeItemIdValue cookie = 0;
-#endif
-            newItem = GetLastChild (GetRootItem(), cookie);
-        }break;
-
-        // <HOME>: go to root
-        case WXK_HOME: {
-            newItem = GetRootItem();
-            if (HasFlag(wxTR_HIDE_ROOT)) {
-#if !wxCHECK_VERSION(2, 5, 0)
-                long cookie = 0;
-#else
-                wxTreeItemIdValue cookie = 0;
-#endif
-                newItem = GetFirstChild (newItem, cookie);
-            }
-        }break;
-
-        // any char: go to the next matching string
-        default:
-            if (event.GetKeyCode() >= (int)' ') {
-                if (!m_findTimer->IsRunning()) m_findStr.Clear();
-                m_findStr.Append (event.GetKeyCode());
-                m_findTimer->Start (FIND_TIMER_TICKS, wxTIMER_ONE_SHOT);
-                wxTreeItemId prev = m_curItem? (wxTreeItemId*)m_curItem: (wxTreeItemId*)NULL;
-                while (true) {
-                    newItem = FindItem (prev, m_findStr, wxTL_MODE_NAV_EXPANDED |
-                                                         wxTL_MODE_FIND_PARTIAL |
-                                                         wxTL_MODE_FIND_NOCASE);
-                    if (newItem || (m_findStr.Length() <= 1)) break;
-                    m_findStr.RemoveLast();
-                };
-            }
-            event.Skip();
-
-    }
-
-    // select and show the new item
-    if (newItem) {
-        if (!event.ControlDown()) {
-            bool unselect_others = !((event.ShiftDown() || event.ControlDown()) &&
-                                      HasFlag(wxTR_MULTIPLE));
-            SelectItem (newItem, m_shiftItem, unselect_others);
-        }
-        EnsureVisible (newItem);
-        wxTreeListItem *oldItem = m_curItem;
-        m_curItem = (wxTreeListItem*)newItem.m_pItem; // make the new item the current item
-        RefreshLine (oldItem);
-    }
-
-}
-
-wxTreeItemId wxTreeListMainWindow::HitTest (const wxPoint& point, int& flags, int& column) {
-
-    int w, h;
-    GetSize(&w, &h);
-    flags=0;
-    column = -1;
-    if (point.x<0) flags |= wxTREE_HITTEST_TOLEFT;
-    if (point.x>w) flags |= wxTREE_HITTEST_TORIGHT;
-    if (point.y<0) flags |= wxTREE_HITTEST_ABOVE;
-    if (point.y>h) flags |= wxTREE_HITTEST_BELOW;
-    if (flags) return wxTreeItemId();
-
-    if (!m_rootItem) {
-        flags = wxTREE_HITTEST_NOWHERE;
-        column = -1;
-        return wxTreeItemId();
-    }
-
-    wxTreeListItem *hit = m_rootItem->HitTest (CalcUnscrolledPosition(point),
-                                               this, flags, column, 0);
-    if (!hit) {
-        flags = wxTREE_HITTEST_NOWHERE;
-        column = -1;
-        return wxTreeItemId();
-    }
-    return hit;
-}
-
-// get the bounding rectangle of the item (or of its label only)
-bool wxTreeListMainWindow::GetBoundingRect (const wxTreeItemId& itemId, wxRect& rect,
-                                            bool WXUNUSED(textOnly)) const {
-    wxCHECK_MSG (itemId.IsOk(), false, _T("invalid item in wxTreeListMainWindow::GetBoundingRect") );
-
-    wxTreeListItem *item = (wxTreeListItem*) itemId.m_pItem;
-
-    int xUnit, yUnit;
-    GetScrollPixelsPerUnit (&xUnit, &yUnit);
-    int startX, startY;
-    GetViewStart(& startX, & startY);
-
-    rect.x = item->GetX() - startX * xUnit;
-    rect.y = item->GetY() - startY * yUnit;
-    rect.width = item->GetWidth();
-    rect.height = GetLineHeight (item);
-
-    return true;
-}
-
-/* **** */
-
-void wxTreeListMainWindow::EditLabel (const wxTreeItemId& item, int column) {
-    if (!item.IsOk()) return;
-    if (!((column >= 0) && (column < GetColumnCount()))) return;
-
-    m_editItem = (wxTreeListItem*) item.m_pItem;
-
-    wxTreeEvent te( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, m_owner->GetId() );
-#if !wxCHECK_VERSION(2, 5, 0)
-    te.SetItem ((long)m_editItem);
-#else
-    te.SetItem (m_editItem);
-#endif
-    te.SetInt (column);
-    te.SetEventObject (m_owner );
-    m_owner->GetEventHandler()->ProcessEvent (te);
-
-    if (!te.IsAllowed()) return;
-
-    // ensure that the position of the item it calculated in any case
-    if (m_dirty) CalculatePositions();
-
-    wxTreeListHeaderWindow* header_win = m_owner->GetHeaderWindow();
-    int x = 0;
-    int y = m_editItem->GetY() + 1; // wxTextCtrl needs 1 pixels above the text
-    int w = 0;
-    int h = m_editItem->GetHeight();
-    long style = 0;
-    if (column == GetMainColumn()) {
-        x += m_editItem->GetTextX() - 2; // wxTextCtrl needs 2 pixels before the text
-        w = wxMin (m_editItem->GetWidth(), m_owner->GetHeaderWindow()->GetWidth() - x);
-    }else{
-        for (int i = 0; i < column; ++i) x += header_win->GetColumnWidth (i); // start of column
-        switch (header_win->GetColumnAlignment (column)) {
-            case wxALIGN_LEFT: {style = wxTE_LEFT; break;}
-            case wxALIGN_RIGHT: {style = wxTE_RIGHT; break;}
-            case wxALIGN_CENTER: {style = wxTE_CENTER; break;}
-        }
-        w = header_win->GetColumnWidth (column); // width of column
-    }
-
-    wxClientDC dc (this);
-    PrepareDC (dc);
-    x = dc.LogicalToDeviceX (x);
-    y = dc.LogicalToDeviceY (y);
-
-    wxEditTextCtrl *text = new wxEditTextCtrl (this, -1, &m_renameAccept, &m_renameRes,
-                                               this, m_editItem->GetText (column),
-                                               wxPoint (x, y), wxSize (w, h), style);
-    text->SetFocus();
-}
-
-void wxTreeListMainWindow::OnRenameTimer() {
-    EditLabel (m_curItem, m_curColumn);
-}
-
-void wxTreeListMainWindow::OnRenameAccept() {
-
-    // TODO if the validator fails this causes a crash
-    wxTreeEvent le( wxEVT_COMMAND_TREE_END_LABEL_EDIT, m_owner->GetId() );
-#if !wxCHECK_VERSION(2, 5, 0)
-    le.SetItem((long)m_editItem);
-#else
-    le.SetItem(m_editItem);
-#endif
-    le.SetEventObject( /*this*/m_owner );
-    le.SetLabel( m_renameRes );
-    m_owner->GetEventHandler()->ProcessEvent( le );
-
-    if (!le.IsAllowed()) return;
-
-    SetItemText (m_editItem, m_curColumn, m_renameRes);
-}
-
-void wxTreeListMainWindow::OnMouse (wxMouseEvent &event) {
-    if (!m_rootItem) return;
-
-    // we process left mouse up event (enables in-place edit), right down
-    // (pass to the user code), left dbl click (activate item) and
-    // dragging/moving events for items drag-and-drop
-    if (!(event.LeftDown() ||
-          event.LeftUp() ||
-          event.RightDown() ||
-          event.RightUp() ||
-          event.LeftDClick() ||
-          event.Dragging() ||
-          (event.GetWheelRotation() != 0 )/*? TODO ||
-          event.Moving()?*/)) {
-        m_owner->GetEventHandler()->ProcessEvent (event);
-        return;
-    }
-
-    // set focus if window clicked
-    if (event.LeftDown() || event.RightDown()) SetFocus();
-
-    // determine event
-    wxPoint p = wxPoint (event.GetX(), event.GetY());
-    int flags = 0;
-    wxTreeListItem *item = m_rootItem->HitTest (CalcUnscrolledPosition (p),
-                                                this, flags, m_curColumn, 0);
-
-    // we only process dragging here
-    if (event.Dragging()){
-        if (m_isDragging) return; // nothing to do, already done
-        if (item == NULL) return; // we need an item to dragging
-
-        // determine drag start
-        if (m_dragCount == 0) {
-            m_dragTimer->Start (DRAG_TIMER_TICKS, wxTIMER_ONE_SHOT);
-        }
-        m_dragCount++;
-        if (m_dragCount < 3) return; // minimum drag 3 pixel
-        if (m_dragTimer->IsRunning()) return;
-
-        // we're going to drag
-        m_dragCount = 0;
-        m_isDragging = true;
-        CaptureMouse();
-        RefreshSelected();
-
-        // send drag start event
-        wxEventType command = event.LeftIsDown()
-                              ? wxEVT_COMMAND_TREE_BEGIN_DRAG
-                              : wxEVT_COMMAND_TREE_BEGIN_RDRAG;
-        wxTreeEvent nevent (command, m_owner->GetId());
-        nevent.SetEventObject (m_owner);
-#if !wxCHECK_VERSION(2, 5, 0)
-        nevent.SetItem ((long)item); // the item the drag is ended
-#else
-        nevent.SetItem (item); // the item the drag is ended
-#endif
-        nevent.Veto(); // dragging must be explicit allowed!
-        m_owner->GetEventHandler()->ProcessEvent (nevent);
-
-    }else if (m_isDragging) { // any other event but not event.Dragging()
-
-        // end dragging
-        m_dragCount = 0;
-        m_isDragging = false;
-        if (HasCapture()) ReleaseMouse();
-        RefreshSelected();
-
-        // send drag end event event
-        wxTreeEvent nevent (wxEVT_COMMAND_TREE_END_DRAG, m_owner->GetId());
-        nevent.SetEventObject (m_owner);
-#if !wxCHECK_VERSION(2, 5, 0)
-        nevent.SetItem ((long)item); // the item the drag is started
-#else
-        nevent.SetItem (item); // the item the drag is started
-#endif
-        nevent.SetPoint (p);
-        m_owner->GetEventHandler()->ProcessEvent (nevent);
-
-    }else if (m_dragCount > 0) { // just in case dragging is initiated
-
-        // end dragging
-        m_dragCount = 0;
-
-    }
-
-    // we process only the messages which happen on tree items
-    if (item == NULL) {
-        m_owner->GetEventHandler()->ProcessEvent (event);
-        return;
-    }
-
-    // remember item at shift down
-    if (event.ShiftDown())  {
-        if (!m_shiftItem) m_shiftItem = m_curItem;
-    }else{
-        m_shiftItem = (wxTreeListItem*)NULL;
-    }
-
-    if (event.RightUp()) {
-
-        SetFocus();
-        wxTreeEvent nevent (wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, m_owner->GetId());
-        nevent.SetEventObject (m_owner);
-#if !wxCHECK_VERSION(2, 5, 0)
-        nevent.SetItem ((long)item); // the item clicked
-#else
-        nevent.SetItem (item); // the item clicked
-#endif
-        nevent.SetInt (m_curColumn); // the colum clicked
-        nevent.SetPoint (p);
-        m_owner->GetEventHandler()->ProcessEvent (nevent);
-
-    }else if (event.LeftUp()) {
-
-        if (m_lastOnSame) {
-            if ((item == m_curItem) && (m_curColumn != -1) &&
-                (m_owner->GetHeaderWindow()->IsColumnEditable (m_curColumn)) &&
-                (flags & (wxTREE_HITTEST_ONITEMLABEL | wxTREE_HITTEST_ONITEMCOLUMN))){
-                m_renameTimer->Start (RENAME_TIMER_TICKS, wxTIMER_ONE_SHOT);
-            }
-            m_lastOnSame = false;
-        }
-
-        if (((flags & wxTREE_HITTEST_ONITEMBUTTON) ||
-             (flags & wxTREE_HITTEST_ONITEMICON)) &&
-            HasButtons() && item->HasPlus()) {
-
-
-            // only toggle the item for a single click, double click on
-            // the button doesn't do anything (it toggles the item twice)
-            if (event.LeftDown()) Toggle (item);
-
-            // don't select the item if the button was clicked
-            return;
-        }
-
-        // determine the selection if not done by left down
-        if (!m_left_down_selection) {
-            bool unselect_others = !((event.ShiftDown() || event.ControlDown()) &&
-                                     HasFlag(wxTR_MULTIPLE));
-
-            SelectItem (item, m_shiftItem, unselect_others);
-            EnsureVisible (item);
-           //  LG  m_curItem = item; // make the new item the current item
-        }else{
-            m_left_down_selection = false;
-        }
-
-    }else if (event.LeftDown() || event.RightDown() || event.LeftDClick()) {
-
-        if (event.LeftDown() || event.RightDown()) {
-            SetFocus();
-            m_lastOnSame = item == m_curItem;
-        }
-
-        if (((flags & wxTREE_HITTEST_ONITEMBUTTON) ||
-             (flags & wxTREE_HITTEST_ONITEMICON)) &&
-            item->HasPlus()) {
-
-            // only toggle the item for a single click, double click on
-            // the button doesn't do anything (it toggles the item twice)
-
-            if (event.LeftDown()) Toggle (item);
-
-            // don't select the item if the button was clicked
-            return;
-        }
-
-        // determine the selection if the current item is not selected
-        if (!item->IsSelected()) {
-            bool unselect_others = !((event.ShiftDown() || event.ControlDown()) &&
-                                     HasFlag(wxTR_MULTIPLE));
-           SelectItem (item, m_shiftItem, unselect_others);
-           EnsureVisible (item);
-            // LG m_curItem = item; // make the new item the current item
-            m_left_down_selection = true;
-        }
-
-        // For some reason, Windows isn't recognizing a left double-click,
-        // so we need to simulate it here.  Allow 200 milliseconds for now.
-        if (event.LeftDClick()) {
-
-            // double clicking should not start editing the item label
-            m_renameTimer->Stop();
-            m_lastOnSame = false;
-
-            // send activate event first
-            wxTreeEvent nevent (wxEVT_COMMAND_TREE_ITEM_ACTIVATED, m_owner->GetId());
-            nevent.SetEventObject (m_owner);
-#if !wxCHECK_VERSION(2, 5, 0)
-            nevent.SetItem ((long)item); // the item clicked
-#else
-            nevent.SetItem (item); // the item clicked
-#endif
-            nevent.SetInt (m_curColumn); // the colum clicked
-            nevent.SetPoint (p);
-            if (!m_owner->GetEventHandler()->ProcessEvent (nevent)) {
-
-                // if the user code didn't process the activate event,
-                // handle it ourselves by toggling the item when it is
-                // double clicked
-
-                if (item->HasPlus()) Toggle(item);
-            }
-        }
-
-    }else{ // any other event skip just in case
-
-        event.Skip();
-
-    }
-}
-
-void wxTreeListMainWindow::OnIdle (wxIdleEvent &WXUNUSED(event)) {
-    /* after all changes have been done to the tree control,
-     * we actually redraw the tree when everything is over */
-
-    if (!m_dirty) return;
-
-    m_dirty = false;
-
-    CalculatePositions();
-    Refresh();
-    AdjustMyScrollbars();
-}
-
-void wxTreeListMainWindow::OnScroll (wxScrollWinEvent& event) {
-    // FIXME
-#if defined(__WXGTK__) && !defined(__WXUNIVERSAL__)
-    wxScrolledWindow::OnScroll(event);
-#else
-    HandleOnScroll( event );
-#endif
-
-    if(event.GetOrientation() == wxHORIZONTAL) {
-        m_owner->GetHeaderWindow()->Refresh();
-        m_owner->GetHeaderWindow()->Update();
-    }
-}
-
-void wxTreeListMainWindow::CalculateSize (wxTreeListItem *item, wxDC &dc) {
-    wxCoord text_w = 0;
-    wxCoord text_h = 0;
-
-    dc.SetFont (GetItemFont (item));
-
-    dc.GetTextExtent (item->GetText (m_main_column), &text_w, &text_h);
-
-    // restore normal font
-    dc.SetFont (m_normalFont);
-
-    int total_h = (m_imgHeight > text_h) ? m_imgHeight : text_h;
-    if (total_h < 30) { // add 10% space if greater than 30 pixels
-      total_h += 2; // minimal 2 pixel space
-    }else{
-      total_h += total_h / 10; // otherwise 10% space
-    }
-
-    item->SetHeight (total_h);
-    if (total_h > m_lineHeight) m_lineHeight = total_h;
-    item->SetWidth(m_imgWidth + text_w +2);
-}
-
-// -----------------------------------------------------------------------------
-void wxTreeListMainWindow::CalculateLevel (wxTreeListItem *item, wxDC &dc,
-                                           int level, int &y, int x_colstart) {
-
-    // calculate position of vertical lines
-    int x = x_colstart + MARGIN; // start of column
-    if (HasFlag(wxTR_LINES_AT_ROOT)) x += LINEATROOT; // space for lines at root
-    if (HasButtons()) {
-        x += (m_btnWidth-m_btnWidth2); // half button space
-    }else{
-        x += (m_indent-m_indent/2);
-    }
-    if (HasFlag(wxTR_HIDE_ROOT)) {
-      // LG
-      //        x += m_indent * (level-2); // indent but not level 1
-      x += m_indent * (level-1); // indent but not level 1
-
-    }else{
-        x += m_indent * level; // indent according to level
-    }
-
-    // a hidden root is not evaluated, but its children are always
-    if (HasFlag(wxTR_HIDE_ROOT) && (level == 0)) goto Recurse;
-
-    CalculateSize( item, dc );
-
-    // set its position
-    item->SetX (x);
-    item->SetY (y);
-    y += GetLineHeight(item);
-
-    // we don't need to calculate collapsed branches
-    if ( !item->IsExpanded() ) return;
-
-Recurse:
-    wxArrayTreeListItems& children = item->GetChildren();
-    long n, count = (long)children.Count();
-    ++level;
-    for (n = 0; n < count; ++n) {
-        CalculateLevel( children[n], dc, level, y, x_colstart );  // recurse
-    }
-}
-
-void wxTreeListMainWindow::CalculatePositions() {
-    if ( !m_rootItem ) return;
-
-    wxClientDC dc(this);
-    PrepareDC( dc );
-
-    dc.SetFont( m_normalFont );
-
-    dc.SetPen( m_dottedPen );
-    //if(GetImageList() == NULL)
-    // m_lineHeight = (int)(dc.GetCharHeight() + 4);
-
-    int y = 2;
-    int x_colstart = 0;
-    for (int i = 0; i < (int)GetMainColumn(); ++i) {
-        if (!m_owner->GetHeaderWindow()->IsColumnShown(i)) continue;
-        x_colstart += m_owner->GetHeaderWindow()->GetColumnWidth(i);
-    }
-    CalculateLevel( m_rootItem, dc, 0, y, x_colstart ); // start recursion
-}
-
-void wxTreeListMainWindow::RefreshSubtree (wxTreeListItem *item) {
-    if (m_dirty) return;
-
-    wxClientDC dc(this);
-    PrepareDC(dc);
-
-    int cw = 0;
-    int ch = 0;
-    GetVirtualSize( &cw, &ch );
-
-    wxRect rect;
-    rect.x = dc.LogicalToDeviceX( 0 );
-    rect.width = cw;
-    rect.y = dc.LogicalToDeviceY( item->GetY() - 2 );
-    rect.height = ch;
-
-    Refresh (true, &rect );
-    AdjustMyScrollbars();
-}
-
-void wxTreeListMainWindow::RefreshLine (wxTreeListItem *item) {
-
-  //  return;
-  //  std::cout << "RefreshLine = "<<item<<std::endl;
-  //return;
-
-  if (m_dirty) return;
-
-    wxClientDC dc(this);
-    PrepareDC( dc );
-
-    int cw = 0;
-    int ch = 0;
-    GetVirtualSize( &cw, &ch );
-
-    wxRect rect;
-    rect.x = dc.LogicalToDeviceX( 0 );
-    rect.y = dc.LogicalToDeviceY( item->GetY() );
-    rect.width = cw;
-    rect.height = GetLineHeight(item); //dc.GetCharHeight() + 6;
-
-    Refresh (true, &rect);
-}
-
-void wxTreeListMainWindow::RefreshSelected() 
-{
-
-  long count = m_selected.GetCount();
-  for (long n = 0; n < count; n++ ) 
-    {
-      RefreshLine (m_selected[n]);
-    }
-}
-
-/*
-void wxTreeListMainWindow::RefreshSelectedUnder (wxTreeListItem *item) {
-    if (item->IsSelected()) {
-        RefreshLine (item);
-    }
-
-    const wxArrayTreeListItems& children = item->GetChildren();
-    long count = children.GetCount();
-    for (long n = 0; n < count; n++ ) {
-        RefreshSelectedUnder (children[n]);
-    }
-}
-*/
-
-// ----------------------------------------------------------------------------
-// changing colours: we need to refresh the tree control
-// ----------------------------------------------------------------------------
-
-bool wxTreeListMainWindow::SetBackgroundColour (const wxColour& colour) {
-    if (!wxWindow::SetBackgroundColour(colour)) return false;
-
-    Refresh();
-    return true;
-}
-
-bool wxTreeListMainWindow::SetForegroundColour (const wxColour& colour) {
-    if (!wxWindow::SetForegroundColour(colour)) return false;
-
-    Refresh();
-    return true;
-}
-
-void wxTreeListMainWindow::SetItemText (const wxTreeItemId& itemId, int column,
-                                        const wxString& text) {
-    wxCHECK_RET (itemId.IsOk(), _T("invalid tree item"));
-
-    wxClientDC dc (this);
-    wxTreeListItem *item = (wxTreeListItem*) itemId.m_pItem;
-    item->SetText (column, text);
-    CalculateSize (item, dc);
-    RefreshLine (item);
-}
-
-wxString wxTreeListMainWindow::GetItemText (const wxTreeItemId& itemId,
-                                            int column) const {
-    wxCHECK_MSG (itemId.IsOk(), _T(""), _T("invalid tree item") );
-
-    if( IsVirtual() )   return m_owner->OnGetItemText(((wxTreeListItem*) itemId.m_pItem)->GetData(),column);
-    else                return ((wxTreeListItem*) itemId.m_pItem)->GetText (column);
-}
-
-wxString wxTreeListMainWindow::GetItemText (wxTreeItemData* item,
-int column) const {
-   wxASSERT_MSG( IsVirtual(), _T("can be used only with virtual control") );
-   return m_owner->OnGetItemText(item,column);
-}
-
-void wxTreeListMainWindow::SetFocus() {
-    wxWindow::SetFocus();
-}
-
-wxFont wxTreeListMainWindow::GetItemFont (wxTreeListItem *item) {
-    wxTreeItemAttr *attr = item->GetAttributes();
-
-    if (attr && attr->HasFont()) {
-        return attr->GetFont();
-    }else if (item->IsBold()) {
-        return m_boldFont;
-    }else{
-        return m_normalFont;
-   }
-}
-
-int wxTreeListMainWindow::GetItemWidth (int column, wxTreeListItem *item) {
-    if (!item) return 0;
-
-    // determine item width
-    int w = 0, h = 0;
-    wxFont font = GetItemFont (item);
-    GetTextExtent (item->GetText (column), &w, &h, NULL, NULL, font.Ok()? &font: NULL);
-    w += 2*MARGIN;
-
-    // calculate width
-    int width = w + 2*MARGIN;
-    if (column == GetMainColumn()) {
-        width += MARGIN;
-        if (HasFlag(wxTR_LINES_AT_ROOT)) width += LINEATROOT;
-        if (HasButtons()) width += m_btnWidth + LINEATROOT;
-        if (item->GetCurrentImage() != NO_IMAGE) width += m_imgWidth;
-
-        // count indent level
-        int level = 0;
-        wxTreeListItem *parent = item->GetItemParent();
-        wxTreeListItem *root = (wxTreeListItem*)GetRootItem().m_pItem;
-        while (parent && (!HasFlag(wxTR_HIDE_ROOT) || (parent != root))) {
-            level++;
-            parent = parent->GetItemParent();
-        }
-        if (level) width += level * GetIndent();
-    }
-
-    return width;
-}
-
-int wxTreeListMainWindow::GetBestColumnWidth (int column, wxTreeItemId parent) {
-    int maxWidth, h;
-    GetClientSize (&maxWidth, &h);
-    int width = 0;
-
-    // get root if on item
-    if (!parent.IsOk()) parent = GetRootItem();
-
-    // add root width
-    if (!HasFlag(wxTR_HIDE_ROOT)) {
-        int w = GetItemWidth (column, (wxTreeListItem*)parent.m_pItem);
-        if (width < w) width = w;
-        if (width > maxWidth) return maxWidth;
-    }
-
-    wxTreeItemIdValue cookie = 0;
-    wxTreeItemId item = GetFirstChild (parent, cookie);
-    while (item.IsOk()) {
-        int w = GetItemWidth (column, (wxTreeListItem*)item.m_pItem);
-        if (width < w) width = w;
-        if (width > maxWidth) return maxWidth;
-
-        // check the children of this item
-        if (((wxTreeListItem*)item.m_pItem)->IsExpanded()) {
-            int w = GetBestColumnWidth (column, item);
-            if (width < w) width = w;
-            if (width > maxWidth) return maxWidth;
-        }
-
-        // next sibling
-        item = GetNextChild (parent, cookie);
-    }
-
-    return width;
-}
-
-
-//-----------------------------------------------------------------------------
-//  wxTreeListCtrl
-//-----------------------------------------------------------------------------
-
-//IMPLEMENT_DYNAMIC_CLASS(wxTreeListCtrl, wxControl);
-//IMPLEMENT_CLASS(wxTreeListCtrl, wxControl);
-
-BEGIN_EVENT_TABLE(wxTreeListCtrl, wxControl)
-    EVT_SIZE(wxTreeListCtrl::OnSize)
-END_EVENT_TABLE();
-
-bool wxTreeListCtrl::Create(wxWindow *parent, wxWindowID id,
-                            const wxPoint& pos,
-                            const wxSize& size,
-                            long style, const wxValidator &validator,
-                            const wxString& name)
-{
-    long main_style = style & ~(wxSIMPLE_BORDER|wxSUNKEN_BORDER|wxDOUBLE_BORDER|
-                                wxRAISED_BORDER|wxSTATIC_BORDER);
-    long ctrl_style = style & ~(wxVSCROLL|wxHSCROLL);
-
-    if (!wxControl::Create(parent, id, pos, size, ctrl_style, validator, name)) {
-       return false;
-    }
-    m_main_win = new wxTreeListMainWindow (this, -1, wxPoint(0, 0), size,
-                                           main_style, validator);
-    m_header_win = new wxTreeListHeaderWindow (this, -1, m_main_win,
-                                               wxPoint(0, 0), wxDefaultSize,
-                                               wxTAB_TRAVERSAL);
-    CalculateAndSetHeaderHeight();
-    return true;
-}
-
-void wxTreeListCtrl::CalculateAndSetHeaderHeight()
-{
-    if (m_header_win) {
-
-        // we use 'g' to get the descent, too
-        int w, h, d;
-        m_header_win->GetTextExtent(_T("Hg"), &w, &h, &d);
-        h += d + 2 * HEADER_OFFSET_Y + EXTRA_HEIGHT;
-       h = 0 ;
-        // only update if changed
-        if (h != m_headerHeight) {
-            m_headerHeight = h;
-            DoHeaderLayout();
-        }
-    }
-}
-
-void wxTreeListCtrl::DoHeaderLayout()
-{
-    int w, h;
-    GetClientSize(&w, &h);
-    if (m_header_win) {
-        m_header_win->SetSize (0, 0, w, m_headerHeight);
-        m_header_win->Refresh();
-    }
-    if (m_main_win) {
-        m_main_win->SetSize (0, m_headerHeight + 1, w, h - m_headerHeight - 1);
-    }
-}
-
-void wxTreeListCtrl::OnSize(wxSizeEvent& WXUNUSED(event))
-{
-    DoHeaderLayout();
-}
-
-size_t wxTreeListCtrl::GetCount() const { return m_main_win->GetCount(); }
-
-unsigned int wxTreeListCtrl::GetIndent() const
-{ return m_main_win->GetIndent(); }
-
-void wxTreeListCtrl::SetIndent(unsigned int indent)
-{ m_main_win->SetIndent(indent); }
-
-unsigned int wxTreeListCtrl::GetLineSpacing() const
-{ return m_main_win->GetLineSpacing(); }
-
-void wxTreeListCtrl::SetLineSpacing(unsigned int spacing)
-{ m_main_win->SetLineSpacing(spacing); }
-
-wxImageList* wxTreeListCtrl::GetImageList() const
-{ return m_main_win->GetImageList(); }
-
-wxImageList* wxTreeListCtrl::GetStateImageList() const
-{ return m_main_win->GetStateImageList(); }
-
-wxImageList* wxTreeListCtrl::GetButtonsImageList() const
-{ return m_main_win->GetButtonsImageList(); }
-
-void wxTreeListCtrl::SetImageList(wxImageList* imageList)
-{ m_main_win->SetImageList(imageList); }
-
-void wxTreeListCtrl::SetStateImageList(wxImageList* imageList)
-{ m_main_win->SetStateImageList(imageList); }
-
-void wxTreeListCtrl::SetButtonsImageList(wxImageList* imageList)
-{ m_main_win->SetButtonsImageList(imageList); }
-
-void wxTreeListCtrl::AssignImageList(wxImageList* imageList)
-{ m_main_win->AssignImageList(imageList); }
-
-void wxTreeListCtrl::AssignStateImageList(wxImageList* imageList)
-{ m_main_win->AssignStateImageList(imageList); }
-
-void wxTreeListCtrl::AssignButtonsImageList(wxImageList* imageList)
-{ m_main_win->AssignButtonsImageList(imageList); }
-
-wxString wxTreeListCtrl::GetItemText(const wxTreeItemId& item, int column) const
-{ return m_main_win->GetItemText (item, column); }
-
-int wxTreeListCtrl::GetItemImage(const wxTreeItemId& item, int column,
-                                 wxTreeItemIcon which) const
-{ return m_main_win->GetItemImage(item, column, which); }
-
-wxTreeItemData* wxTreeListCtrl::GetItemData(const wxTreeItemId& item) const
-{ return m_main_win->GetItemData(item); }
-
-bool wxTreeListCtrl::GetItemBold(const wxTreeItemId& item) const
-{ return m_main_win->GetItemBold(item); }
-
-wxColour wxTreeListCtrl::GetItemTextColour(const wxTreeItemId& item) const
-{ return m_main_win->GetItemTextColour(item); }
-
-wxColour wxTreeListCtrl::GetItemBackgroundColour(const wxTreeItemId& item)
-    const
-{ return m_main_win->GetItemBackgroundColour(item); }
-
-wxFont wxTreeListCtrl::GetItemFont(const wxTreeItemId& item) const
-{ return m_main_win->GetItemFont(item); }
-
-
-void wxTreeListCtrl::SetItemText(const wxTreeItemId& item, int column,
-                                 const wxString& text)
-{ m_main_win->SetItemText (item, column, text); }
-
-void wxTreeListCtrl::SetItemImage(const wxTreeItemId& item,
-                                  int column,
-                                  int image,
-                                  wxTreeItemIcon which)
-{ m_main_win->SetItemImage(item, column, image, which); }
-
-void wxTreeListCtrl::SetItemData(const wxTreeItemId& item,
-                                 wxTreeItemData* data)
-{ m_main_win->SetItemData(item, data); }
-
-void wxTreeListCtrl::SetItemHasChildren(const wxTreeItemId& item, bool has)
-{ m_main_win->SetItemHasChildren(item, has); }
-
-void wxTreeListCtrl::SetItemBold(const wxTreeItemId& item, bool bold)
-{ m_main_win->SetItemBold(item, bold); }
-
-void wxTreeListCtrl::SetItemTextColour(const wxTreeItemId& item,
-                                       const wxColour& colour)
-{ m_main_win->SetItemTextColour(item, colour); }
-
-void wxTreeListCtrl::SetItemBackgroundColour(const wxTreeItemId& item,
-                                             const wxColour& colour)
-{ m_main_win->SetItemBackgroundColour(item, colour); }
-
-void wxTreeListCtrl::SetItemFont(const wxTreeItemId& item,
-                                 const wxFont& font)
-{ m_main_win->SetItemFont(item, font); }
-
-bool wxTreeListCtrl::SetFont(const wxFont& font)
-{
-    if (m_header_win) {
-        m_header_win->SetFont(font);
-        CalculateAndSetHeaderHeight();
-        m_header_win->Refresh();
-    }
-    if (m_main_win) {
-        return m_main_win->SetFont(font);
-    }else{
-        return false;
-    }
-}
-
-void wxTreeListCtrl::SetWindowStyle(const long style)
-{
-    if(m_main_win)
-        m_main_win->SetWindowStyle(style);
-    m_windowStyle = style;
-    // TODO: provide something like wxTL_NO_HEADERS to hide m_header_win
-}
-
-long wxTreeListCtrl::GetWindowStyle() const
-{
-    long style = m_windowStyle;
-    if(m_main_win)
-        style |= m_main_win->GetWindowStyle();
-    return style;
-}
-
-bool wxTreeListCtrl::IsVisible(const wxTreeItemId& item, bool fullRow) const
-{ return m_main_win->IsVisible(item, fullRow); }
-
-bool wxTreeListCtrl::HasChildren(const wxTreeItemId& item) const
-{ return m_main_win->HasChildren(item); }
-
-bool wxTreeListCtrl::IsExpanded(const wxTreeItemId& item) const
-{ return m_main_win->IsExpanded(item); }
-
-bool wxTreeListCtrl::IsSelected(const wxTreeItemId& item) const
-{ return m_main_win->IsSelected(item); }
-
-bool wxTreeListCtrl::IsBold(const wxTreeItemId& item) const
-{ return m_main_win->IsBold(item); }
-
-size_t wxTreeListCtrl::GetChildrenCount(const wxTreeItemId& item, bool rec)
-{ return m_main_win->GetChildrenCount(item, rec); }
-
-wxTreeItemId wxTreeListCtrl::GetRootItem() const
-{ return m_main_win->GetRootItem(); }
-
-//wxTreeItemId wxTreeListCtrl::GetSelection() const
-//{ return m_main_win->GetSelection(); }
- wxTreeItemId wxTreeListCtrl::GetCurrent() const
- { return m_main_win->GetCurrent(); }
- // returns the number of currently selected items
- size_t wxTreeListCtrl::GetSelectionSize() const
- { return m_main_win->GetSelectionSize(); }
-
-size_t wxTreeListCtrl::GetSelections(wxArrayTreeItemIds& arr) const
-{ return m_main_win->GetSelections(arr); }
-
-wxTreeItemId wxTreeListCtrl::GetItemParent(const wxTreeItemId& item) const
-{ return m_main_win->GetItemParent(item); }
-
-#if !wxCHECK_VERSION(2, 5, 0)
-wxTreeItemId wxTreeListCtrl::GetFirstChild (const wxTreeItemId& item,
-                                            long& cookie) const
-#else
-wxTreeItemId wxTreeListCtrl::GetFirstChild (const wxTreeItemId& item,
-                                            wxTreeItemIdValue& cookie) const
-#endif
-{ return m_main_win->GetFirstChild(item, cookie); }
-
-#if !wxCHECK_VERSION(2, 5, 0)
-wxTreeItemId wxTreeListCtrl::GetNextChild (const wxTreeItemId& item,
-                                           long& cookie) const
-#else
-wxTreeItemId wxTreeListCtrl::GetNextChild (const wxTreeItemId& item,
-                                           wxTreeItemIdValue& cookie) const
-#endif
-{ return m_main_win->GetNextChild(item, cookie); }
-
-#if !wxCHECK_VERSION(2, 5, 0)
-wxTreeItemId wxTreeListCtrl::GetPrevChild (const wxTreeItemId& item,
-                                           long& cookie) const
-#else
-wxTreeItemId wxTreeListCtrl::GetPrevChild (const wxTreeItemId& item,
-                                           wxTreeItemIdValue& cookie) const
-#endif
-{ return m_main_win->GetPrevChild(item, cookie); }
-
-#if !wxCHECK_VERSION(2, 5, 0)
-wxTreeItemId wxTreeListCtrl::GetLastChild (const wxTreeItemId& item,
-                                           long& cookie) const
-#else
-wxTreeItemId wxTreeListCtrl::GetLastChild (const wxTreeItemId& item,
-                                           wxTreeItemIdValue& cookie) const
-#endif
-{ return m_main_win->GetLastChild(item, cookie); }
-
-
-wxTreeItemId wxTreeListCtrl::GetNextSibling(const wxTreeItemId& item) const
-{ return m_main_win->GetNextSibling(item); }
-
-wxTreeItemId wxTreeListCtrl::GetPrevSibling(const wxTreeItemId& item) const
-{ return m_main_win->GetPrevSibling(item); }
-
-wxTreeItemId wxTreeListCtrl::GetNext(const wxTreeItemId& item) const
-{ return m_main_win->GetNext(item, true); }
-
-wxTreeItemId wxTreeListCtrl::GetPrev(const wxTreeItemId& item) const
-{ return m_main_win->GetPrev(item, true); }
-
-wxTreeItemId wxTreeListCtrl::GetFirstExpandedItem() const
-{ return m_main_win->GetFirstExpandedItem(); }
-
-wxTreeItemId wxTreeListCtrl::GetNextExpanded(const wxTreeItemId& item) const
-{ return m_main_win->GetNextExpanded(item); }
-
-wxTreeItemId wxTreeListCtrl::GetPrevExpanded(const wxTreeItemId& item) const
-{ return m_main_win->GetPrevExpanded(item); }
-
-wxTreeItemId wxTreeListCtrl::GetFirstVisibleItem(bool fullRow) const
-{ return m_main_win->GetFirstVisibleItem(fullRow); }
-
-wxTreeItemId wxTreeListCtrl::GetNextVisible(const wxTreeItemId& item, bool fullRow) const
-{ return m_main_win->GetNextVisible(item, fullRow); }
-
-wxTreeItemId wxTreeListCtrl::GetPrevVisible(const wxTreeItemId& item, bool fullRow) const
-{ return m_main_win->GetPrevVisible(item, fullRow); }
-
-wxTreeItemId wxTreeListCtrl::AddRoot (const wxString& text, int image,
-                                      int selectedImage, wxTreeItemData* data)
-{ return m_main_win->AddRoot (text, image, selectedImage, data); }
-
-wxTreeItemId wxTreeListCtrl::PrependItem(const wxTreeItemId& parent,
-                                         const wxString& text, int image,
-                                         int selectedImage,
-                                         wxTreeItemData* data)
-{ return m_main_win->PrependItem(parent, text, image, selectedImage, data); }
-
-wxTreeItemId wxTreeListCtrl::InsertItem(const wxTreeItemId& parent,
-                                        const wxTreeItemId& previous,
-                                        const wxString& text, int image,
-                                        int selectedImage,
-                                        wxTreeItemData* data)
-{
-    return m_main_win->InsertItem(parent, previous, text, image,
-                                  selectedImage, data);
-}
-
-wxTreeItemId wxTreeListCtrl::InsertItem(const wxTreeItemId& parent,
-                                        size_t index,
-                                        const wxString& text, int image,
-                                        int selectedImage,
-                                        wxTreeItemData* data)
-{
-    return m_main_win->InsertItem(parent, index, text, image,
-                                  selectedImage, data);
-}
-
-wxTreeItemId wxTreeListCtrl::AppendItem(const wxTreeItemId& parent,
-                                        const wxString& text, int image,
-                                        int selectedImage,
-                                        wxTreeItemData* data)
-{ return m_main_win->AppendItem(parent, text, image, selectedImage, data); }
-
-void wxTreeListCtrl::Delete(const wxTreeItemId& item)
-{ m_main_win->Delete(item); }
-
-void wxTreeListCtrl::DeleteChildren(const wxTreeItemId& item)
-{ m_main_win->DeleteChildren(item); }
-
-void wxTreeListCtrl::DeleteRoot()
-{ m_main_win->DeleteRoot(); }
-
-void wxTreeListCtrl::Expand(const wxTreeItemId& item)
-{ m_main_win->Expand(item); }
-
-void wxTreeListCtrl::ExpandAll(const wxTreeItemId& item)
-{ m_main_win->ExpandAll(item); }
-
-void wxTreeListCtrl::Collapse(const wxTreeItemId& item)
-{ m_main_win->Collapse(item); }
-
-void wxTreeListCtrl::CollapseAndReset(const wxTreeItemId& item)
-{ m_main_win->CollapseAndReset(item); }
-
-void wxTreeListCtrl::Toggle(const wxTreeItemId& item)
-{ m_main_win->Toggle(item); }
-
-//void wxTreeListCtrl::Unselect()
-//{ m_main_win->Unselect(); }
-
-// LG 19/09/08 : Added 
-//void wxTreeListCtrl::Unselect(wxTreeItemId& item)
-//{ m_main_win->Unselect((wxTreeListItem*)item.m_pItem); }
-
-void wxTreeListCtrl::UnselectAll()
-{ m_main_win->UnselectAll(); }
-
-void wxTreeListCtrl::SelectItem(const wxTreeItemId& item, const wxTreeItemId& last,
-                                bool unselect_others)
-{ m_main_win->SelectItem (item, last, unselect_others); }
-
-void wxTreeListCtrl::SelectAll()
-{ m_main_win->SelectAll(); }
-
-void wxTreeListCtrl::EnsureVisible(const wxTreeItemId& item)
-{ m_main_win->EnsureVisible(item); }
-
-void wxTreeListCtrl::ScrollTo(const wxTreeItemId& item)
-{ m_main_win->ScrollTo(item); }
-
-wxTreeItemId wxTreeListCtrl::HitTest(const wxPoint& pos, int& flags, int& column)
-{
-    wxPoint p = m_main_win->ScreenToClient (ClientToScreen (pos));
-    return m_main_win->HitTest (p, flags, column);
-}
-
-bool wxTreeListCtrl::GetBoundingRect(const wxTreeItemId& item, wxRect& rect,
-                                     bool textOnly) const
-{ return m_main_win->GetBoundingRect(item, rect, textOnly); }
-
-void wxTreeListCtrl::EditLabel (const wxTreeItemId& item, int column)
-{ m_main_win->EditLabel (item, column); }
-
-int wxTreeListCtrl::OnCompareItems(const wxTreeItemId& item1,
-                                   const wxTreeItemId& item2)
-{
-    // do the comparison here, and not delegate to m_main_win, in order
-    // to let the user override it
-    //return m_main_win->OnCompareItems(item1, item2);
-    return wxStrcmp(GetItemText(item1), GetItemText(item2));
-}
-
-void wxTreeListCtrl::SortChildren(const wxTreeItemId& item)
-{ m_main_win->SortChildren(item); }
-
-wxTreeItemId wxTreeListCtrl::FindItem (const wxTreeItemId& item, const wxString& str, int mode)
-{ return m_main_win->FindItem (item, str, mode); }
-
-void wxTreeListCtrl::SetDragItem (const wxTreeItemId& item)
-{ m_main_win->SetDragItem (item); }
-
-bool wxTreeListCtrl::SetBackgroundColour(const wxColour& colour)
-{
-    if (!m_main_win) return false;
-    return m_main_win->SetBackgroundColour(colour);
-}
-
-bool wxTreeListCtrl::SetForegroundColour(const wxColour& colour)
-{
-    if (!m_main_win) return false;
-    return m_main_win->SetForegroundColour(colour);
-}
-
-int wxTreeListCtrl::GetColumnCount() const
-{ return m_main_win->GetColumnCount(); }
-
-void wxTreeListCtrl::SetColumnWidth(int column, int width)
-{
-    m_header_win->SetColumnWidth (column, width);
-    m_header_win->Refresh();
-}
-
-int wxTreeListCtrl::GetColumnWidth(int column) const
-{ return m_header_win->GetColumnWidth(column); }
-
-void wxTreeListCtrl::SetMainColumn(int column)
-{ m_main_win->SetMainColumn(column); }
-
-int wxTreeListCtrl::GetMainColumn() const
-{ return m_main_win->GetMainColumn(); }
-
-void wxTreeListCtrl::SetColumnText(int column, const wxString& text)
-{
-    m_header_win->SetColumnText (column, text);
-    m_header_win->Refresh();
-}
-
-wxString wxTreeListCtrl::GetColumnText(int column) const
-{ return m_header_win->GetColumnText(column); }
-
-void wxTreeListCtrl::AddColumn(const wxTreeListColumnInfo& colInfo)
-{
-    m_header_win->AddColumn (colInfo);
-    DoHeaderLayout();
-}
-
-void wxTreeListCtrl::InsertColumn(int before, const wxTreeListColumnInfo& colInfo)
-{
-    m_header_win->InsertColumn (before, colInfo);
-    m_header_win->Refresh();
-}
-
-void wxTreeListCtrl::RemoveColumn(int column)
-{
-    m_header_win->RemoveColumn (column);
-    m_header_win->Refresh();
-}
-
-void wxTreeListCtrl::SetColumn(int column, const wxTreeListColumnInfo& colInfo)
-{
-    m_header_win->SetColumn (column, colInfo);
-    m_header_win->Refresh();
-}
-
-const wxTreeListColumnInfo& wxTreeListCtrl::GetColumn(int column) const
-{ return m_header_win->GetColumn(column); }
-
-wxTreeListColumnInfo& wxTreeListCtrl::GetColumn(int column)
-{ return m_header_win->GetColumn(column); }
-
-void wxTreeListCtrl::SetColumnImage(int column, int image)
-{
-    m_header_win->SetColumn (column, GetColumn(column).SetImage(image));
-    m_header_win->Refresh();
-}
-
-int wxTreeListCtrl::GetColumnImage(int column) const
-{
-    return m_header_win->GetColumn(column).GetImage();
-}
-
-void wxTreeListCtrl::SetColumnEditable(int column, bool shown)
-{
-    m_header_win->SetColumn (column, GetColumn(column).SetEditable(shown));
-}
-
-void wxTreeListCtrl::SetColumnShown(int column, bool shown)
-{
-    wxASSERT_MSG (column != GetMainColumn(), _T("The main column may not be hidden") );
-    m_header_win->SetColumn (column, GetColumn(column).SetShown(GetMainColumn()==column? true: shown));
-    m_header_win->Refresh();
-}
-
-bool wxTreeListCtrl::IsColumnEditable(int column) const
-{
-    return m_header_win->GetColumn(column).IsEditable();
-}
-
-bool wxTreeListCtrl::IsColumnShown(int column) const
-{
-    return m_header_win->GetColumn(column).IsShown();
-}
-
-void wxTreeListCtrl::SetColumnAlignment (int column, int flag)
-{
-    m_header_win->SetColumn(column, GetColumn(column).SetAlignment(flag));
-    m_header_win->Refresh();
-}
-
-int wxTreeListCtrl::GetColumnAlignment(int column) const
-{
-    return m_header_win->GetColumn(column).GetAlignment();
-}
-
-void wxTreeListCtrl::Refresh(bool erase, const wxRect* rect)
-{
-    m_main_win->Refresh (erase, rect);
-    m_header_win->Refresh (erase, rect);
-}
-
-void wxTreeListCtrl::SetFocus()
-{ m_main_win->SetFocus(); }
-
-wxSize wxTreeListCtrl::DoGetBestSize() const
-{
-    // something is better than nothing...
-    return wxSize (200,200); // but it should be specified values! FIXME
-}
-
-wxString wxTreeListCtrl::OnGetItemText( wxTreeItemData* WXUNUSED(item), long WXUNUSED(column)) const
-{
-    return wxEmptyString;
-}
diff --git a/src/treelistctrl.h b/src/treelistctrl.h
deleted file mode 100644 (file)
index 5c23dfc..0000000
+++ /dev/null
@@ -1,563 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        treelistctrl.h
-// Purpose:     wxTreeListCtrl class
-// Author:      Robert Roebling
-// Maintainer:  Otto Wyss
-// Created:     01/02/97
-// RCS-ID:      $Id: treelistctrl.h,v 1.3 2008/10/01 14:23:59 guigues Exp $
-// Copyright:   (c) 2004 Robert Roebling, Julian Smart, Alberto Griggio,
-//              Vadim Zeitlin, Otto Wyss
-// Licence:     wxWindows
-/////////////////////////////////////////////////////////////////////////////
-
-
-#ifndef TREELISTCTRL_H
-#define TREELISTCTRL_H
-
-
-
-
-
-
-#if defined(__GNUG__) && !defined(__APPLE__)
-    #pragma interface "treelistctrl.h"
-#endif
-
-#include <creaImageIOSystem.h>
-#include <creaWx.h>
-
-#include <wx/treectrl.h>
-#include <wx/control.h>
-#include <wx/pen.h>
-#include <wx/listctrl.h> // for wxListEvent
-
-
-class CREAIMAGEIO_EXPORT wxTreeListItem;
-class CREAIMAGEIO_EXPORT wxTreeListHeaderWindow;
-class CREAIMAGEIO_EXPORT wxTreeListMainWindow;
-
-#define wxTR_VIRTUAL    0x1000    // The application provides items text on demand.
-
-// Using this typedef removes an ambiguity when calling Remove()
-#ifdef __WXMSW__
-#if !wxCHECK_VERSION(2, 5, 0)
-typedef long wxTreeItemIdValue;
-#else
-typedef void *wxTreeItemIdValue;
-#endif
-#endif
-
-//-----------------------------------------------------------------------------
-// wxTreeListColumnAttrs
-//-----------------------------------------------------------------------------
-
-enum {
-    DEFAULT_COL_WIDTH = 100
-};
-
-class CREAIMAGEIO_EXPORT wxTreeListColumnInfo: public wxObject {
-
-public:
-    wxTreeListColumnInfo (const wxString &text = wxEmptyString,
-                          int width = DEFAULT_COL_WIDTH,
-                          int flag = wxALIGN_LEFT,
-                          int image = -1,
-                          bool shown = true,
-                          bool edit = false) {
-        m_text = text;
-        m_width = width;
-        m_flag = flag;
-        m_image = image;
-        m_selected_image = -1;
-        m_shown = shown;
-        m_edit = edit;
-    }
-
-    wxTreeListColumnInfo (const wxTreeListColumnInfo& other) {
-        m_text = other.m_text;
-        m_width = other.m_width;
-        m_flag = other.m_flag;
-        m_image = other.m_image;
-        m_selected_image = other.m_selected_image;
-        m_shown = other.m_shown;
-        m_edit = other.m_edit;
-    }
-
-    ~wxTreeListColumnInfo() {}
-
-    // get/set
-    wxString GetText() const { return m_text; }
-    wxTreeListColumnInfo& SetText (const wxString& text) { m_text = text; return *this; }
-
-    int GetWidth() const { return m_width; }
-    wxTreeListColumnInfo& SetWidth (int width) { m_width = width; return *this; }
-
-    int GetAlignment() const { return m_flag; }
-    wxTreeListColumnInfo& SetAlignment (int flag) { m_flag = flag; return *this; }
-
-    int GetImage() const { return m_image; }
-    wxTreeListColumnInfo& SetImage (int image) { m_image = image; return *this; }
-
-    int GetSelectedImage() const { return m_selected_image; }
-    wxTreeListColumnInfo& SetSelectedImage (int image) { m_selected_image = image; return *this; }
-
-    bool IsEditable() const { return m_edit; }
-    wxTreeListColumnInfo& SetEditable (bool edit)
-        { m_edit = edit; return *this; }
-
-    bool IsShown() const { return m_shown; }
-    wxTreeListColumnInfo& SetShown(bool shown) { m_shown = shown; return *this; }
-
-private:
-    wxString m_text;
-    int m_width;
-    int m_flag;
-    int m_image;
-    int m_selected_image;
-    bool m_shown;
-    bool m_edit;
-};
-
-//----------------------------------------------------------------------------
-// wxTreeListCtrl - the multicolumn tree control
-//----------------------------------------------------------------------------
-
-// modes for navigation
-const int wxTL_MODE_NAV_FULLTREE = 0x0000; // default
-const int wxTL_MODE_NAV_EXPANDED = 0x0001;
-const int wxTL_MODE_NAV_VISIBLE  = 0x0002;
-const int wxTL_MODE_NAV_LEVEL    = 0x0004;
-
-// modes for FindItem
-const int wxTL_MODE_FIND_EXACT   = 0x0000; // default
-const int wxTL_MODE_FIND_PARTIAL = 0x0010;
-const int wxTL_MODE_FIND_NOCASE  = 0x0020;
-
-// additional flag for HitTest
-const int wxTREE_HITTEST_ONITEMCOLUMN = 0x2000;
-extern CREAIMAGEIO_EXPORT const wxChar* wxTreeListCtrlNameStr;
-
-
-class CREAIMAGEIO_EXPORT wxTreeListCtrl : public wxControl
-{
-public:
-    // creation
-    // --------
-    wxTreeListCtrl()
-        : m_header_win(0), m_main_win(0), m_headerHeight(0)
-    {}
-
-    wxTreeListCtrl(wxWindow *parent, wxWindowID id = -1,
-               const wxPoint& pos = wxDefaultPosition,
-               const wxSize& size = wxDefaultSize,
-               long style = wxTR_DEFAULT_STYLE,
-               const wxValidator &validator = wxDefaultValidator,
-               const wxString& name = wxTreeListCtrlNameStr )
-        : m_header_win(0), m_main_win(0), m_headerHeight(0)
-    {
-        Create(parent, id, pos, size, style, validator, name);
-    }
-
-    virtual ~wxTreeListCtrl() {}
-
-    bool Create(wxWindow *parent, wxWindowID id = -1,
-                const wxPoint& pos = wxDefaultPosition,
-                const wxSize& size = wxDefaultSize,
-                long style = wxTR_DEFAULT_STYLE,
-                const wxValidator &validator = wxDefaultValidator,
-                const wxString& name = wxTreeListCtrlNameStr );
-
-    void Refresh(bool erase=TRUE, const wxRect* rect=NULL);
-    void SetFocus();
-    // accessors
-    // ---------
-
-    // get the total number of items in the control
-    size_t GetCount() const;
-
-    // indent is the number of pixels the children are indented relative to
-    // the parents position. SetIndent() also redraws the control
-    // immediately.
-    unsigned int GetIndent() const;
-    void SetIndent(unsigned int indent);
-
-    // line spacing is the space above and below the text on each line
-    unsigned int GetLineSpacing() const;
-    void SetLineSpacing(unsigned int spacing);
-
-    // image list: these functions allow to associate an image list with
-    // the control and retrieve it. Note that when assigned with
-    // SetImageList, the control does _not_ delete
-    // the associated image list when it's deleted in order to allow image
-    // lists to be shared between different controls. If you use
-    // AssignImageList, the control _does_ delete the image list.
-    //
-    // The normal image list is for the icons which correspond to the
-    // normal tree item state (whether it is selected or not).
-    // Additionally, the application might choose to show a state icon
-    // which corresponds to an app-defined item state (for example,
-    // checked/unchecked) which are taken from the state image list.
-    wxImageList *GetImageList() const;
-    wxImageList *GetStateImageList() const;
-    wxImageList *GetButtonsImageList() const;
-
-    void SetImageList(wxImageList *imageList);
-    void SetStateImageList(wxImageList *imageList);
-    void SetButtonsImageList(wxImageList *imageList);
-    void AssignImageList(wxImageList *imageList);
-    void AssignStateImageList(wxImageList *imageList);
-    void AssignButtonsImageList(wxImageList *imageList);
-
-
-    // Functions to work with columns
-
-    // adds a column
-    void AddColumn (const wxString& text,
-                    int width = DEFAULT_COL_WIDTH,
-                    int flag = wxALIGN_LEFT,
-                    int image = -1,
-                    bool shown = true,
-                    bool edit = false) {
-        AddColumn (wxTreeListColumnInfo (text, width, flag, image, shown, edit));
-    }
-    void AddColumn (const wxTreeListColumnInfo& colInfo);
-
-    // inserts a column before the given one
-    void InsertColumn (int before,
-                       const wxString& text,
-                       int width = DEFAULT_COL_WIDTH,
-                       int flag = wxALIGN_LEFT,
-                       int image = -1,
-                       bool shown = true,
-                       bool edit = false) {
-        InsertColumn (before,
-                      wxTreeListColumnInfo (text, width, flag, image, shown, edit));
-    }
-    void InsertColumn (int before, const wxTreeListColumnInfo& colInfo);
-
-    // deletes the given column - does not delete the corresponding column
-    void RemoveColumn (int column);
-
-    // returns the number of columns in the ctrl
-    int GetColumnCount() const;
-
-    // tells which column is the "main" one, i.e. the "threaded" one
-    void SetMainColumn (int column);
-    int GetMainColumn() const;
-
-    void SetColumn (int column, const wxTreeListColumnInfo& colInfo);
-    wxTreeListColumnInfo& GetColumn (int column);
-    const wxTreeListColumnInfo& GetColumn (int column) const;
-
-    void SetColumnText (int column, const wxString& text);
-    wxString GetColumnText (int column) const;
-
-    void SetColumnWidth (int column, int width);
-    int GetColumnWidth (int column) const;
-
-    void SetColumnAlignment (int column, int flag);
-    int GetColumnAlignment (int column) const;
-
-    void SetColumnImage (int column, int image);
-    int GetColumnImage (int column) const;
-
-    void SetColumnShown (int column, bool shown = true);
-    bool IsColumnShown (int column) const;
-
-    void SetColumnEditable (int column, bool edit = true);
-    bool IsColumnEditable (int column) const;
-
-    // Functions to work with items.
-
-    // accessors
-    // ---------
-
-    // retrieve item's label (of the main column)
-    wxString GetItemText (const wxTreeItemId& item) const
-        { return GetItemText (item, GetMainColumn()); }
-    // retrieves item's label of the given column
-    wxString GetItemText (const wxTreeItemId& item, int column) const;
-
-    // get one of the images associated with the item (normal by default)
-    int GetItemImage (const wxTreeItemId& item,
-                      wxTreeItemIcon which = wxTreeItemIcon_Normal) const
-    { return GetItemImage (item, GetMainColumn(), which); }
-    int GetItemImage (const wxTreeItemId& item, int column,
-                      wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
-
-    // get the data associated with the item
-    wxTreeItemData *GetItemData (const wxTreeItemId& item) const;
-
-    bool GetItemBold (const wxTreeItemId& item) const;
-    wxColour GetItemTextColour (const wxTreeItemId& item) const;
-    wxColour GetItemBackgroundColour (const wxTreeItemId& item) const;
-    wxFont GetItemFont (const wxTreeItemId& item) const;
-
-    // modifiers
-
-    // set item's label
-    void SetItemText (const wxTreeItemId& item, const wxString& text)
-        { SetItemText (item, GetMainColumn(), text); }
-    void SetItemText (const wxTreeItemId& item, int column, const wxString& text);
-
-    // get one of the images associated with the item (normal by default)
-    void SetItemImage (const wxTreeItemId& item, int image,
-                       wxTreeItemIcon which = wxTreeItemIcon_Normal)
-        { SetItemImage (item, GetMainColumn(), image, which); }
-    // the which parameter is ignored for all columns but the main one
-    void SetItemImage (const wxTreeItemId& item, int column, int image,
-                       wxTreeItemIcon which = wxTreeItemIcon_Normal);
-
-    // associate some data with the item
-    void SetItemData (const wxTreeItemId& item, wxTreeItemData *data);
-
-    // force appearance of [+] button near the item. This is useful to
-    // allow the user to expand the items which don't have any children now
-    // - but instead add them only when needed, thus minimizing memory
-    // usage and loading time.
-    void SetItemHasChildren(const wxTreeItemId& item, bool has = true);
-
-    // the item will be shown in bold
-    void SetItemBold (const wxTreeItemId& item, bool bold = true);
-
-    // set the item's text colour
-    void SetItemTextColour (const wxTreeItemId& item, const wxColour& colour);
-
-    // set the item's background colour
-    void SetItemBackgroundColour (const wxTreeItemId& item, const wxColour& colour);
-
-    // set the item's font (should be of the same height for all items)
-    void SetItemFont (const wxTreeItemId& item, const wxFont& font);
-
-    // set the window font
-    virtual bool SetFont ( const wxFont &font );
-
-    // set the styles.
-    void SetWindowStyle (const long styles);
-    long GetWindowStyle() const;
-    long GetWindowStyleFlag () const { return GetWindowStyle(); }
-
-    // item status inquiries
-    // ---------------------
-
-    // is the item visible (it might be outside the view or not expanded)?
-    bool IsVisible (const wxTreeItemId& item, bool fullRow = false) const;
-    // does the item has any children?
-    bool HasChildren (const wxTreeItemId& item) const;
-    // is the item expanded (only makes sense if HasChildren())?
-    bool IsExpanded (const wxTreeItemId& item) const;
-    // is this item currently selected (the same as has focus)?
-    bool IsSelected (const wxTreeItemId& item) const;
-    // is item text in bold font?
-    bool IsBold (const wxTreeItemId& item) const;
-    // does the layout include space for a button?
-
-    // number of children
-    // ------------------
-
-    // if 'recursively' is FALSE, only immediate children count, otherwise
-    // the returned number is the number of all items in this branch
-    size_t GetChildrenCount (const wxTreeItemId& item, bool recursively = true);
-
-    // navigation
-    // ----------
-
-    // wxTreeItemId.IsOk() will return FALSE if there is no such item
-
-    // get the root tree item
-    wxTreeItemId GetRootItem() const;
-
-    // get the item currently selected (may return NULL if no selection)
-  //    wxTreeItemId GetSelection() const;
-  wxTreeItemId GetCurrent() const;
-
-    // returns the number of currently selected items
-    size_t GetSelectionSize() const;
-
-    // get the items currently selected, return the number of such item
-    size_t GetSelections (wxArrayTreeItemIds&) const;
-
-    // get the parent of this item (may return NULL if root)
-    wxTreeItemId GetItemParent (const wxTreeItemId& item) const;
-
-    // for this enumeration function you must pass in a "cookie" parameter
-    // which is opaque for the application but is necessary for the library
-    // to make these functions reentrant (i.e. allow more than one
-    // enumeration on one and the same object simultaneously). Of course,
-    // the "cookie" passed to GetFirstChild() and GetNextChild() should be
-    // the same!
-
-    // get child of this item
-#if !wxCHECK_VERSION(2, 5, 0)
-    wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& cookie) const;
-    wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const;
-    wxTreeItemId GetPrevChild(const wxTreeItemId& item, long& cookie) const;
-    wxTreeItemId GetLastChild(const wxTreeItemId& item, long& cookie) const;
-#else
-    wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
-    wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
-    wxTreeItemId GetPrevChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
-    wxTreeItemId GetLastChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
-#endif
-
-    // get sibling of this item
-    wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
-    wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
-
-    // get item in the full tree (currently only for internal use)
-    wxTreeItemId GetNext(const wxTreeItemId& item) const;
-    wxTreeItemId GetPrev(const wxTreeItemId& item) const;
-
-    // get expanded item, see IsExpanded()
-    wxTreeItemId GetFirstExpandedItem() const;
-    wxTreeItemId GetNextExpanded(const wxTreeItemId& item) const;
-    wxTreeItemId GetPrevExpanded(const wxTreeItemId& item) const;
-
-    // get visible item, see IsVisible()
-    wxTreeItemId GetFirstVisibleItem(bool fullRow = false) const;
-    wxTreeItemId GetNextVisible(const wxTreeItemId& item, bool fullRow = false) const;
-    wxTreeItemId GetPrevVisible(const wxTreeItemId& item, bool fullRow = false) const;
-
-    // operations
-    // ----------
-
-    // add the root node to the tree
-    wxTreeItemId AddRoot (const wxString& text,
-                          int image = -1, int selectedImage = -1,
-                          wxTreeItemData *data = NULL);
-
-    // insert a new item in as the first child of the parent
-    wxTreeItemId PrependItem (const wxTreeItemId& parent,
-                              const wxString& text,
-                              int image = -1, int selectedImage = -1,
-                              wxTreeItemData *data = NULL);
-
-    // insert a new item after a given one
-    wxTreeItemId InsertItem (const wxTreeItemId& parent,
-                             const wxTreeItemId& idPrevious,
-                             const wxString& text,
-                             int image = -1, int selectedImage = -1,
-                             wxTreeItemData *data = NULL);
-
-    // insert a new item before the one with the given index
-    wxTreeItemId InsertItem (const wxTreeItemId& parent,
-                             size_t index,
-                             const wxString& text,
-                             int image = -1, int selectedImage = -1,
-                             wxTreeItemData *data = NULL);
-
-    // insert a new item in as the last child of the parent
-    wxTreeItemId AppendItem (const wxTreeItemId& parent,
-                             const wxString& text,
-                             int image = -1, int selectedImage = -1,
-                             wxTreeItemData *data = NULL);
-
-    // delete this item (except root) and associated data if any
-    void Delete (const wxTreeItemId& item);
-    // delete all children (but don't delete the item itself)
-    // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
-    void DeleteChildren (const wxTreeItemId& item);
-    // delete the root and all its children from the tree
-    // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
-    void DeleteRoot();
-
-    // expand this item
-    void Expand (const wxTreeItemId& item);
-    // expand this item and all subitems recursively
-    void ExpandAll (const wxTreeItemId& item);
-    // collapse the item without removing its children
-    void Collapse (const wxTreeItemId& item);
-    // collapse the item and remove all children
-    void CollapseAndReset(const wxTreeItemId& item); //? TODO ???
-    // toggles the current state
-    void Toggle (const wxTreeItemId& item);
-
-  // remove the selection from currently selected item (if any)
-  // LG 19/09/08 : Added 
-  void Unselect(wxTreeItemId& item);
-    void Unselect();
-    void UnselectAll();
-    // select this item
-    void SelectItem (const wxTreeItemId& item,
-                     const wxTreeItemId& last = (wxTreeItemId*)NULL,
-                     bool unselect_others = true);
-    // select all items in the expanded tree
-    void SelectAll();
-    // make sure this item is visible (expanding the parent item and/or
-    // scrolling to this item if necessary)
-    void EnsureVisible (const wxTreeItemId& item);
-    // scroll to this item (but don't expand its parent)
-    void ScrollTo (const wxTreeItemId& item);
-
-    // The first function is more portable (because easier to implement
-    // on other platforms), but the second one returns some extra info.
-    wxTreeItemId HitTest (const wxPoint& point)
-        { int flags; int column; return HitTest (point, flags, column); }
-    wxTreeItemId HitTest (const wxPoint& point, int& flags)
-        { int column; return HitTest (point, flags, column); }
-    wxTreeItemId HitTest (const wxPoint& point, int& flags, int& column);
-
-    // get the bounding rectangle of the item (or of its label only)
-    bool GetBoundingRect (const wxTreeItemId& item, wxRect& rect,
-                          bool textOnly = false) const;
-
-    // Start editing the item label: this (temporarily) replaces the item
-    // with a one line edit control. The item will be selected if it hadn't
-    // been before.
-    void EditLabel (const wxTreeItemId& item)
-        { EditLabel (item, GetMainColumn()); }
-    // edit item's label of the given column
-    void EditLabel (const wxTreeItemId& item, int column);
-
-    // virtual mode
-    virtual wxString OnGetItemText( wxTreeItemData* item, long column ) const;
-
-    // sorting
-    // this function is called to compare 2 items and should return -1, 0
-    // or +1 if the first item is less than, equal to or greater than the
-    // second one. The base class version performs alphabetic comparaison
-    // of item labels (GetText)
-    virtual int OnCompareItems (const wxTreeItemId& item1, const wxTreeItemId& item2);
-    // sort the children of this item using OnCompareItems
-    // NB: this function is not reentrant and not MT-safe (FIXME)!
-    void SortChildren(const wxTreeItemId& item);
-
-    // searching
-    wxTreeItemId FindItem (const wxTreeItemId& item, const wxString& str, int mode = 0);
-
-    // overridden base class virtuals
-    virtual bool SetBackgroundColour (const wxColour& colour);
-    virtual bool SetForegroundColour (const wxColour& colour);
-
-    // drop over item
-    void SetDragItem (const wxTreeItemId& item = (wxTreeItemId*)NULL);
-
-
-    wxTreeListHeaderWindow* GetHeaderWindow() const
-        { return m_header_win; }
-
-    wxTreeListMainWindow* GetMainWindow() const
-        { return m_main_win; }
-
-    virtual wxSize DoGetBestSize() const;
-
-protected:
-    // header window, responsible for column visualization and manipulation
-    wxTreeListHeaderWindow* m_header_win;
-
-    // main window, the "true" tree ctrl
-    wxTreeListMainWindow* m_main_win;
-
-    void CalculateAndSetHeaderHeight();
-    void DoHeaderLayout();
-    void OnSize(wxSizeEvent& event);
-
-private:
-    int m_headerHeight;
-
-    DECLARE_EVENT_TABLE()
-   // DECLARE_DYNAMIC_CLASS(wxTreeListCtrl)
-};
-
-#endif // TREELISTCTRL_H
-