[med-svn] [SCM] Free software framework for ludic-therapeutic activities branch, upstream, updated. upstream/1.0.1-4-g2275774

Andreas Tille tille at debian.org
Mon Mar 5 08:31:51 UTC 2012


The following commit has been merged in the upstream branch:
commit 6118b3fe57d710fe41b463966e3638116d4dcd7c
Author: Andreas Tille <tille at debian.org>
Date:   Mon Mar 5 09:27:16 2012 +0100

    Imported Upstream version 1.0.3

diff --git a/3rdparty/wiiuse/CMakeLists.txt b/3rdparty/wiiuse/CMakeLists.txt
index 461a170..ae9db63 100755
--- a/3rdparty/wiiuse/CMakeLists.txt
+++ b/3rdparty/wiiuse/CMakeLists.txt
@@ -1,7 +1,9 @@
 cmake_minimum_required(VERSION 2.6)
 project(wiiuselib)
 
-#set (CMAKE_VERBOSE_MAKEFILE ON)
+set (WIIUSE_MAJOR_VERSION 0)
+set (WIIUSE_RELEASE_VERSION 13)
+set (WIIUSE_EPOCH_VERSION 0)
 
 #
 # Set default build mode
@@ -13,6 +15,16 @@ IF(NOT CMAKE_BUILD_TYPE)
       FORCE)
 ENDIF(NOT CMAKE_BUILD_TYPE)
 
+IF (WIN32)
+	# On WIN32 force shared lib because wiiuse depends on many specific libraries
+	SET(BUILD_SHARED_LIBS ON)
+ELSE (WIN32)
+	IF(NOT DEFINED BUILD_SHARED_LIBS)
+		SET(BUILD_SHARED_LIBS OFF CACHE BOOL 
+			"Build shared libraries as default?")
+	ENDIF(NOT DEFINED BUILD_SHARED_LIBS)
+ENDIF(WIN32)
+
 #
 # Compilation flags
 #
diff --git a/3rdparty/wiiuse/src/CMakeLists.txt b/3rdparty/wiiuse/src/CMakeLists.txt
index 105d4fe..63362dc 100755
--- a/3rdparty/wiiuse/src/CMakeLists.txt
+++ b/3rdparty/wiiuse/src/CMakeLists.txt
@@ -99,7 +99,7 @@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 # Target
 #
 
-add_library (wiiuse SHARED ${wiiuse_SRCS})
+add_library (wiiuse ${wiiuse_SRCS})
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 	TARGET_LINK_LIBRARIES(wiiuse bluetooth m)
@@ -107,13 +107,17 @@ ELSEIF(WIN32)
 	TARGET_LINK_LIBRARIES(wiiuse odbc32.lib odbccp32.lib Ws2_32.lib hid.lib setupapi.lib)
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
-#
-# Remove transitive dependencies
-#
-
-set_target_properties(wiiuse
+IF(BUILD_SHARED_LIBS)
+	# Remove transitive dependencies
+	set_target_properties(wiiuse
       PROPERTIES
       LINK_INTERFACE_LIBRARIES ""
-  )
-
-INSTALL (TARGETS wiiuse RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+	)
+  
+	set_target_properties(wiiuse PROPERTIES 
+		VERSION "${WIIUSE_MAJOR_VERSION}.${WIIUSE_RELEASE_VERSION}.${WIIUSE_EPOCH_VERSION}"
+		SOVERSION ${WIIUSE_MAJOR_VERSION}
+	)
+	
+	INSTALL (TARGETS wiiuse RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${LIBDIR})
+ENDIF(BUILD_SHARED_LIBS)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d05efba..46fb525 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,12 +9,31 @@ project(sitplus)
 set(APP_NAME "sitplus")
 set(SITPLUS_MAJOR_VERSION 1)
 set(SITPLUS_MINOR_VERSION 0)
-set(SITPLUS_REVISION_VERSION 1)
+set(SITPLUS_REVISION_VERSION 3)
 set(SITPLUS_VERSION "${SITPLUS_MAJOR_VERSION}.${SITPLUS_MINOR_VERSION}.${SITPLUS_REVISION_VERSION}")
 
+#
+# if this is set to ON, then all libraries are built as shared libraries by default.
+#
+
+SET(BUILD_SHARED_LIBS OFF CACHE BOOL 
+	"Build shared libraries as default?")
+
+#
 # if this is set to ON, then all libraries are built as shared libraries by default.
-# currently used to tell wxWidgets the libs to link against to
-SET(BUILD_SHARED_LIBS ON)
+#
+
+SET(BUILD_TESTS OFF CACHE BOOL 
+	"Build tests?")
+	
+
+#
+# Generate Doxygen doc
+#
+
+SET(GENERATE_DOXYGEN ON CACHE BOOL 
+	"Generate Doxygen documentation?")
+	
 #set(WHOLE_PROGRAM_OPTIMIZATION OFF CACHE BOOL "Flags for whole program optimization.")
 
 SET(CMAKE_VERBOSE_MAKEFILE false)
@@ -34,23 +53,26 @@ IF(NOT CMAKE_BUILD_TYPE)
 ENDIF(NOT CMAKE_BUILD_TYPE)
 
 #
-# Directories
+# Directories and RPATH
 #
 
 set (BINDIR "bin")
-set (LIBDIR "lib")
+
 if (WIN32)
+	set (LIBDIR "lib")
 	set (LOCALEDIR "${BINDIR}/locale")
 	set (DATADIR "${BINDIR}")
 	set (DOCDIR "${BINDIR}/doc")
 	set (PLUGINDIR "${BINDIR}")
 	set (LIBRUNTIMEDIR "${BINDIR}")
 else(WIN32)
+	set (LIBDIR "lib/${APP_NAME}")
 	set (LOCALEDIR "share/locale")
 	set (DATADIR "share/${APP_NAME}")
 	set (DOCDIR "${DATADIR}/doc")
-	set (PLUGINDIR "lib")
-	set (LIBRUNTIMEDIR "lib")
+	set (PLUGINDIR "lib/${APP_NAME}")
+	set (LIBRUNTIMEDIR "lib/${APP_NAME}")
+	set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
 endif(WIN32)
 
 
@@ -59,7 +81,7 @@ endif(WIN32)
 # 
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/")
 
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/3rdparty)
+INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/3rdparty)
 # For the add_library & add_executable commands
 set (CUSTOM_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/include")
 set (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/${BINDIR})
@@ -197,8 +219,8 @@ if (ENABLE_WXWIDGETS)
 			install_to_msvc_build_directory( "${EXECUTABLE_OUTPUT_PATH}" "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28ud_core_vc_custom.dll")
 		endif(MSVC)
 	
-		install(FILES "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxbase28ud_vc_custom.dll" "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28ud_core_vc_custom.dll" DESTINATION "${BINDIR}" CONFIGURATIONS Debug)
-		install(FILES "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxbase28u_vc_custom.dll" "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28u_core_vc_custom.dll" DESTINATION "${BINDIR}" CONFIGURATIONS Release RelWithDebInfo)
+		install(FILES "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxbase28ud_vc_custom.dll" "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28ud_core_vc_custom.dll" "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28ud_adv_vc_custom.dll" DESTINATION "${BINDIR}" CONFIGURATIONS Debug)
+		install(FILES "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxbase28u_vc_custom.dll" "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28u_core_vc_custom.dll" "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxmsw28u_adv_vc_custom.dll" DESTINATION "${BINDIR}" CONFIGURATIONS Release RelWithDebInfo)
 	endif(WIN32)
 endif (ENABLE_WXWIDGETS)
 
@@ -226,7 +248,7 @@ if (ENABLE_NLS)
 	string(REPLACE "\n" "" LINGUAS ${LINGUAS})
 	separate_arguments(LINGUAS)
 	
-	INCLUDE_DIRECTORIES(${LIBINTL_INCLUDE_DIR})
+	INCLUDE_DIRECTORIES(BEFORE ${LIBINTL_INCLUDE_DIR})
 	add_subdirectory(po)
 	
 	if(WIN32)
@@ -241,7 +263,7 @@ configure_file ("${PROJECT_SOURCE_DIR}/include/config.h.in"
                 "${PROJECT_BINARY_DIR}/include/config.h" )
 configure_file ("${PROJECT_SOURCE_DIR}/include/version.h.in"
                 "${PROJECT_BINARY_DIR}/include/version.h" )
-INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include/)
+INCLUDE_DIRECTORIES(BEFORE ${PROJECT_BINARY_DIR}/include/)
 
 #####################################################################
 # Compiler flags
@@ -350,30 +372,33 @@ endif()
 #####################################################################
 # Doxygen
 #####################################################################
-if (0)
-# check if doxygen is even installed
-find_package(Doxygen)
-if (DOXYGEN_FOUND STREQUAL "NO")
-    message(FATAL_ERROR "Doxygen not found. Please get a copy http://www.doxygen.org")
-endif (DOXYGEN_FOUND STREQUAL "NO")
-
-# prepare doxygen configuration file
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-# add doxygen as target
-add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-# cleanup $build/api-doc on "make clean"
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES api-doc)
-
-# add doxygen as dependency to doc-target
-get_target_property(DOC_TARGET doc TYPE)
-if(NOT DOC_TARGET)
-	add_custom_target(doc)
-endif()
-add_dependencies(doc doxygen)
+IF(GENERATE_DOXYGEN)
+	if (0)
+	# check if doxygen is even installed
+	find_package(Doxygen)
+	if (DOXYGEN_FOUND STREQUAL "NO")
+		message(FATAL_ERROR "Doxygen not found. Please get a copy http://www.doxygen.org")
+	endif (DOXYGEN_FOUND STREQUAL "NO")
+
+	# prepare doxygen configuration file
+	configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+	# add doxygen as target
+	add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+	# cleanup $build/api-doc on "make clean"
+	set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES api-doc)
+
+	# add doxygen as dependency to doc-target
+	get_target_property(DOC_TARGET doc TYPE)
+	if(NOT DOC_TARGET)
+		add_custom_target(doc)
+	endif()
+	add_dependencies(doc doxygen)
+
+	endif(0)
+ENDIF(GENERATE_DOXYGEN)
 
-endif(0)
 # install HTML API documentation and manual pages
 #set(DOC_PATH "share/doc/${CPACK_PACKAGE_NAME}-${VERSION}")
 
@@ -407,6 +432,7 @@ install(DIRECTORY scores DESTINATION "${DATADIR}")
 install(DIRECTORY sp DESTINATION "${DATADIR}")
 install(DIRECTORY graphics DESTINATION "${DATADIR}")
 install(DIRECTORY logos DESTINATION "${DATADIR}")
+install(DIRECTORY audio DESTINATION "${DATADIR}")
 install(FILES THANKS DESTINATION "${DATADIR}")
 
 if (WIN32 AND MSVC)
@@ -447,7 +473,7 @@ SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
 #SET(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/installnote.rtf")
 
 # Open manual after install
-set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecShell open $INSTDIR/bin/doc/manual.html")
+set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecShell open $INSTDIR\\\\bin\\\\doc\\\\manual.html")
 #set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "!insertmacro MUI_LANGDLL_DISPLAY")
 
 SET(CPACK_SOURCE_GENERATOR "TGZ")
@@ -467,7 +493,7 @@ endif(NOT WIN32)
 # DEB packager
 #
 
-SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Cesar Mauri Loba")
+SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Debian Med Packaging Team")
 
 INCLUDE(CPack)
 
diff --git a/ChangeLog b/NEWS
similarity index 83%
rename from ChangeLog
rename to NEWS
index 2dc24e7..6d05326 100755
--- a/ChangeLog
+++ b/NEWS
@@ -1,5 +1,15 @@
-SITPLUS ChangeLog
-=================
+SITPLUS Release Notes
+=====================
+Version 1.0.3 (2012-01-19)
+--------------------------
+- Added new option to show camera image as background
+- Fixed camera grabbing issues on linux
+- Other minor fixes
+- Translations updated
+	Castellano
+	Català	
+	Galego (thanks to Miguel Bouzada)
+
 Version 1.0.1 (2011-08-18)
 --------------------------
 - Added Galego translation (thanks to Miguel Bouzada)
diff --git a/audio/click.wav b/audio/click.wav
new file mode 100644
index 0000000..24d8294
Binary files /dev/null and b/audio/click.wav differ
diff --git a/doc/manual.html b/doc/manual.html
index ae84e6f..0152f94 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -3,7 +3,8 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="AsciiDoc 8.2.7" />
+<meta name="generator" content="AsciiDoc 8.5.2" />
+<title>SITPLUS Manual</title>
 <style type="text/css">
 /* Debug borders */
 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
@@ -90,7 +91,7 @@ span#author {
 }
 span#email {
 }
-span#revision {
+span#revnumber, span#revdate, span#revremark {
   font-family: sans-serif;
 }
 
@@ -110,17 +111,21 @@ div#footer-badges {
   padding-bottom: 0.5em;
 }
 
-div#preamble,
+div#preamble {
+  margin-top: 1.5em;
+  margin-bottom: 1.5em;
+}
 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
 div.admonitionblock {
-  margin-right: 10%;
-  margin-top: 1.5em;
+  margin-top: 1.0em;
   margin-bottom: 1.5em;
 }
 div.admonitionblock {
-  margin-top: 2.5em;
-  margin-bottom: 2.5em;
+  margin-top: 2.0em;
+  margin-bottom: 2.0em;
+  margin-right: 10%;
+  color: #606060;
 }
 
 div.content { /* Block element content. */
@@ -156,26 +161,25 @@ div.sidebarblock > div.content {
   padding: 0.5em;
 }
 
-div.listingblock {
-  margin-right: 0%;
-}
 div.listingblock > div.content {
   border: 1px solid silver;
   background: #f4f4f4;
   padding: 0.5em;
 }
 
-div.quoteblock {
-  padding-left: 2.0em;
+div.quoteblock, div.verseblock {
+  padding-left: 1.0em;
+  margin-left: 1.0em;
+  margin-right: 10%;
+  border-left: 5px solid #dddddd;
+  color: #777777;
 }
+
 div.quoteblock > div.attribution {
   padding-top: 0.5em;
   text-align: right;
 }
 
-div.verseblock {
-  padding-left: 2.0em;
-}
 div.verseblock > div.content {
   white-space: pre;
 }
@@ -198,17 +202,17 @@ div.admonitionblock .icon {
 }
 div.admonitionblock td.content {
   padding-left: 0.5em;
-  border-left: 2px solid silver;
+  border-left: 3px solid #dddddd;
 }
 
 div.exampleblock > div.content {
-  border-left: 2px solid silver;
-  padding: 0.5em;
+  border-left: 3px solid #dddddd;
+  padding-left: 0.5em;
 }
 
 div.imageblock div.content { padding-left: 0; }
-div.imageblock img { border: 1px solid silver; }
 span.image img { border-style: none; }
+a.image:visited { color: white; }
 
 dl {
   margin-top: 0.8em;
@@ -218,6 +222,7 @@ dt {
   margin-top: 0.5em;
   margin-bottom: 0;
   font-style: normal;
+  color: navy;
 }
 dd > *:first-child {
   margin-top: 0.1em;
@@ -226,44 +231,123 @@ dd > *:first-child {
 ul, ol {
     list-style-position: outside;
 }
-div.olist > ol {
+ol.arabic {
   list-style-type: decimal;
 }
-div.olist2 > ol {
+ol.loweralpha {
   list-style-type: lower-alpha;
 }
+ol.upperalpha {
+  list-style-type: upper-alpha;
+}
+ol.lowerroman {
+  list-style-type: lower-roman;
+}
+ol.upperroman {
+  list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+  margin-top: 0.1em;
+  margin-bottom: 0.1em;
+}
 
 div.tableblock > table {
   border: 3px solid #527bbd;
 }
-thead {
+thead, p.table.header {
   font-family: sans-serif;
   font-weight: bold;
 }
 tfoot {
   font-weight: bold;
 }
+td > div.verse {
+  white-space: pre;
+}
+p.table {
+  margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+  border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+  border-left-style: none;
+  border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+  border-top-style: none;
+  border-bottom-style: none;
+}
+
 
-div.hlist {
+div.hdlist {
   margin-top: 0.8em;
   margin-bottom: 0.8em;
 }
-div.hlist td {
+div.hdlist tr {
   padding-bottom: 15px;
 }
-td.hlist1 {
+dt.hdlist1.strong, td.hdlist1.strong {
+  font-weight: bold;
+}
+td.hdlist1 {
   vertical-align: top;
   font-style: normal;
   padding-right: 0.8em;
+  color: navy;
 }
-td.hlist2 {
+td.hdlist2 {
   vertical-align: top;
 }
+div.hdlist.compact tr {
+  margin: 0;
+  padding-bottom: 0;
+}
+
+.comment {
+  background: yellow;
+}
+
+.footnote, .footnoteref {
+  font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+  vertical-align: super;
+}
+
+#footnotes {
+  margin: 20px 0 20px 0;
+  padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+  margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+  border: none;
+  border-top: 1px solid silver;
+  height: 1px;
+  text-align: left;
+  margin-left: 0;
+  width: 20%;
+  min-width: 100px;
+}
+
 
 @media print {
   div#footer-badges { display: none; }
 }
 
+div#toc {
+  margin-bottom: 2.5em;
+}
+
 div#toctitle {
   color: #527bbd;
   font-family: sans-serif;
@@ -324,24 +408,22 @@ div.verseblock-attribution {
 }
 
 div.exampleblock-content {
-  border-left: 2px solid silver;
+  border-left: 3px solid #dddddd;
   padding-left: 0.5em;
 }
 
 /* IE6 sets dynamically generated links as visited. */
 div#toc a:visited { color: blue; }
-
-/* Because IE6 child selector is broken. */
-div.olist2 ol {
-  list-style-type: lower-alpha;
-}
-div.olist2 div.olist ol {
-  list-style-type: decimal;
-}
 </style>
 <script type="text/javascript">
 /*<![CDATA[*/
-window.onload = function(){generateToc(2)}
+window.onload = function(){asciidoc.footnotes(); asciidoc.toc(2);}
+var asciidoc = {  // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
 /* Author: Mihai Bazon, September 2002
  * http://students.infoiasi.ro/~mishoo
  *
@@ -353,53 +435,55 @@ window.onload = function(){generateToc(2)}
  */
 
  /* modified by Troy D. Hanson, September 2006. License: GPL */
- /* modified by Stuart Rackham, October 2006. License: GPL */
-
-function getText(el) {
-  var text = "";
-  for (var i = el.firstChild; i != null; i = i.nextSibling) {
-    if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
-      text += i.data;
-    else if (i.firstChild != null)
-      text += getText(i);
-  }
-  return text;
-}
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
 
-function TocEntry(el, text, toclevel) {
-  this.element = el;
-  this.text = text;
-  this.toclevel = toclevel;
-}
+// toclevels = 1..4.
+toc: function (toclevels) {
 
-function tocEntries(el, toclevels) {
-  var result = new Array;
-  var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
-  // Function that scans the DOM tree for header elements (the DOM2
-  // nodeIterator API would be a better technique but not supported by all
-  // browsers).
-  var iterate = function (el) {
+  function getText(el) {
+    var text = "";
     for (var i = el.firstChild; i != null; i = i.nextSibling) {
-      if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
-        var mo = re.exec(i.tagName)
-        if (mo)
-          result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
-        iterate(i);
+      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+        text += i.data;
+      else if (i.firstChild != null)
+        text += getText(i);
+    }
+    return text;
+  }
+
+  function TocEntry(el, text, toclevel) {
+    this.element = el;
+    this.text = text;
+    this.toclevel = toclevel;
+  }
+
+  function tocEntries(el, toclevels) {
+    var result = new Array;
+    var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+    // Function that scans the DOM tree for header elements (the DOM2
+    // nodeIterator API would be a better technique but not supported by all
+    // browsers).
+    var iterate = function (el) {
+      for (var i = el.firstChild; i != null; i = i.nextSibling) {
+        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+          var mo = re.exec(i.tagName);
+          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+          }
+          iterate(i);
+        }
       }
     }
+    iterate(el);
+    return result;
   }
-  iterate(el);
-  return result;
-}
 
-// This function does the work. toclevels = 1..4.
-function generateToc(toclevels) {
   var toc = document.getElementById("toc");
-  var entries = tocEntries(document.getElementsByTagName("body")[0], toclevels);
+  var entries = tocEntries(document.getElementById("content"), toclevels);
   for (var i = 0; i < entries.length; ++i) {
     var entry = entries[i];
     if (entry.element.id == "")
-      entry.element.id = "toc" + i;
+      entry.element.id = "_toc_" + i;
     var a = document.createElement("a");
     a.href = "#" + entry.element.id;
     a.appendChild(document.createTextNode(entry.text));
@@ -409,11 +493,61 @@ function generateToc(toclevels) {
     toc.appendChild(div);
   }
   if (entries.length == 0)
-    document.getElementById("header").removeChild(toc);
+    toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+  var cont = document.getElementById("content");
+  var noteholder = document.getElementById("footnotes");
+  var spans = cont.getElementsByTagName("span");
+  var refs = {};
+  var n = 0;
+  for (i=0; i<spans.length; i++) {
+    if (spans[i].className == "footnote") {
+      n++;
+      // Use [\s\S] in place of . so multi-line matches work.
+      // Because JavaScript has no s (dotall) regex flag.
+      note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+      noteholder.innerHTML +=
+        "<div class='footnote' id='_footnote_" + n + "'>" +
+        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+        n + "</a>. " + note + "</div>";
+      spans[i].innerHTML =
+        "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+        "' title='View footnote' class='footnote'>" + n + "</a>]";
+      var id =spans[i].getAttribute("id");
+      if (id != null) refs["#"+id] = n;
+    }
+  }
+  if (n == 0)
+    noteholder.parentNode.removeChild(noteholder);
+  else {
+    // Process footnoterefs.
+    for (i=0; i<spans.length; i++) {
+      if (spans[i].className == "footnoteref") {
+        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+        href = href.match(/#.*/)[0];  // Because IE return full URL.
+        n = refs[href];
+        spans[i].innerHTML =
+          "[<a href='#_footnote_" + n +
+          "' title='View footnote' class='footnote'>" + n + "</a>]";
+      }
+    }
+  }
+}
+
 }
 /*]]>*/
 </script>
-<title>SITPLUS Manual</title>
 </head>
 <body>
 <div id="header">
@@ -423,33 +557,34 @@ function generateToc(toclevels) {
   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
 </div>
 </div>
+<div id="content">
 <div id="preamble">
 <div class="sectionbody">
 <div class="imageblock">
 <div class="content">
-<img src="images/sitplus_logo_120x120.png" alt="images/sitplus_logo_120x120.png"/>
+<img src="images/sitplus_logo_120x120.png" alt="images/sitplus_logo_120x120.png" />
 </div>
 </div>
 <div class="imageblock">
 <div class="content">
-<img src="images/sitpluslogo_med.png" alt="SITPLUS Logo" title="SITPLUS Logo"/>
+<img src="images/sitpluslogo_med.png" alt="SITPLUS Logo" />
 </div>
 </div>
 </div>
 </div>
 <h2 id="_introduction">1. Introduction</h2>
 <div class="sectionbody">
-<div class="para"><p>SITPLUS is a free software framework whose main goal is to provide
-recreational activities for people with multiple disabilities. It offers new
-forms of interaction based on computer vision, voice and other peripherals to
-produce a result in the form of image and sound. Inspired by the cause and
+<div class="paragraph"><p>SITPLUS is a free software framework whose main goal is to provide
+ludic-therapeutic activities for people with multiple disabilities. It offers
+new forms of interaction based on computer vision, voice and other peripherals
+to produce a result in the form of image and sound. Inspired by the cause and
 effect applications, SITPLUS provides a tool for continuous and remote
 interaction, attainable to the majority of people with multiple disabilities.</p></div>
 </div>
 <h2 id="_how_to_install">2. How to install</h2>
 <div class="sectionbody">
 <h3 id="_requirements">2.1. Requirements</h3><div style="clear:left"></div>
-<div class="ilist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 Dual core processor running at 1.5Ghz or higher.
@@ -483,14 +618,14 @@ or projector.
 </li>
 <li>
 <p>
-Pure Data (pd)
+Pure Data (pd) extendend version (pd-extended)
 </p>
 </li>
 <li>
 <p>
 Supported operating systems:
 </p>
-<div class="ilist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 Microsoft Windows XP SP3/Vista/7
@@ -505,11 +640,11 @@ GNU/Linux
 </li>
 </ul></div>
 <h3 id="_installation_process">2.2. Installation process</h3><div style="clear:left"></div>
-<div class="para"><p>You can download the latest SITPLUS version from
+<div class="paragraph"><p>You can download the latest SITPLUS version from
 <a href="http://sitplus.appctarragona.org">SITPLUS website</a>. A Windows installation
 package is provided. For GNU/Linux you might need to fetch the sources and
 compile them.</p></div>
-<div class="olist"><ol>
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Before installing SITPLUS first uninstall any previous version.
@@ -519,7 +654,7 @@ Before installing SITPLUS first uninstall any previous version.
 <p>
 Install Pure Data (pd).
 </p>
-<div class="ilist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 <strong>Windows.</strong> Download and install <strong>with the default options</strong>
@@ -545,39 +680,39 @@ Install SITPLUS.
 </div>
 <h2 id="_running_sitplus">3. Running SITPLUS</h2>
 <div class="sectionbody">
-<div class="para"><p>Before running SITPLUS make sure that the required devices such as sound input
+<div class="paragraph"><p>Before running SITPLUS make sure that the required devices such as sound input
 (i.e. a microphone) and output, web camera, Wii Remote, etc. are already
 installed and work properly. Set also the system sound volume (both for
 recording and playback) accordingly.</p></div>
-<div class="para"><p>Once started check the configuration options under the <em><em>'Configuration</em>'</em>
+<div class="paragraph"><p>Once started check the configuration options under the <em>'<em>Configuration</em>'</em>
 menu. To use a Wii Remote you must pair it with the computer, check
 <a href="#wii-remote-configuration">Wii Remote Configuration</a> for further details.
 Check also how to configure Pure Data. <a href="#pd-config">Pure Data Configuration</a>.</p></div>
-<div class="para"><p>Currently, activities can be started either by choosing <em><em>'Start…</em>'</em> or
-<em><em>'Load file…</em>'</em> under the <em><em>'Activity</em>'</em> menu. The former option allows to
+<div class="paragraph"><p>Currently, activities can be started either by choosing <em>'<em>Start…</em>'</em> or
+<em>'<em>Load file…</em>'</em> under the <em>'<em>Activity</em>'</em> menu. The former option allows to
 select which input channels to use (camera, voice and/or Wii Remote) before
 starting one of the built-in the activities. The later option allows to load a
 .sp file (some .sp files are provided under sp/ folder).</p></div>
 <h3 id="built-in-activities">3.1. Built-in activities</h3><div style="clear:left"></div>
-<div class="para"><p>Although SITPLUS is conceived as a framework which allows for several ways
+<div class="paragraph"><p>Although SITPLUS is conceived as a framework which allows for several ways
 of customization, it currently provides some built-in activities which combine
 different input methods (camera tracker, voice input and Wii Remote based
 motion sensing) with real-time MIDI sound generation and a graphical collage.</p></div>
 <div class="imageblock">
 <div class="content">
-<img src="images/activity.png" alt="Activity screenshot" title="Activity screenshot"/>
+<img src="images/activity.png" alt="Activity screenshot" />
 </div>
-<div class="image-title">Figure: Activity screenshot</div>
+<div class="image-title">Figure 1: Activity screenshot</div>
 </div>
-<div class="para"><p>The screenshot depicts an activity which combines the use of the three input
+<div class="paragraph"><p>The screenshot depicts an activity which combines the use of the three input
 channels is shown. Using this activity the user can play a MIDI musical score
 though the motion picked up using the camera and/or a wiimote.
 Motion is also use to make the graphical collage evolve. At the same time,
-the user's voice is also picked up, processed using the chosen effects and
-played it back to the loudspeakers. Moreover, user's voice also makes the
+the user’s voice is also picked up, processed using the chosen effects and
+played it back to the loudspeakers. Moreover, user’s voice also makes the
 collage evolve.</p></div>
-<div class="para"><p>The window is organized in three main areas:</p></div>
-<div class="ilist"><ul>
+<div class="paragraph"><p>The window is organized in three main areas:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 The left area holds input channel options organized in a notebook.
@@ -597,27 +732,45 @@ The right area holds the graphical output controls.
 </div>
 <h2 id="_configuration">4. Configuration</h2>
 <div class="sectionbody">
-<h3 id="wii-remote-configuration">4.1. Wii Remote Configuration</h3><div style="clear:left"></div>
-<div class="para"><p>To be able to connect a Wii Remote device (aka wiimote) - currently the
+<h3 id="midi-configuration">4.1. MIDI Output Configuration</h3><div style="clear:left"></div>
+<div class="paragraph"><p>To set up the MIDI output to use, select <em>'Configuration</em>' and then <em>'MIDI
+Out…</em>'. The configuration dialogue allows to choose and test a MIDI device.</p></div>
+<div class="paragraph"><p>If you do not have an external MIDI module attached to your computer or a
+similar device (which is the most common scenario), you need a software
+synthesizer in order to play MIDI sounds.</p></div>
+<div class="paragraph"><p><strong>Windows</strong> ships a software synthesizer called "Microsoft GS Wavetable Synth".
+TIP: to reduce the latency of this synthesizer take a look
+<a href="http://ocremix.org/forums/showthread.php?t=23223">here</a>.</p></div>
+<div class="paragraph"><p>On <strong>GNU/Linux</strong> most distributions provide binary packages for an high quality
+MIDI synthesizer called TiMidity++.</p></div>
+<div class="paragraph"><p>To install TiMidity++ on Debian/Ubuntu run:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>sudo apt-get install timidity freepats</tt></pre>
+</div></div>
+<div class="paragraph"><p>TODO: <a href="http://ubuntuforums.org/showthread.php?t=789578">http://ubuntuforums.org/showthread.php?t=789578</a>
+<a href="http://www.pulseaudio.org/wiki/PerfectSetup">http://www.pulseaudio.org/wiki/PerfectSetup</a></p></div>
+<h3 id="wii-remote-configuration">4.2. Wii Remote Configuration</h3><div style="clear:left"></div>
+<div class="paragraph"><p>To be able to connect a Wii Remote device (aka wiimote) - currently the
 standard Wii Remote (also with Motion Plus) and the Balance Board are
 supported - you need a bluetooth adapter. The configuration of such device is
 beyond the scope of this manual.</p></div>
-<div class="para"><p>On Windows you first need to pair you wiimote with the computer, see
+<div class="paragraph"><p>On Windows you first need to pair you wiimote with the computer, see
 <a href="#pairing-wiimote">Pairing the wiimote</a>.</p></div>
-<div class="para"><p>To check if the wiimote is properly detected access Configuration → Wii
+<div class="paragraph"><p>To check if the wiimote is properly detected access Configuration → Wii
 Remotes and press the “Reconnect” button (on GNU/Linux you might need to
 simultaneously press buttons “1” and “2” on the wiimote before
 reconnecting). Once connected the wiimote will rumble and the dialogue will
 be updated.</p></div>
 <div class="imageblock">
 <div class="content">
-<img src="images/wiimotesconfig.png" alt="Wii remote screenshot" title="Wii remote screenshot"/>
+<img src="images/wiimotesconfig.png" alt="Wii remote screenshot" />
 </div>
-<div class="image-title">Figure: Wii remotes configuration screenshot</div>
+<div class="image-title">Figure 2: Wii remotes configuration screenshot</div>
 </div>
-<h4 id="pairing-wiimote">4.1.1. Pairing the wiimote (Windows only)</h4>
-<div class="para"><p>The basic steps are:</p></div>
-<div class="olist"><ol>
+<h4 id="pairing-wiimote">4.2.1. Pairing the wiimote (Windows only)</h4>
+<div class="paragraph"><p>The basic steps are:</p></div>
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Open the Bluetooth Device configuration. Depending on your Windows version
@@ -649,13 +802,13 @@ Select the newly detected device and pair it without using codes.
 </p>
 </li>
 </ol></div>
-<div class="para"><p>If the process succeeded, LEDs will keep flashing. Note that after a system
+<div class="paragraph"><p>If the process succeeded, LEDs will keep flashing. Note that after a system
 reboot you need to repeat this process again.</p></div>
-<div class="para"><p>Sometimes (if the wiimote was not properly shut down) you might need to reset
+<div class="paragraph"><p>Sometimes (if the wiimote was not properly shut down) you might need to reset
 it by removing the batteries and pressing “1” and “2” before putting them
 into again.</p></div>
-<h3 id="pd-config">4.2. Pure Data Configuration</h3><div style="clear:left"></div>
-<div class="olist"><ol>
+<h3 id="pd-config">4.3. Pure Data Configuration</h3><div style="clear:left"></div>
+<div class="olist arabic"><ol class="arabic">
 <li>
 <p>
 Open the audio configuration dialogue (Configuration → Pure Data).
@@ -667,7 +820,7 @@ Once opened you should hear a continuous sound. If no sound is present
 make sure you have previously closed other applications dealing with sound
 (e.g. media players, web browsers, etc.) and that system sound settings are
 properly set. <strong>NOTE:</strong> on Windows Vista/7 it is advised to <strong>not to use</strong> ASIO
-drivers on Pure Data, otherwise MIDI sound won't work. For further information
+drivers on Pure Data, otherwise MIDI sound won’t work. For further information
 about Pure Data check <a href="http://crca.ucsd.edu/~msp/Pd_documentation/">Pd
 documentation</a>.
 </p>
@@ -682,17 +835,17 @@ You can also check if the microphone works properly by selecting
 </ol></div>
 <div class="imageblock">
 <div class="content">
-<img src="images/pdconfig.png" alt="PD configuration dialogue" title="PD configuration dialogue"/>
+<img src="images/pdconfig.png" alt="PD configuration dialogue" />
 </div>
-<div class="image-title">Figure: PD configuration dialogue screenshot</div>
+<div class="image-title">Figure 3: PD configuration dialogue screenshot</div>
 </div>
 </div>
 <h2 id="_customization">5. Customization</h2>
 <div class="sectionbody">
-<div class="para"><p>SITPLUS allows different ways of customization ranging from creating new
+<div class="paragraph"><p>SITPLUS allows different ways of customization ranging from creating new
 musical scores or graphical collages to developing your own components.</p></div>
-<div class="para"><p>What can be customized?</p></div>
-<div class="ilist"><ul>
+<div class="paragraph"><p>What can be customized?</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 <strong>Musical scores.</strong> The <tt>scores/</tt> directory contains musical scores that the
@@ -712,7 +865,7 @@ behaviour and contents of the graphical collages. See
 a detailed description.  Under <tt>graphics/mod_collage_xml/</tt>
 there are two folders:
 </p>
-<div class="ilist"><ul>
+<div class="ulist"><ul>
 <li>
 <p>
 <tt>activities/</tt>: it holds the activities which will be draw in the
@@ -736,15 +889,15 @@ directory. It contains scripts whose format is specified in <a href="activities.
 </div>
 <h2 id="_information_for_developers">6. Information for developers</h2>
 <div class="sectionbody">
-<div class="para"><p>SITPLUS is built around a core C++ library (spcore) which provides basic
+<div class="paragraph"><p>SITPLUS is built around a core C++ library (spcore) which provides basic
 services such as module loading, component instantiation, basic types and
 internalization among others, and base classes to develop new components.</p></div>
-<div class="para"><p>The basic building block is the component (IComponent interface). A component
+<div class="paragraph"><p>The basic building block is the component (IComponent interface). A component
 is a processing unit which provides input and/or output pins and an optional
 UI panel. Components can be arranged in a composite and its pins can be
 connected to build data-flow oriented applications.</p></div>
-<div class="para"><p>Along with with the core, two helper libraries are also provided:</p></div>
-<div class="ilist"><ul>
+<div class="paragraph"><p>Along with with the core, two helper libraries are also provided:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 sphost: provides some helper functions and classes to develop final
@@ -758,8 +911,8 @@ widgets_base: provides UI base classes
 </p>
 </li>
 </ul></div>
-<div class="para"><p>Finally, several modules are also provided:</p></div>
-<div class="ilist"><ul>
+<div class="paragraph"><p>Finally, several modules are also provided:</p></div>
+<div class="ulist"><ul>
 <li>
 <p>
 mod_camera: components and types to deal with camera capture.
@@ -796,17 +949,17 @@ mod_wiimotes: components and types to use Wii remotes
 </p>
 </li>
 </ul></div>
-<div class="para"><p>One of the goals of SITPLUS is to become GUI toolkit agnostic. Currently
+<div class="paragraph"><p>One of the goals of SITPLUS is to become GUI toolkit agnostic. Currently
 it uses wxWidgets and most modules provide UI panels based on this toolkit,
-but the core itself has not an strong dependency (component's method GetGUI
+but the core itself has not an strong dependency (component’s method GetGUI
 expects wxWindows types though this is easily changeable by just defining a
 neutral window type, the core itself provides methods such as InitGUISupport,
 RunMessageLoop and CleanupGUISupport which are based on wx).</p></div>
-<div class="para"><p>(This section is a draft and needs to be extended).</p></div>
+<div class="paragraph"><p>(This section is a draft and needs to be extended).</p></div>
 </div>
 <h2 id="_project_origin">7. Project origin</h2>
 <div class="sectionbody">
-<div class="para"><p>SITPLUS was born as a research project in the Cerebral Palsy Centre
+<div class="paragraph"><p>SITPLUS was born as a research project in the Cerebral Palsy Centre
 <a href="http://www.appctarragona.org/">APPC</a> of Tarragona (Spain) in collaboration
 with <a href="http://www.crea-si.com">CREA Software Systems</a> and others.
 SITPLUS is the result of more than three years of research,
@@ -823,10 +976,10 @@ for many people with moderate to severe impairments, but is also very
 motivating for users with mild impairments.</p></div>
 <div class="imageblock">
 <div class="content">
-<img src="images/sitpluslab.jpg" alt="SITPLUS laboratory in the APPC" title="SITPLUS laboratory in the APPC"/>
+<img src="images/sitpluslab.jpg" alt="SITPLUS laboratory in the APPC" />
 </div>
 </div>
-<div class="para"><p>Although SITPLUS focuses on people with cerebral palsy, we believe
+<div class="paragraph"><p>Although SITPLUS focuses on people with cerebral palsy, we believe
 that it could benefit other people with cognitive disabilities.
 Moreover, it can also be useful as a platform for game or interactive
 music and visual arts research. Indeed, SITPLUS is conceived as an
@@ -839,9 +992,11 @@ behind this model is to allow reusing those components to provide rich
 interactive scenarios whilst keeping simple its further development and
 usage.</p></div>
 </div>
+</div>
+<div id="footnotes"><hr /></div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2011-06-21 18:40:36 CEST
+Last updated 2011-10-14 21:24:16 CEST
 </div>
 </div>
 </body>
diff --git a/doc/manual.txt b/doc/manual.txt
index baa2236..bdce97b 100755
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -33,7 +33,7 @@ Requirements
 - Wii Remote + Bluetooth adapter (optional, for Wii Remote based interaction).
 - (Optional but recommended.) Good quality sound system and secondary display
 or projector.
-- Pure Data (pd)
+- Pure Data (pd) extendend version (pd-extended)
 - Supported operating systems:
 
 	* Microsoft Windows XP SP3/Vista/7
@@ -109,6 +109,31 @@ The window is organized in three main areas:
 Configuration
 -------------
 
+[[midi-configuration]]
+MIDI Output Configuration
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To set up the MIDI output to use, select ''Configuration'' and then ''MIDI 
+Out...''. The configuration dialogue allows to choose and test a MIDI device.
+
+If you do not have an external MIDI module attached to your computer or a 
+similar device (which is the most common scenario), you need a software 
+synthesizer in order to play MIDI sounds.
+
+*Windows* ships a software synthesizer called "Microsoft GS Wavetable Synth".
+TIP: to reduce the latency of this synthesizer take a look
+http://ocremix.org/forums/showthread.php?t=23223[here].
+
+On *GNU/Linux* most distributions provide binary packages for an high quality 
+MIDI synthesizer called TiMidity++.   
+
+To install TiMidity++ on Debian/Ubuntu run: 
+
+	sudo apt-get install timidity freepats
+
+TODO: http://ubuntuforums.org/showthread.php?t=789578
+http://www.pulseaudio.org/wiki/PerfectSetup
+
 [[wii-remote-configuration]]
 Wii Remote Configuration
 ~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/graphics/mod_collage_xml/backgrounds/-No-.xml b/graphics/mod_collage_xml/backgrounds/-No-.xml
index 2ddd400..f29eb04 100755
--- a/graphics/mod_collage_xml/backgrounds/-No-.xml
+++ b/graphics/mod_collage_xml/backgrounds/-No-.xml
@@ -30,6 +30,8 @@
 ]>
 <activity>
 	<module moduleType="CYCLE" delayType="NODELAY">
-		<default></default>
+		<default>
+			<transition transitionType="IDENTITY"/>
+		</default>
 	</module>
 </activity>
diff --git a/graphics/mod_collage_xml/backgrounds/1.-Ona.xml b/graphics/mod_collage_xml/backgrounds/1.-Ona.xml
index 493bfd9..4ec5ba0 100755
--- a/graphics/mod_collage_xml/backgrounds/1.-Ona.xml
+++ b/graphics/mod_collage_xml/backgrounds/1.-Ona.xml
@@ -34,6 +34,10 @@
 		../../pictures/background/ona_animada_2.png,
 		../../pictures/background/ona_animada_3.png" 
 		lapseAnimation="0.1">
-		<default></default>
+		<default>
+			<transition inout="IN" transitionType="IDENTITY"/>
+			<transition inout="OUT" transitionType="IDENTITY"/>
+		</default>
 	</module>
+	
 </activity>
diff --git a/graphics/mod_collage_xml/backgrounds/2.-Pluie.xml b/graphics/mod_collage_xml/backgrounds/2.-Pluie.xml
index cb20c6d..b414154 100755
--- a/graphics/mod_collage_xml/backgrounds/2.-Pluie.xml
+++ b/graphics/mod_collage_xml/backgrounds/2.-Pluie.xml
@@ -34,6 +34,9 @@
 			../../pictures/background/pluja_3.png,
 			../../pictures/background/pluja_4.png,
 			../../pictures/background/pluja_5.png" lapseAnimation="0.1">
-		<default></default>
+		<default>
+			<transition inout="IN" transitionType="IDENTITY"/>
+			<transition inout="OUT" transitionType="IDENTITY"/>
+		</default>
 	</module>
 </activity>
diff --git a/graphics/mod_collage_xml/backgrounds/3.-Zombie.xml b/graphics/mod_collage_xml/backgrounds/3.-Zombie.xml
index bf4b022..4c2d6c8 100755
--- a/graphics/mod_collage_xml/backgrounds/3.-Zombie.xml
+++ b/graphics/mod_collage_xml/backgrounds/3.-Zombie.xml
@@ -30,6 +30,9 @@
 ]>
 <activity>
 	<module moduleType="CYCLE" delayType="NODELAY" listSrcBackground="../../pictures/background/zombies.png" lapseAnimation="2">
-	<default></default>
+		<default>
+			<transition inout="IN" transitionType="IDENTITY"/>
+			<transition inout="OUT" transitionType="IDENTITY"/>
+		</default>
 	</module>
 </activity>
diff --git a/graphics/mod_collage_xml/backgrounds/4.-Mort.xml b/graphics/mod_collage_xml/backgrounds/4.-Mort.xml
index 78de12e..809498b 100755
--- a/graphics/mod_collage_xml/backgrounds/4.-Mort.xml
+++ b/graphics/mod_collage_xml/backgrounds/4.-Mort.xml
@@ -30,6 +30,9 @@
 ]>
 <activity>
 	<module moduleType="CYCLE" delayType="NODELAY" listSrcBackground="../../pictures/background/difunt.png" lapseAnimation="2">
-	<default></default>
+		<default>
+			<transition inout="IN" transitionType="IDENTITY"/>
+			<transition inout="OUT" transitionType="IDENTITY"/>
+		</default>
 	</module>
 </activity>
diff --git a/include/spcore/baseobj.h b/include/spcore/baseobj.h
index bc70a77..9533786 100644
--- a/include/spcore/baseobj.h
+++ b/include/spcore/baseobj.h
@@ -1,27 +1,41 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        baseobj.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		baseobj.h
+* @brief	Reference counted base class for all other classes
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*	
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_BASEOBJ_H
 #define SPCORE_BASEOBJ_H
 
 #include <assert.h>
 #include <boost/detail/atomic_count.hpp>
 #include <boost/intrusive_ptr.hpp>
+#include "spcore/libimpexp.h"
+
+#ifdef _MSC_VER
+#pragma warning(push)
+// 'm_A' : class 'A' needs to have dll-interface to be used by clients of class 'B'
+#pragma warning(disable: 4251)
+// non dll-interface class 'A' used as base for dll-interface class 'B'
+#pragma warning(disable: 4275)
+#endif // _MSC_VER
+
 namespace spcore {
 
 /*
@@ -43,80 +57,99 @@ namespace spcore {
 	which complicates the syntax besides other problems. See:
 
 	http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1449.pdf
-
-	TODO: implement it using the template alias feature of the new
+*/
+/**
+	@todo, TODO: implement it using the template alias feature of the new
 	C++0x standard when it become more widespread.		
 */	
-
 #define SmartPtr boost::intrusive_ptr
 #define smartptr_static_cast boost::static_pointer_cast
 #define smartptr_dynamic_cast boost::dynamic_pointer_cast
 
-///**
-//Base class for all other classes. It makes sure client code do not use delete
-//*/
-class IBaseObject {
-  protected:
-    inline virtual ~IBaseObject();
-
-    inline IBaseObject();
+/**
+	@brief Reference counted base class for all other classes
 
+	This class is used as base to derive other classes within
+	sitplus-lib that need to be reference counted.
 
-  public:
-    inline virtual void AddRef() const;
-
-    inline virtual void Release() const;
+	Note that this implementation relies on inline methods due to
+	its simplicity and to make sure that the "delete this" instruction
+	it is defined within the specific module boundaries. In fact, on
+	WIN32 this class does no generate linkage.
+*/
+class IBaseObject {
+protected:
+	virtual ~IBaseObject() {}
+	/**
+		@brief Protected constructor.
+		
+		Initialises reference counter to 1.
+	*/
+	IBaseObject() : m_refCount(1) {}
+
+public:
+	/**
+		@brief Increment reference counter.
+
+		This method is thread safe.
+	*/
+	void AddRef() const {
+		assert (m_refCount> 0);
+  		++m_refCount;
+	}
 
+	/**
+		@brief Decrement reference counter.
 
-  protected:
-    // Delete current object
-    inline virtual void Destroy() const;
+		Decrement reference counter and destroy the instance if it reaches 0.
+		This method is thread safe.
+	*/
+	void Release() const  {
+  		if (--m_refCount== 0) Destroy();
+	}
 
+protected:
+	/**
+		@brief Delete current object (this). 
+		
+		Inline, so ensure deletion is carried out within module.
+	*/
+	void Destroy() const {
+		delete this;
+	}
 
-	// Assignement operator.
+	/**
+		@brief Assignment operator.
+	*/
 	IBaseObject& operator=( const IBaseObject& ) {
 		// Does nothing. The reference counter should never be copied
 		return *this;
 	}
 
-  private:
+private:
 	// Copy constructor. Disabled
 	IBaseObject ( const IBaseObject& );
 
-    mutable boost::detail::atomic_count m_refCount;
-
+	/**
+		@brief Atomic reference counter.
+	*/
+	mutable boost::detail::atomic_count m_refCount;
 };
-inline IBaseObject::~IBaseObject() {
-}
-
-inline IBaseObject::IBaseObject() : m_refCount(1) {
-}
-
-inline void IBaseObject::AddRef() const {
-  	assert (m_refCount> 0);
-  	++m_refCount;
-}
-
-inline void IBaseObject::Release() const {
-  	if (--m_refCount== 0) Destroy();
-}
-
-// Delete current object. Abstract to force implementation
-// in subclasses to ensure deletion is carried out within module
-inline void IBaseObject::Destroy() const {
-  	delete this;
-}
-
 
 } // namespace spcore
 
 namespace boost
 {
-	inline void intrusive_ptr_add_ref(const ::spcore::IBaseObject * p) {
-		p->AddRef();
-	}
-	inline void intrusive_ptr_release(const ::spcore::IBaseObject * p) {
-		p->Release();
-	}
+inline void intrusive_ptr_add_ref(const ::spcore::IBaseObject * p) {
+	p->AddRef();
+}
+inline void intrusive_ptr_release(const ::spcore::IBaseObject * p) {
+	p->Release();
+}
 };
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 #endif
diff --git a/include/spcore/basetype.h b/include/spcore/basetype.h
index 6f139d1..5cf2e6b 100644
--- a/include/spcore/basetype.h
+++ b/include/spcore/basetype.h
@@ -1,21 +1,25 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        basetype.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		basetype.h
+* @brief	CTypeAny definition and associated helpers
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*	
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_BASETYPE_H
 #define SPCORE_BASETYPE_H
 
@@ -25,25 +29,45 @@
 
 namespace spcore {
 
+// Forward declarations
 class IOutputPin;
 
+/**
+	@brief Type identifiers.
+*/
 enum EBasicID {
   TYPE_INVALID = -1,
   TYPE_ANY = 0
 };
 
-//Base type for all instances that traverses the graph.
-//It supports reference counting
+/**
+	@brief Base class for all types.
+*/
 class CTypeAny : public IBaseObject {
 public:
+	/**
+		@brief Get type ID.
+		@return the identifier of this instance.
+	*/
 	virtual int GetTypeID() const { return m_typeID; }
 	
-	// Composition methods
-	// Return 0 when OK
+	/**
+		@brief Add child instance (interface for composite types).
+		@param component smart pointer to an instance to add as child.
+		@return 0: child added successfully or -1 if error.
+
+		Default definition doesn't allow child instances.
+	*/
 	virtual int AddChild(SmartPtr<CTypeAny> component) {
 		return -1;
 	}
 
+	/**
+		@brief Query children instances (interface for composite types).
+		@return smart pointer to an iterator which can be NULL.
+
+		Default definition doesn't allow child instances.
+	*/
     virtual SmartPtr<IIterator<CTypeAny*> > QueryChildren() const {
 		return SmartPtr<IIterator<CTypeAny*> >(NULL);
 	}
@@ -51,18 +75,15 @@ public:
 	static const char* getTypeName() { return "any"; }
 
 	/**
-		Clone one instance. 
-
-		\param dst: if not NULL tries to perform the copy to the given
-			instance if it is of the same type. If types mismatch
-			new copy will be created on dynamic memory
-
-		\param recurse: is passed untouched to CopyTo. if it is true
+		@brief Performs a copy of this object.
+		@param dst if not NULL and its ID coincides with the ID of this then
+			overwrites dst. If type IDs mismatch a new instance is created and
+			returned.
+		@param recurse is passed untouched to CopyTo. if it is true
 			deep copies are performed on composite types, if false only
-			copies the instance.
-
-		\return an smart pointer to the new instance which can be the same 
-			to dst, a new one or NULL if the instance doesn't support copies
+			copies the instance but not its children.
+		@return smart pointer to the new instance which can be dst, a new one or 
+			NULL if this doesn't support copies.
 	*/
 	virtual SmartPtr<CTypeAny> Clone (CTypeAny * dst, bool recurse) const {
 		if (this== dst) return SmartPtr<CTypeAny>(dst);
@@ -76,7 +97,7 @@ public:
 				return SmartPtr<CTypeAny>();
 		}
 		else {
-			// Diferent types or dst NULL
+			// Different types or dst NULL
 			ICoreRuntime* cr= getSpCoreRuntime(); assert (cr);
 			SmartPtr<CTypeAny> newInstance= cr->CreateTypeInstance(m_typeID);
 			if (newInstance.get()== NULL) {
@@ -85,69 +106,111 @@ public:
 				return newInstance;
 			}		
 						
-			if (CopyTo(*newInstance, recurse)) {
-				// Old instance is not needed anymore
-				//if (dst) dst->Release();
+			if (CopyTo(*newInstance, recurse))
 				return newInstance;
-			}
 			else
 				// Copy failed
 				return SmartPtr<CTypeAny>();
 		}
 	}
 
+	/**
+		@brief Create output pins of type CTypeAny.
+		@param name name that will be given to the pin.
+		
+		Pins created with this function can be attached to components 
+		and instances of any type. If calls to api functions of the pin
+		need to be thread safe see CreateOutputPinLockAny() method.
+	*/
 	static SmartPtr<IOutputPin> CreateOutputPinAny(const char* name) {
 		return getSpCoreRuntime()->CreateOutputPin(CTypeAny::getTypeName(), name, false);
 	}
+	
+	/**
+		@brief Create thread safe output pins of type CTypeAny.
+		@param name name that will be given to the pin.
+		
+		Pins created with this function can be attached to components 
+		and instances of any type.
+	*/
 	static SmartPtr<IOutputPin> CreateOutputPinLockAny(const char* name) {
 		return getSpCoreRuntime()->CreateOutputPin(CTypeAny::getTypeName(), name, true);
 	}
 
-  protected:
+protected:
+	/**
+		@brief Protected constructor.
+		@param id numerical ID given to this instance.
+	*/
 	CTypeAny(int id) { assert (id>= 0); m_typeID= id; }
+	
+	/**
+		@brief Virtual destructor.
+	*/
 	virtual ~CTypeAny() {}
 
 	/**
-		Copies this into dst
-
-		\param dst copy destination, is allways an already created instance
-		\param recurse, intended for allowing to perform deep copies of
-			composites when true
+		@brief Copies this into dst
+		@param dst copy destination. Is always an existing instance.
+		@param recurse perform deep copies of	composite objects when true.
+		@todo make pure virtual?
 	*/
-	virtual bool CopyTo ( CTypeAny& , bool ) const {
+	virtual bool CopyTo ( CTypeAny& dst, bool recurse) const {
+		// This method should not be called directly
 		// Calls are expected to be performed on derived classes
 		assert (false);
+		// Unused parameters
+		(void) dst;
+		(void) recurse;
 		return false;
 	}
 
-	// Assignement operator. Available to derived classe to allow to use 
-	// the compiler generated copy constructor. Note that copying between 
-	// instances with different m_typeID it is not allowed and derived
-	// classed must ensure this. Use with care.
+	/**
+		@brief Assignment operator. 
+
+		Available to derived classes to allow to use the compiler generated copy 
+		constructor. Note that copying between instances with different IDs it 
+		is not allowed and also derived classed must ensure this. Use with care.
+	*/
 	CTypeAny& operator=( const CTypeAny& that )	{
 		assert (this->m_typeID== that.m_typeID);
 		return *this;
 	}
 
-  private:
-	// disable copy constructor
+private:
+	// Disable copy constructor.
 	CTypeAny ( const CTypeAny& );      
-	
 
-    int m_typeID;
+	//
+	// Attributes
+	//
+	int m_typeID;
 };
 
-
+/**
+	@brief Interface for intances factory.
+	
+	Conforming implementation should provide definition of GetName() and 
+	CreateInstance() methods.
+*/
 class ITypeFactory : public IBaseObject {
-  protected:
+protected:
 	virtual ~ITypeFactory() {}
 
+public:
 
-  public:
+	/**
+		@brief Return the name of the type of the instances this factory creates.
+		@return name of the type of the instances this factory creates.
+	*/
     virtual const char* GetName() const = 0;
 
+	/**
+		@brief Create instance.
+		@param id numerical ID of the type.
+		@todo store the ID in the factory once registered.
+	*/
     virtual SmartPtr<CTypeAny> CreateInstance(int id) = 0;
-
 };
 
 
diff --git a/include/spcore/basetypeimpl.h b/include/spcore/basetypeimpl.h
index 7fac26d..fbb82e6 100644
--- a/include/spcore/basetypeimpl.h
+++ b/include/spcore/basetypeimpl.h
@@ -1,21 +1,25 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        basetypeimpl.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/** 
+* @file		basetypeimpl.h
+* @brief	Support classes to implement new types within lib-sitplus.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_BASETYPEIMPL_H
 #define SPCORE_BASETYPEIMPL_H
 
@@ -27,9 +31,15 @@
 namespace spcore {
 
 /**
- Template for basic types factories
+	@brief Template to create basic factories of basic types.
+	@tparam T class of objects this factory constructs.
+
+	This template allows to create type factories given a class
+	which provides an static method getTypeName() and a constructor
+	which accepts the ID as parameter.
 */
-template<class T> class SimpleTypeFactory : public ITypeFactory
+template<class T> 
+class SimpleTypeFactory : public ITypeFactory
 {
 public:
 	virtual const char * GetName() const {
@@ -41,7 +51,9 @@ public:
 };
 
 /**
-	Adapter to implement composite types. For non-composite type inherit directly from CTypeAny
+	@brief Adapter to implement composite types.
+	
+	For non-composite type inherit directly from CTypeAny.
 */
 class CompositeTypeAdapter : public CTypeAny
 {
@@ -57,6 +69,7 @@ public:
 	virtual SmartPtr<IIterator<CTypeAny*> > QueryChildren() const {
 		return SmartPtr<IIterator<CTypeAny*> > (new CIteratorVector<CTypeAny*>(m_children), false);		
 	}
+
 protected:
 	CompositeTypeAdapter(int id) : CTypeAny(id) {}
 	virtual ~CompositeTypeAdapter() {
@@ -70,7 +83,7 @@ protected:
 
 		CompositeTypeAdapter* dst_cast= sptype_static_cast<CompositeTypeAdapter>(&dst);
 				
-		// Contents are copyed by the derived class that should call this method
+		// Contents are copied by the derived class that should call this method
 
 		if (recurse) {
 			// 
@@ -88,10 +101,12 @@ protected:
 					return false;
 				}
 				if (newInstance.get()!= *it_dst) {
-					// TODO: remove the following assert which is only intended to
-					// detect when this portion of code is used. Note that this means
-					// that the old dst had a different type form the src which is
-					// strange but not, in principle, wrong
+					/**
+					 @todo, TODO: remove the following assert which is only intended to
+					 detect when this portion of code is used. Note that this means
+					 that the old dst had a different type form the src which is
+					 strange but not, in principle, wrong
+					*/
 					assert (false);
 
 					// Copy process created a new instance. Substitute in vector and
@@ -146,41 +161,93 @@ private:
 
 
 /**
-	Template to define basic type common static operations
+	@brief Template to define common static operations of a basic type.
+	@tparam BASE class which provide the basic operations of the type.
+	@tparam RESULT resulting class (i.e. the class of the type instances).
+		Used for return types and type castings.
+
+	Provides convenience functions to allow to obtain the type ID and to
+	create instances and pin using the name of the class directly in
+	in the C++ sources.	
+	
+	Intended for being used internally. Use SimpleType template class if you 
+	are	implementing a new sort of type.
+
+	Ex: CTypeInt::CreateInstance() creates a new integer instance.
 */
 template <class BASE, class RESULT>
 class SimpleTypeBasicOperations
 {
 public:
+	/**
+		@brief Get numeral type identifier using core services.
+		@return type ID or TYPE_INVALID if type is undefined.
+
+		First call uses the type name to obtain the ID, but
+		further calls use a cached copy of the ID.
+	*/
 	static int getTypeID() { 
 		static int typeID= TYPE_INVALID;
 		if (typeID== TYPE_INVALID) typeID= getSpCoreRuntime()->ResolveTypeID(BASE::getTypeName());
 		return typeID;
 	}
+
+	/**
+		@brief Create an instance of the type.
+		@return smart pointer to the new instance which can store NULL when error.
+	*/
 	static SmartPtr<RESULT> CreateInstance() {
 		int typeID= SimpleTypeBasicOperations::getTypeID();
 		if (typeID== TYPE_INVALID) return SmartPtr<RESULT>(NULL, false);    			
 		return SmartPtr<RESULT>(static_cast<RESULT *>(getSpCoreRuntime()->CreateTypeInstance(typeID).get()));		
 	}
-	// Note that the two methods below can throw although 
-	// shouldn't unless a fatal error ocurrs
+
+	/**
+		@brief Create output pin of the type.
+		@param name identifier the new pin will be given.
+		@return smart pointer to the newly created output pin.
+		@todo check usage and decide whether to catch exceptions and log errors
+
+		Note that this method below can throw although shouldn't unless a fatal error occur.
+	*/	
 	static SmartPtr<IOutputPin> CreateOutputPin(const char* name) {
 		return SmartPtr<IOutputPin>(new COutputPin (name, BASE::getTypeName()), false);
 	}
+	
+	/**
+		@brief Create a thread safe output pin of the type.
+		@param name identifier the new pin will be given.
+		@return smart pointer to the newly created output pin.
+		@todo check usage and decide whether to catch exceptions and log errors
+
+		Note that this method below can throw although shouldn't unless a fatal error occur.
+	*/
 	static SmartPtr<IOutputPin> CreateOutputPinLock(const char* name) {
 		return SmartPtr<IOutputPin>(new COutputPinLock (name, BASE::getTypeName()), false);
 	}
 };
 
 /**
-	Template to define basic types
+	@brief Template to define basic types
+	@tparam BASE class which provide the basic operations of the type.
 */
 
 template<class BASE>
 class SimpleType : public BASE, public SimpleTypeBasicOperations<BASE, SimpleType<BASE> >
 {
+	/**
+		Template class SimpleTypeFactory is the only allowed.
+		to create instances of this class.
+	*/
 	friend class SimpleTypeFactory<SimpleType>;
+
 protected:
+	/**
+		@brief Protected constructor.
+		@param typeID type identifier the new instance will be given. 
+		Note that this constructor only can be called from a 
+		SimpleTypeFactory instance.
+	*/
 	SimpleType(int typeID) : BASE(typeID) {}
 		
 private:
@@ -189,19 +256,33 @@ private:
 	SimpleType& operator=( const SimpleType& );     // not implemented
 };
 
-//
-// Contents template class for scalar types
-//
+/**
+	@brief Contents template class for scalar types.
+	@tparam T scalar type to be stored.
+*/
 template<class T>
 class ScalarTypeContents : public CTypeAny {
 	BOOST_STATIC_ASSERT (!boost::is_pointer<T>::value);
-public:	
+public:
+	/**
+		@brief Get the stored value
+		@return stored value
+		@todo remove const
+	*/
 	virtual const T getValue() const { return m_value; }
+
+	/**
+		@brief Store a new value
+		@param value
+	*/
 	virtual void setValue(T value) { m_value= value; }
+
 protected:
-	ScalarTypeContents(int id) : CTypeAny(id) {
-		m_value= 0;
-	}
+	/**
+		@brief Protected constructor.
+		@param id identifier the new instance will be given.
+	*/
+	ScalarTypeContents(int id) : CTypeAny(id) { m_value= 0; }
 	
 	virtual bool CopyTo ( CTypeAny& dst, bool ) const {
 		assert (dst.GetTypeID()== this->GetTypeID());
diff --git a/include/spcore/basictypes.h b/include/spcore/basictypes.h
index 1040344..35fcedc 100644
--- a/include/spcore/basictypes.h
+++ b/include/spcore/basictypes.h
@@ -1,21 +1,25 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        basictypes.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		basictypes.h
+* @brief	Definition int, bool, float, string and composite core types.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010-11 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_BASICTYPES_H
 #define SPCORE_BASICTYPES_H
 
@@ -37,24 +41,48 @@ public:
 	CTypeIntContents(int id) : ScalarTypeContents<int>(id) {}
 	static inline const char* getTypeName() { return "int"; }
 };
+
+/**
+	@brief Integer type for lib-sitplus.
+	
+	See class ScalarTypeContents and SimpleTypeBasicOperations for
+	available operations.
+*/
 typedef SimpleType< CTypeIntContents > CTypeInt;
 
+
 // float
 class CTypeFloatContents : public ScalarTypeContents<float> {
 public:
 	CTypeFloatContents(int id) : ScalarTypeContents<float>(id) {}
 	static inline const char* getTypeName() { return "float"; }
 };
+
+/**
+	@brief Float type for lib-sitplus.
+	
+	See class ScalarTypeContents and SimpleTypeBasicOperations for
+	available operations.
+*/
 typedef SimpleType< CTypeFloatContents > CTypeFloat;
 
+
 // bool
 class CTypeBoolContents : public ScalarTypeContents<bool> {
 public:
 	CTypeBoolContents(int id) : ScalarTypeContents<bool>(id) {}
 	static inline const char* getTypeName() { return "bool"; }
 };
+
+/**
+	@brief Boolean type for lib-sitplus.
+	
+	See class ScalarTypeContents and SimpleTypeBasicOperations for
+	available operations.
+*/
 typedef SimpleType< CTypeBoolContents > CTypeBool;
 
+
 // string
 class CTypeStringContents : public CTypeAny
 {
@@ -75,8 +103,14 @@ private:
 	std::string m_string;
 };
 
+/**
+	@brief String type for lib-sitplus.
+	
+	See class SimpleTypeBasicOperations for	additional operations.
+*/
 typedef spcore::SimpleType< CTypeStringContents > CTypeString;
 
+
 // composite
 class CTypeCompositeContents : public CompositeTypeAdapter
 {
@@ -84,11 +118,16 @@ public:
 	CTypeCompositeContents(int id) : CompositeTypeAdapter(id) {}
 	static inline const char* getTypeName() { return "composite"; }
 
-	// Does not provide a specialized CopyTo method because
+	// Does not provide a specialised CopyTo method because
 	// this class has no data an so the base class method is enough
-	//virtual bool CopyTo ( CTypeAny& dst, bool recurse) const;
 };
 
+/**
+	@brief Composite type for lib-sitplus.
+	
+	See class CompositeTypeAdapter and SimpleTypeBasicOperations for
+	available operations.
+*/
 typedef spcore::SimpleType< CTypeCompositeContents > CTypeComposite;
 
 //
@@ -96,11 +135,10 @@ typedef spcore::SimpleType< CTypeCompositeContents > CTypeComposite;
 // FOR INTERNAL USE ONLY!
 //
 class CBasicTypesModule : public CModuleAdapter {
-  public:
+public:
     CBasicTypesModule();
     virtual const char * GetName() const;
 };
 
-
 } // namespace spcore
 #endif
diff --git a/include/spcore/component.h b/include/spcore/component.h
index c3096b7..35925ff 100644
--- a/include/spcore/component.h
+++ b/include/spcore/component.h
@@ -1,31 +1,32 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        component.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		component.h
+* @brief	Components' related stuff (interfaces and adapters)
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010-12 Cesar Mauri Loba - CREA Software Systems
+*
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_COMPONENT_H
 #define SPCORE_COMPONENT_H
 
 #include "spcore/baseobj.h"
 #include "spcore/coreruntime.h"
 #include <vector>
-using namespace std;
 #include <string>
-using namespace std;
-
 #include "spcore/pin.h"
 #include "spcore/iterator.h"
 #include "spcore/configuration.h"
@@ -34,473 +35,437 @@ using namespace std;
 #include <boost/type_traits.hpp>
 #include <boost/static_assert.hpp>
 
-// Forward declarations
-namespace spcore { 
-	template<class T> class IIterator; 
-	class IInputPin; 
-	class IOutputPin; 
-}
-// TODO: typedef as a neutral window type
+/**
+	@todo typedef as a neutral window type
+*/
 class wxWindow;
 
 namespace spcore {
 
-///**
-//Base class for any kind of component
-//*/
-class IComponent : public IBaseObject {
-  protected:
-    inline virtual ~IComponent();
-
-
-  public:
-    ///**
-    //Return the name of the component
-    //*/
-    virtual const char* GetName() const = 0;
-
-    virtual const char* GetTypeName() const = 0;
-
-    ///**
-    //Opens a window for this component if has one and returns a pointer to it or NULL.
-    //The lifetime of this instance belongs to the component and should never be deleted.
-    //*/
-    virtual wxWindow* GetGUI(wxWindow * parent) = 0;
-
-    // Return 0 when OK
-    virtual int AddChild(SmartPtr<IComponent> component) = 0;
-
-    virtual SmartPtr<IIterator<IComponent*> > QueryComponents() = 0;
-
-    ///**
-    //Returns an iterator which allows to enumerate the input pins of the component.
-    //Returned pointer should be deleted explicitly or (better) using
-    //a IteratorPtr object.
-    //*/
-    virtual SmartPtr<IIterator<IInputPin*> > GetInputPins() = 0;
-
-    ///**
-    //Returns an iterator which allows to enumerate the output pins of the component.
-    //Returned pointer should be deleted explicitly or (better) using
-    //a IteratorPtr object.
-    //*/
-    virtual SmartPtr<IIterator<IOutputPin*> > GetOutputPins() = 0;
-
-    ///**
-    //Returns whether this component provides a thread of execution so that
-    //calls to Start and Stop are meaningful.
-    //*/
-    virtual bool ProvidesExecThread() = 0;
-
-    ///**
-    // Returns whether this component needs to be explicitly Initialized / Finished.
-    //*/
-    virtual bool NeedsInitialization() = 0;
-
-    ///**
-    //Starts the components. This calle only makes sense when the component provides
-    //an execution thread
-    //\return 0 if successfully started, -1 otherwise
-    //\sa ProvidesExecThread
-    //*/
-    virtual int Start() = 0;
-
-    ///**
-    //Stops the component. Only makes sense for components that provide an execution thread.
-    //*/
-    virtual void Stop() = 0;
-
-    ///**
-    //Initializes the component.
-    //\return 0 if successfully initialized, -1 otherwise
-    //\sa NeedsInitialization
-    //*/
-    virtual int Initialize() = 0;
-
-    ///**
-    //Finishes the component.
-    //*/
-    virtual void Finish() = 0;
-
-	/*!
-		\brief Store internal settings
-		\param cfg Configuration object		
-	*/
-	virtual void SaveSettings(IConfiguration& cfg)= 0;
-
-	/*!
-		\brief Store internal settings
-		\param cfg Configuration object		
-	*/
-	virtual void LoadSettings(IConfiguration& cfg)= 0;
-
-    ///**
-    //  Search an input pin given its name
-	//
-	//	\return A pointer to the pin or NULL if not found
-    //*/
-    static inline IInputPin* FindInputPin(IComponent & component, const char * name);
-
-	///**
-    //  Search an output pin given its name
-	//
-	//	\return A pointer to the pin or NULL if not found
-    //*/
-    static inline IOutputPin* FindOutputPin(IComponent & component, const char * name);
-};
-inline IComponent::~IComponent() {
-}
-
-///**
-//  Search a pin given its name
-//*/
-inline IInputPin* IComponent::FindInputPin(IComponent & component, const char * name)
-{
-  	assert (name);
-  	if (!name) return NULL;
-  	SmartPtr<IIterator<IInputPin*> > ipit= component.GetInputPins();
-  	for (; !ipit->IsDone(); ipit->Next()) {
-  		if (strcmp(ipit->CurrentItem()->GetName(), name)== 0) return ipit->CurrentItem();
-  	}
-  	return NULL;
-}
+// Forward declarations
+template<class T> class IIterator; 
+class IInputPin; 
+class IOutputPin; 
 
-inline IOutputPin* IComponent::FindOutputPin(IComponent & component, const char * name)
-{
-	assert (name);
-  	if (!name) return NULL;
-  	SmartPtr<IIterator<IOutputPin*> > opit= component.GetOutputPins();
-  	for (; !opit->IsDone(); opit->Next()) {
-  		if (strcmp(opit->CurrentItem()->GetName(), name)== 0) return opit->CurrentItem();
-  	}
-  	return NULL;
-}
+/**
+	@brief Interface for all components.
+*/
+class IComponent : public IBaseObject {
+protected:
+	virtual ~IComponent() {};
 
-///**
-//Adapter class to implement IComponent conforming classes.
-//
-//This class is intended to be derived to implement leaf type components
-//(i.e. without child components). If you need to implement a component
-//that is composed of children use CCompositeComponentAdapter instead.
-//*/
-class CComponentAdapter : public IComponent {
 public:
-	// Constructor expects, apart from the name, an optional pointer
-	// (can be NULL) to an string contaning initialization arguments
-    inline CComponentAdapter(const char * name, int argc, const char * argv[]);
-
-    inline virtual ~CComponentAdapter();
-
-    inline virtual const char* GetName() const;
-
-    ///**
-    //Opens a window for this component if has one and returns a pointer to it or NULL.
-    //
-    //*/
-    inline virtual wxWindow* GetGUI(wxWindow * parent);
-
-    ///**
-    //Register a child component.
-    //\return 0 when success, <0 otherwise
-    //NOTE the adapter implementation always return -1
-    //*/
+	/**
+		@brief Return the name of the component.
+		@return Pointer to an internally managed string with the name of the component.
+	*/
+	virtual const char* GetName() const = 0;
 
-    inline virtual int AddChild(SmartPtr<IComponent> component);
+	/**
+		@brief Return the name of the type of the component.
+		@return Pointer to an internally managed string with the name.
+	*/
+	virtual const char* GetTypeName() const = 0;
 
-    inline virtual SmartPtr<IIterator<IComponent*> > QueryComponents();
+	/**
+		@brief Opens a window for this component (if it has one).
+		@param parent Pointer to the parent window.
+		@return Pointer to the window or NULL.
 
-    inline virtual SmartPtr<IIterator<IInputPin*> > GetInputPins();
+		The lifetime of this instance belongs to the component and should never be deleted.
+	*/
+	virtual wxWindow* GetGUI(wxWindow * parent) = 0;
 
-    inline virtual SmartPtr<IIterator<IOutputPin*> > GetOutputPins();
+	/**
+		@brief Add a child component.
+		@param component Smart pointer to the child component.
+		@return 0 when OK
 
-    // Tells whether this component provides a thread of execution so that
-    // call to Start and Stop are meaningful
-    inline virtual bool ProvidesExecThread();
+		Note not all components support composition.
+	*/
+	virtual int AddChild(SmartPtr<IComponent> component) = 0;
 
-    // Tells whether this component needs to be explicitly Initialized / Finished
-    inline virtual bool NeedsInitialization();
+	/**
+		@brief Get the list of children compoents.
+		@return Smart pointer to a component iterator. Can be NULL.
 
-    inline virtual int Start();
+		Note not all components support composition.
+	*/
+	virtual SmartPtr<IIterator<IComponent*> > QueryComponents() = 0;
 
-    inline virtual void Stop();
+	/**
+		@brief Get the input pins of a component (if any).
+		@return Smart pointer to an iterator of input pins.
+	*/
+	virtual SmartPtr<IIterator<IInputPin*> > GetInputPins() = 0;
 
-    inline virtual int Initialize();
+	/**
+		@brief Get the output pins of a component (if any).
+		@return Smart pointer to an iterator of output pins.
+	*/
+	virtual SmartPtr<IIterator<IOutputPin*> > GetOutputPins() = 0;
 
-    inline virtual void Finish();
+	/**
+		@brief Returns whether this component provides a thread of execution.
+		@return true or false.
+		
+		Use Start() and Stop() methods to control thread state.
+	*/
+	virtual bool ProvidesExecThread() const = 0;
 
-	virtual void SaveSettings(IConfiguration&) {}
+	/**
+		@brief Starts the component (and children if any). 
+		@return 0 if successfully started, -1 otherwise.
 
-	virtual void LoadSettings(IConfiguration&) {}
+		This call is used to start/stop the component which can perform specific
+		actions to enable/disable it and, when ProvidesExecThread is true then
+		also runs the thread.
+	*/
+	virtual int Start() = 0;
 
-  protected:
-    // Registers a new input pin. Returns -1 in case of error (pin already registered)
-    inline int RegisterInputPin(IInputPin & pin);
+	/**
+		@brief Stops the component. 
+		
+		See comment for Start() method.
+	*/
+	virtual void Stop() = 0;
 
-    // Registers a new input pin. Returns -1 in case of error (pin already registered)
-    inline int RegisterOutputPin(IOutputPin & pin);
+	/**
+		@brief	Initializes the component.
+		@return 0 if successfully initialized, -1 otherwise.		
+	*/
+	virtual int Initialize() = 0;
 
-	// TODO: temporary operation which allows derived classes to change the name
-	// associated with this component. Update project to allow an additional parameter
-	// with a full command-line.
-	//void SetName (const char * name) { m_name= name; }
+	/**
+		@brief Finishes the component.
+	*/
+	virtual void Finish() = 0;
 
-  private:
-    vector<IInputPin *> m_inputPins;
+	/**
+		@brief Store internal settings.
+		@param cfg Configuration object		
+	*/
+	virtual void SaveSettings(IConfiguration& cfg)= 0;
 
-    vector<IOutputPin *> m_outputPins;
+	/**
+		@brief Store internal settings.
+		@param cfg Configuration object.		
+	*/
+	virtual void LoadSettings(IConfiguration& cfg)= 0;
 
-    string m_name;
+	/**
+		@brief Static method which searches an input pin given its name.
+		@param component Component
+		@param name Name of the input pin to look for.
+		@return Pointer to the pin or NULL if not found.
+	*/
+	static inline
+	IInputPin* FindInputPin(IComponent & component, const char * name) {
+		assert (name);
+  		if (!name) return NULL;
+  		SmartPtr<IIterator<IInputPin*> > ipit= component.GetInputPins();
+  		for (; !ipit->IsDone(); ipit->Next()) {
+  			if (strcmp(ipit->CurrentItem()->GetName(), name)== 0) return ipit->CurrentItem();
+  		}
+  		return NULL;
+	}
 
+	/**
+		@brief Static method which searches an output pin given its name.
+		@param component Component
+		@param name Name of the output pin to look for.
+		@return Pointer to the pin or NULL if not found.
+	*/
+	static inline 
+	IOutputPin* FindOutputPin(IComponent & component, const char * name) {
+		assert (name);
+  		if (!name) return NULL;
+  		SmartPtr<IIterator<IOutputPin*> > opit= component.GetOutputPins();
+  		for (; !opit->IsDone(); opit->Next()) {
+  			if (strcmp(opit->CurrentItem()->GetName(), name)== 0) return opit->CurrentItem();
+  		}
+  		return NULL;
+	}
 };
-inline CComponentAdapter::CComponentAdapter(const char * name, int, const char * []) {
-	m_name= name;
-	// TODO: currently args is not used
-}
-
-inline CComponentAdapter::~CComponentAdapter() {
-  	vector<IInputPin*>::iterator iti;
-  	for (iti= m_inputPins.begin(); iti!= m_inputPins.end(); ++iti)
-  		(*iti)->Release();
-  	m_inputPins.clear();
 
-  	vector<IOutputPin*>::iterator ito;
-  	for (ito= m_outputPins.begin(); ito!= m_outputPins.end(); ++ito)
-  		(*ito)->Release();
-  	m_outputPins.clear();
-}
-
-inline const char* CComponentAdapter::GetName() const {
-  	return m_name.c_str();
-}
-
-///**
-//Opens a window for this component if has one and returns a pointer to it or NULL.
-//
-//*/
-inline wxWindow* CComponentAdapter::GetGUI(wxWindow * ) {
-  	return NULL;
-}
-
-///**
-//Register a child component.
-//\return 0 when success, <0 otherwise
-//NOTE the adapter implementation always return -1
-//*/
-
-inline int CComponentAdapter::AddChild(SmartPtr<IComponent>) {
-  	return -1;
-}
-
-inline SmartPtr<IIterator<IComponent*> > CComponentAdapter::QueryComponents() {
-  	return SmartPtr<IIterator<IComponent*> >(NULL, false);
-}
+/**
+	@brief Adapter class to implement IComponent conforming classes.
+	
+	This class is intended to be derived to implement leaf type components
+	(i.e. without child components). If you need to implement a component
+	that is composed of children use class CCompositeComponentAdapter instead.
+*/
+class CComponentAdapter : public IComponent {
+public:
+	/**
+		@brief Constructor 
+		@param name Name given to the component.
+		@param argc Number of arguments passed to the parameter argv.
+		@param argv Array of parameters (can be NULL if argc==0).
+
+		argc, argv are not used actually but these parameters are needed
+		to provide an uniform construction mechanism.
+	*/
+	CComponentAdapter(const char * name, int argc, const char * argv[]) 
+	: m_initialized(false)
+	, m_name(name)
+	{
+		// Unused parameters
+		(void) argc;
+		(void) argv;
+	}
 
-inline SmartPtr<IIterator<IInputPin*> > CComponentAdapter::GetInputPins() {
-  	return SmartPtr<IIterator<IInputPin*> >(new CIteratorVector<IInputPin *>(m_inputPins), false);
-}
+	virtual ~CComponentAdapter() {
+		std::vector<IInputPin*>::iterator iti;
+		for (iti= m_inputPins.begin(); iti!= m_inputPins.end(); ++iti)
+			(*iti)->Release();
+		m_inputPins.clear();
 
-inline SmartPtr<IIterator<IOutputPin*> > CComponentAdapter::GetOutputPins() {
-  	return SmartPtr<IIterator<IOutputPin*> >(new CIteratorVector<IOutputPin *>(m_outputPins), false);
-}
+		std::vector<IOutputPin*>::iterator ito;
+		for (ito= m_outputPins.begin(); ito!= m_outputPins.end(); ++ito)
+			(*ito)->Release();
+		m_outputPins.clear();
+	}
 
-// Tells whether this component provides a thread of execution so that
-// call to Start and Stop are meaningful
-inline bool CComponentAdapter::ProvidesExecThread() {
-  	return false;
-}
+	virtual const char* GetName() const { return m_name.c_str(); }
+	virtual wxWindow* GetGUI(wxWindow * parent) { 
+		(void) parent;
+		return NULL; 
+	}
 
-// Tells whether this component needs to be explicitly Initialized / Finished
-inline bool CComponentAdapter::NeedsInitialization() {
-  	return false;
-}
+	virtual int AddChild(SmartPtr<IComponent> component) { return -1; }
+	virtual SmartPtr<IIterator<IComponent*> > QueryComponents() {
+		return SmartPtr<IIterator<IComponent*> >(NULL, false);
+	}
 
-inline int CComponentAdapter::Start() {
-  	return false;
-}
+	virtual SmartPtr<IIterator<IInputPin*> > GetInputPins() {
+		return SmartPtr<IIterator<IInputPin*> >(new CIteratorVector<IInputPin *>(m_inputPins), false);
+	}
+	virtual SmartPtr<IIterator<IOutputPin*> > GetOutputPins() {
+		return SmartPtr<IIterator<IOutputPin*> >(new CIteratorVector<IOutputPin *>(m_outputPins), false);
+	}
 
-inline void CComponentAdapter::Stop() {
-}
+	virtual bool ProvidesExecThread() const { return false; }
 
-inline int CComponentAdapter::Initialize() {
-  	return false;
-}
+	virtual int Start() {
+		int retval= Initialize();
+		if (retval) return retval;
+		return DoStart();
+	}
+	virtual void Stop() { DoStop(); }
 
-inline void CComponentAdapter::Finish() {
-}
+	virtual int Initialize() {
+		if (m_initialized) return 0;
 
-// Registers a new input pin. Returns -1 in case of error (pin already registered)
-inline int CComponentAdapter::RegisterInputPin(IInputPin & pin) {
-  	vector<IInputPin*>::iterator it= find (m_inputPins.begin(), m_inputPins.end(), &pin);
-  	if (it!= m_inputPins.end())	return -1; // Already registered
+		int retval= DoInitialize();
+		if (retval) return retval;
+		
+		m_initialized= true;
+			
+		return 0; 
+	}
+	virtual void Finish() {
+		if (m_initialized) {
+			DoFinish();
+			m_initialized= false;
+		}
+	}
 
-  	pin.AddRef();
-  	m_inputPins.push_back (&pin);
+	virtual void SaveSettings(IConfiguration&) {}
+	virtual void LoadSettings(IConfiguration&) {}
 
-  	return 0;
-}
+protected:
+	/**
+		@brief	Perform the actual component initialization.
+		@return 0 if successfully initialized, -1 otherwise.		
+	*/
+	virtual int DoInitialize() { return 0; }
 
-// Registers a new input pin. Returns -1 in case of error (pin already registered)
-inline int CComponentAdapter::RegisterOutputPin(IOutputPin & pin) {
-  	vector<IOutputPin*>::iterator it= find (m_outputPins.begin(), m_outputPins.end(), &pin);
-  	if (it!= m_outputPins.end()) return -1; // Already registered
+	/**
+		@brief	Perform the actual component finalization.
+	*/
+	virtual void DoFinish() { }
 
-  	pin.AddRef();
-  	m_outputPins.push_back (&pin);
+	/**
+		@brief	Return whether the component is initialized.
+	*/
+	virtual bool IsInitialized() const { return m_initialized; }
 
-  	return 0;
-}
+	/**
+		@brief	Actual component start.
+	*/
+	virtual int DoStart() { return 0; }
 
-class CCompositeComponentAdapter : public CComponentAdapter {
-  public:
-    inline virtual ~CCompositeComponentAdapter();
+	/**
+		@brief	Actual component stop.
+	*/
+	virtual void DoStop() {}
 
-    inline CCompositeComponentAdapter(const char * name, int argc, const char * argv[]);
+	/**
+		@brief Registers a new input pin. 
+		@return -1 when error (pin already registered).
+	*/
+	int RegisterInputPin(IInputPin & pin) {
+		std::vector<IInputPin*>::iterator it= find (m_inputPins.begin(), m_inputPins.end(), &pin);
+  		if (it!= m_inputPins.end())	return -1; // Already registered
 
-    ///**
-    // Registers a child component.
-    //
-    // It checks whether the component was already registered by comparing
-    // the pointer address.
-    //
-    // \return 0 when OK, -1 if the component was already registered
-    //*/
-    inline virtual int AddChild(SmartPtr<IComponent> component);
+  		pin.AddRef();
+  		m_inputPins.push_back (&pin);
 
-    inline virtual SmartPtr<IIterator<IComponent*> > QueryComponents();
+  		return 0;
+	}
 
-	virtual bool ProvidesExecThread() { return true; }
+	/**
+		@brief Registers a new output pin. 
+		@return -1 when error (pin already registered).
+	*/
+	int RegisterOutputPin(IOutputPin & pin) {
+		std::vector<IOutputPin*>::iterator it= find (m_outputPins.begin(), m_outputPins.end(), &pin);
+  		if (it!= m_outputPins.end()) return -1; // Already registered
 
-    // Tells whether this component needs to be explicitly Initialized / Finished
-    virtual bool NeedsInitialization()  { return true; }
+  		pin.AddRef();
+  		m_outputPins.push_back (&pin);
 
-    inline virtual int Start();
+  		return 0;
+	}
 
-    inline virtual void Stop();
+private:
+	bool m_initialized;
+	std::vector<IInputPin *> m_inputPins;
+	std::vector<IOutputPin *> m_outputPins;
+	std::string m_name;
+};
 
+/**
+	@brief Adapter class to implement IComponent conforming classes which,
+	in turn, need composition support.
+*/
+class CCompositeComponentAdapter : public CComponentAdapter {
+public:
+	CCompositeComponentAdapter(const char * name, int argc, const char * argv[])
+	: CComponentAdapter(name, argc, argv) { }
+	
+	virtual ~CCompositeComponentAdapter() {
+		Stop();
+		Finish();
+		// Delete components
+		for (std::vector<IComponent*>::iterator it= m_components.begin(); it!= m_components.end(); ++it)
+			(*it)->Release();
+	}
+	
 
-  protected:
-    inline virtual int Initialize();
+	virtual int AddChild(SmartPtr<IComponent> component) {
+		std::vector<IComponent*>::iterator it= m_components.begin();
 
-    inline virtual void Finish();
+		for(; it!= m_components.end(); ++it) {
+			// Check if the component (by pointer) has been already registered.
+			// TODO: check that component is not registered (comparing pointers)
+			// anywhere in this component composite
+			if ((*it)== component.get()) break;
 
+			// Check also by name
+			if (strcmp((*it)->GetName(), component->GetName())== 0) break;
+		}
 
-  private:
-    vector<IComponent *> m_components;
+		if (it!= m_components.end()) {
+			// Component already registered
+			return -1;
+		}
 
-};
-inline CCompositeComponentAdapter::~CCompositeComponentAdapter(){
-	Stop();
-	Finish();
-	// Delete components
-	for (vector<IComponent*>::iterator it= m_components.begin(); it!= m_components.end(); ++it)
-		(*it)->Release();
-}
+		// Finaly add component to vector
+		component->AddRef();
+		m_components.push_back(component.get());
 
-inline CCompositeComponentAdapter::CCompositeComponentAdapter(const char * name, int argc, const char * argv[])
-: CComponentAdapter(name, argc, argv) { }
-
-///**
-// Registers a child component.
-//
-// It checks whether the component was already registered by comparing
-// the pointer address.
-//
-// \return 0 when OK, -1 if the component was already registered
-//*/
-inline int CCompositeComponentAdapter::AddChild(SmartPtr<IComponent> component) {
-
-	//vector<IComponent*>::iterator it= find(m_components.begin(), m_components.end(), component);
-	vector<IComponent*>::iterator it= m_components.begin();
-
-	for(; it!= m_components.end(); ++it) {
-		// Check if the component (by pointer) has been already registered.
-		// TODO: check that component is not registered (comparing pointers)
-		// anywhere in this component composite
-		if ((*it)== component.get()) break;
-
-		// Check also by name
-		if (strcmp((*it)->GetName(), component->GetName())== 0) break;
+		return 0;
 	}
 
-	if (it!= m_components.end()) {
-		// Component already registered
-		return -1;
+	virtual SmartPtr<IIterator<IComponent*> > QueryComponents() {
+		return SmartPtr<IIterator<IComponent*> >(new CIteratorVector<IComponent*>(m_components), false);
 	}
 
-	// Finaly add component to vector
-	component->AddRef();
-	m_components.push_back(component.get());
-
-	return 0;
-}
+	virtual int Start() {
+		int retval= Initialize();
+		if (retval!= 0) return retval;
 
-inline SmartPtr<IIterator<IComponent*> > CCompositeComponentAdapter::QueryComponents() {
-  	return SmartPtr<IIterator<IComponent*> >(new CIteratorVector<IComponent*>(m_components), false);
-}
+		std::vector<IComponent*>::iterator it;
+		for (it= m_components.begin(); retval== 0 && it!= m_components.end(); ++it)
+			retval= (*it)->Start();
 
-inline int CCompositeComponentAdapter::Start() {
-	int retval= Initialize();
-	if (retval!= 0) return retval;
+		if (retval!= 0) Stop();
 
-	vector<IComponent*>::iterator it;
-	for (it= m_components.begin(); retval== 0 && it!= m_components.end(); ++it)
-		if ((*it)->ProvidesExecThread()) retval= (*it)->Start();
+		return retval;
+	}
 
-	if (retval!= 0) Stop();
+	virtual void Stop() {
+		std::vector<IComponent*>::iterator it;
+		for (it= m_components.begin(); it!= m_components.end(); ++it)
+			(*it)->Stop();
+	}
 
-	return retval;
-}
+	virtual int Initialize() {
+		int retval= 0;
 
-inline void CCompositeComponentAdapter::Stop() {
-	vector<IComponent*>::iterator it;
-	for (it= m_components.begin(); it!= m_components.end(); ++it)
-		if ((*it)->ProvidesExecThread()) (*it)->Stop();
-	//Finish();
-}
+		retval= DoInitialize();
+		if (retval) return retval;
 
-inline int CCompositeComponentAdapter::Initialize() {
-	int retval= 0;
+		std::vector<IComponent*>::iterator it;
+		for (it= m_components.begin(); retval== 0 && it!= m_components.end(); ++it)
+			retval= (*it)->Initialize();
 
-	vector<IComponent*>::iterator it;
-	for (it= m_components.begin(); retval== 0 && it!= m_components.end(); ++it)
-		if ((*it)->NeedsInitialization()) retval= (*it)->Initialize();
+		if (retval!= 0) Finish();
 
-	if (retval!= 0) Finish();
+		return retval;
+	}
 
-	return retval;
-}
+	virtual void Finish() {
+		Stop();
+		DoFinish();
+		std::vector<IComponent*>::iterator it;
+		for (it= m_components.begin(); it!= m_components.end(); ++it)
+			(*it)->Finish();
+	}
 
-inline void CCompositeComponentAdapter::Finish() {
-	Stop();
-	vector<IComponent*>::iterator it;
-	for (it= m_components.begin(); it!= m_components.end(); ++it)
-		if ((*it)->NeedsInitialization()) (*it)->Finish();
-}
+private:
+	std::vector<IComponent *> m_components;
+};
 
+/**
+	@brief Interface class for factories of components.
+*/
 class IComponentFactory : public IBaseObject {
-  protected:
-    inline virtual ~IComponentFactory();
-
-
-  public:
-    virtual const char* GetName() const = 0;
-
-    virtual SmartPtr<IComponent> CreateInstance(const char * name, int argc, const char * argv[]) = 0;
+protected:
+	virtual ~IComponentFactory() {}
 
+public:
+	/**
+		@brief Return the name of the type of components this factory creates.
+		@return Pointer to an internally managed string.
+	*/
+	virtual const char* GetName() const = 0;
+
+	/**
+		@brief Create a new component instance.
+		@param name Name the component will be given.
+		@param argc Number of arguments passed to the parameter argv.
+		@param argv Array of parameters (can be NULL if argc==0).
+		@return Smart pointer to the newly created component which can contain NULL if an error ocurred.
+	*/
+	virtual SmartPtr<IComponent> CreateInstance(const char * name, int argc, const char * argv[]) = 0;
 };
-inline IComponentFactory::~IComponentFactory() {
-}
-
 
 /**
-	Connects an output pin of a component with an input of another component.
-	It uses pin number to refer to a specific pin
-
-	\return 0 when success
-	\return -1 invalid component
-	\return -2 trying to connect the component with itself
-	\return -3 invalid pin number
-	\return -4 pin type mismatch
+	@brief Connects an output pin of a component with an input of another component.
+	@param srcComponent Source component.
+	@param srcPin Number of order of the output of the source component.
+	@param dstComponent Destination component.
+	@param dstPin Number of order of the input of the destination component.
+	@return 0 when success
+	@return -1 invalid component
+	@return -2 trying to connect the component with itself
+	@return -3 invalid pin number
+	@return -4 pin type mismatch
+
+	Uses pin number to refer to a specific pin
 */
 inline int Connect(IComponent * srcComponent, unsigned int srcPin, IComponent * dstComponent, unsigned int dstPin) {
   	if (srcComponent== NULL || dstComponent== NULL) return -1;	// Invalid component
@@ -530,18 +495,18 @@ inline int Connect(IComponent * srcComponent, unsigned int srcPin, IComponent *
   	return 0;
 }
 
-
 /**
-	Connects an output pin of a component with an input of another component.
-	It uses pin name to refer to a specific pin
-
-	\return 0 when success
-	\return -1 invalid component
-	\return -2 trying to connect the component with itself
-	\return -3 invalid pin name
-	\return -4 pin type mismatch
+	@brief Connects an output pin of a component with an input of another component.
+	@param srcComponent Source component.
+	@param srcPin Namne of the output of the source component.
+	@param dstComponent Destination component.
+	@param dstPin Name of the input of the destination component.
+	@return 0 when success
+	@return -1 invalid component
+	@return -2 trying to connect the component with itself
+	@return -3 invalid pin number
+	@return -4 pin type mismatch
 */
-
 inline int Connect(IComponent * srcComponent, const char * srcPin, IComponent * dstComponent, const char * dstPin) {
   	if (srcComponent== NULL || dstComponent== NULL) return -1;	// Invalid component
   	if (srcComponent== dstComponent) return -2;	// Forbids connecting pins of the same component
@@ -565,12 +530,14 @@ inline int Connect(IComponent * srcComponent, const char * srcPin, IComponent *
 }
 
 /**
-	Helper template to create simple component factories
+	@brief Helper template class to create simple component factories.
+
+	@tparam COTYPE Type of the component.
 */
 template <typename COTYPE>
-class ComponentFactory : public spcore::IComponentFactory
-{
+class ComponentFactory : public spcore::IComponentFactory {
 	BOOST_STATIC_ASSERT( (boost::is_base_of<IComponent,COTYPE>::value) );
+
 public:
 	virtual const char* GetName() const { return COTYPE::getTypeName(); }
 
@@ -600,12 +567,14 @@ public:
 };
 
 /**
-	Helper template to create simple singleton component factories
+	@brief Helper template to create simple singleton component factories.
+
+	@tparam COTYPE Type of the component.
 */
 template <typename COTYPE>
-class SingletonComponentFactory : public spcore::IComponentFactory
-{
+class SingletonComponentFactory : public spcore::IComponentFactory {
 	BOOST_STATIC_ASSERT( (boost::is_base_of<IComponent,COTYPE>::value) );
+
 public:
 	virtual const char* GetName() const { return COTYPE::getTypeName(); }
 
diff --git a/include/spcore/configuration.h b/include/spcore/configuration.h
old mode 100755
new mode 100644
index e9392d5..0c25b59
--- a/include/spcore/configuration.h
+++ b/include/spcore/configuration.h
@@ -1,21 +1,25 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        configuration.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		configuration.h
+* @brief	Interfaces for loading/storing configuration values.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+*
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_CONFIGURATION_H
 #define SPCORE_CONFIGURATION_H
 
@@ -25,125 +29,128 @@
 namespace spcore {
 
 /**
-	Interface class for configuration objects
-**/
+	@brief Interface class for configuration objects.
+
+	Paths may consist only of alphanumeric characters, dashes (‘-’) and 
+	underscores (‘_’). Slash character "/" is used to separate levels. 
+	If the first character is '/' denotes an absolute path, otherwise 
+	it is a relative to the current path. The current path can be changed 
+	using the SetPath() method.
+*/
 class IConfiguration : public IBaseObject {
 protected:
 	virtual ~IConfiguration() {}
 
 public:
-	/*!
-		\brief Saves the current configuration to a file
-		\param outstream opened output file stream
-		\return true when saved successfully, false when error
+
+	/**
+		@brief Load configuration from file.
+		@param instream opened input file stream.
+		@return true when loaded successfully, false when error.
 	*/
 	virtual bool Load (FILE* instream)= 0;
-	
-	/*!
-		\brief Loads a configuration from a file
-		\param instream opened input file stream
-		\return true when loaded successfully, false when error
+
+	/**
+		@brief Save current configuration to file.
+		@param outstream opened output file stream.
+		@return true when saved successfully, false when error.
 	*/
 	virtual bool Save (FILE* outstream) const= 0;
    
-	/*!
-		\brief Read a string
-		\param path
-		\param str read string (storage is managed internally, so
-			the pointer may not be freed)
-		\return true if the value was read
+	/**
+		@brief Read a string.
+		@param path path that uniquely identifies the key.
+		@param str read string (storage is managed internally, so
+			the pointer SHOULD NOT be freed).
+		@return true if the value was read.
 	*/
 	virtual bool ReadString (const char* path, const char** str) const= 0;
 	
-	/*!
-		\brief Read an integer
-		\param path
-		\param i pointer to where the read value will be stored
-		\return true if the value was read
+	/**
+		@brief Read an integer.
+		@param path path that uniquely identifies the key.
+		@param i pointer to where the read value will be stored.
+		@return true if the value was read.
 	*/
 	virtual bool ReadInt (const char* path, int* i) const= 0;
 	
-	/*!
-		\brief Read a 64bit integer
-		\param path
-		\param i pointer to where the read value will be stored
-		\return true if the value was read
+	/**
+		@brief Read a 64bit integer.
+		@param path path that uniquely identifies the key.
+		@param i pointer to where the read value will be stored.
+		@return true if the value was read.
 	*/
 	virtual bool ReadInt64 (const char* path, long long* i) const= 0;
 	
-	/*!
-		\brief Read a double
-		\param path
-		\param d pointer to where the read value will be stored
-		\return true if the value was read
+	/**
+		@brief Read a double.
+		@param path path that uniquely identifies the key.
+		@param d pointer to where the read value will be stored.
+		@return true if the value was read.
 	*/
 	virtual bool ReadDouble (const char* path, double* d) const= 0;
 	
-	/*!
-		\brief Read a boolean
-		\param path
-		\param b pointer to where the read value will be stored
-		\return true if the value was read
+	/**
+		@brief Read a boolean.
+		@param path path that uniquely identifies the key.
+		@param b pointer to where the read value will be stored.
+		@return true if the value was read.
 	*/
 	virtual bool ReadBool (const char* path, bool* b) const= 0;
 	
 	
-	/*!
-		\brief Write a string
-		\param path
-		\param str string to write
-		\return true if the value was written
+	/**
+		@brief Write a string.
+		@param path path that uniquely identifies the key.
+		@param str string to write.
+		@return true if the value was written.
 	*/
 	virtual bool WriteString (const char* path, const char* str)= 0;
 	
-	/*!
-		\brief Write an integer
-		\param path
-		\param i integer to write
-		\return true if the value was written
+	/**
+		@brief Write an integer.
+		@param path path that uniquely identifies the key.
+		@param i integer to write.
+		@return true if the value was written.
 	*/
 	virtual bool WriteInt (const char* path, int i)= 0;
 	
-	/*!
-		\brief Write a 64bit integer
-		\param path
-		\param i 64bit integer to write
-		\return true if the value was written
+	/**
+		@brief Write a 64bit integer.
+		@param path path that uniquely identifies the key.
+		@param i 64bit integer to write.
+		@return true if the value was written.
 	*/
 	virtual bool WriteInt64 (const char* path, long long i)= 0;
 	
-	/*!
-		\brief Write a double
-		\param path
-		\param d floating point value to write
-		\return true if the value was written
+	/**
+		@brief Write a double.
+		@param path path that uniquely identifies the key.
+		@param d floating point value to write.
+		@return true if the value was written.
 	*/
 	virtual bool WriteDouble (const char* path, double d)= 0;
 	
-	/*!
-		\brief Write a boolean
-		\param path
-		\param b value to write
-		\return true if the value was written
+	/**
+		@brief Write a boolean.
+		@param path path that uniquely identifies the key.
+		@param b value to write.
+		@return true if the value was written.
 	*/
 	virtual bool WriteBool (const char* path, bool b)= 0;
 	
-	/*!
-		\brief Removes an element given its path
-		\param path
-		\return true if the value was removed
+	/**
+		@brief Removes an element given its path.
+		@param path path that uniquely identifies the key.
+		@return true if the value was removed.
 	*/
 	virtual bool Remove (const char* path)= 0;
 
-	/*!
-		\brief Set current path
-		\param path New path. If the first character is '/', it is an absolute
-		path, otherwise it is a relative path. '..' is supported. May consist 
-		only of alphanumeric characters, dashes (‘-’) and underscores (‘_’).		
-		\return true if the path was successfully set
+	/**
+		@brief Set current path.
+		@param path New path to change to. '..' is supported. If path does not exists it is created.
+		@return true if the path was successfully set. 
 	*/
-
-	//If path does not exists it is created.
 	virtual bool SetPath (const char* path)= 0;
 };
 
diff --git a/include/spcore/conversion.h b/include/spcore/conversion.h
old mode 100755
new mode 100644
index bc33161..62c86c2
--- a/include/spcore/conversion.h
+++ b/include/spcore/conversion.h
@@ -1,66 +1,70 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        conversion.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		conversion.h
+* @brief	Locale independent string to number conversion functions.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+*
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
-#include "libexports.h"
+#include "spcore/libimpexp.h"
 
 namespace spcore {
 
 /**
-	Converts a string into a float
-
-	\return true is conversion successful, or false otherwise
+	@brief Converts a string into a float.
+	@return true is conversion successful, or false otherwise.
 */
-EXPORT_FUNCTION bool StrToFloat (const char* str, float* val);
+SPEXPORT_FUNCTION 
+bool StrToFloat (const char* str, float* val);
 
 /**
-	Converts a string into a double
-
-	\return true is conversion successful, or false otherwise
+	@brief Converts a string into a double.
+	@return true is conversion successful, or false otherwise.
 */
-EXPORT_FUNCTION bool StrToDouble (const char* str, double* val);
+SPEXPORT_FUNCTION 
+bool StrToDouble (const char* str, double* val);
 
 /**
-	Converts a string into a long double
-
-	\return true is conversion successful, or false otherwise
+	@brief Converts a string into a long double.
+	@return true is conversion successful, or false otherwise.
 */
-EXPORT_FUNCTION bool StrToLongDouble (const char* str, long double* val);
+SPEXPORT_FUNCTION 
+bool StrToLongDouble (const char* str, long double* val);
 
 /**
-	Converts a string into a int
-
-	\return true is conversion successful, or false otherwise
+	@brief Converts a string into a int.
+	@return true is conversion successful, or false otherwise.
 */
-EXPORT_FUNCTION bool StrToInt (const char* str, int* val);
+SPEXPORT_FUNCTION 
+bool StrToInt (const char* str, int* val);
 
 /**
-	Converts a string into an unsigned int
-
-	\return true is conversion successful, or false otherwise
+	@brief Converts a string into an unsigned int.
+	@return true is conversion successful, or false otherwise.
 */
-EXPORT_FUNCTION bool StrToUint (const char* str, unsigned int* val);
+SPEXPORT_FUNCTION 
+bool StrToUint (const char* str, unsigned int* val);
 
 /**
-	Converts a string into a long
-
-	\return true is conversion successful, or false otherwise
+	@brief Converts a string into a long.
+	@return true is conversion successful, or false otherwise.
 */
-EXPORT_FUNCTION bool StrToLongInt (const char* str, long* val);
+SPEXPORT_FUNCTION 
+bool StrToLongInt (const char* str, long* val);
 
 } // namespace spcore
diff --git a/include/spcore/coreruntime.h b/include/spcore/coreruntime.h
index 8a3c0ce..08cf5c0 100644
--- a/include/spcore/coreruntime.h
+++ b/include/spcore/coreruntime.h
@@ -1,29 +1,33 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        coreruntime.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		coreruntime.h
+* @brief	Interface class for lib-sitplus core functions.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*	
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+*
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_CORERUNTIME_H
 #define SPCORE_CORERUNTIME_H
 
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 #include "spcore/baseobj.h"
-#include "config.h"
-/*
+#include "config.h"		// ENABLE_WXWIDGETS define
 
+/**
 One of the goals of SITPLUS is to become GUI toolkit agnostic.
 Currently it uses wxWidgets and most modules provide GUI's based on this 
 toolkit, but the core itself has not an strong dependency (component's 
@@ -32,9 +36,10 @@ changeable by just defining a neutral window type, the core itself
 provides methods such as InitGUISupport, RunMessageLoop and 
 CleanupGUISupport which are based on wx).
 
-TODO: provide an interface for non-wx apps and/or other toolkits
+ at todo provide an interface for non-wx apps and/or other toolkits
 and set this define as a build parameter
 */
+
 #ifndef ENABLE_WXWIDGETS
 #error "Currently wxWidgets is necessary"
 #endif
@@ -54,154 +59,179 @@ class IConfiguration;
 class IPaths;
 class ILogTarget;
 
-// Core runtime services interface. Call:
-//	getSpCoreRuntime
-//to obtain a poiinter to it
+/**
+	@brief Interface class for lib-sitplus core functions.
+
+	Call spcore::getSpCoreRuntime() to get the only instance of the class 
+	that implements the core interface.
+**/
 class ICoreRuntime {
 public:
 	virtual ~ICoreRuntime() {}
 
-    // Resolves the runtime ID of a named type. Returns the ID or TYPE_INVALID
-    // if the specified type doesn't exists.
-    virtual int ResolveTypeID(const char * name) = 0;
+	/**
+		@brief Get the runtime ID of a named type.
+		@param name type name
+		@return the ID or TYPE_INVALID if the specified type doesn't exists.
+	**/
+	virtual int ResolveTypeID(const char * name) = 0;
 
-    virtual SmartPtr<IIterator<ITypeFactory*> > QueryTypes() = 0;
+	/**
+		@brief Get all registered types.
+		@return an iterator to a collection of type factories.
+	**/
+	virtual SmartPtr<IIterator<ITypeFactory*> > QueryTypes() = 0;
 
-    // Creates a new type instance for a given type name. Returns a pointer
-    // to the new instance or NULL if the type doesn't exists or another error
-    // occurred.
-    virtual SmartPtr<CTypeAny> CreateTypeInstance(const char * typeName) = 0;
+	/**
+		@brief Creates a new instance of certain type given its name.
+		@param typeName type name.
+		@return pointer to the new instance or NULL if the type doesn't exists 
+			or another error occurred.
+	**/
+	virtual SmartPtr<CTypeAny> CreateTypeInstance(const char * typeName) = 0;
 
-    virtual SmartPtr<CTypeAny> CreateTypeInstance(int id) = 0;
+	/**
+		@brief Creates a new instance of certain type given its ID.
+		@param id type identifier.
+		@return pointer to the new instance or NULL if the type doesn't exists 
+			or another error occurred.
+	**/
+	virtual SmartPtr<CTypeAny> CreateTypeInstance(int id) = 0;
 
-    virtual SmartPtr<IIterator<IComponentFactory*> > QueryComponents() = 0;
+	/**
+		@brief Get all registered components.
+		@return an iterator to a collection of component factories.
+	**/
+	virtual SmartPtr<IIterator<IComponentFactory*> > QueryComponents() = 0;
 
-    virtual SmartPtr<IComponent> CreateComponent(const char * typeName, const char * name, int argc, const char * argv[]) = 0;
+	/**
+		@brief Create a new instance of a component.
+		@param typeName name of the component type.
+		@param name name given to the new instance.
+		@param argc number of arguments provided in argv array.
+		@param argv array of arguments.
+		@return smart pointer to the newly created component or NULL when error.
+
+		Creates a new instance of the component of type "typeName" and names it with
+		"name". Specific values for argc and argv are component type dependent.
+	**/
+	virtual SmartPtr<IComponent> CreateComponent(const char * typeName, const char * name, int argc, const char * argv[]) = 0;
 
 	/**
-		Create an instance of an output pin
+		@brief Create an instance of an output pin.
+		@param type name of the type of the pin.
+		@param name name given to the pin.
+		@param locked if it is true constructs a looked (synchronized) pin.
+		@return smart pointer to the new pin or NULL when error.
+	**/
+	virtual SmartPtr<IOutputPin> CreateOutputPin(const char* type, const char* name, bool locked) = 0;
 
-		\param type : string containing the name of the type of the pin
-		\param name : string with the name the pin will be given
-		\param locked : tells whether to construct a looked (synchronized) pin or not
+	/**    
+		@brief Register a module inside spcore.
+		@param module module instance.
+		@return	0 on success,
+				-1 : module already registered,
+				-2 : wrong core version,
+				-3 : type name already registered,
+				-4 : component already registered.
+    **/
+	virtual int RegisterModule(SmartPtr<IModule> module) = 0;
 
-		\return an smart ptr to the new pin which can be NULL if error
-	*/
-	virtual SmartPtr<IOutputPin> CreateOutputPin(const char* type, const char* name, bool locked) = 0;
+	/**
+		@brief Load and register a module.
+		@param name name of the shared library to load.
+		@param dir path where look for library files. If dir is NULL then
+			current working directory and system library paths are searched.
+		@return 0 on success,
+				-1 : module already registered,
+				-2 : wrong core version,
+				-3 : type name already registered,
+				-4 : component already registered,
+				-5 : defective element provided in library (e.g. anonymous factory),
+				-6 : library not found,
+				-7 : wrong library format (symbol not found),
+				-8 : no module.
+	**/
+	virtual int LoadModule(const char * name, const char * dir = NULL) = 0;
 
-	///**
-    //
-    //Register a module inside spcore
-    //
-    //\return 0 on success
-    //\return -1 : module already registered
-    //\return -2 : wrong core version
-    //\return -3 : type name already registered
-    //\return -4 : component already registered
-    //*/
-    virtual int RegisterModule(SmartPtr<IModule> module) = 0;
-
-	///**
-	//Tries to load and register a module.
-	//\param path to the shared library to load
-	//\return 0 on success, <0 otherwise
-	// -1 : module already registered
-	// -2 : wrong core version
-	// -3 : type name already registered
-	// -4 : component already registered
-	// -5 : defective element provided in library (e.g. anonymous factory)
-	// -6 : library not found
-	// -7 : wrong library format (symbol not found)
-	// -8 : no module
-	//*/
-    virtual int LoadModule(const char * name, const char * dir = NULL) = 0;
-
-	/**
-		Log severity levels
-		- LOG_DEBUG:
-		This is the most verbose logging level. Only for development and testing.
-
-		- LOG_INFO:
-		The Information level is typically used to output information that is useful
-		to the running and management of the system.
-
-		- LOG_WARNING:
-		Warning is often used for handled 'exceptions' or other important log events.
-
-		- LOG_ERROR:
-		Error is used to log all unhandled exceptions which prevent the application
-		to run properly.
-
-		- LOG_FATAL:
-		Fatal is reserved for special exceptions/conditions where no recovery is possible.
+	/**
+		@brief Log severity levels.
 	*/
-	enum LogSeverityLevel { LOG_FATAL= 0, LOG_ERROR, LOG_WARNING, LOG_INFO, LOG_DEBUG };
+	enum LogSeverityLevel { 
+		LOG_FATAL= 0,	/**< reserved for special exceptions/conditions when recovery is not possible. */
+		LOG_ERROR,		/**< used to log all unhandled exceptions which prevent the application runing properly. */
+		LOG_WARNING,	/**< often used for handled 'exceptions' or other important log events. */
+		LOG_INFO,		/**< typically used to output information that is useful for the running and 
+							management of the system. */
+		LOG_DEBUG		/**< is the most verbose logging level. Only for development and testing. */
+	};
 
 	/**
-		Log message
-		\param severity: severity level of the message
-		\param message: string with the message
-		\param module: module name (optional but recommended)
+		@brief Send a message to the logging subsystem.
+		@param severity severity level of the message
+		@param message message to log
+		@param module module name (deprecated)
 	*/
 	virtual void LogMessage (LogSeverityLevel severity, const char* message, const char* module= NULL)= 0;
 
-	/*!
-		\brief Register a new log target
-		\lt Pointer to the log target to register
+	/**
+		@brief Register a new log target.
+		@param lt pointer to the log target to register.
+
+		After calling this method all log messages will be (also) sent to the registered target.
+		If the target was previously registered the request is ignored silently.
 	*/
 	virtual void RegisterLogTarget (ILogTarget* lt)= 0;
 
-	/*!
-		\brief Unregister log target
-		\lt Pointer to the log target to unregister
+	/**
+		@brief Unregister a log target.
+		@param lt pointer to the log target to unregister.
 	*/
 	virtual void UnregisterLogTarget (ILogTarget* lt)= 0;
 
-	/*!
-		\brief Construct and return an IConfiguration object
-		\return a smart pointer to a new IConfiguration object
+	/**
+		@brief Construct and return an IConfiguration object.
+		@return smart pointer to a new IConfiguration object.
+		@todo Remove this method and allow to create IConfiguration instances directly.
 	*/
 	virtual SmartPtr<IConfiguration> GetConfiguration() const= 0;
 
-	/*!
-		\brief Get an object to report paths
-		\return a reference to the IPath object
+	/**
+		@brief Get an object to report paths.
+		@return reference to the IPath object.
+		@todo remove this method and provide a class with static members.
 	*/
 	virtual IPaths& GetPaths() const= 0;
 
 	/**
-		Returns whether the caller is the main thread
+		@brief Return whether the caller thread is the main one.
+		@todo provide a regular function.
 	*/
 	virtual bool IsMainThread () const= 0;
 
 #ifdef ENABLE_WXWIDGETS
 
 	/**
-		Initializes wxWidgets
-
-		Initializes the wx subsystem. This method must be called before creating
-		any window or calling RunMessageLoop
+		@brief Initializes GUI subsystem (currently only wxWidgets is supported).
+		@return 0 on successful initialization or -1 when error
 
-		\params argc, argv
-		\return 0 on successful initialization or -1 when error
+		This method must be called before creating any window or calling RunMessageLoop.
 	*/
 	virtual int InitGUISupport (int argc, char** argv)= 0;
 
 	/**
-		Runs the main message loop.
-
-		Runs the wx subsystem main loop. This function does not return until
-		the last frame has been destroyed as the regular wx message	loop does.
+		@brief Runs the main message loop.
+		@return exit code
 
-		\return exit code
+		This function does not return until the last frame window has been destroyed 
+		as the regular wx message loop does.
 	*/
 	virtual int RunMessageLoop ()= 0;
 
 	/**
-		Finalizes wxWidgets
+		@brief Finalizes GUI subsystem (wxWidgets currently)
 
-		Finalized the wx subsystem. This method must be called after RunMessageLoop
-		has exited.
+		This method must be called after RunMessageLoop	has exited.
 	*/
 	virtual void CleanupGUISupport ()= 0;
 
@@ -211,28 +241,61 @@ public:
 
 		\return		0:	message successfully sent
 					-1:	type mismatch or message could not be send
+		@todo remove this method (ans its implementation).
 	*/
 	virtual int SendMessageMainThreadSync (SmartPtr<const CTypeAny> msg, IInputPin & dst)= 0;
 
 	/**
-		Forwards a message via the application main thread to a callback
+		@brief Callback type for SendMessageMainThreadAsync method.		
 	*/
 	typedef void ToMainThreadCallback (IComponent*, const CTypeAny*);
+
+	/**
+		@brief Forwards a message via the application main thread to a callback.
+
+		Some GUI toolkits (such as wx) and other libraries (e.g. SDL) only work 
+		properly when its API is called from the main thread. This method allows
+		to store a message which the application main thread will collect and 
+		deliver through a callback (i.e. asynchronously). Note that, though is 
+		possible to send a message synchronously (i.e. waiting until the main 
+		thread has delivered the message) this approach could easily cause a 
+		deadlock and so is not recommendable.
+	*/	
 	virtual void SendMessageMainThreadAsync (const CTypeAny&, IComponent&, ToMainThreadCallback*)= 0;
 
 #endif
 };
 
+/**
+	@brief Interface class for log targets.
+*/
 class ILogTarget
 {
 public:
+	/**
+		@brief Function which will be called each time a log message is received.
+		@param severity
+		@param message
+	*/
 	virtual void LogMessage (ICoreRuntime::LogSeverityLevel severity, const char* message)= 0;
 };
 
+/**
+	@brief Get the ICoreRuntime instance.
+	@return pointer to the ICoreRuntime instance.
+	The first call to this method will create the appropiate ICoreRuntime implementation instance.
+*/
+SPEXPORT_FUNCTION 
+ICoreRuntime* getSpCoreRuntime();
 
-EXPORT_FUNCTION ICoreRuntime* getSpCoreRuntime();
-EXPORT_FUNCTION void freeSpCoreRuntime();
+/**
+	@brief Clean up the ICoreRuntime instance.
 
+	Free resources allocated by the ICoreRuntime instance. Should be called just before.
+	exiting your host application.
+*/
+SPEXPORT_FUNCTION 
+void freeSpCoreRuntime();
 
 } // namespace spcore
 #endif
diff --git a/include/spcore/coreversion.h b/include/spcore/coreversion.h
index 100c1f9..8d80895 100644
--- a/include/spcore/coreversion.h
+++ b/include/spcore/coreversion.h
@@ -1,21 +1,26 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        version.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		coreversion.h
+* @brief	Header which provide the current version of the core.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+* @todo		get values from CMakeLists.txt
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_VERSION_H
 #define SPCORE_VERSION_H
 
diff --git a/include/spcore/iterator.h b/include/spcore/iterator.h
index 8737c88..57da26e 100644
--- a/include/spcore/iterator.h
+++ b/include/spcore/iterator.h
@@ -1,157 +1,96 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        iterator.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		iterator.h
+* @brief	Iterators implementation.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*	
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_ITERATOR_H
 #define SPCORE_ITERATOR_H
 
 #include "include/spcore/baseobj.h"
 #include <vector>
-using namespace std;
 #include <map>
-using namespace std;
 
 namespace spcore {
 
+/**
+	@brief Interface for iterators
+
+	Based on GOF iterator pattern
+**/
 template<class T>
 class IIterator : public IBaseObject {
-  protected:
-    virtual ~IIterator();
-
-
-  public:
-    virtual void First() = 0;
-
-    virtual void Next() = 0;
-
-    virtual bool IsDone() const = 0;
-
-    virtual T CurrentItem() const = 0;
-
+protected:
+	virtual ~IIterator() {}
+
+public:
+	virtual void First() = 0;
+	virtual void Next() = 0;
+	virtual bool IsDone() const = 0;
+	virtual T CurrentItem() const = 0;
 };
-template<class T>
-IIterator<T>::~IIterator() {
-}
 
+/**
+	@brief Iterator implementation for std::vector
+**/
 template<class T>
 class CIteratorVector : public IIterator<T> {
-  public:
-    CIteratorVector(const vector<T> & vector);
-
-    virtual ~CIteratorVector();
-
-    virtual void First();
-
-    virtual void Next();
-
-    virtual bool IsDone() const;
-
-    virtual T CurrentItem() const;
-
-
-  private:
-    const vector<T>* m_vector;
-
-	typename vector<T>::const_iterator m_iterator;
-
+public:
+	CIteratorVector(const std::vector<T> & vector) {
+		m_vector= &vector;
+		m_iterator= vector.begin();
+	}
+
+	virtual ~CIteratorVector() { m_vector= NULL; }
+
+	virtual void First() { m_iterator= m_vector->begin(); }
+	virtual void Next() { ++m_iterator; }
+	virtual bool IsDone() const { return (m_iterator== m_vector->end()); }
+	virtual T CurrentItem() const { return (*m_iterator); }
+
+private:
+	const std::vector<T>* m_vector;
+	typename std::vector<T>::const_iterator m_iterator;
 };
-template<class T>
-CIteratorVector<T>::CIteratorVector(const vector<T> & vector) {
-  	m_vector= &vector;
-  	m_iterator= vector.begin();
-}
-
-template<class T>
-CIteratorVector<T>::~CIteratorVector() {
-  	m_vector= NULL;
-}
-
-template<class T>
-void CIteratorVector<T>::First() {
-  	m_iterator= m_vector->begin();
-}
-
-template<class T>
-void CIteratorVector<T>::Next() {
-  	++m_iterator;
-}
-
-template<class T>
-bool CIteratorVector<T>::IsDone() const {
-  	return (m_iterator== m_vector->end());
-}
-
-template<class T>
-T CIteratorVector<T>::CurrentItem() const {
-  	return (*m_iterator);
-}
 
+/**
+	@brief Iterator implementation for std::map
+**/
 template<class KEY, class VALUE>
 class CIteratorMap : public IIterator<VALUE> {
-  public:
-    CIteratorMap(const map<KEY,VALUE> & map);
-
-    virtual ~CIteratorMap();
-
-    virtual void First();
-
-    virtual void Next();
-
-    virtual bool IsDone() const;
-
-    virtual VALUE CurrentItem() const;
-
-
-  private:
-    const map<KEY,VALUE>* m_map;
-
-    typename map<KEY,VALUE>::const_iterator m_iterator;
-
+public:
+	CIteratorMap(const std::map<KEY,VALUE> & map) {
+		m_map= ↦
+		m_iterator= map.begin();
+	}
+
+	virtual ~CIteratorMap() { m_map= NULL; }
+
+	virtual void First() { m_iterator= m_map->begin(); }
+	virtual void Next() { ++m_iterator; }
+	virtual bool IsDone() const { return (m_iterator== m_map->end()); }
+	virtual VALUE CurrentItem() const { return (m_iterator->second); }
+
+private:
+	const std::map<KEY,VALUE>* m_map;
+	typename std::map<KEY,VALUE>::const_iterator m_iterator;
 };
-template<class KEY, class VALUE>
-CIteratorMap<KEY, VALUE>::CIteratorMap(const map<KEY,VALUE> & map) {
-  	m_map= ↦
-  	m_iterator= map.begin();
-}
-
-template<class KEY, class VALUE>
-CIteratorMap<KEY, VALUE>::~CIteratorMap() {
-  	m_map= NULL;
-}
-
-template<class KEY, class VALUE>
-void CIteratorMap<KEY, VALUE>::First() {
-  	m_iterator= m_map->begin();
-}
-
-template<class KEY, class VALUE>
-void CIteratorMap<KEY, VALUE>::Next() {
-  	++m_iterator;
-}
-
-template<class KEY, class VALUE>
-bool CIteratorMap<KEY, VALUE>::IsDone() const {
-  	return (m_iterator== m_map->end());
-}
-
-template<class KEY, class VALUE>
-VALUE CIteratorMap<KEY, VALUE>::CurrentItem() const {
-  	return (m_iterator->second);
-}
 
 } // namespace spcore
 #endif
diff --git a/include/spcore/language.h b/include/spcore/language.h
old mode 100755
new mode 100644
index 7f5b586..5476b68
--- a/include/spcore/language.h
+++ b/include/spcore/language.h
@@ -1,24 +1,28 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        language.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010-10 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		language.h
+* @brief	i18n related functions.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010-11 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #pragma once
 #include "config.h"
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 
 #ifdef ENABLE_NLS
 	#include <libintl.h>
@@ -36,7 +40,9 @@
 		#include <wx/intl.h>
 	#endif
 
-	/*
+	/**
+		@brief _() and __() macros
+
 		Macro _() is usually defined by some frameworks such as wx 
 		which the unicode versions is commonly used, so we define
 		our own translation macro __() for ansi strings
@@ -53,59 +59,57 @@
 	#define N__(STRING)	(STRING)
 
 	/**
-		\brief Set locale configuration given a language identifier return by spGetLanguageId
-		\param[in]	id	Locale identifier.
-		\return 0 if ok, -1 if failed
-		\note
-		Caveats: this funtion should be called once, otherwise the behaviour is undefined
+		@brief Set locale configuration given a language identifier return by spGetLanguageId.
+		@param[in]	id	Locale identifier.
+		@return 0 if ok, -1 if failed.
+
+		Caveats: this funtion should be called once, otherwise the behaviour is undefined.
 	*/
-	EXPORT_FUNCTION
+	SPEXPORT_FUNCTION
 	int spSetLanguage (const char* id);
 
 	/**
-		\brief Bind gettext domain with a directory
-		\param[in]	domain	Domain name.
-		\param[in]	dirname	Directory name.
-		\return 0 if OK, -1 if error
-		\note
+		@brief Bind gettext domain with a directory.
+		@param[in]	domain	Domain name.
+		@param[in]	dirname	Directory name.
+		@return 0 if OK, -1 if error.
+
 		Before calling this function the language must be set.
 	*/
-	EXPORT_FUNCTION
+	SPEXPORT_FUNCTION
 	int spBindTextDomain(const char* domain, const char* dirname);
 
 	/**
-		\brief Obtains the number of available languages.
-		\return the number of available languages.
+		@brief Obtains the number of available languages.
+		@return the number of available languages.
 	*/
-	EXPORT_FUNCTION
+	SPEXPORT_FUNCTION
 	unsigned int spGetAvailableLanguages();
 
 	/**
-		\brief Obtains the language ID given its index.
-		\param[in]	idx	Index of the parameter. 
-		\return a pointer to an string whith the language id or NULL if error.
-		\note
+		@brief Obtains the language ID given its index.
+		@param[in]	idx	Index of the parameter. 
+		@return a pointer to an string whith the language id or NULL if error.
+
 		The returned identifier can be stored and used later.
 		Do not rely on indexs which could change between executions.
 	*/
-	EXPORT_FUNCTION
+	SPEXPORT_FUNCTION
 	const char* spGetLanguageId (unsigned int idx);
 
 	/**
-		\brief Obtains the language name given its index.
-		\param[in]	idx	Index of the parameter.
-		\param[in]	domain	Domain for gettext
-		\return a pointer to an string whith the language name or NULL if error.
-		\note
+		@brief Obtains the language name given its index.
+		@param[in]	idx	Index of the parameter.
+		@param[in]	domain	Domain for gettext
+		@return a pointer to an string whith the language name or NULL if error.
+
 		The names provided are given in its native language encoded using utf-8.
 	*/
-	EXPORT_FUNCTION
+	SPEXPORT_FUNCTION
 	const char* spGetLanguageNativeName (unsigned int idx, const char* domain);
 
-//	EXPORT_FUNCTION void TestLang();
-
 #else
-	// If NLS disabled, macro does not translate
+	// If NLS disabled, macros do nothing.
 	#define __(STRING)	(STRING)
 	#define N__(STRING)	(STRING)
 #endif
\ No newline at end of file
diff --git a/include/spcore/libexports.h b/include/spcore/libexports.h
deleted file mode 100644
index 41572b4..0000000
--- a/include/spcore/libexports.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        libexports.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
-#ifndef LIBEXPORTS_H
-#define LIBEXPORTS_H
-
-#ifdef WIN32
-#define EXPORT_FUNCTION extern "C" __declspec(dllexport)
-#define EXPORT_CLASS __declspec(dllexport)
-#else
-#define EXPORT_FUNCTION extern "C"
-#define EXPORT_CLASS 
-#endif
-
-#endif
diff --git a/include/spcore/libimpexp.h b/include/spcore/libimpexp.h
new file mode 100644
index 0000000..2393b08
--- /dev/null
+++ b/include/spcore/libimpexp.h
@@ -0,0 +1,46 @@
+/**
+* @file		libimpexp.h
+* @brief	Preprocessor macros when bulding dynamic library.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010-11 Cesar Mauri Loba - CREA Software Systems
+*
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef LIBEXPORTS_H
+#define LIBEXPORTS_H
+
+#ifdef WIN32
+	#define SPEXPORT_FUNCTION extern "C" __declspec(dllexport)
+	#define SPIMPORT_FUNCTION extern "C" __declspec(dllimport)
+	#define SPEXPORT_CLASS __declspec(dllexport)
+	#define SPIMPORT_CLASS __declspec(dllimport)
+#else
+	#define SPEXPORT_FUNCTION extern "C" 
+	#define SPIMPORT_FUNCTION extern "C" 
+	#define SPEXPORT_CLASS
+	#define SPIMPORT_CLASS
+#endif	// WIN32
+
+////////////////////////
+
+#ifdef SPMAKING_DLL_SPCORE
+	#define SPIMPEXP_CLASS_CORE SPEXPORT_CLASS
+#else
+	#define SPIMPEXP_CLASS_CORE SPIMPORT_CLASS
+#endif	// SPMAKING_DLL_SPCORE
+
+#endif	// LIBEXPORTS_H
diff --git a/include/spcore/module.h b/include/spcore/module.h
index 32a3c8b..265ca5a 100644
--- a/include/spcore/module.h
+++ b/include/spcore/module.h
@@ -1,21 +1,25 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        module.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		module.h
+* @brief	Module related stuff.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_MODULE_H
 #define SPCORE_MODULE_H
 
@@ -25,124 +29,118 @@
 #include "spcore/component.h"
 #include "include/spcore/baseobj.h"
 #include <vector>
-using namespace std;
 
-namespace spcore { template<class T> class IIterator; } 
-namespace spcore { class ITypeFactory; } 
-namespace spcore { class IComponentFactory; } 
-
-namespace spcore { class IActivity; } 
 namespace spcore {
 
-class IModule : public IBaseObject {
-  protected:
-    //Protected destructor to prevent the use of the delete operator
-    inline virtual ~IModule();
-
-
-  public:
-    // Returns the version of spcore this module was build against
-    virtual int GetCoreVersion() const = 0;
-
-    virtual int GetModuleVersion() const = 0;
-
-    virtual const char* GetName() const = 0;
-
-    // Return a string encoded in UTF-8 containing a description of the module.
-    virtual const char* GetDescription() const = 0;
-
-    //Type names that this modules provides. This names are either for
-    //pins and type instances.
-    virtual SmartPtr<IIterator<ITypeFactory*> > GetTypeFactories() = 0;
-
-    virtual SmartPtr<IIterator<IComponentFactory*> > GetComponentFactories() = 0;
+// Forward declarations
+template<class T> class IIterator;
+class ITypeFactory;
+class IComponentFactory;
+class IActivity;
 
+/**
+	@brief Interface class for modules.
+*/
+class IModule : public IBaseObject {
+protected:
+	/**
+		@brief Protected destructor to prevent the use of the delete operator.
+	*/
+	inline virtual ~IModule() {}
+
+public:
+	/**
+		@brief Returns the version of spcore this module was build against.
+		@todo Check this.
+	*/
+	virtual int GetCoreVersion() const = 0;
+
+	/**
+		@brief Returns the version of this.
+		@todo Check this.
+	*/
+	virtual int GetModuleVersion() const = 0;
+
+	/**
+		@brief Return the name of the module.
+		@return Pointer to an internally managed string.
+	*/
+	virtual const char* GetName() const = 0;
+
+	/**
+		@brief Gets a human readable description of the module.
+		@return Pointer to an internally managed string encoded in UTF-8.
+	*/	
+	virtual const char* GetDescription() const = 0;
+
+	/**
+		@brief Get the names of the types this module provides.
+		@return Smart pointer to an iterator (which can be NULL) of type factories.
+	*/
+	virtual SmartPtr<IIterator<ITypeFactory*> > GetTypeFactories() = 0;
+
+	/**
+		@brief Get the names of the components this module provides.
+		@return Smart pointer to an iterator (which can be NULL) of component factories.
+	*/
+	virtual SmartPtr<IIterator<IComponentFactory*> > GetComponentFactories() = 0;
 };
-//Protected destructor to prevent the use of the delete operator
-inline IModule::~IModule() {
-}
 
+/**
+	@brief Adapter class to create new IModule conforming classes.
+*/
 class CModuleAdapter : public IModule {
-  public:
-    inline virtual ~CModuleAdapter();
-
-    inline virtual int GetCoreVersion() const;
-
-    inline virtual int GetModuleVersion() const;
-
-    // Return a string encoded in UTF-8 containing a description of the module.
-    inline virtual const char* GetDescription() const;
-
-    ///**
-    //Type names that this modules provides. This names are either for
-    //pins and type instances.
-    //*/
-    inline virtual SmartPtr<IIterator<ITypeFactory*> > GetTypeFactories();
-
-    inline virtual SmartPtr<IIterator<IComponentFactory*> > GetComponentFactories();
-
-
-  private:
-    vector<IComponentFactory *> m_componentFactories;
-
-    vector<ITypeFactory *> m_typeFactories;
-
-
-  protected:
-    inline int RegisterTypeFactory(SmartPtr<ITypeFactory> f);
-
-    inline int RegisterComponentFactory(SmartPtr<IComponentFactory> c);
-
+public:
+	virtual ~CModuleAdapter() {
+		std::vector<IComponentFactory *>::iterator itcf;
+  		for (itcf= m_componentFactories.begin(); itcf!= m_componentFactories.end(); ++itcf)
+  			(*itcf)->Release();
+  		m_componentFactories.clear();
+	  
+		std::vector<ITypeFactory *>::iterator ittf;
+  		for (ittf= m_typeFactories.begin(); ittf!= m_typeFactories.end(); ++ittf)
+  			(*ittf)->Release();
+  		m_typeFactories.clear();
+	}
+
+	virtual int GetCoreVersion() const { return SPCORE_VERSION; }
+	virtual int GetModuleVersion() const { return 1; }
+	virtual const char* GetDescription() const { return ""; }
+	virtual SmartPtr<IIterator<ITypeFactory*> > GetTypeFactories() {
+		return SmartPtr<IIterator<ITypeFactory*> >(
+			new CIteratorVector<ITypeFactory*>(m_typeFactories), false);
+	}
+	virtual SmartPtr<IIterator<IComponentFactory*> > GetComponentFactories() {
+		return SmartPtr<IIterator<IComponentFactory*> >(
+			new CIteratorVector<IComponentFactory*>(m_componentFactories), false);
+	}
+
+protected:
+	/**
+		@brief Register a type factory to this module.
+		@param f Smart pointer to a type factory.
+		@return 0 when success
+	*/
+	int RegisterTypeFactory(SmartPtr<ITypeFactory> f) {
+		m_typeFactories.push_back(f.get());
+  		f->AddRef();
+  		return 0;
+	}
+	/**
+		@brief Register a component factory to this module.
+		@param c Smart pointer to a component factory.
+		@return 0 when success
+	*/
+	int RegisterComponentFactory(SmartPtr<IComponentFactory> c) {
+		m_componentFactories.push_back(c.get());
+  		c->AddRef();
+  		return 0;
+	}
+
+private:
+	std::vector<IComponentFactory *> m_componentFactories;
+	std::vector<ITypeFactory *> m_typeFactories;
 };
-inline CModuleAdapter::~CModuleAdapter() {
-  	vector<IComponentFactory *>::iterator itcf;
-  	for (itcf= m_componentFactories.begin(); itcf!= m_componentFactories.end(); ++itcf)
-  		(*itcf)->Release();
-  	m_componentFactories.clear();
-  
-  	vector<ITypeFactory *>::iterator ittf;
-  	for (ittf= m_typeFactories.begin(); ittf!= m_typeFactories.end(); ++ittf)
-  		(*ittf)->Release();
-  	m_typeFactories.clear();
-}
-
-inline int CModuleAdapter::GetCoreVersion() const {
-  	return SPCORE_VERSION;
-}
-
-inline int CModuleAdapter::GetModuleVersion() const {
-  	return 1;
-}
-
-// Return a string encoded in UTF-8 containing a description of the module.
-inline const char* CModuleAdapter::GetDescription() const {
-  	return "";
-}
-
-///**
-//Type names that this modules provides. This names are either for
-//pins and type instances.
-//*/
-inline SmartPtr<IIterator<ITypeFactory*> > CModuleAdapter::GetTypeFactories() {
-  	return SmartPtr<IIterator<ITypeFactory*> >(new CIteratorVector<ITypeFactory*>(m_typeFactories), false);
-}
-
-inline SmartPtr<IIterator<IComponentFactory*> > CModuleAdapter::GetComponentFactories() {
-  	return SmartPtr<IIterator<IComponentFactory*> >(new CIteratorVector<IComponentFactory*>(m_componentFactories), false);
-}
-
-inline int CModuleAdapter::RegisterTypeFactory(SmartPtr<ITypeFactory> f) {
-  	m_typeFactories.push_back(f.get());
-  	f->AddRef();
-  	return 0;
-}
-
-inline int CModuleAdapter::RegisterComponentFactory(SmartPtr<IComponentFactory> c) {
-  	m_componentFactories.push_back(c.get());
-  	c->AddRef();
-  	return 0;
-}
-
 
 } // namespace spcore
 #endif
diff --git a/include/spcore/paths.h b/include/spcore/paths.h
old mode 100755
new mode 100644
index 2136c99..e85dbe1
--- a/include/spcore/paths.h
+++ b/include/spcore/paths.h
@@ -1,21 +1,25 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        paths.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		paths.h
+* @brief	Common path utilities.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+*
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_PATHS_H
 #define SPCORE_PATHS_H
 
@@ -24,67 +28,84 @@
 namespace spcore {
 
 /**
-	Interface class for path reporting class
-**/
+	@brief Interface class for path reporting class
+*/
 class IPaths : public IBaseObject {
 protected:
 	virtual ~IPaths() {}
 
 public:
-	/*!
-		\brief Return the location of the applications global, i.e. not 
+	/**
+		@brief Return the location of the applications global, i.e. not 
 		user-specific, data files.
 		The returned value is, in order of precedence:
 		- The value set using SetDataDir
 		- The value found in SP_DATA_DIR environment variable
-		- A guessed path which is usually <install-prefix>/share/<appname> 
+		- A guessed path which is usually install-prefix/share/appname
 		on *nix and the path where the binary resides on Windows
 		
-		\return pointer to an internal storage which should not be deallocated or NULL
+		@return pointer to an internal storage which should not be deallocated or NULL
 	*/
 	virtual const char* GetDataDir() const= 0;
 
-	/*!
-		\brief Sets the location of the applications global, i.e. not 
+	/**
+		@brief Sets the location of the applications global, i.e. not 
 		user-specific, data files.
-		\param dir Data files directory
+		@param dir Data files directory
 	*/
 	virtual void SetDataDir(const char* dir)= 0;
 	
-	/*!
-		\brief Return the directory for the user-dependent application data 
+	/**
+		@brief Return the directory for the user-dependent application data 
 		and configuration files
 		The returned value is, in order of precedence:
 		- The value set using SetUserDataDir
 		- The value found in SP_USER_DATA_DIR environment variable
 		- A guessed path which is usually ~/.appname on *nix and
-		 C:\Users\username\AppData\appname on Windows
-		\return pointer to an internal storage which should not be deallocated or NULL
+		 C:/Users/username/AppData/appname on Windows
+		@return pointer to an internal storage which should not be deallocated or NULL
 	*/
 	virtual const char* GetUserDataDir() const= 0;
 
-	/*!
-		\brief Sets the location for the user-dependent application data
-		\param dir User-dependent data files directory
+	/**
+		@brief Sets the location for the user-dependent application data
+		@param dir User-dependent data files directory
 	*/
 	virtual void SetUserDataDir(const char* dir)= 0;
 	
-	/*!
-		\brief Return language catalogs directory.
+	/**
+		@brief Return language catalogs directory.
 		The returned value is, in order of precedence:
 		- The value set using SetLocalesDir
 		- The value found in SP_LOCALES_DIR environment variable
-		- A guessed path which is usually <install_prefix>/share/locale/ on *nix and 
+		- A guessed path which is usually install_prefix/share/locale/ on *nix and 
 		DataDir plus locale/ on Windows
-		\return pointer to an internal storage which should not be deallocated or NULL
+		@return pointer to an internal storage which should not be deallocated or NULL
 	*/
 	virtual const char* GetLocalesDir() const= 0;
 
-	/*!
-		\brief Sets the location for language catalogs
-		\param dir Language catalogs files directory
+	/**
+		@brief Sets the location for language catalogs
+		@param dir Language catalogs files directory
 	*/
 	virtual void SetLocalesDir(const char* dir)= 0;
+
+	/**
+		@brief Return plug-ins directory.
+		The returned value is, in order of precedence:
+		- The value set using SetPluginsDir
+		- The value found in SP_PLUGINS_DIR environment variable
+		- A guessed path which is usually install_prefix/lib/sitplus/ on *nix and 
+		DataDir on Windows
+		@return pointer to an internal storage which should not be deallocated or NULL
+	*/
+	virtual const char* GetPluginsDir() const= 0;
+
+	/**
+		@brief Sets the location for plug-ins catalogs
+		@param dir Directory name.
+	*/
+	virtual void SetPluginsDir(const char* dir)= 0;
 };
 
 } // namespace spcore
diff --git a/include/spcore/pin.h b/include/spcore/pin.h
index 1be5a10..a41d09a 100644
--- a/include/spcore/pin.h
+++ b/include/spcore/pin.h
@@ -1,21 +1,25 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        pin.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		pin.h
+* @brief	Interface definition for component pins.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_PIN_H
 #define SPCORE_PIN_H
 
@@ -26,22 +30,27 @@ namespace spcore {
 
 class CTypeAny;
 
-///**
-//Interface for input pins
-//This interface declares operations that should be available to work 
-//with pins but not to implement it. Use CInputPin to create your 
-//specific (i.e. typed) pin implementation.
-//*/
+/**
+	@brief Interface for input pins
+
+	This interface declares operations that should be available to work 
+	with pins but not to implement it. Use CInputPin to create your 
+	specific (i.e. typed) pin implementation.
+*/
 class IInputPin : public IBaseObject {
 protected:
 	virtual ~IInputPin() {}
 
 public:
-    // Return the internal type ID for the type name of this pin, 
-    // which is execution dependent, or  TYPE_ANY if the type name doesn't exists
+	/**
+		@return the internal type ID for the type name of this pin, 
+		(which is execution) dependent or TYPE_ANY.
+	*/
     virtual int GetTypeID() const = 0;
 
-    //Return the name of the pin
+    /**
+		@return the name of the pin.
+	*/
     virtual const char* GetName() const = 0;
 
     enum EIPinProperties {
@@ -50,104 +59,115 @@ public:
 
     };
 
-    ///**
-    // Get the properties of the pin.
-    //
-    // \return a combination of flags
-    // \return ALLOW_WRITE: calls to Send method allowed
-    // \return ALLOW_READ: calls to Read method allowed
-    //*/
+    /**
+		@brief Get the properties of the pin.
+		@return Combination of flags.
+		@return ALLOW_WRITE: calls to Send method allowed.
+		@return ALLOW_READ: calls to Read method allowed.
+    */
     virtual unsigned int GetProperties() const = 0;
 
-    ///**
-    //Send a message to the pin. Intended only for calls outside the graph.
-    //\return int: 0 -> message successfully sent, -1 -> type mismatch
-    //*/
+    /**
+		@brief Send a message to the pin. 			
+		@return  0 -> message successfully sent.
+		@return -1 -> type mismatch.
+
+		Intended only for calls outside the graph.
+    */
     virtual int Send(SmartPtr<const CTypeAny> message) = 0;
 
 	/**
-		Read the content of the pin. Always returns a copy of the content
-		of a NULL pointer
+		@brief Read the content of the pin.
+		
+		@return Copy of the content of a NULL pointer.
 	*/
     virtual SmartPtr<const CTypeAny> Read() const = 0;
 
 	/**
-		Rename the pin.
-
-		\param name, new name of the pin
+		@brief Rename the pin.
+		@param name New name of the pin.
 	*/
 	virtual void Rename (const char * name) = 0;
 
 	/**
-		Allow to change the type of the pin. The only change allowed
-		is to turn an any pin into a typed one. The change
-		might fail if the pin is already connected.
-
-		\param type_name, string with the new of the new type
-		\return  0 -> type changed correctly
-				-1 -> type cannot be changed
-				-2 -> type name does not exists
+		@brief Allow to change the type of the pin. 
+		
+		The only change allowed	is to turn an any pin into a typed one. 
+		The change	might fail if the pin is already connected.
+
+		@param type_name Name of the new type.
+		@return  0 -> type changed correctly
+		@return	-1 -> type cannot be changed
+		@return	-2 -> type name does not exists
 	*/
 	virtual int ChangeType (const char * type_name) = 0;
 };
 
 /**
-//Interface for output pins
-//This interface declares operations that should be available to work 
-//with pins but not to implement it. Use COutputPin to create your 
-//specific (i.e. typed pin implementation)
-*/
+	@brief Interface for output pins.
 
+	This interface declares operations that should be available to work 
+	with pins but not to implement it. Use COutputPin to create your 
+	specific (i.e. typed pin implementation)
+*/
 class IOutputPin : public IBaseObject {
 protected:
 	virtual ~IOutputPin() {}
 
-
 public:
-	/*
-    // Return the internal type ID for the type name of this pin, 
-    // which is execution dependent, or  TYPE_ANY if the type name doesn't exists
+	/**
+		@return the internal type ID for the type name of this pin, which 
+		is execution dependent, or  TYPE_ANY if the type name doesn't exists.
 	*/
     virtual int GetTypeID() const = 0;
 
-	/*
-		Name of the pin
-		\return a pointer to a internal char array which might not be freed
+	/**
+		@brief Name of the pin.
+		@return Pointer to a internal char array which might not be freed.
 	*/
     virtual const char* GetName() const = 0;
 
-    ///**
-    //Connects this with a consumer input pin. 
-    //
-    //\return 0 if all correct of <0 when error
-    //*/
+    /**
+		@brief Connect this with a consumer input pin.
+		@param consumer Input pin to connect to.
+		@return 0 if all correct 
+		@return <0 when error
+    */
     virtual int Connect(IInputPin & consumer) = 0;
 
-    ///**
-    // Disconnects. If the two pins where not connected does nothing.
-    //*/
+    /**
+		@brief Disconnects. 
+		@param consumer Input pin at the other end.
+		
+		If the two pins where not connected does nothing.
+    */
     virtual void Disconnect(const IInputPin & consumer) = 0;
 
-    // Checks whether two pins can be connected taking into account
-    // the type of each one.
-    virtual bool CanConnect(const IInputPin & dst) const = 0;
+    /**
+		@brief Checks whether two pins can be connected.
+		taking into account the type of each one.
+		@param consumer Input pin at the other end.
+		@return true or false
+	*/
+    virtual bool CanConnect(const IInputPin & consumer) const = 0;
 
-    ///**
-    // Sends a message to the connected pins. To be used by the component implementation.
-    // \return 0 if correct or <0 when error
-    //*/
+    /**
+		@brief Send a message to the connected pins. 
+		@return 0 if correct or <0 when error.
+
+		To be used by the component implementation.
+    */
     virtual int Send(SmartPtr<const CTypeAny> message) = 0;
 
 	/**
-		Return the number of consumers currently connected
-		\return number of consumers 
+		@brief Return the number of consumers currently connected
+		@return number of consumers 
 	*/
 	virtual unsigned int GetNumComsumers() const = 0;
 
 	/**
-		Rename the pin.
-
-		\param name, new name of the pin
+		@brief Rename the pin.
+		@param name New name for the pin.
 	*/
 	virtual void Rename (const char * name) = 0;
 
@@ -156,10 +176,10 @@ public:
 		is to turn an any pin into a typed one. The change
 		might fail if the pin is already connected.
 
-		\param type_name, string with the new of the new type
-		\return  0 -> type changed correctly
-				-1 -> type cannot be changed
-				-2 -> type name does not exists
+		@param type_name Name of the new type.
+		@return  0 -> type changed correctly
+		@return	-1 -> type cannot be changed
+		@return	-2 -> type name does not exists
 	*/
 	virtual int ChangeType (const char * type_name) = 0;
 
diff --git a/include/spcore/pinimpl.h b/include/spcore/pinimpl.h
index 118b90c..752f839 100644
--- a/include/spcore/pinimpl.h
+++ b/include/spcore/pinimpl.h
@@ -1,21 +1,25 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        pinimpl.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		pinimpl.h
+* @brief	Helper classes to implement pins
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2010 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPCORE_PINIMPL_H
 #define SPCORE_PINIMPL_H
 
@@ -28,7 +32,6 @@
 #include <algorithm>
 #include <boost/thread/shared_mutex.hpp>
 #include <boost/thread/locks.hpp>
-using namespace std;
 
 namespace spcore {
 
@@ -36,12 +39,19 @@ namespace spcore {
 // Forward declaration for COutputPin
 template<class> class SimpleType;
 
-///**
-//Class intended to easy implementing IInputPin derived classes.
-//*/
+/**
+	@brief Adapter class to help to implement input pin classes.
+*/
 class CInputPinAdapter : public IInputPin {
 protected:
-    CInputPinAdapter(const char * name, const char * type) {
+	/**
+		@brief Constructor
+		@param name Name the input pin will be given.
+		@param type Type name of the input pin.
+
+		If the type does not exists throws an exception.
+	*/
+	CInputPinAdapter(const char * name, const char * type) {
 		m_name= name;
 		m_typeID= getSpCoreRuntime()->ResolveTypeID(type);
 		assert (m_typeID!= TYPE_INVALID);
@@ -53,7 +63,7 @@ protected:
 
 public:
 	virtual int GetTypeID() const { return m_typeID; }
-    
+
 	virtual const char* GetName() const { return m_name.c_str(); }
 
 	virtual int Send(SmartPtr<const CTypeAny> message) { return -1; }
@@ -72,19 +82,25 @@ public:
 
 private:
 	int m_typeID;
-    string m_name;    
+	std::string m_name;
 };
 
 
-///**
-//Class intended to easy implementing IIOutputPin derived classes.
-//*/
-
+/**
+	@brief General implementation for output pins.
+*/
 class COutputPin : public IOutputPin {
 	template <class, class> friend class SimpleTypeBasicOperations;
 	friend class CCoreRuntime;
 
-protected:	
+protected:
+	/**
+		@brief Constructor
+		@param name Name the output pin will be given.
+		@param type Type name of the output pin.
+
+		If the type does not exists throws an exception.
+	*/
 	COutputPin(const char * name, const char * type) {
 		m_name= name;
 		m_typeID= getSpCoreRuntime()->ResolveTypeID(type);
@@ -103,7 +119,7 @@ public:
     
     virtual int Connect(IInputPin & consumer) {
 		if (!CanConnect(consumer)) return -1;	
-		if ( find<vector<IInputPin *>::iterator, IInputPin*> 
+		if (std::find<std::vector<IInputPin *>::iterator, IInputPin*> 
 			(m_consumers.begin(), m_consumers.end(), &consumer)== m_consumers.end())
 			m_consumers.push_back (&consumer);  
 
@@ -112,7 +128,7 @@ public:
 	}
 
     virtual void Disconnect(const IInputPin & consumer) {
-		vector<IInputPin*>::iterator it= find (m_consumers.begin(), m_consumers.end(), &consumer);
+		std::vector<IInputPin*>::iterator it= find (m_consumers.begin(), m_consumers.end(), &consumer);
 		if (it!= m_consumers.end()) m_consumers.erase(it);
 		// If not connected do nothing
 	}
@@ -126,8 +142,8 @@ public:
 	}
 
 	virtual int Send(SmartPtr<const CTypeAny> message) {
-		// TODO: check if is really necessary the checks (receiver
-		// pin will also revise message)
+		/** @todo check if is really necessary the checks (receiver
+			pin will also revise message) */
   		int myType= this->GetTypeID();
 		if (myType!= TYPE_ANY && myType!= message->GetTypeID()) return -1;
   		size_t size= m_consumers.size();  	
@@ -157,7 +173,7 @@ public:
 		if (m_typeID!= TYPE_ANY && typeId!= m_typeID) return -1;
 		
 		// Is connected to a pin of different type
-		vector<IInputPin *>::const_iterator it= m_consumers.begin();
+		std::vector<IInputPin *>::const_iterator it= m_consumers.begin();
 
 		for (; it!= m_consumers.end(); ++it) {
 			int consumerType= (*it)->GetTypeID();
@@ -170,24 +186,29 @@ public:
 	}
 
 protected:
-	vector<IInputPin *> const * GetConsumers() const { return &m_consumers; }
+	std::vector<IInputPin *> const * GetConsumers() const { return &m_consumers; }
 
 private:
 	int m_typeID;
-	vector<IInputPin *> m_consumers;
-	string m_name;	
+	std::vector<IInputPin *> m_consumers;
+	std::string m_name;	
 };
 
-//**
-// Thread-safe class intended to easy implementing IIOutputPin derived classes.
-// 
-//*/
-
+/**
+	@brief Thread-safe output pin implementation.
+*/
 class COutputPinLock : public COutputPin {
 	template <class, class> friend class SimpleTypeBasicOperations;
 	friend class CCoreRuntime;
 
 protected:
+	/**
+		@brief Constructor
+		@param name Name the output pin will be given.
+		@param type Type name of the output pin.
+
+		If the type does not exists throws an exception.
+	*/
 	COutputPinLock (const char * name, const char * type) 
 	: COutputPin(name, type)
 	{}
@@ -212,12 +233,21 @@ private:
 };
 
 /**
-	Template class helper to implement pins that refer to some other
-	object (usually the IComponent that contains it
+	@brief Template class helper to implement pins that refer to some other
+	object (usually the IComponent that contains it).
+	@tparam TCOMPONENT Type which this class will hold a pointer to.
 */
 template<class TCOMPONENT>
 class CInputPinComponentRef : public CInputPinAdapter {
 public:
+	/**
+		@brief Constructor
+		@param name Name the pin will be given.
+		@param type Type name of the output pin.
+		@param component Component to point to.
+
+		If the type does not exists throws an exception.
+	*/
 	CInputPinComponentRef(const char * name, const char * type, TCOMPONENT & component)
 	: CInputPinAdapter(name, type)
 	, m_component(&component)
@@ -228,22 +258,24 @@ protected:
 };
 
 /**
-	Template class helper to implement a read-only input pins
+	@brief Template class helper to implement a read-only input pins.
+	@tparam TDATA Compile time type class of the pin.
+	@tparam TCOMPONENT Type which this class will hold a pointer to.
 */
 template<class TDATA, class TCOMPONENT>
 class CInputPinReadOnly : public CInputPinComponentRef<TCOMPONENT> {
 public:
+	/**
+		@brief Constructor
+		@param name Name the pin will be given.
+		@param component Component to point to.
+
+		Note that the type of the pin is provided as a template argument.
+	*/
 	CInputPinReadOnly(const char * name, TCOMPONENT & component) 
 	: CInputPinComponentRef<TCOMPONENT> (name, TDATA::getTypeName(), component) 
 	{}
 
-	///**
-	// Get the properties of the pin.
-	//
-	// \return a combination of flags
-	// \return ALLOW_WRITE: calls to Send method allowed
-	// \return ALLOW_READ: calls to Read method allowed
-	//*/
 	virtual unsigned int GetProperties() const {
 		return (unsigned int) IInputPin::ALLOW_READ;
 	}
@@ -252,34 +284,37 @@ public:
 		return this->DoRead();
 	}
 
+protected:
+	/**
+		@brief Method the derived class should provide to do the actual read.
+		@return Smart pointer to a type instance.
+	*/
 	virtual SmartPtr<TDATA> DoRead() const = 0;
 };
 
 /**
-	Template class helper to implement a write-only input pins
+	@brief Template class helper to implement a write-only input pins.
+	@tparam TDATA Compile time type class of the pin.
+	@tparam TCOMPONENT Type which this class will hold a pointer to.
 */
 template<class TDATA, class TCOMPONENT>
 class CInputPinWriteOnly : public CInputPinComponentRef<TCOMPONENT> {
 public:
+	/**
+		@brief Constructor
+		@param name Name the pin will be given.
+		@param component Component to point to.
+
+		Note that the type of the pin is provided as a template argument.
+	*/
 	CInputPinWriteOnly(const char * name, TCOMPONENT & component) 
 	: CInputPinComponentRef<TCOMPONENT> (name, TDATA::getTypeName(), component) 
 	{}
 
-	///**
-	// Get the properties of the pin.
-	//
-	// \return a combination of flags
-	// \return ALLOW_WRITE: calls to Send method allowed
-	// \return ALLOW_READ: calls to Read method allowed
-	//*/
 	virtual unsigned int GetProperties() const {
 		return (unsigned int) IInputPin::ALLOW_WRITE;
 	}
 
-	///**
-	//Send a message to the pin. 
-	//\return int: 0 -> message successfully sent, -1 -> type mismatch
-	//*/
 	virtual int Send(SmartPtr<const CTypeAny> message) {
 		// Check message type
 		int myType= this->GetTypeID();
@@ -288,31 +323,34 @@ public:
   		return this->DoSend(*static_cast<const TDATA *>(message.get()));
 	}
 
-	///**
-	//Send a message to the pin. 
-	//\return int: 0 -> message successfully sent, -1 -> type mismatch
-	//*/
+protected:
+	/**
+		@brief Method the derived class should provide to do the actual send.
+		@param message
+		@return 0 -> message successfully sent, -1 -> type mismatch
+	*/
 	virtual int DoSend(const TDATA & message) = 0;
-
 };
 
 /**
-	Template class helper to implement a read-write input pins
+	@brief Template class helper to implement a read-write input pins.
+	@tparam TDATA Compile time type class of the pin.
+	@tparam TCOMPONENT Type which this class will hold a pointer to.
 */
 template<class TDATA, class TCOMPONENT>
 class CInputPinReadWrite : public CInputPinComponentRef<TCOMPONENT> {
 public:
+	/**
+		@brief Constructor
+		@param name Name the pin will be given.
+		@param component Component to point to.
+
+		Note that the type of the pin is provided as a template argument.
+	*/
 	CInputPinReadWrite(const char * name, TCOMPONENT & component)
 	: CInputPinComponentRef<TCOMPONENT> (name, TDATA::getTypeName(), component) 
 	{}
 
-	///**
-	// Get the properties of the pin.
-	//
-	// \return a combination of flags
-	// \return ALLOW_WRITE: calls to Send method allowed
-	// \return ALLOW_READ: calls to Read method allowed
-	//*/
 	virtual unsigned int GetProperties() const {
 		return (unsigned int) (IInputPin::ALLOW_READ | IInputPin::ALLOW_WRITE);
 	}
@@ -321,12 +359,6 @@ public:
 		return this->DoRead();
 	}
 
-	virtual SmartPtr<TDATA> DoRead() const = 0;
-
-	///**
-	//Send a message to the pin. 
-	//\return int: 0 -> message successfully sent, -1 -> type mismatch
-	//*/
 	virtual int Send(SmartPtr<const CTypeAny> message){
 		// Check message type
 		int myType= this->GetTypeID();
@@ -335,10 +367,18 @@ public:
   		return this->DoSend(*static_cast<const TDATA *>(message.get()));
 	}
 
-	///**
-	//Send a message to the pin. 
-	//\return int: 0 -> message successfully sent, -1 -> type mismatch
-	//*/
+protected:
+	/**
+		@brief Method the derived class should provide to do the actual read.
+		@return Smart pointer to a type instance.
+	*/
+	virtual SmartPtr<TDATA> DoRead() const = 0;
+
+	/**
+		@brief Method the derived class should provide to do the actual send.
+		@param message
+		@return 0 -> message successfully sent, -1 -> type mismatch
+	*/
 	virtual int DoSend(const TDATA & message) = 0;
 };
 
diff --git a/include/sphost/componenthelper.h b/include/sphost/componenthelper.h
index dde005b..39fd395 100755
--- a/include/sphost/componenthelper.h
+++ b/include/sphost/componenthelper.h
@@ -1,27 +1,40 @@
-/////////////////////////////////////////////////////////////////////////////
-// File:        componenthelper.h
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		componenthelper.h
+* @brief	sp script parser.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+* 
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
+*
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef COMPONENTHELPER_H
 #define COMPONENTHELPER_H
 
 #include "spcore/component.h"
-#include <istream>
+#include "sphost/libimpexp_sphost.h"
+
+#include <exception>
 #include <stdexcept>
+#include <istream>
+
+#ifdef _MSC_VER
+#pragma warning(push)
+// non dll-interface class 'A' used as base for dll-interface class 'B'
+#pragma warning(disable: 4275)
+#endif // _MSC_VER
 
 namespace sphost {
 
@@ -30,17 +43,17 @@ namespace sphost {
 //
 
 // Full parser error
-class parser_error : public std::runtime_error 
+class SPIMPEXP_CLASS_HOST parser_error : public std::runtime_error 
 {
 public:
-	parser_error (const string& what_arg) : std::runtime_error (what_arg) {}
+	parser_error (const std::string& what_arg) : std::runtime_error (what_arg) {}
 };
 
 // Partial error. Used when not enough information is known to fully complete the error message
-class parser_partial_error : public std::runtime_error 
+class SPIMPEXP_CLASS_HOST parser_partial_error : public std::runtime_error 
 {
 public:
-	parser_partial_error (const string& what_arg) : std::runtime_error (what_arg) {}
+	parser_partial_error (const std::string& what_arg) : std::runtime_error (what_arg) {}
 };
 
 /**
@@ -48,7 +61,7 @@ public:
 	it is only intended to be used by the host application not the modules. Therefore,
 	we export directly in the dynamic library.
 */
-class ComponentHelper {
+class SPIMPEXP_CLASS_HOST ComponentHelper {
 public:
 	/**
 	// Parses and input stream and returns a component which contains 
@@ -63,7 +76,7 @@ public:
 	// If any error is found throws an parser_error exception
 	*/
 	static 
-	SmartPtr<spcore::IComponent> SimpleParser (std::istream& is, const string& dir);
+	SmartPtr<spcore::IComponent> SimpleParser (std::istream& is, const std::string& dir);
 
 	/**
 	// Parses a file using the previous call 
@@ -88,4 +101,9 @@ public:
 };
 
 } // namespace spcore
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 #endif
diff --git a/include/sphost/configutils.h b/include/sphost/configutils.h
index acca27a..fba0c46 100755
--- a/include/sphost/configutils.h
+++ b/include/sphost/configutils.h
@@ -1,44 +1,51 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        configutils.h
-// Author:      Cesar Mauri Loba
-// Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		configutils.h
+* @brief	Configuration utility functions.
+* @author	Cesar Mauri Loba
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPHOST_CONFIGUTILS_H
 #define SPHOST_CONFIGUTILS_H
 
 #include "spcore/configuration.h"
+#include "sphost/libimpexp_sphost.h"
 
 namespace sphost {
 
-/*!
-	\brief Try to load a configuration set
-	\param fname File name to load. If the path
+/**
+	@brief Try to load a configuration set
+	@param fname File name to load. If the path
 	is relative the user data directory is appended.
-	\return A smart pointer to the configuration which can be NULL if 
+	@return A smart pointer to the configuration which can be NULL if 
 	the configuration file does not exist or an error ocurred.
 */
+SPIMPEXP_CLASS_HOST
 SmartPtr<spcore::IConfiguration> LoadConfiguration(const char* fname);
 
-/*!
-	\brief Try to save a configuration set.
-	\param cfg Reference to the configuration set.
-	\param fname File name to load. If the path	is relative the user data 
+/**
+	@brief Try to save a configuration set.
+	@param cfg Reference to the configuration set.
+	@param fname File name to load. If the path	is relative the user data 
 	directory is appended. Missing directories are created as needed.
-	\return true on success, false when an error ocurred.
+	@return true on success, false when an error ocurred.
 */
+SPIMPEXP_CLASS_HOST
 bool SaveConfiguration(const spcore::IConfiguration& cfg, const char* fname);
 
 };
diff --git a/include/sphost/langutils.h b/include/sphost/langutils.h
index 3832734..f6f35f2 100755
--- a/include/sphost/langutils.h
+++ b/include/sphost/langutils.h
@@ -1,21 +1,25 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        langutils.h
-// Author:      Cesar Mauri Loba
-// Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
+/**
+* @file		langutils.h
+* @brief	i18n utility functions.
+* @author	Cesar Mauri Loba
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
+* 
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 #ifndef SPHOST_LANGUTILS_H
 #define SPHOST_LANGUTILS_H
 
@@ -25,29 +29,34 @@
 
 #include <string>
 
+#include "sphost/libimpexp_sphost.h"
+
 namespace sphost {
 
 
-/*!
-	\brief Open a language selection dialog.
-	\param lang Language identifier
-	\return false if the user cancelled, true otherwise
-	\remarks wx must has been previously initialized.
+/**
+	@brief Open a language selection dialog.
+	@param lang Language identifier
+	@return false if the user cancelled, true otherwise
+	@remarks wx must has been previously initialized.
 */
+SPIMPEXP_CLASS_HOST
 bool LanguageSelectionDialog(std::string& lang);
 
-/*!
-	\brief Try to load the stored language setting if possible.
-	\param lang Language identifier
-	\return true if language has been found, false otherwise	
+/**
+	@brief Try to load the stored language setting if possible.
+	@param lang Language identifier
+	@return true if language has been found, false otherwise	
 */
+SPIMPEXP_CLASS_HOST
 bool LoadLanguageFromConfiguration(std::string& lang);
 
 /*!
-	\brief Save the language setting
-	\param lang Language identifier
-	\return true if language has been found, false otherwise	
+	@brief Save the language setting
+	@param lang Language identifier
+	@return true if language has been found, false otherwise	
 */
+SPIMPEXP_CLASS_HOST
 bool SaveLanguageToConfiguration(const std::string& lang);
 
 };
diff --git a/include/sphost/libimpexp_sphost.h b/include/sphost/libimpexp_sphost.h
new file mode 100755
index 0000000..014977a
--- /dev/null
+++ b/include/sphost/libimpexp_sphost.h
@@ -0,0 +1,36 @@
+/**
+* @file		libimpexp_sphost.h
+* @brief	Preprocessor macros when bulding dynamic library.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
+*
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#pragma once
+
+#include "spcore/libimpexp.h"
+
+#ifdef SPMAKING_DLL_SPHOST
+	#define SPIMPEXP_CLASS_HOST SPEXPORT_CLASS
+	#define SPIMPEXT_FUNCTION_HOST SPEXPORT_FUNCTION
+#elif defined (SPUSING_DLL)
+	#define SPIMPEXP_CLASS_HOST SPIMPORT_CLASS
+	#define SPIMPEXT_FUNCTION_HOST SPIMPORT_FUNCTION
+#else
+	#define SPIMPEXP_CLASS_HOST
+	#define SPIMPEXT_FUNCTION_HOST
+#endif	// SPMAKING_DLL_SPHOST
diff --git a/include/widgets_base/containerbook.h b/include/widgets_base/containerbook.h
old mode 100755
new mode 100644
index 636c655..24356d5
--- a/include/widgets_base/containerbook.h
+++ b/include/widgets_base/containerbook.h
@@ -31,7 +31,7 @@
 ////@begin includes
 #include "wx/notebook.h"
 ////@end includes
-#include "spcore/libexports.h"
+#include "widgets_base/libimpexp_widgetsbase.h"
 
 /*!
  * Forward declarations
@@ -58,7 +58,7 @@
  * ContainerBook class declaration
  */
 
-class EXPORT_CLASS ContainerBook: public wxNotebook
+class SPIMPEXP_CLASS_WIDGETSBASE ContainerBook: public wxNotebook
 {    
     DECLARE_DYNAMIC_CLASS( ContainerBook )
     DECLARE_EVENT_TABLE()
diff --git a/include/widgets_base/containercollapsible.h b/include/widgets_base/containercollapsible.h
old mode 100755
new mode 100644
index a7a16b1..1096c79
--- a/include/widgets_base/containercollapsible.h
+++ b/include/widgets_base/containercollapsible.h
@@ -32,7 +32,7 @@
 ////@begin includes
 #include "wx/collpane.h"
 ////@end includes
-#include "spcore/libexports.h"
+#include "widgets_base/libimpexp_widgetsbase.h"
 
 /*!
  * Forward declarations
@@ -60,7 +60,7 @@ namespace widgets_base {
  * ContainerCollapsible class declaration
  */
 
-class EXPORT_CLASS ContainerCollapsible: public wxGenericCollapsiblePane
+class SPIMPEXP_CLASS_WIDGETSBASE ContainerCollapsible: public wxGenericCollapsiblePane
 {    
     DECLARE_DYNAMIC_CLASS( ContainerCollapsible )
     DECLARE_EVENT_TABLE()
diff --git a/include/widgets_base/containerpanel.h b/include/widgets_base/containerpanel.h
old mode 100755
new mode 100644
index ddb2c4a..e7cbffa
--- a/include/widgets_base/containerpanel.h
+++ b/include/widgets_base/containerpanel.h
@@ -31,7 +31,7 @@
 
 ////@begin includes
 ////@end includes
-#include "spcore/libexports.h"
+#include "widgets_base/libimpexp_widgetsbase.h"
 
 /*!
  * Forward declarations
@@ -60,7 +60,7 @@ namespace widgets_base {
  * ContainerPanel class declaration
  */
 
-class EXPORT_CLASS ContainerPanel: public wxPanel
+class SPIMPEXP_CLASS_WIDGETSBASE ContainerPanel: public wxPanel
 {    
     DECLARE_DYNAMIC_CLASS( ContainerPanel )
     DECLARE_EVENT_TABLE()
diff --git a/include/widgets_base/dialogcontainer.h b/include/widgets_base/dialogcontainer.h
old mode 100755
new mode 100644
index d618252..a85cd82
--- a/include/widgets_base/dialogcontainer.h
+++ b/include/widgets_base/dialogcontainer.h
@@ -31,7 +31,7 @@
 
 ////@begin includes
 ////@end includes
-#include "spcore/libexports.h"
+#include "widgets_base/libimpexp_widgetsbase.h"
 
 /*!
  * Forward declarations
@@ -59,7 +59,7 @@ namespace widgets_base {
  * DialogContainer class declaration
  */
 
-class EXPORT_CLASS DialogContainer: public wxDialog
+class SPIMPEXP_CLASS_WIDGETSBASE DialogContainer: public wxDialog
 {    
     DECLARE_DYNAMIC_CLASS( DialogContainer )
     DECLARE_EVENT_TABLE()
diff --git a/include/widgets_base/libimpexp_widgetsbase.h b/include/widgets_base/libimpexp_widgetsbase.h
new file mode 100644
index 0000000..7bbd1b4
--- /dev/null
+++ b/include/widgets_base/libimpexp_widgetsbase.h
@@ -0,0 +1,33 @@
+/**
+* @file		libimpexp_widgetsbase.h
+* @brief	Preprocessor macros when bulding dynamic library.
+* @author	Cesar Mauri Loba (cesar at crea-si dot com)
+*
+* -------------------------------------------------------------------------
+*
+* Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
+*
+*  This program is free software: you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation, either version 3 of the License, or
+*  (at your option) any later version.
+*
+*  This program is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU General Public License
+*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#pragma once
+
+#include "spcore/libimpexp.h"
+
+#ifdef SPMAKING_DLL_SPWIDGETSBASE
+	#define SPIMPEXP_CLASS_WIDGETSBASE SPEXPORT_CLASS
+	#define SPIMPEXT_FUNCTION_WIDGETSBASE SPEXPORT_FUNCTION
+#else
+	#define SPIMPEXP_CLASS_WIDGETSBASE
+	#define SPIMPEXT_FUNCTION_WIDGETSBASE
+#endif	// SPMAKING_DLL_SPWIDGETSBASE
diff --git a/include/widgets_base/mdichildcontainer.h b/include/widgets_base/mdichildcontainer.h
old mode 100755
new mode 100644
index b900e79..9163660
--- a/include/widgets_base/mdichildcontainer.h
+++ b/include/widgets_base/mdichildcontainer.h
@@ -32,7 +32,7 @@
 ////@begin includes
 #include "wx/mdi.h"
 ////@end includes
-#include "spcore/libexports.h"
+#include "widgets_base/libimpexp_widgetsbase.h"
 
 /*!
  * Forward declarations
@@ -61,7 +61,7 @@ namespace widgets_base {
  * MDIChildContainer class declaration
  */
 
-class EXPORT_CLASS MDIChildContainer: public wxMDIChildFrame
+class SPIMPEXP_CLASS_WIDGETSBASE MDIChildContainer: public wxMDIChildFrame
 {    
     DECLARE_CLASS( MDIChildContainer )
     DECLARE_EVENT_TABLE()
diff --git a/po/sitplus-mod_camera/ca.po b/po/sitplus-mod_camera/ca.po
index 56063a4..c91b764 100644
--- a/po/sitplus-mod_camera/ca.po
+++ b/po/sitplus-mod_camera/ca.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-20 12:42+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-16 22:24+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/po/sitplus-mod_camera/es.po b/po/sitplus-mod_camera/es.po
index 4439ca7..fe97a8a 100644
--- a/po/sitplus-mod_camera/es.po
+++ b/po/sitplus-mod_camera/es.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-20 12:42+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-19 18:03+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/po/sitplus-mod_camera/gl.po b/po/sitplus-mod_camera/gl.po
index a8a24ba..d835666 100755
--- a/po/sitplus-mod_camera/gl.po
+++ b/po/sitplus-mod_camera/gl.po
@@ -8,10 +8,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-20 12:42+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-29 09:21+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -69,4 +70,3 @@ msgstr "Diálogo da cámara"
 #: src/mod_camera/wcamerapanel.h:34
 msgid "Camera viewer"
 msgstr "Visor da cámara"
-
diff --git a/po/sitplus-mod_midi/ca.po b/po/sitplus-mod_midi/ca.po
index a4482d2..28bc304 100755
--- a/po/sitplus-mod_midi/ca.po
+++ b/po/sitplus-mod_midi/ca.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-21 22:21+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-22 11:55+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -37,4 +38,3 @@ msgstr "Configuració MIDI"
 
 #~ msgid "Select midi device to use"
 #~ msgstr "Escollir dispositiu MIDI a usar"
-
diff --git a/po/sitplus-mod_midi/es.po b/po/sitplus-mod_midi/es.po
index 0e47f0a..7b0567a 100755
--- a/po/sitplus-mod_midi/es.po
+++ b/po/sitplus-mod_midi/es.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-21 22:21+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-22 11:55+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -38,4 +39,3 @@ msgstr "Configuración MIDI"
 
 #~ msgid "Select midi device to use"
 #~ msgstr "Seleccione dispositivo MIDI a usar"
-
diff --git a/po/sitplus-mod_midi/gl.po b/po/sitplus-mod_midi/gl.po
index 1379345..f1972ed 100755
--- a/po/sitplus-mod_midi/gl.po
+++ b/po/sitplus-mod_midi/gl.po
@@ -8,10 +8,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-21 22:21+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-29 09:23+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -40,4 +41,3 @@ msgstr "Configuración MIDI"
 
 #~ msgid "Select midi device to use"
 #~ msgstr "Seleccione dispositivo MIDI a usar"
-
diff --git a/po/sitplus-mod_puredata/ca.po b/po/sitplus-mod_puredata/ca.po
index 274239c..cf90d42 100644
--- a/po/sitplus-mod_puredata/ca.po
+++ b/po/sitplus-mod_puredata/ca.po
@@ -7,68 +7,69 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-16 22:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-16 22:29+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/mod_puredata/playwithvoice.cpp:459
+#: src/mod_puredata/playwithvoice.cpp:460
 msgid "Mic input"
 msgstr "Entrada micro"
 
-#: src/mod_puredata/playwithvoice.cpp:483
+#: src/mod_puredata/playwithvoice.cpp:485
 msgid "Volume"
 msgstr "Volum"
 
-#: src/mod_puredata/playwithvoice.cpp:506
+#: src/mod_puredata/playwithvoice.cpp:507
 msgid "Mic boost"
 msgstr "Amplificació micro"
 
-#: src/mod_puredata/playwithvoice.cpp:510
+#: src/mod_puredata/playwithvoice.cpp:513
 msgid "Effects"
 msgstr "Efectes"
 
-#: src/mod_puredata/playwithvoice.cpp:519
+#: src/mod_puredata/playwithvoice.cpp:522
 msgid "Reverb:"
 msgstr "Reverberació:"
 
-#: src/mod_puredata/playwithvoice.cpp:535
+#: src/mod_puredata/playwithvoice.cpp:538
 msgid "Chorus:"
 msgstr "Coral:"
 
-#: src/mod_puredata/playwithvoice.cpp:551
-#: src/mod_puredata/playwithvoice.cpp:639
+#: src/mod_puredata/playwithvoice.cpp:554
+#: src/mod_puredata/playwithvoice.cpp:644
 msgid "Pitch shift:"
 msgstr "Canvi to:"
 
-#: src/mod_puredata/playwithvoice.cpp:567
+#: src/mod_puredata/playwithvoice.cpp:570
 msgid "Distorsion:"
 msgstr "Distorsió:"
 
-#: src/mod_puredata/playwithvoice.cpp:587
+#: src/mod_puredata/playwithvoice.cpp:592
 msgid "Robot"
 msgstr "Robot"
 
-#: src/mod_puredata/playwithvoice.cpp:595
-msgid "Phone sound"
-msgstr "Phone sound"
-
-#: src/mod_puredata/playwithvoice.cpp:602
+#: src/mod_puredata/playwithvoice.cpp:599
 msgid "Howling reduction"
 msgstr "Reducció acoblament"
 
-#: src/mod_puredata/playwithvoice.cpp:611
+#: src/mod_puredata/playwithvoice.cpp:605
+msgid "Phone sound"
+msgstr "Phone sound"
+
+#: src/mod_puredata/playwithvoice.cpp:616
 msgid "Echo"
 msgstr "Eco"
 
-#: src/mod_puredata/playwithvoice.cpp:619
+#: src/mod_puredata/playwithvoice.cpp:624
 msgid "Delay:"
 msgstr "Retard:"
 
-#: src/mod_puredata/playwithvoice.cpp:635
+#: src/mod_puredata/playwithvoice.cpp:640
 msgid "s"
 msgstr "s"
 
@@ -76,7 +77,7 @@ msgstr "s"
 msgid "Playing with the Voice"
 msgstr "Jugar amb la veu"
 
-#: src/mod_puredata/puredataconfig.cpp:454
+#: src/mod_puredata/puredataconfig.cpp:447
 msgid ""
 "Set \"Delay\" to the minimum\n"
 "possible value before you\n"
@@ -86,47 +87,47 @@ msgstr ""
 "petit possible abans d'obtenir\n"
 "defectes en el so."
 
-#: src/mod_puredata/puredataconfig.cpp:461
+#: src/mod_puredata/puredataconfig.cpp:454
 msgid "Delay"
 msgstr "Retard"
 
-#: src/mod_puredata/puredataconfig.cpp:469
+#: src/mod_puredata/puredataconfig.cpp:462
 msgid "Test type"
 msgstr "Tipus de prova"
 
-#: src/mod_puredata/puredataconfig.cpp:474
+#: src/mod_puredata/puredataconfig.cpp:467
 msgid "Play sound"
 msgstr "Reproduir so"
 
-#: src/mod_puredata/puredataconfig.cpp:479
+#: src/mod_puredata/puredataconfig.cpp:472
 msgid "Microphone"
 msgstr "Micròfon"
 
-#: src/mod_puredata/puredataconfig.cpp:487
-msgid "Mic. vol."
-msgstr "Vol. mic."
-
-#: src/mod_puredata/puredataconfig.cpp:505
+#: src/mod_puredata/puredataconfig.cpp:477
 msgid "Out. vol."
 msgstr "Vol. sort."
 
-#: src/mod_puredata/puredataconfig.cpp:521
+#: src/mod_puredata/puredataconfig.cpp:490
+msgid "Mic. vol."
+msgstr "Vol. mic."
+
+#: src/mod_puredata/puredataconfig.cpp:508
 msgid "Close"
 msgstr "Tancar"
 
-#: src/mod_puredata/puredataconfig.cpp:592
+#: src/mod_puredata/puredataconfig.cpp:579
 msgid ""
 "An error ocurred and Pure Data cannot be started or died unexpectedly.\n"
 "See console for details."
 msgstr ""
-"S'ha produït un error i Pure Data no es pot iniciar o ha fallar inesperadament.\n"
+"S'ha produït un error i Pure Data no es pot iniciar o ha fallar "
+"inesperadament.\n"
 "Vegi la consola per més detalls."
 
-#: src/mod_puredata/puredataconfig.cpp:592
+#: src/mod_puredata/puredataconfig.cpp:579
 msgid "Error"
 msgstr "Error"
 
 #: src/mod_puredata/puredataconfig.h:67
 msgid "Pure Data Configuration"
 msgstr "Configuració Pure Data"
-
diff --git a/po/sitplus-mod_puredata/es.po b/po/sitplus-mod_puredata/es.po
index c28ac1c..0a9e48a 100644
--- a/po/sitplus-mod_puredata/es.po
+++ b/po/sitplus-mod_puredata/es.po
@@ -7,69 +7,70 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-16 22:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-19 18:08+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: src/mod_puredata/playwithvoice.cpp:459
+#: src/mod_puredata/playwithvoice.cpp:460
 msgid "Mic input"
 msgstr "Entrada micro"
 
-#: src/mod_puredata/playwithvoice.cpp:483
+#: src/mod_puredata/playwithvoice.cpp:485
 msgid "Volume"
 msgstr "Volumen"
 
-#: src/mod_puredata/playwithvoice.cpp:506
+#: src/mod_puredata/playwithvoice.cpp:507
 msgid "Mic boost"
 msgstr "Amplificación micro"
 
-#: src/mod_puredata/playwithvoice.cpp:510
+#: src/mod_puredata/playwithvoice.cpp:513
 msgid "Effects"
 msgstr "Efectos"
 
-#: src/mod_puredata/playwithvoice.cpp:519
+#: src/mod_puredata/playwithvoice.cpp:522
 msgid "Reverb:"
 msgstr "Reverberación:"
 
-#: src/mod_puredata/playwithvoice.cpp:535
+#: src/mod_puredata/playwithvoice.cpp:538
 msgid "Chorus:"
 msgstr "Coro:"
 
-#: src/mod_puredata/playwithvoice.cpp:551
-#: src/mod_puredata/playwithvoice.cpp:639
+#: src/mod_puredata/playwithvoice.cpp:554
+#: src/mod_puredata/playwithvoice.cpp:644
 msgid "Pitch shift:"
 msgstr "Cambio de tono:"
 
-#: src/mod_puredata/playwithvoice.cpp:567
+#: src/mod_puredata/playwithvoice.cpp:570
 msgid "Distorsion:"
 msgstr "Distorsión:"
 
-#: src/mod_puredata/playwithvoice.cpp:587
+#: src/mod_puredata/playwithvoice.cpp:592
 msgid "Robot"
 msgstr "Robot"
 
-#: src/mod_puredata/playwithvoice.cpp:595
-msgid "Phone sound"
-msgstr "Sonido telefónico"
-
-#: src/mod_puredata/playwithvoice.cpp:602
+#: src/mod_puredata/playwithvoice.cpp:599
 msgid "Howling reduction"
 msgstr "Reducción acoplamiento"
 
-#: src/mod_puredata/playwithvoice.cpp:611
+#: src/mod_puredata/playwithvoice.cpp:605
+msgid "Phone sound"
+msgstr "Sonido telefónico"
+
+#: src/mod_puredata/playwithvoice.cpp:616
 msgid "Echo"
 msgstr "Eco"
 
-#: src/mod_puredata/playwithvoice.cpp:619
+#: src/mod_puredata/playwithvoice.cpp:624
 msgid "Delay:"
 msgstr "Retardo:"
 
-#: src/mod_puredata/playwithvoice.cpp:635
+#: src/mod_puredata/playwithvoice.cpp:640
 msgid "s"
 msgstr "s"
 
@@ -77,7 +78,7 @@ msgstr "s"
 msgid "Playing with the Voice"
 msgstr "Jugar con la voz"
 
-#: src/mod_puredata/puredataconfig.cpp:454
+#: src/mod_puredata/puredataconfig.cpp:447
 msgid ""
 "Set \"Delay\" to the minimum\n"
 "possible value before you\n"
@@ -87,47 +88,47 @@ msgstr ""
 "valor posible antes de detectar\n"
 "defectos en el sonido."
 
-#: src/mod_puredata/puredataconfig.cpp:461
+#: src/mod_puredata/puredataconfig.cpp:454
 msgid "Delay"
 msgstr "Retardo"
 
-#: src/mod_puredata/puredataconfig.cpp:469
+#: src/mod_puredata/puredataconfig.cpp:462
 msgid "Test type"
 msgstr "Tipo de prueba"
 
-#: src/mod_puredata/puredataconfig.cpp:474
+#: src/mod_puredata/puredataconfig.cpp:467
 msgid "Play sound"
 msgstr "Reproducir sonido"
 
-#: src/mod_puredata/puredataconfig.cpp:479
+#: src/mod_puredata/puredataconfig.cpp:472
 msgid "Microphone"
 msgstr "Micrófono"
 
-#: src/mod_puredata/puredataconfig.cpp:487
-msgid "Mic. vol."
-msgstr "Vol. mic."
-
-#: src/mod_puredata/puredataconfig.cpp:505
+#: src/mod_puredata/puredataconfig.cpp:477
 msgid "Out. vol."
 msgstr "Vol. salida"
 
-#: src/mod_puredata/puredataconfig.cpp:521
+#: src/mod_puredata/puredataconfig.cpp:490
+msgid "Mic. vol."
+msgstr "Vol. mic."
+
+#: src/mod_puredata/puredataconfig.cpp:508
 msgid "Close"
 msgstr "Cerrar"
 
-#: src/mod_puredata/puredataconfig.cpp:592
+#: src/mod_puredata/puredataconfig.cpp:579
 msgid ""
 "An error ocurred and Pure Data cannot be started or died unexpectedly.\n"
 "See console for details."
 msgstr ""
-"Ha ocurrido un error y Pure Data no se ha iniciado o ha terminada inesperadamente.\n"
+"Ha ocurrido un error y Pure Data no se ha iniciado o ha terminada "
+"inesperadamente.\n"
 "Vea la consola para más detalles."
 
-#: src/mod_puredata/puredataconfig.cpp:592
+#: src/mod_puredata/puredataconfig.cpp:579
 msgid "Error"
 msgstr "Error"
 
 #: src/mod_puredata/puredataconfig.h:67
 msgid "Pure Data Configuration"
 msgstr "Configuración Pure Data"
-
diff --git a/po/sitplus-mod_puredata/gl.po b/po/sitplus-mod_puredata/gl.po
index ce192e9..e16f70e 100755
--- a/po/sitplus-mod_puredata/gl.po
+++ b/po/sitplus-mod_puredata/gl.po
@@ -8,70 +8,71 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-16 22:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-29 09:34+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Poedit-Language: Galician\n"
 
-#: src/mod_puredata/playwithvoice.cpp:459
+#: src/mod_puredata/playwithvoice.cpp:460
 msgid "Mic input"
 msgstr "Entrada micro"
 
-#: src/mod_puredata/playwithvoice.cpp:483
+#: src/mod_puredata/playwithvoice.cpp:485
 msgid "Volume"
 msgstr "Volume"
 
-#: src/mod_puredata/playwithvoice.cpp:506
+#: src/mod_puredata/playwithvoice.cpp:507
 msgid "Mic boost"
 msgstr "Amplificación micro"
 
-#: src/mod_puredata/playwithvoice.cpp:510
+#: src/mod_puredata/playwithvoice.cpp:513
 msgid "Effects"
 msgstr "Efectos"
 
-#: src/mod_puredata/playwithvoice.cpp:519
+#: src/mod_puredata/playwithvoice.cpp:522
 msgid "Reverb:"
 msgstr "Reverberación:"
 
-#: src/mod_puredata/playwithvoice.cpp:535
+#: src/mod_puredata/playwithvoice.cpp:538
 msgid "Chorus:"
 msgstr "Coro:"
 
-#: src/mod_puredata/playwithvoice.cpp:551
-#: src/mod_puredata/playwithvoice.cpp:639
+#: src/mod_puredata/playwithvoice.cpp:554
+#: src/mod_puredata/playwithvoice.cpp:644
 msgid "Pitch shift:"
 msgstr "Cambio de ton:"
 
-#: src/mod_puredata/playwithvoice.cpp:567
+#: src/mod_puredata/playwithvoice.cpp:570
 msgid "Distorsion:"
 msgstr "Distorsión:"
 
-#: src/mod_puredata/playwithvoice.cpp:587
+#: src/mod_puredata/playwithvoice.cpp:592
 msgid "Robot"
 msgstr "Robot"
 
-#: src/mod_puredata/playwithvoice.cpp:595
-msgid "Phone sound"
-msgstr "Son telefónico"
-
-#: src/mod_puredata/playwithvoice.cpp:602
+#: src/mod_puredata/playwithvoice.cpp:599
 msgid "Howling reduction"
 msgstr "Redución de efecto «Larsen»"
 
-#: src/mod_puredata/playwithvoice.cpp:611
+#: src/mod_puredata/playwithvoice.cpp:605
+msgid "Phone sound"
+msgstr "Son telefónico"
+
+#: src/mod_puredata/playwithvoice.cpp:616
 msgid "Echo"
 msgstr "Eco"
 
-#: src/mod_puredata/playwithvoice.cpp:619
+#: src/mod_puredata/playwithvoice.cpp:624
 msgid "Delay:"
 msgstr "Retardo:"
 
-#: src/mod_puredata/playwithvoice.cpp:635
+#: src/mod_puredata/playwithvoice.cpp:640
 msgid "s"
 msgstr "s"
 
@@ -79,7 +80,7 @@ msgstr "s"
 msgid "Playing with the Voice"
 msgstr "Xogar coa voz"
 
-#: src/mod_puredata/puredataconfig.cpp:454
+#: src/mod_puredata/puredataconfig.cpp:447
 msgid ""
 "Set \"Delay\" to the minimum\n"
 "possible value before you\n"
@@ -89,47 +90,47 @@ msgstr ""
 "valor posíbel antes de detectar\n"
 "defectos no son."
 
-#: src/mod_puredata/puredataconfig.cpp:461
+#: src/mod_puredata/puredataconfig.cpp:454
 msgid "Delay"
 msgstr "Retardo"
 
-#: src/mod_puredata/puredataconfig.cpp:469
+#: src/mod_puredata/puredataconfig.cpp:462
 msgid "Test type"
 msgstr "Tipo de proba"
 
-#: src/mod_puredata/puredataconfig.cpp:474
+#: src/mod_puredata/puredataconfig.cpp:467
 msgid "Play sound"
 msgstr "Reproducir son"
 
-#: src/mod_puredata/puredataconfig.cpp:479
+#: src/mod_puredata/puredataconfig.cpp:472
 msgid "Microphone"
 msgstr "Micrófono"
 
-#: src/mod_puredata/puredataconfig.cpp:487
-msgid "Mic. vol."
-msgstr "Vol. mic."
-
-#: src/mod_puredata/puredataconfig.cpp:505
+#: src/mod_puredata/puredataconfig.cpp:477
 msgid "Out. vol."
 msgstr "Vol. saída"
 
-#: src/mod_puredata/puredataconfig.cpp:521
+#: src/mod_puredata/puredataconfig.cpp:490
+msgid "Mic. vol."
+msgstr "Vol. mic."
+
+#: src/mod_puredata/puredataconfig.cpp:508
 msgid "Close"
 msgstr "Pechar"
 
-#: src/mod_puredata/puredataconfig.cpp:592
+#: src/mod_puredata/puredataconfig.cpp:579
 msgid ""
 "An error ocurred and Pure Data cannot be started or died unexpectedly.\n"
 "See console for details."
 msgstr ""
-"Produciuse un erro e «Pure Data» non foi iniciado ou rematou de xeito inesperado.\n"
+"Produciuse un erro e «Pure Data» non foi iniciado ou rematou de xeito "
+"inesperado.\n"
 "Vexa a consola para obter máis detalles."
 
-#: src/mod_puredata/puredataconfig.cpp:592
+#: src/mod_puredata/puredataconfig.cpp:579
 msgid "Error"
 msgstr "Erro"
 
 #: src/mod_puredata/puredataconfig.h:67
 msgid "Pure Data Configuration"
 msgstr "Configuración de «Pure Data»"
-
diff --git a/po/sitplus-mod_score_player/ca.po b/po/sitplus-mod_score_player/ca.po
old mode 100755
new mode 100644
index 7123569..6260257
--- a/po/sitplus-mod_score_player/ca.po
+++ b/po/sitplus-mod_score_player/ca.po
@@ -7,523 +7,524 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-23 13:23+0200\n"
-"PO-Revision-Date: 2011-06-23 13:52+0100\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
+"PO-Revision-Date: 2012-01-05 16:15+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/mod_score_player/instrselect.cpp:39
+#: src/mod_score_player/instrselect.cpp:40
 msgid "Acoustic Grand Piano"
 msgstr "Piano de cua"
 
-#: src/mod_score_player/instrselect.cpp:40
+#: src/mod_score_player/instrselect.cpp:41
 msgid "Bright Acoustic Piano"
 msgstr "Piano vertical"
 
-#: src/mod_score_player/instrselect.cpp:41
+#: src/mod_score_player/instrselect.cpp:42
 msgid "Electric Grand Piano"
 msgstr "Piano elèctric de cua'"
 
-#: src/mod_score_player/instrselect.cpp:42
+#: src/mod_score_player/instrselect.cpp:43
 msgid "Honky-Tonk"
 msgstr "Piano de cantina"
 
-#: src/mod_score_player/instrselect.cpp:43
+#: src/mod_score_player/instrselect.cpp:44
 msgid "Electric Piano 1"
 msgstr "Piano elèctric 1"
 
-#: src/mod_score_player/instrselect.cpp:44
+#: src/mod_score_player/instrselect.cpp:45
 msgid "Electric Piano 2"
 msgstr "Piano elèctric 2"
 
-#: src/mod_score_player/instrselect.cpp:45
+#: src/mod_score_player/instrselect.cpp:46
 msgid "Harpsichord"
 msgstr "Arpa"
 
-#: src/mod_score_player/instrselect.cpp:46
+#: src/mod_score_player/instrselect.cpp:47
 msgid "Clavinet"
 msgstr "Clavecí"
 
-#: src/mod_score_player/instrselect.cpp:47
+#: src/mod_score_player/instrselect.cpp:48
 msgid "Celesta"
 msgstr "Celesta"
 
-#: src/mod_score_player/instrselect.cpp:48
+#: src/mod_score_player/instrselect.cpp:49
 msgid "Glockenspiel"
 msgstr "Glockenspiel"
 
-#: src/mod_score_player/instrselect.cpp:49
+#: src/mod_score_player/instrselect.cpp:50
 msgid "Music Box"
 msgstr "Caixa de música"
 
-#: src/mod_score_player/instrselect.cpp:50
+#: src/mod_score_player/instrselect.cpp:51
 msgid "Vibraphone"
 msgstr "Vibràfon"
 
-#: src/mod_score_player/instrselect.cpp:51
+#: src/mod_score_player/instrselect.cpp:52
 msgid "Marimba"
 msgstr "Marimba"
 
-#: src/mod_score_player/instrselect.cpp:52
+#: src/mod_score_player/instrselect.cpp:53
 msgid "Xylophone"
 msgstr "Xilofon"
 
-#: src/mod_score_player/instrselect.cpp:53
+#: src/mod_score_player/instrselect.cpp:54
 msgid "Tubular Bells"
 msgstr "Campanes de tub"
 
-#: src/mod_score_player/instrselect.cpp:54
+#: src/mod_score_player/instrselect.cpp:55
 msgid "Dulcimer"
 msgstr "Dulcemer (salteri alemany)"
 
-#: src/mod_score_player/instrselect.cpp:55
+#: src/mod_score_player/instrselect.cpp:56
 msgid "Drawbar Organ"
 msgstr "Orgue Hammond"
 
-#: src/mod_score_player/instrselect.cpp:56
+#: src/mod_score_player/instrselect.cpp:57
 msgid "Percussive Organ"
 msgstr "Orgue de percussió"
 
-#: src/mod_score_player/instrselect.cpp:57
+#: src/mod_score_player/instrselect.cpp:58
 msgid "Rock Organ"
 msgstr "Orgue de rock"
 
-#: src/mod_score_player/instrselect.cpp:58
+#: src/mod_score_player/instrselect.cpp:59
 msgid "Church Organ"
 msgstr "Orgue església"
 
-#: src/mod_score_player/instrselect.cpp:59
+#: src/mod_score_player/instrselect.cpp:60
 msgid "Reed Organ"
 msgstr "Armoni"
 
-#: src/mod_score_player/instrselect.cpp:60
+#: src/mod_score_player/instrselect.cpp:61
 msgid "Accordion"
 msgstr "Acordió"
 
-#: src/mod_score_player/instrselect.cpp:61
+#: src/mod_score_player/instrselect.cpp:62
 msgid "Harmonica"
 msgstr "Harmònica"
 
-#: src/mod_score_player/instrselect.cpp:62
+#: src/mod_score_player/instrselect.cpp:63
 msgid "Tango Accordion"
 msgstr "Bandoneó"
 
-#: src/mod_score_player/instrselect.cpp:63
+#: src/mod_score_player/instrselect.cpp:64
 msgid "Nylon String Guitar"
 msgstr "Guitarra acústica (cordes de nylon)"
 
-#: src/mod_score_player/instrselect.cpp:64
+#: src/mod_score_player/instrselect.cpp:65
 msgid "Steel String Guitar"
 msgstr "Guitarra acústica (cordes metàl·liques)"
 
-#: src/mod_score_player/instrselect.cpp:65
+#: src/mod_score_player/instrselect.cpp:66
 msgid "Electric Jazz Guitar"
 msgstr "Guitarra elèctrica (jazz)"
 
-#: src/mod_score_player/instrselect.cpp:66
+#: src/mod_score_player/instrselect.cpp:67
 msgid "Electric Clean Guitar"
 msgstr "Guitarra elèctrica"
 
-#: src/mod_score_player/instrselect.cpp:67
+#: src/mod_score_player/instrselect.cpp:68
 msgid "Electric Muted Guitar"
 msgstr "Guitarra elèctrica (amb sordina)"
 
-#: src/mod_score_player/instrselect.cpp:68
+#: src/mod_score_player/instrselect.cpp:69
 msgid "Overdriven Guitar"
 msgstr "Guitarra elèctrica (saturada)"
 
-#: src/mod_score_player/instrselect.cpp:69
+#: src/mod_score_player/instrselect.cpp:70
 msgid "Distortion Guitar"
 msgstr "Guitarra elèctrica (distorsionada)"
 
-#: src/mod_score_player/instrselect.cpp:70
+#: src/mod_score_player/instrselect.cpp:71
 msgid "Guitar Harmonics"
 msgstr "Guitarra d’harmònics"
 
-#: src/mod_score_player/instrselect.cpp:71
+#: src/mod_score_player/instrselect.cpp:72
 msgid "Acoustic Bass"
 msgstr "Baix acústic"
 
-#: src/mod_score_player/instrselect.cpp:72
+#: src/mod_score_player/instrselect.cpp:73
 msgid "Electric Bass(finger)"
 msgstr "Baix elèctric (digitat)"
 
-#: src/mod_score_player/instrselect.cpp:73
+#: src/mod_score_player/instrselect.cpp:74
 msgid "Electric Bass(pick)"
 msgstr "Baix elèctric (amb pua)"
 
-#: src/mod_score_player/instrselect.cpp:74
+#: src/mod_score_player/instrselect.cpp:75
 msgid "Fretless Bass"
 msgstr "Baix sense trasts"
 
-#: src/mod_score_player/instrselect.cpp:75
+#: src/mod_score_player/instrselect.cpp:76
 msgid "Slap Bass 1"
 msgstr "Baix colpejat 1"
 
-#: src/mod_score_player/instrselect.cpp:76
+#: src/mod_score_player/instrselect.cpp:77
 msgid "Slap Bass 2"
 msgstr "Baix colpejat 2"
 
-#: src/mod_score_player/instrselect.cpp:77
+#: src/mod_score_player/instrselect.cpp:78
 msgid "Synth Bass 1"
 msgstr "Baix sintetitzat 1"
 
-#: src/mod_score_player/instrselect.cpp:78
+#: src/mod_score_player/instrselect.cpp:79
 msgid "Synth Bass 2"
 msgstr "Baix sintetitzat 2"
 
-#: src/mod_score_player/instrselect.cpp:79
+#: src/mod_score_player/instrselect.cpp:80
 msgid "Violin"
 msgstr "Violí"
 
-#: src/mod_score_player/instrselect.cpp:80
+#: src/mod_score_player/instrselect.cpp:81
 msgid "Viola"
 msgstr "Viola"
 
-#: src/mod_score_player/instrselect.cpp:81
+#: src/mod_score_player/instrselect.cpp:82
 msgid "Cello"
 msgstr "Violoncel"
 
-#: src/mod_score_player/instrselect.cpp:82
+#: src/mod_score_player/instrselect.cpp:83
 msgid "Contrabass"
 msgstr "Contrabaix"
 
-#: src/mod_score_player/instrselect.cpp:83
+#: src/mod_score_player/instrselect.cpp:84
 msgid "Tremolo Strings"
 msgstr "Cordes amb trèmolo"
 
-#: src/mod_score_player/instrselect.cpp:84
+#: src/mod_score_player/instrselect.cpp:85
 msgid "Pizzicato Strings"
 msgstr "Cordes pessigades"
 
-#: src/mod_score_player/instrselect.cpp:85
+#: src/mod_score_player/instrselect.cpp:86
 msgid "Orchestral Strings"
 msgstr "Corda"
 
-#: src/mod_score_player/instrselect.cpp:86
+#: src/mod_score_player/instrselect.cpp:87
 msgid "Timpani"
 msgstr "Timbals"
 
-#: src/mod_score_player/instrselect.cpp:87
+#: src/mod_score_player/instrselect.cpp:88
 msgid "String Ensemble 1"
 msgstr "Conjunt de corda 1"
 
-#: src/mod_score_player/instrselect.cpp:88
+#: src/mod_score_player/instrselect.cpp:89
 msgid "String Ensemble 2"
 msgstr "Conjunt de corda 2"
 
-#: src/mod_score_player/instrselect.cpp:89
+#: src/mod_score_player/instrselect.cpp:90
 msgid "SynthStrings 1"
 msgstr "Cordes sintetitzades 1"
 
-#: src/mod_score_player/instrselect.cpp:90
+#: src/mod_score_player/instrselect.cpp:91
 msgid "SynthStrings 2"
 msgstr "Cordes sintetitzades 2"
 
-#: src/mod_score_player/instrselect.cpp:91
+#: src/mod_score_player/instrselect.cpp:92
 msgid "Choir Aahs"
 msgstr "Coral de aah"
 
-#: src/mod_score_player/instrselect.cpp:92
+#: src/mod_score_player/instrselect.cpp:93
 msgid "Voice Oohs"
 msgstr "Veus ooh"
 
-#: src/mod_score_player/instrselect.cpp:93
+#: src/mod_score_player/instrselect.cpp:94
 msgid "Synth Voice"
 msgstr "Veus sintetitzades"
 
-#: src/mod_score_player/instrselect.cpp:94
+#: src/mod_score_player/instrselect.cpp:95
 msgid "Orchestra Hit"
 msgstr "Cop orquestra"
 
-#: src/mod_score_player/instrselect.cpp:95
+#: src/mod_score_player/instrselect.cpp:96
 msgid "Trumpet"
 msgstr "Trompeta"
 
-#: src/mod_score_player/instrselect.cpp:96
+#: src/mod_score_player/instrselect.cpp:97
 msgid "Trombone"
 msgstr "Trombó"
 
-#: src/mod_score_player/instrselect.cpp:97
+#: src/mod_score_player/instrselect.cpp:98
 msgid "Tuba"
 msgstr "Tuba"
 
-#: src/mod_score_player/instrselect.cpp:98
+#: src/mod_score_player/instrselect.cpp:99
 msgid "Muted Trumpet"
 msgstr "Trompeta amb sordina"
 
-#: src/mod_score_player/instrselect.cpp:99
+#: src/mod_score_player/instrselect.cpp:100
 msgid "French Horn"
 msgstr "Trompa"
 
-#: src/mod_score_player/instrselect.cpp:100
+#: src/mod_score_player/instrselect.cpp:101
 msgid "Brass Section"
 msgstr "Grup de vent-metall"
 
-#: src/mod_score_player/instrselect.cpp:101
+#: src/mod_score_player/instrselect.cpp:102
 msgid "SynthBrass 1"
 msgstr "Conjunt de metall (sint.1)"
 
-#: src/mod_score_player/instrselect.cpp:102
+#: src/mod_score_player/instrselect.cpp:103
 msgid "SynthBrass 2"
 msgstr "Conjunt de metall (sint.2)"
 
-#: src/mod_score_player/instrselect.cpp:103
+#: src/mod_score_player/instrselect.cpp:104
 msgid "Soprano Sax"
 msgstr "Saxòfon soprano"
 
-#: src/mod_score_player/instrselect.cpp:104
+#: src/mod_score_player/instrselect.cpp:105
 msgid "Alto Sax"
 msgstr "Saxòfon contralt"
 
-#: src/mod_score_player/instrselect.cpp:105
+#: src/mod_score_player/instrselect.cpp:106
 msgid "Tenor Sax"
 msgstr "Saxòfon tenor"
 
-#: src/mod_score_player/instrselect.cpp:106
+#: src/mod_score_player/instrselect.cpp:107
 msgid "Baritone Sax"
 msgstr "Saxòfon baríton"
 
-#: src/mod_score_player/instrselect.cpp:107
+#: src/mod_score_player/instrselect.cpp:108
 msgid "Oboe"
 msgstr "Oboè"
 
-#: src/mod_score_player/instrselect.cpp:108
+#: src/mod_score_player/instrselect.cpp:109
 msgid "English Horn"
 msgstr "Corn anglès"
 
-#: src/mod_score_player/instrselect.cpp:109
+#: src/mod_score_player/instrselect.cpp:110
 msgid "Bassoon"
 msgstr "Fagot"
 
-#: src/mod_score_player/instrselect.cpp:110
+#: src/mod_score_player/instrselect.cpp:111
 msgid "Clarinet"
 msgstr "Clarinet"
 
-#: src/mod_score_player/instrselect.cpp:111
+#: src/mod_score_player/instrselect.cpp:112
 msgid "Piccolo"
 msgstr "Flautí"
 
-#: src/mod_score_player/instrselect.cpp:112
+#: src/mod_score_player/instrselect.cpp:113
 msgid "Flute"
 msgstr "Flauta travessera"
 
-#: src/mod_score_player/instrselect.cpp:113
+#: src/mod_score_player/instrselect.cpp:114
 msgid "Recorder"
 msgstr "Flauta dolça"
 
-#: src/mod_score_player/instrselect.cpp:114
+#: src/mod_score_player/instrselect.cpp:115
 msgid "Pan Flute"
 msgstr "Flauta de Pan"
 
-#: src/mod_score_player/instrselect.cpp:115
+#: src/mod_score_player/instrselect.cpp:116
 msgid "Blown Bottle"
 msgstr "Botella bufada"
 
-#: src/mod_score_player/instrselect.cpp:116
+#: src/mod_score_player/instrselect.cpp:117
 msgid "Shakuhachi"
 msgstr "Shakuhachi"
 
-#: src/mod_score_player/instrselect.cpp:117
+#: src/mod_score_player/instrselect.cpp:118
 msgid "Whistle"
 msgstr "Xiulet"
 
-#: src/mod_score_player/instrselect.cpp:118
+#: src/mod_score_player/instrselect.cpp:119
 msgid "Ocarina"
 msgstr "Ocarina"
 
-#: src/mod_score_player/instrselect.cpp:119
+#: src/mod_score_player/instrselect.cpp:120
 msgid "Square Wave"
 msgstr "Ona quadrada"
 
-#: src/mod_score_player/instrselect.cpp:120
+#: src/mod_score_player/instrselect.cpp:121
 msgid "Saw Wave"
 msgstr "Ona dent serra"
 
-#: src/mod_score_player/instrselect.cpp:121
+#: src/mod_score_player/instrselect.cpp:122
 msgid "Syn. Calliope"
 msgstr "Orgue portàtil"
 
-#: src/mod_score_player/instrselect.cpp:122
+#: src/mod_score_player/instrselect.cpp:123
 msgid "Chiffer Lead"
 msgstr "Orgue solista"
 
-#: src/mod_score_player/instrselect.cpp:123
+#: src/mod_score_player/instrselect.cpp:124
 msgid "Charang"
 msgstr "Xaranga"
 
-#: src/mod_score_player/instrselect.cpp:124
+#: src/mod_score_player/instrselect.cpp:125
 msgid "Solo Vox"
 msgstr "Veu sintetitzada"
 
-#: src/mod_score_player/instrselect.cpp:125
+#: src/mod_score_player/instrselect.cpp:126
 msgid "5th Saw Wave"
-msgstr ""
+msgstr "5ena Ona de Serra"
 
-#: src/mod_score_player/instrselect.cpp:126
+#: src/mod_score_player/instrselect.cpp:127
 msgid "Bass& Lead"
 msgstr "Baixos"
 
-#: src/mod_score_player/instrselect.cpp:127
+#: src/mod_score_player/instrselect.cpp:128
 msgid "Fantasia"
 msgstr "Fantasia"
 
-#: src/mod_score_player/instrselect.cpp:128
+#: src/mod_score_player/instrselect.cpp:129
 msgid "Warm Pad"
 msgstr "Fons càlid"
 
-#: src/mod_score_player/instrselect.cpp:129
+#: src/mod_score_player/instrselect.cpp:130
 msgid "Polysynth"
 msgstr "Fons múltiple sintetitzat"
 
-#: src/mod_score_player/instrselect.cpp:130
+#: src/mod_score_player/instrselect.cpp:131
 msgid "Space Voice"
 msgstr "Veus sintetitzades"
 
-#: src/mod_score_player/instrselect.cpp:131
+#: src/mod_score_player/instrselect.cpp:132
 msgid "Bowed Glass"
 msgstr "Fons d’arcs"
 
-#: src/mod_score_player/instrselect.cpp:132
+#: src/mod_score_player/instrselect.cpp:133
 msgid "Metal Pad"
 msgstr "Fons metàl·lic"
 
-#: src/mod_score_player/instrselect.cpp:133
+#: src/mod_score_player/instrselect.cpp:134
 msgid "Halo Pad"
 msgstr "Fons celestial"
 
-#: src/mod_score_player/instrselect.cpp:134
+#: src/mod_score_player/instrselect.cpp:135
 msgid "Sweep Pad"
 msgstr "Escombrats"
 
-#: src/mod_score_player/instrselect.cpp:135
+#: src/mod_score_player/instrselect.cpp:136
 msgid "Ice Rain"
 msgstr "Pluja"
 
-#: src/mod_score_player/instrselect.cpp:136
+#: src/mod_score_player/instrselect.cpp:137
 msgid "Soundtrack"
 msgstr "Efectes: banda sonora"
 
-#: src/mod_score_player/instrselect.cpp:137
+#: src/mod_score_player/instrselect.cpp:138
 msgid "Crystal"
 msgstr "Cristall"
 
-#: src/mod_score_player/instrselect.cpp:138
+#: src/mod_score_player/instrselect.cpp:139
 msgid "Atmosphere"
 msgstr "Efectes: atmosfera"
 
-#: src/mod_score_player/instrselect.cpp:139
+#: src/mod_score_player/instrselect.cpp:140
 msgid "Brightness"
 msgstr "Efectes: brillant"
 
-#: src/mod_score_player/instrselect.cpp:140
+#: src/mod_score_player/instrselect.cpp:141
 msgid "Goblin"
 msgstr "Follet"
 
-#: src/mod_score_player/instrselect.cpp:141
+#: src/mod_score_player/instrselect.cpp:142
 msgid "Echo Drops"
 msgstr "Ecos"
 
-#: src/mod_score_player/instrselect.cpp:142
+#: src/mod_score_player/instrselect.cpp:143
 msgid "Star Theme"
 msgstr "Tema estelar"
 
-#: src/mod_score_player/instrselect.cpp:143
+#: src/mod_score_player/instrselect.cpp:144
 msgid "Sitar"
 msgstr "Sitar"
 
-#: src/mod_score_player/instrselect.cpp:144
+#: src/mod_score_player/instrselect.cpp:145
 msgid "Banjo"
 msgstr "Banjo"
 
-#: src/mod_score_player/instrselect.cpp:145
+#: src/mod_score_player/instrselect.cpp:146
 msgid "Shamisen"
 msgstr "Shamisen"
 
-#: src/mod_score_player/instrselect.cpp:146
+#: src/mod_score_player/instrselect.cpp:147
 msgid "Koto"
 msgstr "Koto"
 
-#: src/mod_score_player/instrselect.cpp:147
+#: src/mod_score_player/instrselect.cpp:148
 msgid "Kalimba"
 msgstr "Kalimba"
 
-#: src/mod_score_player/instrselect.cpp:148
+#: src/mod_score_player/instrselect.cpp:149
 msgid "Bagpipe"
 msgstr "Gaita"
 
-#: src/mod_score_player/instrselect.cpp:149
+#: src/mod_score_player/instrselect.cpp:150
 msgid "Fiddle"
 msgstr "Violí (arc)"
 
-#: src/mod_score_player/instrselect.cpp:150
+#: src/mod_score_player/instrselect.cpp:151
 msgid "Shanai"
 msgstr "Shanai"
 
-#: src/mod_score_player/instrselect.cpp:151
+#: src/mod_score_player/instrselect.cpp:152
 msgid "Tinkle Bell"
 msgstr "Campanetes"
 
-#: src/mod_score_player/instrselect.cpp:152
+#: src/mod_score_player/instrselect.cpp:153
 msgid "Agogo"
 msgstr "Agogó"
 
-#: src/mod_score_player/instrselect.cpp:153
+#: src/mod_score_player/instrselect.cpp:154
 msgid "Steel Drums"
 msgstr "Percussió metàl·lica"
 
-#: src/mod_score_player/instrselect.cpp:154
+#: src/mod_score_player/instrselect.cpp:155
 msgid "Woodblock"
 msgstr "Blocs de fusta"
 
-#: src/mod_score_player/instrselect.cpp:155
+#: src/mod_score_player/instrselect.cpp:156
 msgid "Taiko Drum"
 msgstr "Taiko"
 
-#: src/mod_score_player/instrselect.cpp:156
+#: src/mod_score_player/instrselect.cpp:157
 msgid "Melodic Tom"
 msgstr "Tom melòdic"
 
-#: src/mod_score_player/instrselect.cpp:157
+#: src/mod_score_player/instrselect.cpp:158
 msgid "Synth Drum"
 msgstr "Caixa sintetitzada"
 
-#: src/mod_score_player/instrselect.cpp:158
+#: src/mod_score_player/instrselect.cpp:159
 msgid "Reverse Cymbal"
 msgstr "Plat (invertit)"
 
-#: src/mod_score_player/instrselect.cpp:159
+#: src/mod_score_player/instrselect.cpp:160
 msgid "Guitar Fret Noise"
 msgstr "Efectes: so trasts guitarra"
 
-#: src/mod_score_player/instrselect.cpp:160
+#: src/mod_score_player/instrselect.cpp:161
 msgid "Breath Noise"
 msgstr "Efectes: so de respiració"
 
-#: src/mod_score_player/instrselect.cpp:161
+#: src/mod_score_player/instrselect.cpp:162
 msgid "Seashore"
 msgstr "Efectes: so onades"
 
-#: src/mod_score_player/instrselect.cpp:162
+#: src/mod_score_player/instrselect.cpp:163
 msgid "Bird Tweet"
 msgstr "Efectes: refilet d’ocells "
 
-#: src/mod_score_player/instrselect.cpp:163
+#: src/mod_score_player/instrselect.cpp:164
 msgid "Telephone Ring"
 msgstr "Efectes: timbre de telèfon"
 
-#: src/mod_score_player/instrselect.cpp:164
+#: src/mod_score_player/instrselect.cpp:165
 msgid "Helicopter"
 msgstr "Efectes: helicòpter"
 
-#: src/mod_score_player/instrselect.cpp:165
+#: src/mod_score_player/instrselect.cpp:166
 msgid "Applause"
 msgstr "Efectes: aplaudiments"
 
-#: src/mod_score_player/instrselect.cpp:166
+#: src/mod_score_player/instrselect.cpp:167
 msgid "Gunshot"
 msgstr "Efectes: tret"
 
diff --git a/po/sitplus-mod_score_player/es.po b/po/sitplus-mod_score_player/es.po
old mode 100755
new mode 100644
index c810091..17592c0
--- a/po/sitplus-mod_score_player/es.po
+++ b/po/sitplus-mod_score_player/es.po
@@ -7,523 +7,525 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-23 14:00+0200\n"
-"PO-Revision-Date: 2011-06-23 13:55+0100\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
+"PO-Revision-Date: 2012-01-05 16:15+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: src/mod_score_player/instrselect.cpp:39
+#: src/mod_score_player/instrselect.cpp:40
 msgid "Acoustic Grand Piano"
 msgstr "Piano de cola"
 
-#: src/mod_score_player/instrselect.cpp:40
+#: src/mod_score_player/instrselect.cpp:41
 msgid "Bright Acoustic Piano"
 msgstr "Piano vertical"
 
-#: src/mod_score_player/instrselect.cpp:41
+#: src/mod_score_player/instrselect.cpp:42
 msgid "Electric Grand Piano"
 msgstr "Piano eléctrico 'de cola'"
 
-#: src/mod_score_player/instrselect.cpp:42
+#: src/mod_score_player/instrselect.cpp:43
 msgid "Honky-Tonk"
 msgstr "Piano de cantina"
 
-#: src/mod_score_player/instrselect.cpp:43
+#: src/mod_score_player/instrselect.cpp:44
 msgid "Electric Piano 1"
 msgstr "Piano eléctrico 1"
 
-#: src/mod_score_player/instrselect.cpp:44
+#: src/mod_score_player/instrselect.cpp:45
 msgid "Electric Piano 2"
 msgstr "Piano eléctrico 2"
 
-#: src/mod_score_player/instrselect.cpp:45
+#: src/mod_score_player/instrselect.cpp:46
 msgid "Harpsichord"
 msgstr "Arpa"
 
-#: src/mod_score_player/instrselect.cpp:46
+#: src/mod_score_player/instrselect.cpp:47
 msgid "Clavinet"
 msgstr "Clavecín"
 
-#: src/mod_score_player/instrselect.cpp:47
+#: src/mod_score_player/instrselect.cpp:48
 msgid "Celesta"
 msgstr "Celesta"
 
-#: src/mod_score_player/instrselect.cpp:48
+#: src/mod_score_player/instrselect.cpp:49
 msgid "Glockenspiel"
 msgstr "Glockenspiel"
 
-#: src/mod_score_player/instrselect.cpp:49
+#: src/mod_score_player/instrselect.cpp:50
 msgid "Music Box"
 msgstr "Caja de música"
 
-#: src/mod_score_player/instrselect.cpp:50
+#: src/mod_score_player/instrselect.cpp:51
 msgid "Vibraphone"
 msgstr "Vibráfono"
 
-#: src/mod_score_player/instrselect.cpp:51
+#: src/mod_score_player/instrselect.cpp:52
 msgid "Marimba"
 msgstr "Marimba"
 
-#: src/mod_score_player/instrselect.cpp:52
+#: src/mod_score_player/instrselect.cpp:53
 msgid "Xylophone"
 msgstr "Xilofón"
 
-#: src/mod_score_player/instrselect.cpp:53
+#: src/mod_score_player/instrselect.cpp:54
 msgid "Tubular Bells"
 msgstr "Campanas de tubo"
 
-#: src/mod_score_player/instrselect.cpp:54
+#: src/mod_score_player/instrselect.cpp:55
 msgid "Dulcimer"
 msgstr "Dulcemer (salterio alemán)"
 
-#: src/mod_score_player/instrselect.cpp:55
+#: src/mod_score_player/instrselect.cpp:56
 msgid "Drawbar Organ"
 msgstr "Órgano Hammond"
 
-#: src/mod_score_player/instrselect.cpp:56
+#: src/mod_score_player/instrselect.cpp:57
 msgid "Percussive Organ"
 msgstr "Órgano de percusión"
 
-#: src/mod_score_player/instrselect.cpp:57
+#: src/mod_score_player/instrselect.cpp:58
 msgid "Rock Organ"
 msgstr "Órgano de rock"
 
-#: src/mod_score_player/instrselect.cpp:58
+#: src/mod_score_player/instrselect.cpp:59
 msgid "Church Organ"
 msgstr "Órgano de iglesia"
 
-#: src/mod_score_player/instrselect.cpp:59
+#: src/mod_score_player/instrselect.cpp:60
 msgid "Reed Organ"
 msgstr "Armonio"
 
-#: src/mod_score_player/instrselect.cpp:60
+#: src/mod_score_player/instrselect.cpp:61
 msgid "Accordion"
 msgstr "Acordeón"
 
-#: src/mod_score_player/instrselect.cpp:61
+#: src/mod_score_player/instrselect.cpp:62
 msgid "Harmonica"
 msgstr "Armónica"
 
-#: src/mod_score_player/instrselect.cpp:62
+#: src/mod_score_player/instrselect.cpp:63
 msgid "Tango Accordion"
 msgstr "Bandoneón"
 
-#: src/mod_score_player/instrselect.cpp:63
+#: src/mod_score_player/instrselect.cpp:64
 msgid "Nylon String Guitar"
 msgstr "Guitarra acústica (cuerdas de nylon)"
 
-#: src/mod_score_player/instrselect.cpp:64
+#: src/mod_score_player/instrselect.cpp:65
 msgid "Steel String Guitar"
 msgstr "Guitarra acústica (cuerdas metálicas)"
 
-#: src/mod_score_player/instrselect.cpp:65
+#: src/mod_score_player/instrselect.cpp:66
 msgid "Electric Jazz Guitar"
 msgstr "Guitarra eléctrica (jazz)"
 
-#: src/mod_score_player/instrselect.cpp:66
+#: src/mod_score_player/instrselect.cpp:67
 msgid "Electric Clean Guitar"
 msgstr "Guitarra eléctrica"
 
-#: src/mod_score_player/instrselect.cpp:67
+#: src/mod_score_player/instrselect.cpp:68
 msgid "Electric Muted Guitar"
 msgstr "Guitarra eléctrica (con sordina)"
 
-#: src/mod_score_player/instrselect.cpp:68
+#: src/mod_score_player/instrselect.cpp:69
 msgid "Overdriven Guitar"
 msgstr "Guitarra eléctrica (saturada)"
 
-#: src/mod_score_player/instrselect.cpp:69
+#: src/mod_score_player/instrselect.cpp:70
 msgid "Distortion Guitar"
 msgstr "Guitarra eléctrica (distorsionada)"
 
-#: src/mod_score_player/instrselect.cpp:70
+#: src/mod_score_player/instrselect.cpp:71
 msgid "Guitar Harmonics"
 msgstr "Guitarra de armónicos"
 
-#: src/mod_score_player/instrselect.cpp:71
+#: src/mod_score_player/instrselect.cpp:72
 msgid "Acoustic Bass"
 msgstr "Bajo acústico"
 
-#: src/mod_score_player/instrselect.cpp:72
+#: src/mod_score_player/instrselect.cpp:73
 msgid "Electric Bass(finger)"
 msgstr "Bajo eléctrico (digitado)"
 
-#: src/mod_score_player/instrselect.cpp:73
+#: src/mod_score_player/instrselect.cpp:74
 msgid "Electric Bass(pick)"
 msgstr "Bajo eléctrico (con púa)"
 
-#: src/mod_score_player/instrselect.cpp:74
+#: src/mod_score_player/instrselect.cpp:75
 msgid "Fretless Bass"
 msgstr "Bajo sin trastes"
 
-#: src/mod_score_player/instrselect.cpp:75
+#: src/mod_score_player/instrselect.cpp:76
 msgid "Slap Bass 1"
 msgstr "Bajo golpeado 1"
 
-#: src/mod_score_player/instrselect.cpp:76
+#: src/mod_score_player/instrselect.cpp:77
 msgid "Slap Bass 2"
 msgstr "Bajo golpeado 2"
 
-#: src/mod_score_player/instrselect.cpp:77
+#: src/mod_score_player/instrselect.cpp:78
 msgid "Synth Bass 1"
 msgstr "Bajo sintetizado 1"
 
-#: src/mod_score_player/instrselect.cpp:78
+#: src/mod_score_player/instrselect.cpp:79
 msgid "Synth Bass 2"
 msgstr "Bajo sintetizado 2"
 
-#: src/mod_score_player/instrselect.cpp:79
+#: src/mod_score_player/instrselect.cpp:80
 msgid "Violin"
 msgstr "Violín"
 
-#: src/mod_score_player/instrselect.cpp:80
+#: src/mod_score_player/instrselect.cpp:81
 msgid "Viola"
 msgstr "Viola"
 
-#: src/mod_score_player/instrselect.cpp:81
+#: src/mod_score_player/instrselect.cpp:82
 msgid "Cello"
 msgstr "Violoncelo"
 
-#: src/mod_score_player/instrselect.cpp:82
+#: src/mod_score_player/instrselect.cpp:83
 msgid "Contrabass"
 msgstr "Contrabajo"
 
-#: src/mod_score_player/instrselect.cpp:83
+#: src/mod_score_player/instrselect.cpp:84
 msgid "Tremolo Strings"
 msgstr "Cuerdas con trémolo"
 
-#: src/mod_score_player/instrselect.cpp:84
+#: src/mod_score_player/instrselect.cpp:85
 msgid "Pizzicato Strings"
 msgstr "Cuerdas pellizcadas"
 
-#: src/mod_score_player/instrselect.cpp:85
+#: src/mod_score_player/instrselect.cpp:86
 msgid "Orchestral Strings"
 msgstr "Cuerda"
 
-#: src/mod_score_player/instrselect.cpp:86
+#: src/mod_score_player/instrselect.cpp:87
 msgid "Timpani"
 msgstr "Timbales"
 
-#: src/mod_score_player/instrselect.cpp:87
+#: src/mod_score_player/instrselect.cpp:88
 msgid "String Ensemble 1"
 msgstr "Conjunto de cuerda 1"
 
-#: src/mod_score_player/instrselect.cpp:88
+#: src/mod_score_player/instrselect.cpp:89
 msgid "String Ensemble 2"
 msgstr "Conjunto de cuerda 2"
 
-#: src/mod_score_player/instrselect.cpp:89
+#: src/mod_score_player/instrselect.cpp:90
 msgid "SynthStrings 1"
 msgstr "Cuerdas sintetizadas 1"
 
-#: src/mod_score_player/instrselect.cpp:90
+#: src/mod_score_player/instrselect.cpp:91
 msgid "SynthStrings 2"
 msgstr "Cuerdas sintetizadas 2"
 
-#: src/mod_score_player/instrselect.cpp:91
+#: src/mod_score_player/instrselect.cpp:92
 msgid "Choir Aahs"
 msgstr "Coro de aah"
 
-#: src/mod_score_player/instrselect.cpp:92
+#: src/mod_score_player/instrselect.cpp:93
 msgid "Voice Oohs"
 msgstr "Voces ooh"
 
-#: src/mod_score_player/instrselect.cpp:93
+#: src/mod_score_player/instrselect.cpp:94
 msgid "Synth Voice"
 msgstr "Voces sintetizadas"
 
-#: src/mod_score_player/instrselect.cpp:94
+#: src/mod_score_player/instrselect.cpp:95
 msgid "Orchestra Hit"
 msgstr "Toque orquesta"
 
-#: src/mod_score_player/instrselect.cpp:95
+#: src/mod_score_player/instrselect.cpp:96
 msgid "Trumpet"
 msgstr "Trompeta"
 
-#: src/mod_score_player/instrselect.cpp:96
+#: src/mod_score_player/instrselect.cpp:97
 msgid "Trombone"
 msgstr "Trombón"
 
-#: src/mod_score_player/instrselect.cpp:97
+#: src/mod_score_player/instrselect.cpp:98
 msgid "Tuba"
 msgstr "Tuba"
 
-#: src/mod_score_player/instrselect.cpp:98
+#: src/mod_score_player/instrselect.cpp:99
 msgid "Muted Trumpet"
 msgstr "Trompeta con sordina"
 
-#: src/mod_score_player/instrselect.cpp:99
+#: src/mod_score_player/instrselect.cpp:100
 msgid "French Horn"
 msgstr "Trompa"
 
-#: src/mod_score_player/instrselect.cpp:100
+#: src/mod_score_player/instrselect.cpp:101
 msgid "Brass Section"
 msgstr "Grupo de viento-metal"
 
-#: src/mod_score_player/instrselect.cpp:101
+#: src/mod_score_player/instrselect.cpp:102
 msgid "SynthBrass 1"
 msgstr "Conjunto de metal (sint.1)"
 
-#: src/mod_score_player/instrselect.cpp:102
+#: src/mod_score_player/instrselect.cpp:103
 msgid "SynthBrass 2"
 msgstr "Conjunto de metal (sint.2)"
 
-#: src/mod_score_player/instrselect.cpp:103
+#: src/mod_score_player/instrselect.cpp:104
 msgid "Soprano Sax"
 msgstr "Saxofón soprano"
 
-#: src/mod_score_player/instrselect.cpp:104
+#: src/mod_score_player/instrselect.cpp:105
 msgid "Alto Sax"
 msgstr "Saxofón contralto"
 
-#: src/mod_score_player/instrselect.cpp:105
+#: src/mod_score_player/instrselect.cpp:106
 msgid "Tenor Sax"
 msgstr "Saxofón tenor"
 
-#: src/mod_score_player/instrselect.cpp:106
+#: src/mod_score_player/instrselect.cpp:107
 msgid "Baritone Sax"
 msgstr "Saxofón barítono"
 
-#: src/mod_score_player/instrselect.cpp:107
+#: src/mod_score_player/instrselect.cpp:108
 msgid "Oboe"
 msgstr "Oboe"
 
-#: src/mod_score_player/instrselect.cpp:108
+#: src/mod_score_player/instrselect.cpp:109
 msgid "English Horn"
 msgstr "Corno inglés"
 
-#: src/mod_score_player/instrselect.cpp:109
+#: src/mod_score_player/instrselect.cpp:110
 msgid "Bassoon"
 msgstr "Fagot"
 
-#: src/mod_score_player/instrselect.cpp:110
+#: src/mod_score_player/instrselect.cpp:111
 msgid "Clarinet"
 msgstr "Clarinete"
 
-#: src/mod_score_player/instrselect.cpp:111
+#: src/mod_score_player/instrselect.cpp:112
 msgid "Piccolo"
 msgstr "Flautín"
 
-#: src/mod_score_player/instrselect.cpp:112
+#: src/mod_score_player/instrselect.cpp:113
 msgid "Flute"
 msgstr "Flauta travesera"
 
-#: src/mod_score_player/instrselect.cpp:113
+#: src/mod_score_player/instrselect.cpp:114
 msgid "Recorder"
 msgstr "Flauta dulce"
 
-#: src/mod_score_player/instrselect.cpp:114
+#: src/mod_score_player/instrselect.cpp:115
 msgid "Pan Flute"
 msgstr "Flauta de Pan"
 
-#: src/mod_score_player/instrselect.cpp:115
+#: src/mod_score_player/instrselect.cpp:116
 msgid "Blown Bottle"
 msgstr "Botella soplada"
 
-#: src/mod_score_player/instrselect.cpp:116
+#: src/mod_score_player/instrselect.cpp:117
 msgid "Shakuhachi"
 msgstr "Shakuhachi"
 
-#: src/mod_score_player/instrselect.cpp:117
+#: src/mod_score_player/instrselect.cpp:118
 msgid "Whistle"
 msgstr "Silbato"
 
-#: src/mod_score_player/instrselect.cpp:118
+#: src/mod_score_player/instrselect.cpp:119
 msgid "Ocarina"
 msgstr "Ocarina"
 
-#: src/mod_score_player/instrselect.cpp:119
+#: src/mod_score_player/instrselect.cpp:120
 msgid "Square Wave"
 msgstr "Onda cuadrada"
 
-#: src/mod_score_player/instrselect.cpp:120
+#: src/mod_score_player/instrselect.cpp:121
 msgid "Saw Wave"
 msgstr "Onda diente sierra"
 
-#: src/mod_score_player/instrselect.cpp:121
+#: src/mod_score_player/instrselect.cpp:122
 msgid "Syn. Calliope"
 msgstr "Órgano portátil"
 
-#: src/mod_score_player/instrselect.cpp:122
+#: src/mod_score_player/instrselect.cpp:123
 msgid "Chiffer Lead"
 msgstr "Órgano solista"
 
-#: src/mod_score_player/instrselect.cpp:123
+#: src/mod_score_player/instrselect.cpp:124
 msgid "Charang"
 msgstr "Charanga"
 
-#: src/mod_score_player/instrselect.cpp:124
+#: src/mod_score_player/instrselect.cpp:125
 msgid "Solo Vox"
 msgstr "Voz sintetizada"
 
-#: src/mod_score_player/instrselect.cpp:125
+#: src/mod_score_player/instrselect.cpp:126
 msgid "5th Saw Wave"
-msgstr ""
+msgstr " 5ª Onda de Sierra"
 
-#: src/mod_score_player/instrselect.cpp:126
+#: src/mod_score_player/instrselect.cpp:127
 msgid "Bass& Lead"
 msgstr "Bajos"
 
-#: src/mod_score_player/instrselect.cpp:127
+#: src/mod_score_player/instrselect.cpp:128
 msgid "Fantasia"
 msgstr "Fantasía"
 
-#: src/mod_score_player/instrselect.cpp:128
+#: src/mod_score_player/instrselect.cpp:129
 msgid "Warm Pad"
 msgstr "Fondo cálido"
 
-#: src/mod_score_player/instrselect.cpp:129
+#: src/mod_score_player/instrselect.cpp:130
 msgid "Polysynth"
 msgstr "Fondo múltiple sintetizado"
 
-#: src/mod_score_player/instrselect.cpp:130
+#: src/mod_score_player/instrselect.cpp:131
 msgid "Space Voice"
 msgstr "Voces sintetizadas"
 
-#: src/mod_score_player/instrselect.cpp:131
+#: src/mod_score_player/instrselect.cpp:132
 msgid "Bowed Glass"
 msgstr "Fondo de arcos"
 
-#: src/mod_score_player/instrselect.cpp:132
+#: src/mod_score_player/instrselect.cpp:133
 msgid "Metal Pad"
 msgstr "Fondo metálico"
 
-#: src/mod_score_player/instrselect.cpp:133
+#: src/mod_score_player/instrselect.cpp:134
 msgid "Halo Pad"
 msgstr "Fondo celestial"
 
-#: src/mod_score_player/instrselect.cpp:134
+#: src/mod_score_player/instrselect.cpp:135
 msgid "Sweep Pad"
 msgstr "Barridos"
 
-#: src/mod_score_player/instrselect.cpp:135
+#: src/mod_score_player/instrselect.cpp:136
 msgid "Ice Rain"
 msgstr "Lluvia"
 
-#: src/mod_score_player/instrselect.cpp:136
+#: src/mod_score_player/instrselect.cpp:137
 msgid "Soundtrack"
 msgstr "Efectos: banda sonora"
 
-#: src/mod_score_player/instrselect.cpp:137
+#: src/mod_score_player/instrselect.cpp:138
 msgid "Crystal"
 msgstr "Cristal"
 
-#: src/mod_score_player/instrselect.cpp:138
+#: src/mod_score_player/instrselect.cpp:139
 msgid "Atmosphere"
 msgstr "Efectos: atmósfera"
 
-#: src/mod_score_player/instrselect.cpp:139
+#: src/mod_score_player/instrselect.cpp:140
 msgid "Brightness"
 msgstr "Efectos: brillante"
 
-#: src/mod_score_player/instrselect.cpp:140
+#: src/mod_score_player/instrselect.cpp:141
 msgid "Goblin"
 msgstr "Duende"
 
-#: src/mod_score_player/instrselect.cpp:141
+#: src/mod_score_player/instrselect.cpp:142
 msgid "Echo Drops"
 msgstr "Ecos"
 
-#: src/mod_score_player/instrselect.cpp:142
+#: src/mod_score_player/instrselect.cpp:143
 msgid "Star Theme"
 msgstr "Tema estelar"
 
-#: src/mod_score_player/instrselect.cpp:143
+#: src/mod_score_player/instrselect.cpp:144
 msgid "Sitar"
 msgstr "Sitar"
 
-#: src/mod_score_player/instrselect.cpp:144
+#: src/mod_score_player/instrselect.cpp:145
 msgid "Banjo"
 msgstr "Banjo"
 
-#: src/mod_score_player/instrselect.cpp:145
+#: src/mod_score_player/instrselect.cpp:146
 msgid "Shamisen"
 msgstr "Shamisen"
 
-#: src/mod_score_player/instrselect.cpp:146
+#: src/mod_score_player/instrselect.cpp:147
 msgid "Koto"
 msgstr "Koto"
 
-#: src/mod_score_player/instrselect.cpp:147
+#: src/mod_score_player/instrselect.cpp:148
 msgid "Kalimba"
 msgstr "Kalimba"
 
-#: src/mod_score_player/instrselect.cpp:148
+#: src/mod_score_player/instrselect.cpp:149
 msgid "Bagpipe"
 msgstr "Gaita"
 
-#: src/mod_score_player/instrselect.cpp:149
+#: src/mod_score_player/instrselect.cpp:150
 msgid "Fiddle"
 msgstr "Violín (arco)"
 
-#: src/mod_score_player/instrselect.cpp:150
+#: src/mod_score_player/instrselect.cpp:151
 msgid "Shanai"
 msgstr "Shanai"
 
-#: src/mod_score_player/instrselect.cpp:151
+#: src/mod_score_player/instrselect.cpp:152
 msgid "Tinkle Bell"
 msgstr "Campanillas"
 
-#: src/mod_score_player/instrselect.cpp:152
+#: src/mod_score_player/instrselect.cpp:153
 msgid "Agogo"
 msgstr "Agogó"
 
-#: src/mod_score_player/instrselect.cpp:153
+#: src/mod_score_player/instrselect.cpp:154
 msgid "Steel Drums"
 msgstr "Percusión metálica"
 
-#: src/mod_score_player/instrselect.cpp:154
+#: src/mod_score_player/instrselect.cpp:155
 msgid "Woodblock"
 msgstr "Bloques de madera"
 
-#: src/mod_score_player/instrselect.cpp:155
+#: src/mod_score_player/instrselect.cpp:156
 msgid "Taiko Drum"
 msgstr "Taiko"
 
-#: src/mod_score_player/instrselect.cpp:156
+#: src/mod_score_player/instrselect.cpp:157
 msgid "Melodic Tom"
 msgstr "Tom melódico"
 
-#: src/mod_score_player/instrselect.cpp:157
+#: src/mod_score_player/instrselect.cpp:158
 msgid "Synth Drum"
 msgstr "Caja sintetizada"
 
-#: src/mod_score_player/instrselect.cpp:158
+#: src/mod_score_player/instrselect.cpp:159
 msgid "Reverse Cymbal"
 msgstr "Plato (invertido)"
 
-#: src/mod_score_player/instrselect.cpp:159
+#: src/mod_score_player/instrselect.cpp:160
 msgid "Guitar Fret Noise"
 msgstr "Efectos: ruido de trastes de guitarra"
 
-#: src/mod_score_player/instrselect.cpp:160
+#: src/mod_score_player/instrselect.cpp:161
 msgid "Breath Noise"
 msgstr "Efectos: ruido de respiración"
 
-#: src/mod_score_player/instrselect.cpp:161
+#: src/mod_score_player/instrselect.cpp:162
 msgid "Seashore"
 msgstr "Efectos: ruido de olas"
 
-#: src/mod_score_player/instrselect.cpp:162
+#: src/mod_score_player/instrselect.cpp:163
 msgid "Bird Tweet"
 msgstr "Efectos: trino de pájaros"
 
-#: src/mod_score_player/instrselect.cpp:163
+#: src/mod_score_player/instrselect.cpp:164
 msgid "Telephone Ring"
 msgstr "Efectos: timbre de teléfono"
 
-#: src/mod_score_player/instrselect.cpp:164
+#: src/mod_score_player/instrselect.cpp:165
 msgid "Helicopter"
 msgstr "Efectos: helicóptero"
 
-#: src/mod_score_player/instrselect.cpp:165
+#: src/mod_score_player/instrselect.cpp:166
 msgid "Applause"
 msgstr "Efectos: aplausos"
 
-#: src/mod_score_player/instrselect.cpp:166
+#: src/mod_score_player/instrselect.cpp:167
 msgid "Gunshot"
 msgstr "Efectos: disparo"
+
diff --git a/po/sitplus-mod_score_player/gl.po b/po/sitplus-mod_score_player/gl.po
index b5cfbd7..e04a42f 100755
--- a/po/sitplus-mod_score_player/gl.po
+++ b/po/sitplus-mod_score_player/gl.po
@@ -8,525 +8,525 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-23 14:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-29 10:35+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Poedit-Language: Galician\n"
 
-#: src/mod_score_player/instrselect.cpp:39
+#: src/mod_score_player/instrselect.cpp:40
 msgid "Acoustic Grand Piano"
 msgstr "Gran piano (de cola)"
 
-#: src/mod_score_player/instrselect.cpp:40
+#: src/mod_score_player/instrselect.cpp:41
 msgid "Bright Acoustic Piano"
 msgstr "Piano vertical"
 
-#: src/mod_score_player/instrselect.cpp:41
+#: src/mod_score_player/instrselect.cpp:42
 msgid "Electric Grand Piano"
 msgstr "Gran piano eléctrico"
 
-#: src/mod_score_player/instrselect.cpp:42
+#: src/mod_score_player/instrselect.cpp:43
 msgid "Honky-Tonk"
 msgstr "Piano de cantina"
 
-#: src/mod_score_player/instrselect.cpp:43
+#: src/mod_score_player/instrselect.cpp:44
 msgid "Electric Piano 1"
 msgstr "Piano eléctrico 1"
 
-#: src/mod_score_player/instrselect.cpp:44
+#: src/mod_score_player/instrselect.cpp:45
 msgid "Electric Piano 2"
 msgstr "Piano eléctrico 2"
 
-#: src/mod_score_player/instrselect.cpp:45
+#: src/mod_score_player/instrselect.cpp:46
 msgid "Harpsichord"
 msgstr "Arpa"
 
-#: src/mod_score_player/instrselect.cpp:46
+#: src/mod_score_player/instrselect.cpp:47
 msgid "Clavinet"
 msgstr "Clavecín"
 
-#: src/mod_score_player/instrselect.cpp:47
+#: src/mod_score_player/instrselect.cpp:48
 msgid "Celesta"
 msgstr "Celesta"
 
-#: src/mod_score_player/instrselect.cpp:48
+#: src/mod_score_player/instrselect.cpp:49
 msgid "Glockenspiel"
 msgstr "Glockenspiel (lira)"
 
-#: src/mod_score_player/instrselect.cpp:49
+#: src/mod_score_player/instrselect.cpp:50
 msgid "Music Box"
 msgstr "Caixa de música"
 
-#: src/mod_score_player/instrselect.cpp:50
+#: src/mod_score_player/instrselect.cpp:51
 msgid "Vibraphone"
 msgstr "Vibráfono"
 
-#: src/mod_score_player/instrselect.cpp:51
+#: src/mod_score_player/instrselect.cpp:52
 msgid "Marimba"
 msgstr "Marimba"
 
-#: src/mod_score_player/instrselect.cpp:52
+#: src/mod_score_player/instrselect.cpp:53
 msgid "Xylophone"
 msgstr "Xilófono"
 
-#: src/mod_score_player/instrselect.cpp:53
+#: src/mod_score_player/instrselect.cpp:54
 msgid "Tubular Bells"
 msgstr "Campás de tubo"
 
-#: src/mod_score_player/instrselect.cpp:54
+#: src/mod_score_player/instrselect.cpp:55
 msgid "Dulcimer"
 msgstr "dulcimer (salterio alemán)"
 
-#: src/mod_score_player/instrselect.cpp:55
+#: src/mod_score_player/instrselect.cpp:56
 msgid "Drawbar Organ"
 msgstr "Órgano tipo «Hammond»"
 
-#: src/mod_score_player/instrselect.cpp:56
+#: src/mod_score_player/instrselect.cpp:57
 msgid "Percussive Organ"
 msgstr "Órgano de percusión"
 
-#: src/mod_score_player/instrselect.cpp:57
+#: src/mod_score_player/instrselect.cpp:58
 msgid "Rock Organ"
 msgstr "Órgano de rock"
 
-#: src/mod_score_player/instrselect.cpp:58
+#: src/mod_score_player/instrselect.cpp:59
 msgid "Church Organ"
 msgstr "Órgano de igrexa"
 
-#: src/mod_score_player/instrselect.cpp:59
+#: src/mod_score_player/instrselect.cpp:60
 msgid "Reed Organ"
 msgstr "Harmonio"
 
-#: src/mod_score_player/instrselect.cpp:60
+#: src/mod_score_player/instrselect.cpp:61
 msgid "Accordion"
 msgstr "Acordeón"
 
-#: src/mod_score_player/instrselect.cpp:61
+#: src/mod_score_player/instrselect.cpp:62
 msgid "Harmonica"
 msgstr "Harmónica"
 
-#: src/mod_score_player/instrselect.cpp:62
+#: src/mod_score_player/instrselect.cpp:63
 msgid "Tango Accordion"
 msgstr "Bandoneón"
 
-#: src/mod_score_player/instrselect.cpp:63
+#: src/mod_score_player/instrselect.cpp:64
 msgid "Nylon String Guitar"
 msgstr "Guitarra acústica (cordas de nailon)"
 
-#: src/mod_score_player/instrselect.cpp:64
+#: src/mod_score_player/instrselect.cpp:65
 msgid "Steel String Guitar"
 msgstr "Guitarra acústica (cordas metálicas)"
 
-#: src/mod_score_player/instrselect.cpp:65
+#: src/mod_score_player/instrselect.cpp:66
 msgid "Electric Jazz Guitar"
 msgstr "Guitarra eléctrica (jazz)"
 
-#: src/mod_score_player/instrselect.cpp:66
+#: src/mod_score_player/instrselect.cpp:67
 msgid "Electric Clean Guitar"
 msgstr "Guitarra eléctrica"
 
-#: src/mod_score_player/instrselect.cpp:67
+#: src/mod_score_player/instrselect.cpp:68
 msgid "Electric Muted Guitar"
 msgstr "Guitarra eléctrica (con sordina)"
 
-#: src/mod_score_player/instrselect.cpp:68
+#: src/mod_score_player/instrselect.cpp:69
 msgid "Overdriven Guitar"
 msgstr "Guitarra eléctrica (saturada)"
 
-#: src/mod_score_player/instrselect.cpp:69
+#: src/mod_score_player/instrselect.cpp:70
 msgid "Distortion Guitar"
 msgstr "Guitarra eléctrica (distorsionada)"
 
-#: src/mod_score_player/instrselect.cpp:70
+#: src/mod_score_player/instrselect.cpp:71
 msgid "Guitar Harmonics"
 msgstr "Guitarra de harmónicos"
 
-#: src/mod_score_player/instrselect.cpp:71
+#: src/mod_score_player/instrselect.cpp:72
 msgid "Acoustic Bass"
 msgstr "Baixo acústico"
 
-#: src/mod_score_player/instrselect.cpp:72
+#: src/mod_score_player/instrselect.cpp:73
 msgid "Electric Bass(finger)"
 msgstr "Baixo eléctrico (dixitado)"
 
-#: src/mod_score_player/instrselect.cpp:73
+#: src/mod_score_player/instrselect.cpp:74
 msgid "Electric Bass(pick)"
 msgstr "Baixo eléctrico (con púa)"
 
-#: src/mod_score_player/instrselect.cpp:74
+#: src/mod_score_player/instrselect.cpp:75
 msgid "Fretless Bass"
 msgstr "Baixo sen trastes"
 
-#: src/mod_score_player/instrselect.cpp:75
+#: src/mod_score_player/instrselect.cpp:76
 msgid "Slap Bass 1"
 msgstr "Baixo golpeado 1"
 
-#: src/mod_score_player/instrselect.cpp:76
+#: src/mod_score_player/instrselect.cpp:77
 msgid "Slap Bass 2"
 msgstr "Baixo golpeado 2"
 
-#: src/mod_score_player/instrselect.cpp:77
+#: src/mod_score_player/instrselect.cpp:78
 msgid "Synth Bass 1"
 msgstr "Baixo sintetizado 1"
 
-#: src/mod_score_player/instrselect.cpp:78
+#: src/mod_score_player/instrselect.cpp:79
 msgid "Synth Bass 2"
 msgstr "Baixo sintetizado 2"
 
-#: src/mod_score_player/instrselect.cpp:79
+#: src/mod_score_player/instrselect.cpp:80
 msgid "Violin"
 msgstr "Violín"
 
-#: src/mod_score_player/instrselect.cpp:80
+#: src/mod_score_player/instrselect.cpp:81
 msgid "Viola"
 msgstr "Viola"
 
-#: src/mod_score_player/instrselect.cpp:81
+#: src/mod_score_player/instrselect.cpp:82
 msgid "Cello"
 msgstr "Violoncello"
 
-#: src/mod_score_player/instrselect.cpp:82
+#: src/mod_score_player/instrselect.cpp:83
 msgid "Contrabass"
 msgstr "Contrabaixo"
 
-#: src/mod_score_player/instrselect.cpp:83
+#: src/mod_score_player/instrselect.cpp:84
 msgid "Tremolo Strings"
 msgstr "Cordas con trémolo"
 
-#: src/mod_score_player/instrselect.cpp:84
+#: src/mod_score_player/instrselect.cpp:85
 msgid "Pizzicato Strings"
 msgstr "Cordas beliscadas"
 
-#: src/mod_score_player/instrselect.cpp:85
+#: src/mod_score_player/instrselect.cpp:86
 msgid "Orchestral Strings"
 msgstr "Cordas orquestrais"
 
-#: src/mod_score_player/instrselect.cpp:86
+#: src/mod_score_player/instrselect.cpp:87
 msgid "Timpani"
 msgstr "Timbais"
 
-#: src/mod_score_player/instrselect.cpp:87
+#: src/mod_score_player/instrselect.cpp:88
 msgid "String Ensemble 1"
 msgstr "Conxunto de corda 1"
 
-#: src/mod_score_player/instrselect.cpp:88
+#: src/mod_score_player/instrselect.cpp:89
 msgid "String Ensemble 2"
 msgstr "Conxunto de corda 2"
 
-#: src/mod_score_player/instrselect.cpp:89
+#: src/mod_score_player/instrselect.cpp:90
 msgid "SynthStrings 1"
 msgstr "Cordas sintetizadas 1"
 
-#: src/mod_score_player/instrselect.cpp:90
+#: src/mod_score_player/instrselect.cpp:91
 msgid "SynthStrings 2"
 msgstr "Cordas sintetizadas 2"
 
-#: src/mod_score_player/instrselect.cpp:91
+#: src/mod_score_player/instrselect.cpp:92
 msgid "Choir Aahs"
 msgstr "Coro de «aah»"
 
-#: src/mod_score_player/instrselect.cpp:92
+#: src/mod_score_player/instrselect.cpp:93
 msgid "Voice Oohs"
 msgstr "Voces «ooh»"
 
-#: src/mod_score_player/instrselect.cpp:93
+#: src/mod_score_player/instrselect.cpp:94
 msgid "Synth Voice"
 msgstr "Voces sintetizadas"
 
-#: src/mod_score_player/instrselect.cpp:94
+#: src/mod_score_player/instrselect.cpp:95
 msgid "Orchestra Hit"
 msgstr "Toque orquestra"
 
-#: src/mod_score_player/instrselect.cpp:95
+#: src/mod_score_player/instrselect.cpp:96
 msgid "Trumpet"
 msgstr "Trompeta"
 
-#: src/mod_score_player/instrselect.cpp:96
+#: src/mod_score_player/instrselect.cpp:97
 msgid "Trombone"
 msgstr "Trombón"
 
-#: src/mod_score_player/instrselect.cpp:97
+#: src/mod_score_player/instrselect.cpp:98
 msgid "Tuba"
 msgstr "Tuba"
 
-#: src/mod_score_player/instrselect.cpp:98
+#: src/mod_score_player/instrselect.cpp:99
 msgid "Muted Trumpet"
 msgstr "Trompeta con sordina"
 
-#: src/mod_score_player/instrselect.cpp:99
+#: src/mod_score_player/instrselect.cpp:100
 msgid "French Horn"
 msgstr "Trompa"
 
-#: src/mod_score_player/instrselect.cpp:100
+#: src/mod_score_player/instrselect.cpp:101
 msgid "Brass Section"
 msgstr "Grupo de vento-metal"
 
-#: src/mod_score_player/instrselect.cpp:101
+#: src/mod_score_player/instrselect.cpp:102
 msgid "SynthBrass 1"
 msgstr "Conxunto de metal (sint.1)"
 
-#: src/mod_score_player/instrselect.cpp:102
+#: src/mod_score_player/instrselect.cpp:103
 msgid "SynthBrass 2"
 msgstr "Conxunto de metal (sint.2)"
 
-#: src/mod_score_player/instrselect.cpp:103
+#: src/mod_score_player/instrselect.cpp:104
 msgid "Soprano Sax"
 msgstr "Saxofón soprano"
 
-#: src/mod_score_player/instrselect.cpp:104
+#: src/mod_score_player/instrselect.cpp:105
 msgid "Alto Sax"
 msgstr "Saxofón contralto"
 
-#: src/mod_score_player/instrselect.cpp:105
+#: src/mod_score_player/instrselect.cpp:106
 msgid "Tenor Sax"
 msgstr "Saxofón tenor"
 
-#: src/mod_score_player/instrselect.cpp:106
+#: src/mod_score_player/instrselect.cpp:107
 msgid "Baritone Sax"
 msgstr "Saxofón barítono"
 
-#: src/mod_score_player/instrselect.cpp:107
+#: src/mod_score_player/instrselect.cpp:108
 msgid "Oboe"
 msgstr "Óboe"
 
-#: src/mod_score_player/instrselect.cpp:108
+#: src/mod_score_player/instrselect.cpp:109
 msgid "English Horn"
 msgstr "Corno inglés"
 
-#: src/mod_score_player/instrselect.cpp:109
+#: src/mod_score_player/instrselect.cpp:110
 msgid "Bassoon"
 msgstr "Fagot"
 
-#: src/mod_score_player/instrselect.cpp:110
+#: src/mod_score_player/instrselect.cpp:111
 msgid "Clarinet"
 msgstr "Clarinete"
 
-#: src/mod_score_player/instrselect.cpp:111
+#: src/mod_score_player/instrselect.cpp:112
 msgid "Piccolo"
 msgstr "Frautín"
 
-#: src/mod_score_player/instrselect.cpp:112
+#: src/mod_score_player/instrselect.cpp:113
 msgid "Flute"
 msgstr "Frauta traveseira"
 
-#: src/mod_score_player/instrselect.cpp:113
+#: src/mod_score_player/instrselect.cpp:114
 msgid "Recorder"
 msgstr "Frauta doce"
 
-#: src/mod_score_player/instrselect.cpp:114
+#: src/mod_score_player/instrselect.cpp:115
 msgid "Pan Flute"
 msgstr "Frauta de Pan"
 
-#: src/mod_score_player/instrselect.cpp:115
+#: src/mod_score_player/instrselect.cpp:116
 msgid "Blown Bottle"
 msgstr "Botella soprada"
 
-#: src/mod_score_player/instrselect.cpp:116
+#: src/mod_score_player/instrselect.cpp:117
 msgid "Shakuhachi"
 msgstr "Shakuhachi"
 
-#: src/mod_score_player/instrselect.cpp:117
+#: src/mod_score_player/instrselect.cpp:118
 msgid "Whistle"
 msgstr "Asubío"
 
-#: src/mod_score_player/instrselect.cpp:118
+#: src/mod_score_player/instrselect.cpp:119
 msgid "Ocarina"
 msgstr "Ocarina"
 
-#: src/mod_score_player/instrselect.cpp:119
+#: src/mod_score_player/instrselect.cpp:120
 msgid "Square Wave"
 msgstr "Onda cadrada"
 
-#: src/mod_score_player/instrselect.cpp:120
+#: src/mod_score_player/instrselect.cpp:121
 msgid "Saw Wave"
 msgstr "Onda dente de serra"
 
-#: src/mod_score_player/instrselect.cpp:121
+#: src/mod_score_player/instrselect.cpp:122
 msgid "Syn. Calliope"
 msgstr "Órgano portátil"
 
-#: src/mod_score_player/instrselect.cpp:122
+#: src/mod_score_player/instrselect.cpp:123
 msgid "Chiffer Lead"
 msgstr "Órgano solista"
 
-#: src/mod_score_player/instrselect.cpp:123
+#: src/mod_score_player/instrselect.cpp:124
 msgid "Charang"
 msgstr "Charanga"
 
-#: src/mod_score_player/instrselect.cpp:124
+#: src/mod_score_player/instrselect.cpp:125
 msgid "Solo Vox"
 msgstr "Voz sintetizada"
 
-#: src/mod_score_player/instrselect.cpp:125
+#: src/mod_score_player/instrselect.cpp:126
 msgid "5th Saw Wave"
 msgstr "5ª onda de serra"
 
-#: src/mod_score_player/instrselect.cpp:126
+#: src/mod_score_player/instrselect.cpp:127
 msgid "Bass& Lead"
 msgstr "Baixos"
 
-#: src/mod_score_player/instrselect.cpp:127
+#: src/mod_score_player/instrselect.cpp:128
 msgid "Fantasia"
 msgstr "Fantasía"
 
-#: src/mod_score_player/instrselect.cpp:128
+#: src/mod_score_player/instrselect.cpp:129
 msgid "Warm Pad"
 msgstr "Fondo cálido"
 
-#: src/mod_score_player/instrselect.cpp:129
+#: src/mod_score_player/instrselect.cpp:130
 msgid "Polysynth"
 msgstr "Fondo múltiple sintetizado"
 
-#: src/mod_score_player/instrselect.cpp:130
+#: src/mod_score_player/instrselect.cpp:131
 msgid "Space Voice"
 msgstr "Voces sintetizadas"
 
-#: src/mod_score_player/instrselect.cpp:131
+#: src/mod_score_player/instrselect.cpp:132
 msgid "Bowed Glass"
 msgstr "Fondo de arcos"
 
-#: src/mod_score_player/instrselect.cpp:132
+#: src/mod_score_player/instrselect.cpp:133
 msgid "Metal Pad"
 msgstr "Fondo metálico"
 
-#: src/mod_score_player/instrselect.cpp:133
+#: src/mod_score_player/instrselect.cpp:134
 msgid "Halo Pad"
 msgstr "Fondo celestial"
 
-#: src/mod_score_player/instrselect.cpp:134
+#: src/mod_score_player/instrselect.cpp:135
 msgid "Sweep Pad"
 msgstr "Varridos"
 
-#: src/mod_score_player/instrselect.cpp:135
+#: src/mod_score_player/instrselect.cpp:136
 msgid "Ice Rain"
 msgstr "Choiva"
 
-#: src/mod_score_player/instrselect.cpp:136
+#: src/mod_score_player/instrselect.cpp:137
 msgid "Soundtrack"
 msgstr "Efectos: banda sonora"
 
-#: src/mod_score_player/instrselect.cpp:137
+#: src/mod_score_player/instrselect.cpp:138
 msgid "Crystal"
 msgstr "Cristal"
 
-#: src/mod_score_player/instrselect.cpp:138
+#: src/mod_score_player/instrselect.cpp:139
 msgid "Atmosphere"
 msgstr "Efectos: atmosfera"
 
-#: src/mod_score_player/instrselect.cpp:139
+#: src/mod_score_player/instrselect.cpp:140
 msgid "Brightness"
 msgstr "Efectos: brillante"
 
-#: src/mod_score_player/instrselect.cpp:140
+#: src/mod_score_player/instrselect.cpp:141
 msgid "Goblin"
 msgstr "Trasno"
 
-#: src/mod_score_player/instrselect.cpp:141
+#: src/mod_score_player/instrselect.cpp:142
 msgid "Echo Drops"
 msgstr "Ecos"
 
-#: src/mod_score_player/instrselect.cpp:142
+#: src/mod_score_player/instrselect.cpp:143
 msgid "Star Theme"
 msgstr "Tema estelar"
 
-#: src/mod_score_player/instrselect.cpp:143
+#: src/mod_score_player/instrselect.cpp:144
 msgid "Sitar"
 msgstr "Sitar"
 
-#: src/mod_score_player/instrselect.cpp:144
+#: src/mod_score_player/instrselect.cpp:145
 msgid "Banjo"
 msgstr "Banjo"
 
-#: src/mod_score_player/instrselect.cpp:145
+#: src/mod_score_player/instrselect.cpp:146
 msgid "Shamisen"
 msgstr "Shamisen"
 
-#: src/mod_score_player/instrselect.cpp:146
+#: src/mod_score_player/instrselect.cpp:147
 msgid "Koto"
 msgstr "Koto"
 
-#: src/mod_score_player/instrselect.cpp:147
+#: src/mod_score_player/instrselect.cpp:148
 msgid "Kalimba"
 msgstr "Kalimba"
 
-#: src/mod_score_player/instrselect.cpp:148
+#: src/mod_score_player/instrselect.cpp:149
 msgid "Bagpipe"
 msgstr "Gaita"
 
-#: src/mod_score_player/instrselect.cpp:149
+#: src/mod_score_player/instrselect.cpp:150
 msgid "Fiddle"
 msgstr "Violín (arco)"
 
-#: src/mod_score_player/instrselect.cpp:150
+#: src/mod_score_player/instrselect.cpp:151
 msgid "Shanai"
 msgstr "Shanai"
 
-#: src/mod_score_player/instrselect.cpp:151
+#: src/mod_score_player/instrselect.cpp:152
 msgid "Tinkle Bell"
 msgstr "Campaíñas"
 
-#: src/mod_score_player/instrselect.cpp:152
+#: src/mod_score_player/instrselect.cpp:153
 msgid "Agogo"
 msgstr "Agogó"
 
-#: src/mod_score_player/instrselect.cpp:153
+#: src/mod_score_player/instrselect.cpp:154
 msgid "Steel Drums"
 msgstr "Percusión metálica"
 
-#: src/mod_score_player/instrselect.cpp:154
+#: src/mod_score_player/instrselect.cpp:155
 msgid "Woodblock"
 msgstr "Bloques de madeira"
 
-#: src/mod_score_player/instrselect.cpp:155
+#: src/mod_score_player/instrselect.cpp:156
 msgid "Taiko Drum"
 msgstr "Taiko"
 
-#: src/mod_score_player/instrselect.cpp:156
+#: src/mod_score_player/instrselect.cpp:157
 msgid "Melodic Tom"
 msgstr "Tomtom melódico"
 
-#: src/mod_score_player/instrselect.cpp:157
+#: src/mod_score_player/instrselect.cpp:158
 msgid "Synth Drum"
 msgstr "Caixa sintetizada"
 
-#: src/mod_score_player/instrselect.cpp:158
+#: src/mod_score_player/instrselect.cpp:159
 msgid "Reverse Cymbal"
 msgstr "Prato (invertido)"
 
-#: src/mod_score_player/instrselect.cpp:159
+#: src/mod_score_player/instrselect.cpp:160
 msgid "Guitar Fret Noise"
 msgstr "Efectos: ruído de trastes de guitarra"
 
-#: src/mod_score_player/instrselect.cpp:160
+#: src/mod_score_player/instrselect.cpp:161
 msgid "Breath Noise"
 msgstr "Efectos: ruído de respiración"
 
-#: src/mod_score_player/instrselect.cpp:161
+#: src/mod_score_player/instrselect.cpp:162
 msgid "Seashore"
 msgstr "Efectos: ruído de olas"
 
-#: src/mod_score_player/instrselect.cpp:162
+#: src/mod_score_player/instrselect.cpp:163
 msgid "Bird Tweet"
 msgstr "Efectos: trino de paxaros"
 
-#: src/mod_score_player/instrselect.cpp:163
+#: src/mod_score_player/instrselect.cpp:164
 msgid "Telephone Ring"
 msgstr "Efectos: timbre de teléfono"
 
-#: src/mod_score_player/instrselect.cpp:164
+#: src/mod_score_player/instrselect.cpp:165
 msgid "Helicopter"
 msgstr "Efectos: helicóptero"
 
-#: src/mod_score_player/instrselect.cpp:165
+#: src/mod_score_player/instrselect.cpp:166
 msgid "Applause"
 msgstr "Efectos: aplausos"
 
-#: src/mod_score_player/instrselect.cpp:166
+#: src/mod_score_player/instrselect.cpp:167
 msgid "Gunshot"
 msgstr "Efectos: disparo"
-
diff --git a/po/sitplus-mod_widgets/ca.po b/po/sitplus-mod_widgets/ca.po
index 081fb87..f0c6e1d 100644
--- a/po/sitplus-mod_widgets/ca.po
+++ b/po/sitplus-mod_widgets/ca.po
@@ -7,42 +7,44 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-20 12:42+0200\n"
-"PO-Revision-Date: 2011-06-16 22:30+0100\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
+"PO-Revision-Date: 2012-01-05 16:09+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
 #: include/widgets_base/containerpanel.h:50
 msgid "ContainerPanel"
-msgstr ""
+msgstr "PanelContenidor"
 
 #: include/widgets_base/dialogcontainer.h:51
 msgid "DialogContainer"
-msgstr ""
+msgstr "DiàlegContenidor"
 
 #: src/mod_widgets/choice.h:57
 msgid "Choice"
-msgstr ""
+msgstr "Opció"
 
-#: src/mod_widgets/filepicker.cpp:321
+#: src/mod_widgets/filepicker.cpp:322
 msgid "Choose..."
 msgstr "Escollir..."
 
-#: src/mod_widgets/filepicker.cpp:383
+#: src/mod_widgets/filepicker.cpp:384
 msgid "Choose a directory"
 msgstr "Esculli un directori"
 
-#: src/mod_widgets/filepicker.cpp:389
+#: src/mod_widgets/filepicker.cpp:390
 msgid "Choose a file to open"
 msgstr "Esculli un fitxer per obrir"
 
 #: src/mod_widgets/filepicker.h:60
 msgid "FilePicker"
-msgstr ""
+msgstr "SelectorFitrxer"
 
 #: src/mod_widgets/slider.h:60
 msgid "Slider"
-msgstr ""
+msgstr "Lliscador"
+
diff --git a/po/sitplus-mod_widgets/es.po b/po/sitplus-mod_widgets/es.po
index 8590722..e2f8769 100644
--- a/po/sitplus-mod_widgets/es.po
+++ b/po/sitplus-mod_widgets/es.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-20 12:42+0200\n"
-"PO-Revision-Date: 2011-06-19 18:10+0100\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
+"PO-Revision-Date: 2012-01-05 16:16+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -18,32 +19,33 @@ msgstr ""
 
 #: include/widgets_base/containerpanel.h:50
 msgid "ContainerPanel"
-msgstr ""
+msgstr "PanelContenedor"
 
 #: include/widgets_base/dialogcontainer.h:51
 msgid "DialogContainer"
-msgstr ""
+msgstr "DialogoContenedor"
 
 #: src/mod_widgets/choice.h:57
 msgid "Choice"
 msgstr "Elección"
 
-#: src/mod_widgets/filepicker.cpp:321
+#: src/mod_widgets/filepicker.cpp:322
 msgid "Choose..."
 msgstr "Escoger..."
 
-#: src/mod_widgets/filepicker.cpp:383
+#: src/mod_widgets/filepicker.cpp:384
 msgid "Choose a directory"
 msgstr "Escoja un directorio"
 
-#: src/mod_widgets/filepicker.cpp:389
+#: src/mod_widgets/filepicker.cpp:390
 msgid "Choose a file to open"
 msgstr "Escoja un fichero para abrir"
 
 #: src/mod_widgets/filepicker.h:60
 msgid "FilePicker"
-msgstr ""
+msgstr "SelectorFichero"
 
 #: src/mod_widgets/slider.h:60
 msgid "Slider"
-msgstr ""
+msgstr "Deslizante"
+
diff --git a/po/sitplus-mod_widgets/gl.po b/po/sitplus-mod_widgets/gl.po
index 57a5df8..eabcfab 100755
--- a/po/sitplus-mod_widgets/gl.po
+++ b/po/sitplus-mod_widgets/gl.po
@@ -8,10 +8,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-20 12:42+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-29 09:40+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -30,15 +31,15 @@ msgstr "DialogoContedor"
 msgid "Choice"
 msgstr "Elección"
 
-#: src/mod_widgets/filepicker.cpp:321
+#: src/mod_widgets/filepicker.cpp:322
 msgid "Choose..."
 msgstr "Escoller..."
 
-#: src/mod_widgets/filepicker.cpp:383
+#: src/mod_widgets/filepicker.cpp:384
 msgid "Choose a directory"
 msgstr "Escolla un directorio"
 
-#: src/mod_widgets/filepicker.cpp:389
+#: src/mod_widgets/filepicker.cpp:390
 msgid "Choose a file to open"
 msgstr "Escolla un ficheiro para abrir"
 
@@ -49,4 +50,3 @@ msgstr "SelectorFicheiro"
 #: src/mod_widgets/slider.h:60
 msgid "Slider"
 msgstr "Esvaradío"
-
diff --git a/po/sitplus-mod_wiimotes/ca.po b/po/sitplus-mod_wiimotes/ca.po
index 6696336..17d81a1 100644
--- a/po/sitplus-mod_wiimotes/ca.po
+++ b/po/sitplus-mod_wiimotes/ca.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-21 20:25+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-16 22:32+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/po/sitplus-mod_wiimotes/es.po b/po/sitplus-mod_wiimotes/es.po
index 79470c5..15abe45 100644
--- a/po/sitplus-mod_wiimotes/es.po
+++ b/po/sitplus-mod_wiimotes/es.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-21 20:25+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-19 18:12+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/po/sitplus-mod_wiimotes/gl.po b/po/sitplus-mod_wiimotes/gl.po
index 9e1f2b6..96d7e6c 100755
--- a/po/sitplus-mod_wiimotes/gl.po
+++ b/po/sitplus-mod_wiimotes/gl.po
@@ -8,10 +8,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-21 20:25+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-29 09:45+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -57,4 +58,3 @@ msgstr "«Nunchuck» activado"
 #: src/mod_wiimotes/wwiimotesproperties.cpp:168
 msgid "Motion plus enabled"
 msgstr "«Motion plus» activado"
-
diff --git a/po/sitplus-sp/POTFILES.sp.in b/po/sitplus-sp/POTFILES.sp.in
index fb78243..79b4a5a 100755
--- a/po/sitplus-sp/POTFILES.sp.in
+++ b/po/sitplus-sp/POTFILES.sp.in
@@ -20,3 +20,4 @@ sp/wiiacc_voice_midi_collage.sp
 sp/voice_collage.sp
 sp/wii_voice_midi_collage.sps
 sp/wiiacc_midi_collage.sp
+sp/lib/ipl2sdl.sps
diff --git a/po/sitplus-sp/ca.po b/po/sitplus-sp/ca.po
old mode 100755
new mode 100644
index 49358f6..0f67145
--- a/po/sitplus-sp/ca.po
+++ b/po/sitplus-sp/ca.po
@@ -7,74 +7,94 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-07-12 21:28+0200\n"
-"PO-Revision-Date: 2011-06-22 11:56+0100\n"
+"POT-Creation-Date: 2012-01-05 16:01+0100\n"
+"PO-Revision-Date: 2012-01-05 16:10+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Catalan\n"
 
-#: sp/cam_midi_collage.sp:2 sp/wiiacc_midi_collage.sp:7
+#: sp/cam_midi_collage.sp:2
+#: sp/wiiacc_midi_collage.sp:7
 #: sp/wiimp_midi_collage.sp:7
 msgid "Virtual Instrument"
 msgstr "Instrument virtual"
 
-#: sp/cam_midi_collage.sp:27 sp/cam_voice_midi_collage.sp:72
-#: sp/cam_wii_voice_midi_collage.sps:92
+#: sp/cam_midi_collage.sp:34
+#: sp/cam_voice_midi_collage.sp:79
+#: sp/cam_wii_voice_midi_collage.sps:100
 msgid "Camera Tracker"
 msgstr "Seguiment càmera"
 
-#: sp/cam_midi_collage.sp:30 sp/cam_voice_midi_collage.sp:83
-#: sp/cam_wii_voice_midi_collage.sps:107 sp/wii_midi_collage.sps:29
+#: sp/cam_midi_collage.sp:38
+#: sp/cam_voice_midi_collage.sp:91
+#: sp/cam_wii_voice_midi_collage.sps:116
+#: sp/wii_midi_collage.sps:29
 #: sp/wii_voice_midi_collage.sps:83
 msgid "MIDI Sound"
 msgstr "So MIDI"
 
-#: sp/cam_midi_collage.sp:33 sp/cam_voice_midi_collage.sp:86
-#: sp/cam_wii_voice_midi_collage.sps:110 sp/voice_collage.sp:22
-#: sp/wii_midi_collage.sps:32 sp/wii_voice_midi_collage.sps:86
+#: sp/cam_midi_collage.sp:41
+#: sp/cam_voice_midi_collage.sp:94
+#: sp/cam_wii_voice_midi_collage.sps:119
+#: sp/voice_collage.sp:22
+#: sp/wii_midi_collage.sps:32
+#: sp/wii_voice_midi_collage.sps:86
 msgid "Graphics"
 msgstr "Gràfics"
 
-#: sp/cam_voice_midi_collage.sp:2 sp/cam_wii_voice_midi_collage.sps:2
-#: sp/cam_wiiacc_voice_midi_collage.sp:2 sp/cam_wiiacc_voice_midi_collage.sp:7
-#: sp/cam_wiimp_voice_midi_collage.sp:2 sp/cam_wiimp_voice_midi_collage.sp:7
-#: sp/wii_voice_midi_collage.sps:2 sp/wiiacc_voice_midi_collage.sp:7
+#: sp/cam_voice_midi_collage.sp:2
+#: sp/cam_wii_voice_midi_collage.sps:2
+#: sp/cam_wiiacc_voice_midi_collage.sp:2
+#: sp/cam_wiiacc_voice_midi_collage.sp:7
+#: sp/cam_wiimp_voice_midi_collage.sp:2
+#: sp/cam_wiimp_voice_midi_collage.sp:7
+#: sp/wii_voice_midi_collage.sps:2
+#: sp/wiiacc_voice_midi_collage.sp:7
 #: sp/wiimp_voice_midi_collage.sp:7
 msgid "Playing with voice + Virtual Instrument"
 msgstr "Jugar amb la veu + Instrument virtual"
 
-#: sp/cam_voice_midi_collage.sp:17 sp/cam_wii_voice_midi_collage.sps:17
+#: sp/cam_voice_midi_collage.sp:22
+#: sp/cam_wii_voice_midi_collage.sps:22
 msgid "Enable camera control"
 msgstr "Activar control amb la càmera"
 
-#: sp/cam_voice_midi_collage.sp:28 sp/cam_wii_voice_midi_collage.sps:28
+#: sp/cam_voice_midi_collage.sp:33
+#: sp/cam_wii_voice_midi_collage.sps:33
 #: sp/wii_voice_midi_collage.sps:13
 msgid "Enable voice control"
 msgstr "Activar control amb la veu"
 
-#: sp/cam_voice_midi_collage.sp:37 sp/cam_wii_voice_midi_collage.sps:50
+#: sp/cam_voice_midi_collage.sp:42
+#: sp/cam_wii_voice_midi_collage.sps:55
 #: sp/wii_voice_midi_collage.sps:36
 msgid "Master sensitivity"
 msgstr "Sensibilitat mestra"
 
-#: sp/cam_voice_midi_collage.sp:76 sp/cam_wii_voice_midi_collage.sps:96
-#: sp/voice_collage.sp:19 sp/wii_voice_midi_collage.sps:72
+#: sp/cam_voice_midi_collage.sp:84
+#: sp/cam_wii_voice_midi_collage.sps:105
+#: sp/voice_collage.sp:19
+#: sp/wii_voice_midi_collage.sps:72
 msgid "Voice Input"
 msgstr "Entrada de veu"
 
-#: sp/cam_wii_voice_midi_collage.sps:41 sp/wii_voice_midi_collage.sps:27
+#: sp/cam_wii_voice_midi_collage.sps:46
+#: sp/wii_voice_midi_collage.sps:27
 msgid "Enable Wii control"
 msgstr "Activar control amb Wii"
 
-#: sp/cam_wii_voice_midi_collage.sps:100 sp/wii_midi_collage.sps:26
+#: sp/cam_wii_voice_midi_collage.sps:109
+#: sp/wii_midi_collage.sps:26
 #: sp/wii_voice_midi_collage.sps:76
 msgid "Wii Remote"
 msgstr "Wii Remote"
 
-#: sp/lib/camera_oflow_motion.sps:45 sp/lib/wii_acc_motion.sps:68
+#: sp/lib/camera_oflow_motion.sps:45
+#: sp/lib/wii_acc_motion.sps:68
 #: sp/lib/wii_mp_motion.sps:62
 msgid "Motion detected"
 msgstr "Moviment detectat"
@@ -87,49 +107,57 @@ msgstr "Llindar detecció moviment"
 msgid "Camera sensitivity"
 msgstr "Sensibilitat càmera"
 
-#: sp/lib/camera_oflow_motion.sps:63 sp/lib/motion_collage.sps:130
-#: sp/lib/motion_midi_player.sps:106 sp/lib/pvoice.sps:38
-#: sp/lib/wii_acc_motion.sps:90 sp/lib/wii_mp_motion.sps:85
+#: sp/lib/camera_oflow_motion.sps:63
+#: sp/lib/motion_collage.sps:143
+#: sp/lib/motion_midi_player.sps:106
+#: sp/lib/pvoice.sps:38
+#: sp/lib/wii_acc_motion.sps:90
+#: sp/lib/wii_mp_motion.sps:85
 msgid "Advanced"
 msgstr "Avançat"
 
-#: sp/lib/motion_collage.sps:16
+#: sp/lib/ipl2sdl.sps:22
+msgid "Show camera image as background"
+msgstr "Mostra càmera com a fons"
+
+#: sp/lib/motion_collage.sps:29
 msgid "Graphical sensitivity"
 msgstr "Sensibilitat gràfics"
 
-#: sp/lib/motion_collage.sps:25 sp/lib/motion_collage.sps:136
+#: sp/lib/motion_collage.sps:38
+#: sp/lib/motion_collage.sps:149
 msgid "Background"
 msgstr "Fons"
 
-#: sp/lib/motion_collage.sps:40
+#: sp/lib/motion_collage.sps:53
 msgid "Animation speed"
 msgstr "Velocitat animació"
 
-#: sp/lib/motion_collage.sps:60
+#: sp/lib/motion_collage.sps:73
 msgid "Category"
 msgstr "Categoria"
 
-#: sp/lib/motion_collage.sps:69
+#: sp/lib/motion_collage.sps:82
 msgid "Subcategory"
 msgstr "Subcategoria"
 
-#: sp/lib/motion_collage.sps:79
+#: sp/lib/motion_collage.sps:92
 msgid "Open file"
 msgstr "Obrir fitxer"
 
-#: sp/lib/motion_collage.sps:102
+#: sp/lib/motion_collage.sps:115
 msgid "Next effect (when available)"
 msgstr "Següent efecte (si està disponible)"
 
-#: sp/lib/motion_collage.sps:110
+#: sp/lib/motion_collage.sps:123
 msgid "Maximum number of objects"
 msgstr "Nombre màxim d'objectes"
 
-#: sp/lib/motion_collage.sps:114
+#: sp/lib/motion_collage.sps:127
 msgid "Automatically vanish objects"
 msgstr "Esvair objectes automàticament"
 
-#: sp/lib/motion_collage.sps:119
+#: sp/lib/motion_collage.sps:132
 msgid "Foreground"
 msgstr "Primer pla"
 
@@ -161,7 +189,8 @@ msgstr "Volum"
 msgid "Musical score"
 msgstr "Partitura musical"
 
-#: sp/lib/pvoice.sps:9 sp/voice_collage.sp:2
+#: sp/lib/pvoice.sps:9
+#: sp/voice_collage.sp:2
 msgid "Playing with voice"
 msgstr "Jugar amb la veu"
 
@@ -189,7 +218,8 @@ msgstr "Usar eix Y (avant - enrere)"
 msgid "Use Z axis (up - down)"
 msgstr "Usar eix Z (amunt - avall)"
 
-#: sp/lib/wii_acc_motion.sps:68 sp/lib/wii_mp_motion.sps:62
+#: sp/lib/wii_acc_motion.sps:68
+#: sp/lib/wii_mp_motion.sps:62
 msgid "Motion threshold"
 msgstr "Llindar de moviment"
 
@@ -197,7 +227,8 @@ msgstr "Llindar de moviment"
 msgid "Sensitivity"
 msgstr "Sensibilitat"
 
-#: sp/lib/wii_acc_motion.sps:87 sp/lib/wii_mp_motion.sps:82
+#: sp/lib/wii_acc_motion.sps:87
+#: sp/lib/wii_mp_motion.sps:82
 msgid "Wii Devices"
 msgstr "Dispositius Wii"
 
@@ -217,9 +248,11 @@ msgstr "Usar eix Z (esquerra - dreta)"
 msgid "Motion sensitivity"
 msgstr "Sensibilitat moviment"
 
-#: sp/wii_acc_midi_collage.sp:2 sp/wii_midi_collage.sps:2
+#: sp/wii_acc_midi_collage.sp:2
+#: sp/wii_midi_collage.sps:2
 msgid "Wii Virtual Instrument"
 msgstr "Instrument virtual Wii"
 
 #~ msgid "Wii Motion Plus"
 #~ msgstr "Wii Motion Plus"
+
diff --git a/po/sitplus-sp/es.po b/po/sitplus-sp/es.po
old mode 100755
new mode 100644
index a323745..7ba69eb
--- a/po/sitplus-sp/es.po
+++ b/po/sitplus-sp/es.po
@@ -7,74 +7,94 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-07-12 21:28+0200\n"
-"PO-Revision-Date: 2011-06-22 11:56+0100\n"
+"POT-Creation-Date: 2012-01-05 16:01+0100\n"
+"PO-Revision-Date: 2012-01-05 16:10+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: sp/cam_midi_collage.sp:2 sp/wiiacc_midi_collage.sp:7
+#: sp/cam_midi_collage.sp:2
+#: sp/wiiacc_midi_collage.sp:7
 #: sp/wiimp_midi_collage.sp:7
 msgid "Virtual Instrument"
 msgstr "Instrumento virtual"
 
-#: sp/cam_midi_collage.sp:27 sp/cam_voice_midi_collage.sp:72
-#: sp/cam_wii_voice_midi_collage.sps:92
+#: sp/cam_midi_collage.sp:34
+#: sp/cam_voice_midi_collage.sp:79
+#: sp/cam_wii_voice_midi_collage.sps:100
 msgid "Camera Tracker"
 msgstr "Seguimiento cámara"
 
-#: sp/cam_midi_collage.sp:30 sp/cam_voice_midi_collage.sp:83
-#: sp/cam_wii_voice_midi_collage.sps:107 sp/wii_midi_collage.sps:29
+#: sp/cam_midi_collage.sp:38
+#: sp/cam_voice_midi_collage.sp:91
+#: sp/cam_wii_voice_midi_collage.sps:116
+#: sp/wii_midi_collage.sps:29
 #: sp/wii_voice_midi_collage.sps:83
 msgid "MIDI Sound"
 msgstr "Sonido MIDI"
 
-#: sp/cam_midi_collage.sp:33 sp/cam_voice_midi_collage.sp:86
-#: sp/cam_wii_voice_midi_collage.sps:110 sp/voice_collage.sp:22
-#: sp/wii_midi_collage.sps:32 sp/wii_voice_midi_collage.sps:86
+#: sp/cam_midi_collage.sp:41
+#: sp/cam_voice_midi_collage.sp:94
+#: sp/cam_wii_voice_midi_collage.sps:119
+#: sp/voice_collage.sp:22
+#: sp/wii_midi_collage.sps:32
+#: sp/wii_voice_midi_collage.sps:86
 msgid "Graphics"
 msgstr "Gráficos"
 
-#: sp/cam_voice_midi_collage.sp:2 sp/cam_wii_voice_midi_collage.sps:2
-#: sp/cam_wiiacc_voice_midi_collage.sp:2 sp/cam_wiiacc_voice_midi_collage.sp:7
-#: sp/cam_wiimp_voice_midi_collage.sp:2 sp/cam_wiimp_voice_midi_collage.sp:7
-#: sp/wii_voice_midi_collage.sps:2 sp/wiiacc_voice_midi_collage.sp:7
+#: sp/cam_voice_midi_collage.sp:2
+#: sp/cam_wii_voice_midi_collage.sps:2
+#: sp/cam_wiiacc_voice_midi_collage.sp:2
+#: sp/cam_wiiacc_voice_midi_collage.sp:7
+#: sp/cam_wiimp_voice_midi_collage.sp:2
+#: sp/cam_wiimp_voice_midi_collage.sp:7
+#: sp/wii_voice_midi_collage.sps:2
+#: sp/wiiacc_voice_midi_collage.sp:7
 #: sp/wiimp_voice_midi_collage.sp:7
 msgid "Playing with voice + Virtual Instrument"
 msgstr "Jugar con la voz + Instrumento virtual"
 
-#: sp/cam_voice_midi_collage.sp:17 sp/cam_wii_voice_midi_collage.sps:17
+#: sp/cam_voice_midi_collage.sp:22
+#: sp/cam_wii_voice_midi_collage.sps:22
 msgid "Enable camera control"
 msgstr "Activar control con cámara"
 
-#: sp/cam_voice_midi_collage.sp:28 sp/cam_wii_voice_midi_collage.sps:28
+#: sp/cam_voice_midi_collage.sp:33
+#: sp/cam_wii_voice_midi_collage.sps:33
 #: sp/wii_voice_midi_collage.sps:13
 msgid "Enable voice control"
 msgstr "Activar control con voz"
 
-#: sp/cam_voice_midi_collage.sp:37 sp/cam_wii_voice_midi_collage.sps:50
+#: sp/cam_voice_midi_collage.sp:42
+#: sp/cam_wii_voice_midi_collage.sps:55
 #: sp/wii_voice_midi_collage.sps:36
 msgid "Master sensitivity"
 msgstr "Sensibilidad maestra"
 
-#: sp/cam_voice_midi_collage.sp:76 sp/cam_wii_voice_midi_collage.sps:96
-#: sp/voice_collage.sp:19 sp/wii_voice_midi_collage.sps:72
+#: sp/cam_voice_midi_collage.sp:84
+#: sp/cam_wii_voice_midi_collage.sps:105
+#: sp/voice_collage.sp:19
+#: sp/wii_voice_midi_collage.sps:72
 msgid "Voice Input"
 msgstr "Entrada voz"
 
-#: sp/cam_wii_voice_midi_collage.sps:41 sp/wii_voice_midi_collage.sps:27
+#: sp/cam_wii_voice_midi_collage.sps:46
+#: sp/wii_voice_midi_collage.sps:27
 msgid "Enable Wii control"
 msgstr "Activar control con Wii"
 
-#: sp/cam_wii_voice_midi_collage.sps:100 sp/wii_midi_collage.sps:26
+#: sp/cam_wii_voice_midi_collage.sps:109
+#: sp/wii_midi_collage.sps:26
 #: sp/wii_voice_midi_collage.sps:76
 msgid "Wii Remote"
 msgstr "Wii Remote"
 
-#: sp/lib/camera_oflow_motion.sps:45 sp/lib/wii_acc_motion.sps:68
+#: sp/lib/camera_oflow_motion.sps:45
+#: sp/lib/wii_acc_motion.sps:68
 #: sp/lib/wii_mp_motion.sps:62
 msgid "Motion detected"
 msgstr "Movimiento detectado"
@@ -87,49 +107,57 @@ msgstr "Umbral detección movimiento"
 msgid "Camera sensitivity"
 msgstr "Sensibilidad cámara"
 
-#: sp/lib/camera_oflow_motion.sps:63 sp/lib/motion_collage.sps:130
-#: sp/lib/motion_midi_player.sps:106 sp/lib/pvoice.sps:38
-#: sp/lib/wii_acc_motion.sps:90 sp/lib/wii_mp_motion.sps:85
+#: sp/lib/camera_oflow_motion.sps:63
+#: sp/lib/motion_collage.sps:143
+#: sp/lib/motion_midi_player.sps:106
+#: sp/lib/pvoice.sps:38
+#: sp/lib/wii_acc_motion.sps:90
+#: sp/lib/wii_mp_motion.sps:85
 msgid "Advanced"
 msgstr "Avanzado"
 
-#: sp/lib/motion_collage.sps:16
+#: sp/lib/ipl2sdl.sps:22
+msgid "Show camera image as background"
+msgstr "Mostrar cámara como fondo"
+
+#: sp/lib/motion_collage.sps:29
 msgid "Graphical sensitivity"
 msgstr "Sensibilidad gráficos"
 
-#: sp/lib/motion_collage.sps:25 sp/lib/motion_collage.sps:136
+#: sp/lib/motion_collage.sps:38
+#: sp/lib/motion_collage.sps:149
 msgid "Background"
 msgstr "Fondo"
 
-#: sp/lib/motion_collage.sps:40
+#: sp/lib/motion_collage.sps:53
 msgid "Animation speed"
 msgstr "Velocidad animación"
 
-#: sp/lib/motion_collage.sps:60
+#: sp/lib/motion_collage.sps:73
 msgid "Category"
 msgstr "Categoría"
 
-#: sp/lib/motion_collage.sps:69
+#: sp/lib/motion_collage.sps:82
 msgid "Subcategory"
 msgstr "Subcategoría"
 
-#: sp/lib/motion_collage.sps:79
+#: sp/lib/motion_collage.sps:92
 msgid "Open file"
 msgstr "Abrir fichero"
 
-#: sp/lib/motion_collage.sps:102
+#: sp/lib/motion_collage.sps:115
 msgid "Next effect (when available)"
 msgstr "Siguiente efecto (si está disponible)"
 
-#: sp/lib/motion_collage.sps:110
+#: sp/lib/motion_collage.sps:123
 msgid "Maximum number of objects"
 msgstr "Número máximo de objetos"
 
-#: sp/lib/motion_collage.sps:114
+#: sp/lib/motion_collage.sps:127
 msgid "Automatically vanish objects"
 msgstr "Desvanecer objetos automáticamente"
 
-#: sp/lib/motion_collage.sps:119
+#: sp/lib/motion_collage.sps:132
 msgid "Foreground"
 msgstr "Primer plano"
 
@@ -161,7 +189,8 @@ msgstr "Volumen"
 msgid "Musical score"
 msgstr "Partitura musical"
 
-#: sp/lib/pvoice.sps:9 sp/voice_collage.sp:2
+#: sp/lib/pvoice.sps:9
+#: sp/voice_collage.sp:2
 msgid "Playing with voice"
 msgstr "Jugar con la voz"
 
@@ -189,7 +218,8 @@ msgstr "Usar eje Y (atrás - adelanta)"
 msgid "Use Z axis (up - down)"
 msgstr "Usar eje Z (arriba - abajo)"
 
-#: sp/lib/wii_acc_motion.sps:68 sp/lib/wii_mp_motion.sps:62
+#: sp/lib/wii_acc_motion.sps:68
+#: sp/lib/wii_mp_motion.sps:62
 msgid "Motion threshold"
 msgstr "Umbral de movimiento"
 
@@ -197,7 +227,8 @@ msgstr "Umbral de movimiento"
 msgid "Sensitivity"
 msgstr "Sensibilidad"
 
-#: sp/lib/wii_acc_motion.sps:87 sp/lib/wii_mp_motion.sps:82
+#: sp/lib/wii_acc_motion.sps:87
+#: sp/lib/wii_mp_motion.sps:82
 msgid "Wii Devices"
 msgstr "Dispositivos Wii"
 
@@ -217,9 +248,11 @@ msgstr "Usar eje Z (izq. - derecha)"
 msgid "Motion sensitivity"
 msgstr "Sensibilidad movimiento"
 
-#: sp/wii_acc_midi_collage.sp:2 sp/wii_midi_collage.sps:2
+#: sp/wii_acc_midi_collage.sp:2
+#: sp/wii_midi_collage.sps:2
 msgid "Wii Virtual Instrument"
 msgstr "Instrumento virtual Wii"
 
 #~ msgid "Wii Motion Plus"
 #~ msgstr "Wii Motion Plus"
+
diff --git a/po/sitplus-sp/gl.po b/po/sitplus-sp/gl.po
old mode 100755
new mode 100644
index e3f5a77..78f56bb
--- a/po/sitplus-sp/gl.po
+++ b/po/sitplus-sp/gl.po
@@ -8,75 +8,95 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-07-12 21:28+0200\n"
-"PO-Revision-Date: 2011-06-29 10:44+0100\n"
+"POT-Creation-Date: 2012-01-05 16:01+0100\n"
+"PO-Revision-Date: 2012-01-05 17:32+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Poedit-Language: Galician\n"
 
-#: sp/cam_midi_collage.sp:2 sp/wiiacc_midi_collage.sp:7
+#: sp/cam_midi_collage.sp:2
+#: sp/wiiacc_midi_collage.sp:7
 #: sp/wiimp_midi_collage.sp:7
 msgid "Virtual Instrument"
 msgstr "Instrumento virtual"
 
-#: sp/cam_midi_collage.sp:27 sp/cam_voice_midi_collage.sp:72
-#: sp/cam_wii_voice_midi_collage.sps:92
+#: sp/cam_midi_collage.sp:34
+#: sp/cam_voice_midi_collage.sp:79
+#: sp/cam_wii_voice_midi_collage.sps:100
 msgid "Camera Tracker"
 msgstr "Seguimento de cámara"
 
-#: sp/cam_midi_collage.sp:30 sp/cam_voice_midi_collage.sp:83
-#: sp/cam_wii_voice_midi_collage.sps:107 sp/wii_midi_collage.sps:29
+#: sp/cam_midi_collage.sp:38
+#: sp/cam_voice_midi_collage.sp:91
+#: sp/cam_wii_voice_midi_collage.sps:116
+#: sp/wii_midi_collage.sps:29
 #: sp/wii_voice_midi_collage.sps:83
 msgid "MIDI Sound"
 msgstr "Son MIDI"
 
-#: sp/cam_midi_collage.sp:33 sp/cam_voice_midi_collage.sp:86
-#: sp/cam_wii_voice_midi_collage.sps:110 sp/voice_collage.sp:22
-#: sp/wii_midi_collage.sps:32 sp/wii_voice_midi_collage.sps:86
+#: sp/cam_midi_collage.sp:41
+#: sp/cam_voice_midi_collage.sp:94
+#: sp/cam_wii_voice_midi_collage.sps:119
+#: sp/voice_collage.sp:22
+#: sp/wii_midi_collage.sps:32
+#: sp/wii_voice_midi_collage.sps:86
 msgid "Graphics"
 msgstr "Gráficos"
 
-#: sp/cam_voice_midi_collage.sp:2 sp/cam_wii_voice_midi_collage.sps:2
-#: sp/cam_wiiacc_voice_midi_collage.sp:2 sp/cam_wiiacc_voice_midi_collage.sp:7
-#: sp/cam_wiimp_voice_midi_collage.sp:2 sp/cam_wiimp_voice_midi_collage.sp:7
-#: sp/wii_voice_midi_collage.sps:2 sp/wiiacc_voice_midi_collage.sp:7
+#: sp/cam_voice_midi_collage.sp:2
+#: sp/cam_wii_voice_midi_collage.sps:2
+#: sp/cam_wiiacc_voice_midi_collage.sp:2
+#: sp/cam_wiiacc_voice_midi_collage.sp:7
+#: sp/cam_wiimp_voice_midi_collage.sp:2
+#: sp/cam_wiimp_voice_midi_collage.sp:7
+#: sp/wii_voice_midi_collage.sps:2
+#: sp/wiiacc_voice_midi_collage.sp:7
 #: sp/wiimp_voice_midi_collage.sp:7
 msgid "Playing with voice + Virtual Instrument"
 msgstr "Xogar coa voz + Instrumento virtual"
 
-#: sp/cam_voice_midi_collage.sp:17 sp/cam_wii_voice_midi_collage.sps:17
+#: sp/cam_voice_midi_collage.sp:22
+#: sp/cam_wii_voice_midi_collage.sps:22
 msgid "Enable camera control"
 msgstr "Activar control con cámara"
 
-#: sp/cam_voice_midi_collage.sp:28 sp/cam_wii_voice_midi_collage.sps:28
+#: sp/cam_voice_midi_collage.sp:33
+#: sp/cam_wii_voice_midi_collage.sps:33
 #: sp/wii_voice_midi_collage.sps:13
 msgid "Enable voice control"
 msgstr "Activar control con voz"
 
-#: sp/cam_voice_midi_collage.sp:37 sp/cam_wii_voice_midi_collage.sps:50
+#: sp/cam_voice_midi_collage.sp:42
+#: sp/cam_wii_voice_midi_collage.sps:55
 #: sp/wii_voice_midi_collage.sps:36
 msgid "Master sensitivity"
 msgstr "Sensibilidade mestra"
 
-#: sp/cam_voice_midi_collage.sp:76 sp/cam_wii_voice_midi_collage.sps:96
-#: sp/voice_collage.sp:19 sp/wii_voice_midi_collage.sps:72
+#: sp/cam_voice_midi_collage.sp:84
+#: sp/cam_wii_voice_midi_collage.sps:105
+#: sp/voice_collage.sp:19
+#: sp/wii_voice_midi_collage.sps:72
 msgid "Voice Input"
 msgstr "Entrada de voz"
 
-#: sp/cam_wii_voice_midi_collage.sps:41 sp/wii_voice_midi_collage.sps:27
+#: sp/cam_wii_voice_midi_collage.sps:46
+#: sp/wii_voice_midi_collage.sps:27
 msgid "Enable Wii control"
 msgstr "Activar control con «Wii»"
 
-#: sp/cam_wii_voice_midi_collage.sps:100 sp/wii_midi_collage.sps:26
+#: sp/cam_wii_voice_midi_collage.sps:109
+#: sp/wii_midi_collage.sps:26
 #: sp/wii_voice_midi_collage.sps:76
 msgid "Wii Remote"
 msgstr "Wii Remote"
 
-#: sp/lib/camera_oflow_motion.sps:45 sp/lib/wii_acc_motion.sps:68
+#: sp/lib/camera_oflow_motion.sps:45
+#: sp/lib/wii_acc_motion.sps:68
 #: sp/lib/wii_mp_motion.sps:62
 msgid "Motion detected"
 msgstr "Movemento detectado"
@@ -89,49 +109,57 @@ msgstr "Limiar de detección do movemento"
 msgid "Camera sensitivity"
 msgstr "Sensibilidade da cámara"
 
-#: sp/lib/camera_oflow_motion.sps:63 sp/lib/motion_collage.sps:130
-#: sp/lib/motion_midi_player.sps:106 sp/lib/pvoice.sps:38
-#: sp/lib/wii_acc_motion.sps:90 sp/lib/wii_mp_motion.sps:85
+#: sp/lib/camera_oflow_motion.sps:63
+#: sp/lib/motion_collage.sps:143
+#: sp/lib/motion_midi_player.sps:106
+#: sp/lib/pvoice.sps:38
+#: sp/lib/wii_acc_motion.sps:90
+#: sp/lib/wii_mp_motion.sps:85
 msgid "Advanced"
 msgstr "Avanzado"
 
-#: sp/lib/motion_collage.sps:16
+#: sp/lib/ipl2sdl.sps:22
+msgid "Show camera image as background"
+msgstr "Amosar a imaxe da cámara como fondo"
+
+#: sp/lib/motion_collage.sps:29
 msgid "Graphical sensitivity"
 msgstr "Sensibilidade dos gráficos"
 
-#: sp/lib/motion_collage.sps:25 sp/lib/motion_collage.sps:136
+#: sp/lib/motion_collage.sps:38
+#: sp/lib/motion_collage.sps:149
 msgid "Background"
 msgstr "Fondo"
 
-#: sp/lib/motion_collage.sps:40
+#: sp/lib/motion_collage.sps:53
 msgid "Animation speed"
 msgstr "Velocidade da animación"
 
-#: sp/lib/motion_collage.sps:60
+#: sp/lib/motion_collage.sps:73
 msgid "Category"
 msgstr "Categoría"
 
-#: sp/lib/motion_collage.sps:69
+#: sp/lib/motion_collage.sps:82
 msgid "Subcategory"
 msgstr "Subcategoría"
 
-#: sp/lib/motion_collage.sps:79
+#: sp/lib/motion_collage.sps:92
 msgid "Open file"
 msgstr "Abrir ficheiro"
 
-#: sp/lib/motion_collage.sps:102
+#: sp/lib/motion_collage.sps:115
 msgid "Next effect (when available)"
 msgstr "Seguinte efecto (se está dispoñíbel)"
 
-#: sp/lib/motion_collage.sps:110
+#: sp/lib/motion_collage.sps:123
 msgid "Maximum number of objects"
 msgstr "Número máximo de obxectos"
 
-#: sp/lib/motion_collage.sps:114
+#: sp/lib/motion_collage.sps:127
 msgid "Automatically vanish objects"
 msgstr "Esvaecer obxectos automaticamente"
 
-#: sp/lib/motion_collage.sps:119
+#: sp/lib/motion_collage.sps:132
 msgid "Foreground"
 msgstr "Primeiro plano"
 
@@ -163,7 +191,8 @@ msgstr "Volume"
 msgid "Musical score"
 msgstr "Partitura musical"
 
-#: sp/lib/pvoice.sps:9 sp/voice_collage.sp:2
+#: sp/lib/pvoice.sps:9
+#: sp/voice_collage.sp:2
 msgid "Playing with voice"
 msgstr "Xogar coa voz"
 
@@ -191,7 +220,8 @@ msgstr "Usar eixo Y (atrás - adiante)"
 msgid "Use Z axis (up - down)"
 msgstr "Usar eixo Z (arriba - abaixo)"
 
-#: sp/lib/wii_acc_motion.sps:68 sp/lib/wii_mp_motion.sps:62
+#: sp/lib/wii_acc_motion.sps:68
+#: sp/lib/wii_mp_motion.sps:62
 msgid "Motion threshold"
 msgstr "Limiar de movemento"
 
@@ -199,7 +229,8 @@ msgstr "Limiar de movemento"
 msgid "Sensitivity"
 msgstr "Sensibilidade"
 
-#: sp/lib/wii_acc_motion.sps:87 sp/lib/wii_mp_motion.sps:82
+#: sp/lib/wii_acc_motion.sps:87
+#: sp/lib/wii_mp_motion.sps:82
 msgid "Wii Devices"
 msgstr "Dispositivos «Wii»"
 
@@ -219,9 +250,11 @@ msgstr "Usar eixo Z (esq. - dereita)"
 msgid "Motion sensitivity"
 msgstr "Sensibilidade do movemento"
 
-#: sp/wii_acc_midi_collage.sp:2 sp/wii_midi_collage.sps:2
+#: sp/wii_acc_midi_collage.sp:2
+#: sp/wii_midi_collage.sps:2
 msgid "Wii Virtual Instrument"
 msgstr "Instrumento virtual «Wii»"
 
 #~ msgid "Wii Motion Plus"
 #~ msgstr "Wii Motion Plus"
+
diff --git a/po/sitplus-spcore/ca.po b/po/sitplus-spcore/ca.po
index 11908d5..eda6f01 100644
--- a/po/sitplus-spcore/ca.po
+++ b/po/sitplus-spcore/ca.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-16 22:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-16 22:32+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -18,4 +19,3 @@ msgstr ""
 #: src/spcore/language.cpp:38
 msgid "System default"
 msgstr "Per defecte del sistema"
-
diff --git a/po/sitplus-spcore/es.po b/po/sitplus-spcore/es.po
index 673e098..3346bd7 100644
--- a/po/sitplus-spcore/es.po
+++ b/po/sitplus-spcore/es.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-16 22:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-19 19:10+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -19,4 +20,3 @@ msgstr ""
 #: src/spcore/language.cpp:38
 msgid "System default"
 msgstr "Por defecto del sistema"
-
diff --git a/po/sitplus-spcore/gl.po b/po/sitplus-spcore/gl.po
index 2cb17d4..1c225c5 100755
--- a/po/sitplus-spcore/gl.po
+++ b/po/sitplus-spcore/gl.po
@@ -8,10 +8,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-16 22:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-29 09:48+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -21,4 +22,3 @@ msgstr ""
 #: src/spcore/language.cpp:38
 msgid "System default"
 msgstr "Predeterminado do sistema"
-
diff --git a/po/sitplus-sphost/ca.po b/po/sitplus-sphost/ca.po
index 621eb5d..35f236c 100644
--- a/po/sitplus-sphost/ca.po
+++ b/po/sitplus-sphost/ca.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-16 22:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-16 22:33+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -18,4 +19,3 @@ msgstr ""
 #: src/sphost/componenthelper.cpp:623
 msgid "Advanced"
 msgstr "Avançat"
-
diff --git a/po/sitplus-sphost/es.po b/po/sitplus-sphost/es.po
index 68147a7..9a8b680 100644
--- a/po/sitplus-sphost/es.po
+++ b/po/sitplus-sphost/es.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-16 22:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-19 19:10+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -19,4 +20,3 @@ msgstr ""
 #: src/sphost/componenthelper.cpp:623
 msgid "Advanced"
 msgstr "Avanzado"
-
diff --git a/po/sitplus-sphost/gl.po b/po/sitplus-sphost/gl.po
index bb42e19..8eee9a9 100755
--- a/po/sitplus-sphost/gl.po
+++ b/po/sitplus-sphost/gl.po
@@ -8,10 +8,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-16 22:00+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-29 09:49+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -21,4 +22,3 @@ msgstr ""
 #: src/sphost/componenthelper.cpp:623
 msgid "Advanced"
 msgstr "Avanzado"
-
diff --git a/po/sitplus/ca.po b/po/sitplus/ca.po
index a6f7bd8..9903f16 100755
--- a/po/sitplus/ca.po
+++ b/po/sitplus/ca.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-22 11:59+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-22 11:57+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -79,11 +80,11 @@ msgstr "Arrencar"
 msgid "Stop"
 msgstr "Aturar"
 
-#: src/sitplus/activitymanager.cpp:175
+#: src/sitplus/activitymanager.cpp:174
 msgid "Initialization of activity component "
 msgstr "La inicializació de l'activitat"
 
-#: src/sitplus/activitymanager.cpp:177 src/sitplus/activitymanager.cpp:213
+#: src/sitplus/activitymanager.cpp:176 src/sitplus/activitymanager.cpp:211
 msgid ""
 " failed.\n"
 "See console for details."
@@ -91,16 +92,16 @@ msgstr ""
 " ha fallat.\n"
 "Veure la consola per més detalls."
 
-#: src/sitplus/activitymanager.cpp:178 src/sitplus/activitymanager.cpp:214
-#: src/sitplus/activitymanager.cpp:306
+#: src/sitplus/activitymanager.cpp:177 src/sitplus/activitymanager.cpp:212
+#: src/sitplus/activitymanager.cpp:304
 msgid "SITPLUS error"
 msgstr "Error SITPLUS"
 
-#: src/sitplus/activitymanager.cpp:211
+#: src/sitplus/activitymanager.cpp:209
 msgid "Creation of activity component "
 msgstr "La creació del component "
 
-#: src/sitplus/activitymanager.cpp:306
+#: src/sitplus/activitymanager.cpp:304
 msgid ""
 "Can not start activity.\n"
 "See console for details."
@@ -112,64 +113,64 @@ msgstr ""
 msgid "Activity manager"
 msgstr "Controlador d'activitat"
 
-#: src/sitplus/sitplus_main_window.cpp:246
+#: src/sitplus/sitplus_main_window.cpp:247
 msgid "&Exit"
 msgstr "&Sortir"
 
-#: src/sitplus/sitplus_main_window.cpp:247
+#: src/sitplus/sitplus_main_window.cpp:248
 msgid "&File"
 msgstr "&Fitxer"
 
-#: src/sitplus/sitplus_main_window.cpp:249
+#: src/sitplus/sitplus_main_window.cpp:250
 msgid "&Start..."
 msgstr "&Iniciar..."
 
-#: src/sitplus/sitplus_main_window.cpp:251
+#: src/sitplus/sitplus_main_window.cpp:252
 msgid "&Load file..."
 msgstr "&Obrir fitxer..."
 
-#: src/sitplus/sitplus_main_window.cpp:252
+#: src/sitplus/sitplus_main_window.cpp:253
 msgid "&Activity"
 msgstr "&Activitat"
 
-#: src/sitplus/sitplus_main_window.cpp:254
+#: src/sitplus/sitplus_main_window.cpp:255
 msgid "&Camera..."
 msgstr "&Càmera..."
 
-#: src/sitplus/sitplus_main_window.cpp:255
+#: src/sitplus/sitplus_main_window.cpp:256
 msgid "&Wii remotes..."
 msgstr "&Wii remotes..."
 
-#: src/sitplus/sitplus_main_window.cpp:256
+#: src/sitplus/sitplus_main_window.cpp:257
 msgid "&MIDI Out..."
 msgstr "&Sortida MIDI..."
 
-#: src/sitplus/sitplus_main_window.cpp:257
+#: src/sitplus/sitplus_main_window.cpp:258
 msgid "&Pure Data..."
 msgstr "&Pure Data..."
 
-#: src/sitplus/sitplus_main_window.cpp:259
+#: src/sitplus/sitplus_main_window.cpp:260
 msgid "&Language..."
 msgstr "&Idioma..."
 
-#: src/sitplus/sitplus_main_window.cpp:260
+#: src/sitplus/sitplus_main_window.cpp:261
 msgid "&Configuration"
 msgstr "&Configuració"
 
-#: src/sitplus/sitplus_main_window.cpp:262
-#: src/sitplus/sitplus_main_window.cpp:265
+#: src/sitplus/sitplus_main_window.cpp:263
+#: src/sitplus/sitplus_main_window.cpp:266
 msgid "&Help"
 msgstr "A&juda"
 
-#: src/sitplus/sitplus_main_window.cpp:264
+#: src/sitplus/sitplus_main_window.cpp:265
 msgid "&About"
 msgstr "&Quant a"
 
-#: src/sitplus/sitplus_main_window.cpp:358
+#: src/sitplus/sitplus_main_window.cpp:359
 msgid "ERROR"
 msgstr "ERROR"
 
-#: src/sitplus/sitplus_main_window.cpp:358
+#: src/sitplus/sitplus_main_window.cpp:359
 msgid "Unexpected error opening config dialogue. See console for details"
 msgstr ""
 "Error inesperat obrint diàleg de configuració. Veure consola per més detalls."
@@ -186,15 +187,15 @@ msgstr ""
 msgid "Configuration of "
 msgstr "La configuració de "
 
-#: src/sitplus/sitplus_main_window.cpp:387
+#: src/sitplus/sitplus_main_window.cpp:386
 msgid "Are you sure you want to close this activity?"
 msgstr "Està segur que vol tancar l'activitat?"
 
-#: src/sitplus/sitplus_main_window.cpp:388
+#: src/sitplus/sitplus_main_window.cpp:387
 msgid "Close confirmation"
 msgstr "Confirmació tancar"
 
-#: src/sitplus/sitplus_main_window.cpp:415
+#: src/sitplus/sitplus_main_window.cpp:414
 msgid ""
 "Initialization failed.\n"
 "See console for details."
@@ -202,20 +203,20 @@ msgstr ""
 "Inicializació fallida.\n"
 "Veure consola per més detalls."
 
-#: src/sitplus/sitplus_main_window.cpp:416
-#: src/sitplus/sitplus_main_window.cpp:429
+#: src/sitplus/sitplus_main_window.cpp:415
+#: src/sitplus/sitplus_main_window.cpp:428
 msgid "Error loading activity"
 msgstr "Error carregant activitat"
 
-#: src/sitplus/sitplus_main_window.cpp:427
+#: src/sitplus/sitplus_main_window.cpp:426
 msgid "Creation of activity failed.\n"
 msgstr "La creació de l'activitat ha fallat.\n"
 
-#: src/sitplus/sitplus_main_window.cpp:532
+#: src/sitplus/sitplus_main_window.cpp:531
 msgid "Load activity script"
 msgstr "Carregar script d'activitat"
 
-#: src/sitplus/sitplus_main_window.cpp:614
+#: src/sitplus/sitplus_main_window.cpp:613
 msgid "You must restart SITPLUS to apply this change"
 msgstr "Cal reiniciar SITPLUS per aplicar aquest canvi"
 
diff --git a/po/sitplus/es.po b/po/sitplus/es.po
index 0c52cde..ea4f124 100755
--- a/po/sitplus/es.po
+++ b/po/sitplus/es.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-22 11:59+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-22 11:58+0100\n"
 "Last-Translator: Cesar Mauri <cesar at crea-si.com>\n"
 "Language-Team: none <cesar at crea-si.com>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -83,11 +84,11 @@ msgstr "Arrancar"
 msgid "Stop"
 msgstr "Parar"
 
-#: src/sitplus/activitymanager.cpp:175
+#: src/sitplus/activitymanager.cpp:174
 msgid "Initialization of activity component "
 msgstr "La inicialización de la actividad"
 
-#: src/sitplus/activitymanager.cpp:177 src/sitplus/activitymanager.cpp:213
+#: src/sitplus/activitymanager.cpp:176 src/sitplus/activitymanager.cpp:211
 msgid ""
 " failed.\n"
 "See console for details."
@@ -95,16 +96,16 @@ msgstr ""
 " ha fallado.\n"
 "Ver la consola para más detalles."
 
-#: src/sitplus/activitymanager.cpp:178 src/sitplus/activitymanager.cpp:214
-#: src/sitplus/activitymanager.cpp:306
+#: src/sitplus/activitymanager.cpp:177 src/sitplus/activitymanager.cpp:212
+#: src/sitplus/activitymanager.cpp:304
 msgid "SITPLUS error"
 msgstr "Error SITPLUS"
 
-#: src/sitplus/activitymanager.cpp:211
+#: src/sitplus/activitymanager.cpp:209
 msgid "Creation of activity component "
 msgstr "La creación del componente "
 
-#: src/sitplus/activitymanager.cpp:306
+#: src/sitplus/activitymanager.cpp:304
 msgid ""
 "Can not start activity.\n"
 "See console for details."
@@ -116,64 +117,64 @@ msgstr ""
 msgid "Activity manager"
 msgstr "Controlador de actividad"
 
-#: src/sitplus/sitplus_main_window.cpp:246
+#: src/sitplus/sitplus_main_window.cpp:247
 msgid "&Exit"
 msgstr "&Salir"
 
-#: src/sitplus/sitplus_main_window.cpp:247
+#: src/sitplus/sitplus_main_window.cpp:248
 msgid "&File"
 msgstr "&Archivo"
 
-#: src/sitplus/sitplus_main_window.cpp:249
+#: src/sitplus/sitplus_main_window.cpp:250
 msgid "&Start..."
 msgstr "&Iniciar..."
 
-#: src/sitplus/sitplus_main_window.cpp:251
+#: src/sitplus/sitplus_main_window.cpp:252
 msgid "&Load file..."
 msgstr "&Abrir archivo..."
 
-#: src/sitplus/sitplus_main_window.cpp:252
+#: src/sitplus/sitplus_main_window.cpp:253
 msgid "&Activity"
 msgstr "A&ctividad"
 
-#: src/sitplus/sitplus_main_window.cpp:254
+#: src/sitplus/sitplus_main_window.cpp:255
 msgid "&Camera..."
 msgstr "&Cámara..."
 
-#: src/sitplus/sitplus_main_window.cpp:255
+#: src/sitplus/sitplus_main_window.cpp:256
 msgid "&Wii remotes..."
 msgstr "&Wii remotes..."
 
-#: src/sitplus/sitplus_main_window.cpp:256
+#: src/sitplus/sitplus_main_window.cpp:257
 msgid "&MIDI Out..."
 msgstr "&Salida MIDI..."
 
-#: src/sitplus/sitplus_main_window.cpp:257
+#: src/sitplus/sitplus_main_window.cpp:258
 msgid "&Pure Data..."
 msgstr "&Pure Data..."
 
-#: src/sitplus/sitplus_main_window.cpp:259
+#: src/sitplus/sitplus_main_window.cpp:260
 msgid "&Language..."
 msgstr "&Idioma..."
 
-#: src/sitplus/sitplus_main_window.cpp:260
+#: src/sitplus/sitplus_main_window.cpp:261
 msgid "&Configuration"
 msgstr "&Configuración"
 
-#: src/sitplus/sitplus_main_window.cpp:262
-#: src/sitplus/sitplus_main_window.cpp:265
+#: src/sitplus/sitplus_main_window.cpp:263
+#: src/sitplus/sitplus_main_window.cpp:266
 msgid "&Help"
 msgstr "A&yuda"
 
-#: src/sitplus/sitplus_main_window.cpp:264
+#: src/sitplus/sitplus_main_window.cpp:265
 msgid "&About"
 msgstr "&Acerca de"
 
-#: src/sitplus/sitplus_main_window.cpp:358
+#: src/sitplus/sitplus_main_window.cpp:359
 msgid "ERROR"
 msgstr "ERROR"
 
-#: src/sitplus/sitplus_main_window.cpp:358
+#: src/sitplus/sitplus_main_window.cpp:359
 msgid "Unexpected error opening config dialogue. See console for details"
 msgstr ""
 "Error inesperado abriendo diálogo de configuración. Ver consola para más "
@@ -191,15 +192,15 @@ msgstr ""
 msgid "Configuration of "
 msgstr "La configuración de "
 
-#: src/sitplus/sitplus_main_window.cpp:387
+#: src/sitplus/sitplus_main_window.cpp:386
 msgid "Are you sure you want to close this activity?"
 msgstr "¿Está seguro que quiere cerrar la actividad?"
 
-#: src/sitplus/sitplus_main_window.cpp:388
+#: src/sitplus/sitplus_main_window.cpp:387
 msgid "Close confirmation"
 msgstr "Confirmación cerrar"
 
-#: src/sitplus/sitplus_main_window.cpp:415
+#: src/sitplus/sitplus_main_window.cpp:414
 msgid ""
 "Initialization failed.\n"
 "See console for details."
@@ -207,20 +208,20 @@ msgstr ""
 "Inicialización fallida.\n"
 "Ver consola para más detalles."
 
-#: src/sitplus/sitplus_main_window.cpp:416
-#: src/sitplus/sitplus_main_window.cpp:429
+#: src/sitplus/sitplus_main_window.cpp:415
+#: src/sitplus/sitplus_main_window.cpp:428
 msgid "Error loading activity"
 msgstr "Error cargando actividad"
 
-#: src/sitplus/sitplus_main_window.cpp:427
+#: src/sitplus/sitplus_main_window.cpp:426
 msgid "Creation of activity failed.\n"
 msgstr "La creación de la actividad ha fallado.\n"
 
-#: src/sitplus/sitplus_main_window.cpp:532
+#: src/sitplus/sitplus_main_window.cpp:531
 msgid "Load activity script"
 msgstr "Cargar script de actividad"
 
-#: src/sitplus/sitplus_main_window.cpp:614
+#: src/sitplus/sitplus_main_window.cpp:613
 msgid "You must restart SITPLUS to apply this change"
 msgstr "Es necesario reiniciar SITPLUS para aplicar este cambio."
 
diff --git a/po/sitplus/gl.po b/po/sitplus/gl.po
index a62bd70..7731278 100755
--- a/po/sitplus/gl.po
+++ b/po/sitplus/gl.po
@@ -8,10 +8,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: sitplus 1.0\n"
 "Report-Msgid-Bugs-To: cesar at crea-si.com/\n"
-"POT-Creation-Date: 2011-06-22 11:59+0200\n"
+"POT-Creation-Date: 2012-01-05 15:52+0100\n"
 "PO-Revision-Date: 2011-06-29 09:17+0100\n"
 "Last-Translator: Miguel Anxo Bouzada <mbouzada at gmail.com>\n"
 "Language-Team: Galician <proxecto at trasno.net>\n"
+"Language: gl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -83,12 +84,11 @@ msgstr "Arrancar"
 msgid "Stop"
 msgstr "Parar"
 
-#: src/sitplus/activitymanager.cpp:175
+#: src/sitplus/activitymanager.cpp:174
 msgid "Initialization of activity component "
 msgstr "Non foi posíbel inicializar a actividade: "
 
-#: src/sitplus/activitymanager.cpp:177
-#: src/sitplus/activitymanager.cpp:213
+#: src/sitplus/activitymanager.cpp:176 src/sitplus/activitymanager.cpp:211
 msgid ""
 " failed.\n"
 "See console for details."
@@ -96,17 +96,16 @@ msgstr ""
 " .\n"
 "Vexa a consola para obter máis detalles."
 
-#: src/sitplus/activitymanager.cpp:178
-#: src/sitplus/activitymanager.cpp:214
-#: src/sitplus/activitymanager.cpp:306
+#: src/sitplus/activitymanager.cpp:177 src/sitplus/activitymanager.cpp:212
+#: src/sitplus/activitymanager.cpp:304
 msgid "SITPLUS error"
 msgstr "Erro SITPLUS"
 
-#: src/sitplus/activitymanager.cpp:211
+#: src/sitplus/activitymanager.cpp:209
 msgid "Creation of activity component "
 msgstr "A creación do compoñente "
 
-#: src/sitplus/activitymanager.cpp:306
+#: src/sitplus/activitymanager.cpp:304
 msgid ""
 "Can not start activity.\n"
 "See console for details."
@@ -118,66 +117,68 @@ msgstr ""
 msgid "Activity manager"
 msgstr "Controlador de actividade"
 
-#: src/sitplus/sitplus_main_window.cpp:246
+#: src/sitplus/sitplus_main_window.cpp:247
 msgid "&Exit"
 msgstr "&Saír"
 
-#: src/sitplus/sitplus_main_window.cpp:247
+#: src/sitplus/sitplus_main_window.cpp:248
 msgid "&File"
 msgstr "&Ficheiro"
 
-#: src/sitplus/sitplus_main_window.cpp:249
+#: src/sitplus/sitplus_main_window.cpp:250
 msgid "&Start..."
 msgstr "&Iniciar..."
 
-#: src/sitplus/sitplus_main_window.cpp:251
+#: src/sitplus/sitplus_main_window.cpp:252
 msgid "&Load file..."
 msgstr "&Abrir ficheiro..."
 
-#: src/sitplus/sitplus_main_window.cpp:252
+#: src/sitplus/sitplus_main_window.cpp:253
 msgid "&Activity"
 msgstr "A&ctividade"
 
-#: src/sitplus/sitplus_main_window.cpp:254
+#: src/sitplus/sitplus_main_window.cpp:255
 msgid "&Camera..."
 msgstr "&Cámara..."
 
-#: src/sitplus/sitplus_main_window.cpp:255
+#: src/sitplus/sitplus_main_window.cpp:256
 msgid "&Wii remotes..."
 msgstr "&Wii remotes..."
 
-#: src/sitplus/sitplus_main_window.cpp:256
+#: src/sitplus/sitplus_main_window.cpp:257
 msgid "&MIDI Out..."
 msgstr "&Saída MIDI..."
 
-#: src/sitplus/sitplus_main_window.cpp:257
+#: src/sitplus/sitplus_main_window.cpp:258
 msgid "&Pure Data..."
 msgstr "&Pure Data..."
 
-#: src/sitplus/sitplus_main_window.cpp:259
+#: src/sitplus/sitplus_main_window.cpp:260
 msgid "&Language..."
 msgstr "&Idioma..."
 
-#: src/sitplus/sitplus_main_window.cpp:260
+#: src/sitplus/sitplus_main_window.cpp:261
 msgid "&Configuration"
 msgstr "&Configuración"
 
-#: src/sitplus/sitplus_main_window.cpp:262
-#: src/sitplus/sitplus_main_window.cpp:265
+#: src/sitplus/sitplus_main_window.cpp:263
+#: src/sitplus/sitplus_main_window.cpp:266
 msgid "&Help"
 msgstr "&Axuda"
 
-#: src/sitplus/sitplus_main_window.cpp:264
+#: src/sitplus/sitplus_main_window.cpp:265
 msgid "&About"
 msgstr "&Sobre"
 
-#: src/sitplus/sitplus_main_window.cpp:358
+#: src/sitplus/sitplus_main_window.cpp:359
 msgid "ERROR"
 msgstr "ERRO"
 
-#: src/sitplus/sitplus_main_window.cpp:358
+#: src/sitplus/sitplus_main_window.cpp:359
 msgid "Unexpected error opening config dialogue. See console for details"
-msgstr "Produciuse un error inesperado abrindo o diálogo de configuración. Vexa a consola para obter máis detalles."
+msgstr ""
+"Produciuse un error inesperado abrindo o diálogo de configuración. Vexa a "
+"consola para obter máis detalles."
 
 #: src/sitplus/sitplus_main_window.cpp:370
 msgid ""
@@ -191,15 +192,15 @@ msgstr ""
 msgid "Configuration of "
 msgstr "Non foi posíbel configurar "
 
-#: src/sitplus/sitplus_main_window.cpp:387
+#: src/sitplus/sitplus_main_window.cpp:386
 msgid "Are you sure you want to close this activity?"
 msgstr "Está seguro de que quere pechar a actividade?"
 
-#: src/sitplus/sitplus_main_window.cpp:388
+#: src/sitplus/sitplus_main_window.cpp:387
 msgid "Close confirmation"
 msgstr "Confirmar o peche"
 
-#: src/sitplus/sitplus_main_window.cpp:415
+#: src/sitplus/sitplus_main_window.cpp:414
 msgid ""
 "Initialization failed.\n"
 "See console for details."
@@ -207,20 +208,20 @@ msgstr ""
 "Non foi posíbel inicializar.\n"
 "Vexa a consola para obter máis detalles."
 
-#: src/sitplus/sitplus_main_window.cpp:416
-#: src/sitplus/sitplus_main_window.cpp:429
+#: src/sitplus/sitplus_main_window.cpp:415
+#: src/sitplus/sitplus_main_window.cpp:428
 msgid "Error loading activity"
 msgstr "Produciuse un error cargando a actividade"
 
-#: src/sitplus/sitplus_main_window.cpp:427
+#: src/sitplus/sitplus_main_window.cpp:426
 msgid "Creation of activity failed.\n"
 msgstr "Non foi posíbel crear a actividade.\n"
 
-#: src/sitplus/sitplus_main_window.cpp:532
+#: src/sitplus/sitplus_main_window.cpp:531
 msgid "Load activity script"
 msgstr "Cargar un script de actividade"
 
-#: src/sitplus/sitplus_main_window.cpp:614
+#: src/sitplus/sitplus_main_window.cpp:613
 msgid "You must restart SITPLUS to apply this change"
 msgstr "É necesario reiniciar SITPLUS para aplicar este cambio."
 
@@ -230,6 +231,6 @@ msgstr "SITPLUS"
 
 #~ msgid "&About..."
 #~ msgstr "&Acerca de..."
+
 #~ msgid "&Graphics"
 #~ msgstr "&Gráficos"
-
diff --git a/sp/cam_midi_collage.sp b/sp/cam_midi_collage.sp
index 919d98b..e318813 100755
--- a/sp/cam_midi_collage.sp
+++ b/sp/cam_midi_collage.sp
@@ -4,6 +4,11 @@ name _"Virtual Instrument"
 # Camera source
 create camera_grabber grabber
 
+# Background drawer
+import lib/ipl2sdl.sps
+create ipl2sdl_chk ipl2sdl_chk
+connect grabber image ipl2sdl_chk image
+
 # Motion tracker
 import lib/camera_oflow_motion.sps
 create camera_oflow_motion tracker
@@ -17,8 +22,10 @@ connect tracker motion player motion
 # Collage
 import lib/motion_collage.sps
 create motion_collage motion_collage
-create send_main_async to_main
 
+connect ipl2sdl_chk surface motion_collage background
+
+create send_main_async to_main
 connect tracker motion to_main in
 connect to_main out motion_collage motion
 
@@ -26,6 +33,7 @@ begin_gui_layout
 	layout_begin hbox
 		layout_begin vbox _"Camera Tracker"
 			component tracker
+			component ipl2sdl_chk
 		layout_end
 		layout_begin vbox _"MIDI Sound"
 			component player
diff --git a/sp/cam_voice_midi_collage.sp b/sp/cam_voice_midi_collage.sp
index 4cee310..f603415 100755
--- a/sp/cam_voice_midi_collage.sp
+++ b/sp/cam_voice_midi_collage.sp
@@ -8,6 +8,11 @@ name _"Playing with voice + Virtual Instrument"
 # Camera source
 create camera_grabber grabber
 
+# Background drawer
+import lib/ipl2sdl.sps
+create ipl2sdl_chk ipl2sdl_chk
+connect grabber image ipl2sdl_chk image
+
 # Camera motion tracker
 import lib/camera_oflow_motion.sps
 create camera_oflow_motion cam_tracker
@@ -51,6 +56,8 @@ connect sens_midi result player motion
 #
 import lib/motion_collage.sps
 create motion_collage motion_collage
+connect ipl2sdl_chk surface motion_collage background
+
 create send_main_async to_main
 
 # Accumulate motion
@@ -72,6 +79,7 @@ begin_gui_layout
 				layout_begin book_page _"Camera Tracker"
 					component chk_enable_cam
 					component cam_tracker
+					component ipl2sdl_chk
 				layout_end
 				layout_begin book_page _"Voice Input"
 					component chk_enable_voice
diff --git a/sp/cam_wii_voice_midi_collage.sps b/sp/cam_wii_voice_midi_collage.sps
index 2a04f4e..05b53a7 100755
--- a/sp/cam_wii_voice_midi_collage.sps
+++ b/sp/cam_wii_voice_midi_collage.sps
@@ -8,6 +8,11 @@ args -wii
 # Camera source
 create camera_grabber grabber
 
+# Background drawer
+import lib/ipl2sdl.sps
+create ipl2sdl_chk ipl2sdl_chk
+connect grabber image ipl2sdl_chk image
+
 # Camera motion tracker
 import lib/camera_oflow_motion.sps
 create camera_oflow_motion cam_tracker
@@ -67,6 +72,9 @@ connect sens_midi result player motion
 #
 import lib/motion_collage.sps
 create motion_collage motion_collage
+
+connect ipl2sdl_chk surface motion_collage background
+
 create send_main_async to_main
 
 # Accumulate motion
@@ -92,6 +100,7 @@ begin_gui_layout
 				layout_begin book_page _"Camera Tracker"
 					component chk_enable_cam
 					component cam_tracker
+					component ipl2sdl_chk
 				layout_end
 				layout_begin book_page _"Voice Input"
 					component chk_enable_voice
diff --git a/sp/examples/camera_sdl/test_ipl2sdl.sp b/sp/examples/camera_sdl/test_ipl2sdl.sp
new file mode 100644
index 0000000..a0fe3fb
--- /dev/null
+++ b/sp/examples/camera_sdl/test_ipl2sdl.sp
@@ -0,0 +1,30 @@
+
+type test_ipl2sdl
+name "IPL two SDL"
+
+# Camera source. 
+create camera_grabber grabber
+
+# Send to main
+create send_main_async to_main
+connect grabber image to_main in
+
+# Camera panel 
+create camera_viewer viewer
+connect to_main out viewer image
+
+# SDL drawer
+create sdl_drawer sdl_drawer
+
+# IPL2SDL
+create ipl2sdl ipl2sdl
+connect to_main out ipl2sdl in
+
+connect ipl2sdl out sdl_drawer queue
+connect ipl2sdl out sdl_drawer draw
+
+begin_gui_layout
+	layout_begin hbox
+		component viewer
+	layout_end
+end_gui_layout
diff --git a/sp/examples/camera_sdl/test_ipl2sdl2.sp b/sp/examples/camera_sdl/test_ipl2sdl2.sp
new file mode 100644
index 0000000..5ffc5b7
--- /dev/null
+++ b/sp/examples/camera_sdl/test_ipl2sdl2.sp
@@ -0,0 +1,27 @@
+
+type test_ipl2sdl2
+name "IPL two SDL"
+
+# Camera source. 
+create camera_grabber grabber
+
+import ../../lib/ipl2sdl.sps
+create ipl2sdl_chk ipl2sdl_chk
+
+# Camera panel 
+create camera_viewer viewer
+connect grabber image viewer image
+
+connect grabber image ipl2sdl_chk image
+
+# SDL drawer
+create sdl_drawer sdl_drawer
+connect ipl2sdl_chk surface sdl_drawer queue
+connect ipl2sdl_chk surface sdl_drawer draw
+
+begin_gui_layout
+	layout_begin vbox
+		component viewer
+		component ipl2sdl_chk
+	layout_end
+end_gui_layout
diff --git a/sp/lib/around_zero_threshold.sps b/sp/lib/around_zero_threshold.sps
index 8a32cdc..da9db26 100755
--- a/sp/lib/around_zero_threshold.sps
+++ b/sp/lib/around_zero_threshold.sps
@@ -3,9 +3,11 @@
 #
 # Input pins
 #	in (float)
+#	thres (float)
 #
 # Output pins
 # 	out (float)
+#	above (bool)	- True if value is above threshold.
 #
 # Arguments
 #	-lsld <label>	Slider label
@@ -17,9 +19,11 @@ type around_zero_threshold
 name "Threshold"
 args -lsld -lchk -max -v
 
-# Input pin
-create forward forward
-export_ipin forward in in float
+# Input pins
+create forward forward_in
+export_ipin forward_in in in float
+create forward forward_thres
+export_ipin forward_thres in thres float
 
 #
 # Threshold
@@ -28,18 +32,25 @@ create fthreshold thresneg -a 0 -b orig_minus_thres
 create fthreshold threspos -a orig_minus_thres -b 0
 create fadd add_thres
 
-connect forward out threspos value
-connect forward out thresneg value
+connect forward_in out threspos value
+connect forward_in out thresneg value
 connect threspos result add_thres b
 connect thresneg result add_thres a
 
+#
 # Slider
+#
 create widget_slider sldthres --min 0 --max $-max$ -v $-v$ -l \"$-lsld$\" --log 1
 connect sldthres value threspos thres
 create fmul neg -v -1.0
 connect sldthres value neg a
 connect neg result thresneg thres
 
+# Input threshold
+connect forward_thres out sldthres value
+connect forward_thres out threspos thres
+connect forward_thres out neg a
+
 # Checkbox to show if motion detected
 create widget_checkbox chkmotion -l \"$-lchk$\"
 create fneq hasmotion -v 0 
@@ -48,6 +59,7 @@ connect hasmotion result chkmotion value
 
 # Export motion value
 export_opin add_thres result out
+export_opin hasmotion result above
 
 begin_gui_layout
 	layout_begin vbox
diff --git a/sp/lib/camera_oflow_motion.sps b/sp/lib/camera_oflow_motion.sps
index 4743535..1f5d8ac 100755
--- a/sp/lib/camera_oflow_motion.sps
+++ b/sp/lib/camera_oflow_motion.sps
@@ -48,7 +48,7 @@ connect split 1 thres in
 #
 # Sensitivity slider
 #
-create widget_slider sldsens --min 0 --max 3 -v 1 -l _"Camera sensitivity"
+create widget_slider sldsens --min 0 --max 5 -v 1 -l _"Camera sensitivity"
 create fmul sens 
 connect sldsens value sens b
 connect thres out sens a
diff --git a/sp/lib/filter_values_by_time.sps b/sp/lib/filter_values_by_time.sps
new file mode 100644
index 0000000..faf4524
--- /dev/null
+++ b/sp/lib/filter_values_by_time.sps
@@ -0,0 +1,52 @@
+#
+# Limit the number of activations by time
+#
+#	True values received at input are only sent to output
+#	only when the specified time span has passed.
+#
+# Input pins
+#	in (bool)
+#	time (int)	- in ms
+#
+# Output pins
+# 	out (bool)
+#
+# Arguments
+#	-t <time>		Time in ms
+
+type filter_values_by_time
+name "Filter values by time"
+args -t
+
+# Input pins
+create forward forward_in
+export_ipin forward_in in in bool
+create forward forward_time
+export_ipin forward_time in time int
+
+# Chrono
+create chrono chrono
+connect forward_in out chrono read
+
+# Comparator
+create igt igt -v $-t$
+connect forward_time out igt b
+connect chrono elapsed igt a
+
+# Gate controlled by the comparator
+create forward cmp_gate
+connect igt result cmp_gate gate
+
+# Connect input to gate
+connect forward_in out cmp_gate in
+
+# Gate to let flow only true values
+create forward true_gate
+connect cmp_gate out true_gate gate
+connect cmp_gate out true_gate in
+
+# Connect when a true value flows out reset chrono
+connect true_gate out chrono reset
+
+# Finally export pin
+export_opin true_gate out
diff --git a/sp/lib/ipl2sdl.sps b/sp/lib/ipl2sdl.sps
new file mode 100644
index 0000000..d9f8c23
--- /dev/null
+++ b/sp/lib/ipl2sdl.sps
@@ -0,0 +1,40 @@
+#
+# Translates and IPL image into a SDL surface and provides 
+# a checkbox to enable/disable such a feature
+#
+# Input pins
+#	image (iplimage)
+#
+# Output pins
+# 	surface (sdl_surface)
+#
+
+type ipl2sdl_chk
+name "IPL2SDL"
+
+# IPL image source. Create a forwarder to export the pin ...
+create forward ipin_image
+
+# and export it as "image"
+export_ipin ipin_image in image iplimage
+
+# enable/disable checkbox
+create widget_checkbox enable_disable -l _"Show camera image as background" -v true
+connect enable_disable value ipin_image gate
+
+# Send to main
+create send_main_async to_main
+connect ipin_image out to_main in
+
+# IPL2SDL
+create ipl2sdl ipl2sdl
+connect to_main out ipl2sdl in
+
+# Export sdl pin
+export_opin ipl2sdl out surface
+
+begin_gui_layout
+	layout_begin vbox
+		component enable_disable	
+	layout_end
+end_gui_layout
diff --git a/sp/lib/motion_collage.sps b/sp/lib/motion_collage.sps
index 8e41ac9..192a0f6 100755
--- a/sp/lib/motion_collage.sps
+++ b/sp/lib/motion_collage.sps
@@ -1,14 +1,27 @@
+#
+# Shows a collage according to input motion
+#
+# Input pins
+#	motion (float)
+#	background (sdlsurface)	- Image to use as background
+#
+# Output pins
+#
+
 type motion_collage
 name "Motion collage"
 
-# Motion source. Create a forwarder to export the pin ...
-create forward forward
+# Motion source. Create a forwarder to export the pin and export it as "motion"
+create forward motion_ipin
+export_ipin motion_ipin in motion float
 
-# and export it as "motion"
-export_ipin forward in motion float
+# Background source.
+create forward background_ipin
+export_ipin background_ipin in background sdl_surface
 
 # SDL drawer
 create sdl_drawer sdl_drawer
+connect background_ipin out sdl_drawer queue
 
 #
 # Sensitivity
@@ -16,7 +29,7 @@ create sdl_drawer sdl_drawer
 create widget_slider sld_sens_collage -v 1 --max 15 --min 0 -l _"Graphical sensitivity" --log
 create fmul mul_sens_collage
 connect sld_sens_collage value mul_sens_collage b
-connect forward out mul_sens_collage a
+connect motion_ipin out mul_sens_collage a
 
 #
 # XML selector for collage_background
diff --git a/sp/lib/motion_midi_player.sps b/sp/lib/motion_midi_player.sps
index fd9d5a4..88f4539 100755
--- a/sp/lib/motion_midi_player.sps
+++ b/sp/lib/motion_midi_player.sps
@@ -77,7 +77,7 @@ connect sld_vol value player volume
 #
 # Note duration
 #
-create widget_slider sld_dur -l _"Note duration" --min 50 --max 5000 -v 1000 -i
+create widget_slider sld_dur -l _"Note duration" --min 50 --max 5000 -v 2000 -i
 connect sld_dur value player duration
 
 #
diff --git a/sp/lib/test_filter_activations_by_time.sp b/sp/lib/test_filter_activations_by_time.sp
new file mode 100644
index 0000000..d1fd414
--- /dev/null
+++ b/sp/lib/test_filter_activations_by_time.sp
@@ -0,0 +1,21 @@
+
+type test_filter_values_by_time
+name "Test Filter values by time"
+import filter_values_by_time.sps
+
+create filter_values_by_time f -t 2000
+create widget_button b
+connect b pressed f in
+
+create widget_slider sldtime --min 250 --max 5000 -l "Time (ms)" -v 1000 -i
+connect sldtime value f time
+
+create print p
+connect f out p in
+
+begin_gui_layout
+	layout_begin vbox
+		component b
+		component sldtime
+	layout_end
+end_gui_layout
diff --git a/sp/lib/virtual_switch.sps b/sp/lib/virtual_switch.sps
new file mode 100644
index 0000000..d10d065
--- /dev/null
+++ b/sp/lib/virtual_switch.sps
@@ -0,0 +1,134 @@
+#
+# virtual switch
+#
+# Input pins
+#	image (iplimage)
+#	roi (roi)
+#
+# Output pins
+#	roi (roi)
+# 	action_fired (bool)
+#
+
+type virtual_switch
+name "Virtual Switch"
+args -x -y -c
+
+# Camera source. Create a forwarder to export the pin ...
+create forward forwardin_image
+# and export it as "image"
+export_ipin forwardin_image in image iplimage
+
+# ROI input
+create forward forwardin_roi
+export_ipin forwardin_roi in roi roi
+
+# Camera panel ans its roi
+#create roi_storage roi -s 0.05 0.05 -c 0.25 0.5 --color 16711680
+create roi_storage roi -s 0.05 0.05 -c $-x$ $-y$ --color $-c$
+export_opin roi roi
+
+# Connect external viewer
+connect forwardin_roi out roi roi_same_id
+
+#connect roi roi viewer roi
+#connect forward out viewer image
+
+# Optical flow tracker and its roi
+create optical_flow_tracker oftracker
+connect roi roi oftracker roi
+connect forwardin_image out oftracker image
+
+#
+# Optical flow output processing
+#
+
+# Split output for each axis
+create split split -o 2
+connect oftracker motion split input
+
+# Compute motion modulus
+create fmul mul_a
+create fmul mul_b
+
+connect split 1 mul_a b
+connect split 1 mul_a a
+
+connect split 2 mul_b b
+connect split 2 mul_b a
+
+create fadd modulus_adder
+
+connect mul_a result modulus_adder b
+connect mul_b result modulus_adder a
+
+create fsqrt modulus
+connect modulus_adder result modulus a
+
+# DEBUG SLIDER
+create widget_slider sldmotion_detected --min 0 --max 1 -l "Motion detected"
+connect modulus result sldmotion_detected value
+# DEBUG SLIDER
+
+
+
+#
+# Threshold slider + checkbox
+#
+import around_zero_threshold.sps
+create around_zero_threshold thres -lsld _"Motion detection threshold" -lchk _"Motion detected" -max 0.3 -v 0.01
+connect modulus result thres in
+
+#
+# Filter events by time
+#
+import filter_values_by_time.sps
+create filter_values_by_time filter -t 1000
+connect thres above filter in
+create widget_slider sldtime --min 250 --max 5000 -l "Time (ms)" -v 1000 -i
+connect sldtime value filter time
+
+
+
+#
+# Button to set noise level
+#
+
+create widget_button setthres_btn -l "Set threshold"
+create forward noise_gate
+connect setthres_btn pressed noise_gate gate
+connect modulus result noise_gate in
+
+# Condition value: average + scale
+create freductor avg_motion -a -r 5
+connect noise_gate out avg_motion in
+create fmul scale_motion -v 10
+connect avg_motion out scale_motion a
+
+connect scale_motion result thres thres
+
+create bcast bcast_motion
+connect scale_motion result bcast_motion in
+create not not_motion
+connect bcast_motion out not_motion a
+connect not_motion result noise_gate gate
+
+#
+# Time wait after 
+
+# 
+# Action fired
+
+export_opin filter out action_fired
+
+begin_gui_layout
+	layout_begin vbox
+		component setthres_btn
+		component sldtime
+		
+		layout_begin collapsible _"Advanced"
+			component sldmotion_detected
+			component thres
+		layout_end
+	layout_end
+end_gui_layout
diff --git a/sp/switch_viacam.sp b/sp/switch_viacam.sp
new file mode 100644
index 0000000..8c9ea02
--- /dev/null
+++ b/sp/switch_viacam.sp
@@ -0,0 +1,63 @@
+#
+# switch viacam
+#
+# Input pins
+#	image (iplimage)
+#
+# Output pins
+# 	motion (float)
+#
+
+type switch_viacam
+name "Switch Viacam"
+
+# Camera source. 
+create camera_grabber grabber
+
+# Camera panel 
+create camera_viewer viewer
+connect grabber image viewer image
+
+# Virtual switch logic
+import lib/virtual_switch.sps
+
+create virtual_switch vs1 -x 0.15 -y 0.2 -c 16711680
+connect vs1 roi viewer roi
+connect viewer roi vs1 roi
+connect grabber image vs1 image
+
+create virtual_switch vs2 -x 0.85 -y 0.2 -c 19711680
+connect vs2 roi viewer roi
+connect viewer roi vs2 roi
+connect grabber image vs2 image
+
+# 
+# Mouse output
+#
+
+create print p
+connect vs1 action_fired p in
+connect vs2 action_fired p in
+
+create mouse_output mouse
+connect vs1 action_fired mouse right_click
+connect vs2 action_fired mouse left_click
+
+#
+# Click sound
+#
+create wav_player player -p \"$SP_DATA_DIR$/audio/click.wav\"
+connect vs1 action_fired player play
+connect vs2 action_fired player play
+
+begin_gui_layout
+	layout_begin hbox
+		component viewer
+		layout_begin vbox "Right click"
+			component vs1 
+		layout_end
+		layout_begin vbox "Left click"
+			component vs2 
+		layout_end
+	layout_end
+end_gui_layout
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b5d4d8b..50b9845 100755
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,3 +18,6 @@ add_subdirectory(mod_widgets)
 add_subdirectory(mod_score_player)
 add_subdirectory(mod_puredata)
 add_subdirectory(mod_io)
+add_subdirectory(mod_hid)
+add_subdirectory(mod_audio)
+add_subdirectory(mod_ipl_sdl)
diff --git a/src/creavision/CMakeLists.txt b/src/creavision/CMakeLists.txt
index 5380bca..dec8dd1 100755
--- a/src/creavision/CMakeLists.txt
+++ b/src/creavision/CMakeLists.txt
@@ -74,7 +74,7 @@ add_library (creavision STATIC ${creavision_SRCS})
 TARGET_LINK_LIBRARIES(creavision ${OpenCV_LIBS} )
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-	TARGET_LINK_LIBRARIES(creavision libwebcam)
+	TARGET_LINK_LIBRARIES(creavision libwebcam v4l2)
 ELSEIF(WIN32)
 	TARGET_LINK_LIBRARIES(creavision ole32.lib strmiids.lib uuid.lib dxguid.lib)
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
diff --git a/src/creavision/Makefile.am b/src/creavision/Makefile.am
index 7ad98fb..02cdbf1 100755
--- a/src/creavision/Makefile.am
+++ b/src/creavision/Makefile.am
@@ -6,7 +6,7 @@ noinst_HEADERS = crvimage.h crvskindetection.h crvcamera.h \
 dist_noinst_DATA = crvcamera_wdm.cpp videoInput.cpp \
 	CreaVision_eviacam.vcproj crvcamera_wdm.h videoInput.h
 
-libcreavision_la_LIBADD = $(OPENCV_LIBS) 
+libcreavision_la_LIBADD = $(OPENCV_LIBS) -lv4l2
 
 noinst_LTLIBRARIES = libcreavision.la
 
diff --git a/src/creavision/crvcamera_v4l2.cpp b/src/creavision/crvcamera_v4l2.cpp
old mode 100755
new mode 100644
index b6906d2..0d715c6
--- a/src/creavision/crvcamera_v4l2.cpp
+++ b/src/creavision/crvcamera_v4l2.cpp
@@ -4,7 +4,7 @@
 // Author:      Cesar Mauri Loba (cesar at crea-si dot com)
 // Modified by: 
 // Created:     17/05/2010
-// Copyright:   (C) 2008-10 Cesar Mauri Loba - CREA Software Systems
+// Copyright:   (C) 2008-11 Cesar Mauri Loba - CREA Software Systems
 //              Portions of guvcview are (c) of Paulo Assis and others
 //
 //  This program is free software: you can redistribute it and/or modify
@@ -30,6 +30,7 @@
 #include <limits.h>
 //#include <linux/videodev.h>
 #include "incvideodev.h"
+#include <libv4l2.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/time.h>
@@ -209,18 +210,7 @@ bool CCameraV4L2::DoOpen ()
 		Close();
 		return false;
 	}
-	/*
-	// Result image	
-	// TODO: correct the V4L2_PIX_FMT_YUV420 conversion routine
-	const char* planeOrder;
-	if (m_currentFormat.pixelformat== V4L2_PIX_FMT_YUV420) planeOrder= "BGR";
-	else planeOrder= "RGB";
-	// TODO: make sure that image is not initialized with padded rows
-	if (!m_resultImage.Create (m_currentFormat.width, m_currentFormat.height, IPL_DEPTH_8U, planeOrder, IPL_ORIGIN_TL, IPL_ALIGN_DWORD )) {
-		fprintf (stderr, "Cannot create result image\n");		
-		Close();
-		return false;
-	}*/
+	
 	if (!EnableVideo(true)) {
 		fprintf (stderr, "Unable to enable video\n");
 		DeallocateBuffers();
@@ -230,7 +220,7 @@ bool CCameraV4L2::DoOpen ()
 	
 	// TODO: Awful. This is a provisional solution to avoid broken frames while capturing.
 	// It seems as if the driver/camera needs some time before start grabbing.
-	sleep (1);
+	usleep (2000000);
 	return true;
 }
 
@@ -297,7 +287,7 @@ int xioctl(int fd, int IOCTL_X, void *arg)
 	int ret = 0;
 	int tries= IOCTL_RETRY;
 	do {
-		ret = ioctl(fd, IOCTL_X, arg);
+		ret = v4l2_ioctl(fd, IOCTL_X, arg);
 	} 
 	while (ret && tries-- && ((errno == EINTR) || (errno == EAGAIN) || (errno == ETIMEDOUT)));
 
@@ -358,7 +348,7 @@ bool CCameraV4L2::PopulateCameraControls ()
 
 unsigned int CCameraV4L2::GetCameraControlsCount()
 {
-	return m_cameraControls.size();
+	return static_cast<unsigned int>(m_cameraControls.size());
 }
 
 CCameraControl* CCameraV4L2::GetCameraControl(unsigned int numControl)
@@ -376,7 +366,6 @@ bool CCameraV4L2::RequestBuffers(enum v4l2_memory mem)
 	requestbuffers.count= STREAMING_CAPTURE_NBUFFERS;
 	requestbuffers.type= V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	requestbuffers.memory= mem; //V4L2_MEMORY_MMAP;
-	//if (ioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOC_REQBUFS, &requestbuffers)== 0) {
 	if (xioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOC_REQBUFS, &requestbuffers)== 0) {
 		if (requestbuffers.count== STREAMING_CAPTURE_NBUFFERS) return true;
 		if (requestbuffers.count> 0) UnRequestBuffers(mem);		
@@ -394,29 +383,24 @@ bool CCameraV4L2::UnRequestBuffers(enum v4l2_memory mem)
 	requestbuffers.count= 0;
 	requestbuffers.type= V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	requestbuffers.memory= mem; //V4L2_MEMORY_MMAP;
-	//if (ioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOC_REQBUFS, &requestbuffers)== 0) return true;
 	if (xioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOC_REQBUFS, &requestbuffers)== 0) return true;
+	fprintf (stderr, "ERROR: UnRequestBuffers: failed\n");
 	return false;
 }
 	
-// This method must be AFTER desired format is set	
+// This method must be called AFTER desired format is set	
 CCameraV4L2::ECaptureMethod CCameraV4L2::DetectCaptureMethod()
 {
 	struct v4l2_capability capability;	
 
 	// Query basic capabilities. This never should fail
 	if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_QUERYCAP, &capability)!= 0) {
-	//if (ioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_QUERYCAP, &capability)!= 0) {
-#if !defined(NDEBUG)
-		fprintf (stderr, "ERROR: Cannot query camera capabilities: VIDIOC_QUERYCAP ioctl failed\n");
-#endif
+		fprintf (stderr, "WARNING: Cannot query camera capabilities: VIDIOC_QUERYCAP ioctl failed\n");
 		return CAP_NONE;
 	}
 
 	if (!(capability.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
-#if !defined(NDEBUG)
-	    fprintf (stderr, "ERROR: is no video capture device\n");
-#endif
+	    fprintf (stderr, "WARNING: is no video capture device\n");
 	    return CAP_NONE;
 	}
 
@@ -519,7 +503,7 @@ static void SelectBestFramePixelNumber (unsigned int npixels, std::list<TImageFo
 {
 	if (npixels> 0) {
 		unsigned int bestdiff= UINT_MAX;
-		//unsigned int npixels= imgformat.width * imgformat.height;
+
 		// Find closest frame ratio	
 		for (std::list<TImageFormatEx>::iterator i= availableFormats.begin(); i!= availableFormats.end(); ++i) {
 			unsigned int diff= abs_distance_to_range<uint> (i->min_width * i->min_height, i->max_width * i->max_height, npixels);
@@ -553,6 +537,7 @@ bool CCameraV4L2::DetectBestImageFormat()
 	
 	unsigned int sformats, ssizes, sintervals;
 	unsigned int cformats, csizes, cintervals;
+	
 	// Request needed buffer to store formats
 	sformats= cformats= 0;	
 	if (c_enum_pixel_formats (m_libWebcamHandle, NULL, &sformats, &cformats)!= C_BUFFER_TOO_SMALL) return false;
@@ -717,6 +702,10 @@ bool CCameraV4L2::DetectBestImageFormat()
 				m_currentFormat.frame_rate= range_value_fit (i->min_frame_rate, i->max_frame_rate, i->step_frame_rate, m_currentFormat.frame_rate);
 				m_currentFormat.width= range_value_fit (i->min_width, i->max_width, i->step_width, m_currentFormat.width);
 				m_currentFormat.height= range_value_fit (i->min_height, i->max_height, i->step_height, m_currentFormat.height);
+			#if !defined(NDEBUG)
+				std::cout << "Choosen format:";
+				dump_TImageFormatEx (*i);
+			#endif
 				return true;
 			}
 		}
@@ -731,11 +720,13 @@ bool CCameraV4L2::SetImageFormat()
 {
 	struct v4l2_format format;
 	
-	//Set frame format
+	//
+	// Set frame format, including width, height and pixelformat. First query current
+	// settings, then modify relevant values and finally query actual values
+	//
 	memset (&format, 0, sizeof (format));
 	format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_G_FMT, &format)== -1) {
-	//if (ioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_G_FMT, &format)== -1) {
 		fprintf(stderr, "ERROR: Unable to get format.\n");
 		return false;	
 	}
@@ -747,7 +738,6 @@ bool CCameraV4L2::SetImageFormat()
 	format.fmt.pix.field = V4L2_FIELD_ANY;
 
 	if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_FMT, &format)== -1) {
-	//if (ioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_FMT, &format)== -1) {
 		fprintf(stderr, "ERROR: Unable to set format.\n");
 		return false;	
 	}
@@ -758,17 +748,22 @@ bool CCameraV4L2::SetImageFormat()
 	m_currentFormat.height= format.fmt.pix.height;
 	m_currentFormat.pixelformat= format.fmt.pix.pixelformat;	
 
-	// Set framerate	
+	//	
+	// Set framerate and other camera parameters.
+	// 
+	// We here try to cope with two common drivers: pwc and uvc. Unfortunately pwc driver versions above
+	// 10.0.12 removed support for many ioctls (including that to set the framerate VIDIOCSWIN).
+	// As of kernel version 3.0.0 (which ships pwc 10.0.14) this issue has not been fixed and the odds are
+	// it won't be as the hardware has been discontinued :-(
+	//
 	if (strcasestr(g_deviceDriverNames[m_Id], "pwc")!= NULL)  {
-		// Using a PWC based camera
+		// Using a PWC based camera.
 		bool properlySet= false;
 		struct video_window vwin;		
 		if ((xioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOCGWIN, &vwin) == 0) && (vwin.flags & PWC_FPS_FRMASK)) {
-		//if ((ioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOCGWIN, &vwin) == 0) && (vwin.flags & PWC_FPS_FRMASK)) {
 			vwin.flags &= ~PWC_FPS_FRMASK;
 			vwin.flags |= (m_currentFormat.frame_rate << PWC_FPS_SHIFT);
 			if (xioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOCSWIN, &vwin) == 0) properlySet= true;
-			//if (ioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOCSWIN, &vwin) == 0) properlySet= true;
 		}
 
 		if (!properlySet) fprintf (stderr, "Warning: cannot set FPS: %d for PWC camera\n", m_currentFormat.frame_rate);
@@ -782,18 +777,15 @@ bool CCameraV4L2::SetImageFormat()
 	
 		// Firstly try to get current v4l2_streamparm parameters
 		if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_G_PARM, &parm)== 0) {
-		//if (ioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_G_PARM, &parm)== 0) {
 			parm.parm.capture.timeperframe.numerator = 1;
 			parm.parm.capture.timeperframe.denominator = m_currentFormat.frame_rate;
 			if (xioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_PARM, &parm)!= 0) {
-			//if (ioctl(c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_PARM, &parm)!= 0) {
 				// Show warning and continue
 				fprintf (stderr, "Warning: cannot set FPS: %d for UVC camera\n", m_currentFormat.frame_rate);
 			}
 			
 			// Read values again and store actual values
 			if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_G_PARM, &parm)== 0) {
-			//if (ioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_G_PARM, &parm)== 0) {
 				// Set failed, store read values
 				m_currentFormat.frame_rate= 0;
 				if (parm.parm.capture.timeperframe.denominator)
@@ -807,13 +799,133 @@ bool CCameraV4L2::SetImageFormat()
 			return false;
 		}
 	
-		// Try to set exposure control to match desired frame ratio
+		//
+		// Control V4L2_CID_EXPOSURE_AUTO is key to get a constant capture rate & good
+		// lightning conditions. In order of preference, the value of this control should be:
+		//
+		//   - V4L2_EXPOSURE_APERTURE_PRIORITY: Auto exposure time, manual iris. In practice, 
+		//     when (V4L2_CID_EXPOSURE_AUTO_PRIORITY== false) and the frame rate is previously 
+		//     set via VIDIOC_S_PARM, provides a constant frame rate at top speed and changes 
+		//     exposure time and gain automatically according to the lightning conditions.
+		//     Tested with the Logitech Webcam 9000 (046d:0990). It seems that uvcvideo drivers 
+		//     for newer kernels (3.0 and above) set V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_MANUAL 
+		//     by default instead of V4L2_EXPOSURE_SHUTTER_PRIORITY (at least for this camera model)
+		//     which came as default option for older kernels.
+		//
+		//   - V4L2_EXPOSURE_SHUTTER_PRIORITY: ??? (not tested)
+		//
+		//   - V4L2_EXPOSURE_MANUAL: Manual exposure time, manual iris. Provides maximum flexibility
+		//     and allows for constant frame but i) does not cope well variable lightnint conditions
+		//     (forces user to manually adjust settings when needed) ii) it seems that default gain 
+		//     and exposure values are undefined and thus they need to be set to reasonable 
+		//     defaults and also suggest that camera controls should be permanently stored.
+		//
+		//   - V4L2_EXPOSURE_AUTO: Automatic exposure time, automatic iris aperture. Automatically 
+		//     reduces the frame rate depending on the lightning conditions and thus should be avoided.
+		//
+		// TODO: now uses the V4L2 api directly instead of libwebcam as some controls are not available
+		// any more.
+		// TODO: store control settings permanently
+		//
+		
+	
+		struct v4l2_control control;
+		memset (&control, 0, sizeof (control));
+
+		/*
+		control.id= V4L2_CID_EXPOSURE_AUTO;
+		control.value= -1;
+		if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_G_CTRL, &control))
+			fprintf (stderr, "Warning: cannot get V4L2_CID_EXPOSURE_AUTO\n");
+		else {
+			fprintf (stderr, "Info: V4L2_CID_EXPOSURE_AUTO= %d\n", control.value);
+		}
+		
+
+		for (int i= 0; i<= 16; ++i) {
+			control.id= V4L2_CID_EXPOSURE_AUTO;
+			control.value= i;
+			if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_CTRL, &control))
+				fprintf (stderr, "Warning: cannot set V4L2_CID_EXPOSURE_AUTO to %d\n", i);
+			else
+				fprintf (stderr, "Info: set V4L2_CID_EXPOSURE_AUTO to %d\n", i);
+		}
+		*/
+
+		//
+		// First set manual mode with reasonable exposure and gain values.
+		//
+		control.id= V4L2_CID_EXPOSURE_AUTO;
+		control.value= V4L2_EXPOSURE_MANUAL;
+		if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_CTRL, &control))
+			fprintf (stderr, "Warning: cannot set V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_MANUAL\n");
+		else
+			fprintf (stderr, "Info: set V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_MANUAL\n");
+			
+		// Exposure time to match requested FPS
+		control.id= V4L2_CID_EXPOSURE_ABSOLUTE;
+		control.value= 10000 / m_currentFormat.frame_rate;
+		if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_CTRL, &control))
+			fprintf (stderr, "Warning: cannot set V4L2_CID_EXPOSURE_ABSOLUTE to %d\n", control.value);
+		else
+			fprintf (stderr, "Info: set V4L2_CID_EXPOSURE_ABSOLUTE to %d\n", control.value);
+		
+		// Sets gain to the maximum value
+		for (unsigned int i= 0; i< m_cameraControls.size(); ++i) {
+			if (m_cameraControls[i].GetId()== CCameraControl::CAM_GAIN) {
+				if (m_cameraControls[i].SetValue(m_cameraControls[i].GetMaximumValue()))
+					fprintf (stderr, "Info: set CAM_GAIN to %d\n", 
+						m_cameraControls[i].GetMaximumValue());
+				else
+					fprintf (stderr, "Warning: cannot set CAM_GAIN to %d\n", 
+						m_cameraControls[i].GetMaximumValue());
+				break;
+			}
+		}
+			
+		// Tries to set automatic gain
+		control.id= V4L2_CID_AUTOGAIN;
+		control.value= 1;
+		if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_CTRL, &control))
+			fprintf (stderr, "Warning: cannot set V4L2_CID_AUTOGAIN\n");
+		else
+			fprintf (stderr, "Info: set V4L2_CID_AUTOGAIN\n");
+
+		// Set V4L2_CID_EXPOSURE_AUTO_PRIORITY to false
+		bool hasExposureAutoPriority= false;
 		for (unsigned int i= 0; i< m_cameraControls.size(); ++i) {
 			if (m_cameraControls[i].GetId()== CCameraControl::CAM_AUTO_EXPOSURE_PRIORITY) {
-				m_cameraControls[i].SetValue(0);
+				if (m_cameraControls[i].SetValue(0)) {
+					hasExposureAutoPriority= true;
+					fprintf (stderr, "Info: AUTO_EXPOSURE_PRIORITY disabled\n");
+				}
+				else
+					fprintf (stderr, "Warning: cannot disable AUTO_EXPOSURE_PRIORITY\n");
 				break;
 			}
-		}			
+		}
+
+		// If EXPOSURE_AUTO_PRIORITY cannot be disabled does not attempt remaing settings 
+		if (!hasExposureAutoPriority) return true;	
+	
+		//
+		// Secondly tries to set V4L2_EXPOSURE_SHUTTER_PRIORITY mode
+		//
+		control.id= V4L2_CID_EXPOSURE_AUTO;
+		control.value= V4L2_EXPOSURE_SHUTTER_PRIORITY;
+		if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_CTRL, &control))
+			fprintf (stderr, "Warning: cannot set V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_SHUTTER_PRIORITY\n");
+		else
+			fprintf (stderr, "Info: set V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_SHUTTER_PRIORITY\n");
+
+
+		// Finally tries to set V4L2_EXPOSURE_APERTURE_PRIORITY
+		control.id= V4L2_CID_EXPOSURE_AUTO;
+		control.value= V4L2_EXPOSURE_APERTURE_PRIORITY;
+		if (xioctl (c_get_file_descriptor (m_libWebcamHandle), VIDIOC_S_CTRL, &control))
+			fprintf (stderr, "Warning: cannot set V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_APERTURE_PRIORITY\n");
+		else
+			fprintf (stderr, "Info: set V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_APERTURE_PRIORITY\n");
 	}
 	return true;
 }
@@ -842,12 +954,16 @@ bool CCameraV4L2::EnableVideo(bool enable)
 	    {
 		int type= V4L2_BUF_TYPE_VIDEO_CAPTURE;
 		int action= (enable? VIDIOC_STREAMON : VIDIOC_STREAMOFF);
-		if (xioctl(c_get_file_descriptor (m_libWebcamHandle), action, &type)!= 0) return false;
+		if (xioctl(c_get_file_descriptor (m_libWebcamHandle), action, &type)!= 0) {
+			perror("VIDIOC_STREAMON - Unable to start capture");
+			return false;
+		}
 		break;
 	    }	
 	case CAP_STREAMING_USR:
 		// Not implemented
-		fprintf (stderr, "CAP_STREAMING_USR: feature not implemented\n");	
+		fprintf (stderr, "CAP_STREAMING_USR: feature not implemented\n");
+		assert (false);
 		return false;
 	default:
 		// Never should happen
@@ -1209,7 +1325,8 @@ bool CCameraV4L2::DoQueryFrame(CIplImage& image)
 	else if ((retval > 0) && (FD_ISSET(c_get_file_descriptor (m_libWebcamHandle), &rdset))) {
 		switch (m_captureMethod) {
 		case CAP_READ:
-			// TODO
+			fprintf (stderr, "CAP_READ Capture method not implemented yet\n");
+			assert (false);
 			return false;	
 		case CAP_STREAMING_MMAP: {
 			struct v4l2_buffer buffer;
@@ -1251,10 +1368,10 @@ bool CCameraV4L2::DoQueryFrame(CIplImage& image)
 				return false;
 			}
 			return (!allocFailed);
-			//break;
 		}
 		case CAP_STREAMING_USR:
-			fprintf (stderr, "Capture method not implemented yet\n");
+			fprintf (stderr, "CAP_STREAMING_USR Capture method not implemented yet\n");
+			assert (false);
 			return false;			
 		default:
 			assert (false);
@@ -1346,7 +1463,7 @@ bool CCameraControlV4L2::SetValue(int value)
 	cvalue.value= value;
 	
 	if (c_set_control (m_handle, m_id, &cvalue)!= C_SUCCESS) {
-		fprintf (stderr, "CCameraControlV4L2::GetValue() failed to query value\n");
+		fprintf (stderr, "CCameraControlV4L2::SetValue() failed to set value\n");
 		return false;
 	}
 	return true;
@@ -1443,7 +1560,8 @@ static
 void print_device_info (CHandle handle, char *device_name)
 {
 	assert(handle || device_name);
-	unsigned int size = sizeof(CDevice) + (device_name ? strlen(device_name) : 32) + 84;
+	unsigned int size = static_cast<unsigned int>(sizeof(CDevice)) + 
+		(device_name? static_cast<unsigned int>(strlen(device_name)): 32) + 84;
 	CDevice *info = (CDevice *)malloc(size);
 	assert(info);
 
@@ -1614,8 +1732,6 @@ int CCameraV4L2::GetNumDevices()
 				printf("  Closed device '%s' (handle = %d)\n\n", device->shortName, handle);
 	#endif	// NDEBUG
 			}
-
-					
 		}
 		else {
 			// No devices found
diff --git a/src/creavision/crvimage.cpp b/src/creavision/crvimage.cpp
index 3a88bc0..5a3e577 100755
--- a/src/creavision/crvimage.cpp
+++ b/src/creavision/crvimage.cpp
@@ -236,8 +236,14 @@ bool CIplImage::SetROI (int x, int y, int width,
 	assert (x>= 0 && y>= 0 && width> 0 && height> 0);
 	
 	// Check limits for the ROI
-	if (x< 0 || (x + width > m_pIplImage->width)) return false;
-	if (y< 0 || (y + height > m_pIplImage->height)) return false;
+	if (x< 0 || (x + width > m_pIplImage->width)) {
+		assert (false);
+		return false;
+	}
+	if (y< 0 || (y + height > m_pIplImage->height)) {
+		assert (false);
+		return false;
+	}
 
 	// ROI Ok
 	m_roiStack[m_roiStackPtr].coi= coi;
diff --git a/src/creavision/crvnormroi.cpp b/src/creavision/crvnormroi.cpp
index 26f31d4..377bb73 100755
--- a/src/creavision/crvnormroi.cpp
+++ b/src/creavision/crvnormroi.cpp
@@ -4,7 +4,7 @@
 // Author:      Cesar Mauri Loba (cesar at crea-si dot com)
 // Modified by: 
 // Created:     30/05/2008
-// Copyright:   (C) 2008 Cesar Mauri Loba - CREA Software Systems
+// Copyright:   (C) 2008-11 Cesar Mauri Loba - CREA Software Systems
 // 
 //  This program is free software: you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
@@ -18,465 +18,539 @@
 //
 //  You should have received a copy of the GNU General Public License
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
-#include "crvnormroi.h"
-
-// Area limits
-#define MAX_X_Y				(float) 1.0f 
-//0.99305555555555555555555555555556
-#define MIN_WIDTH_HEIGHT	(float) 0.041666666666666666666666666666667		// 6 píxels over 144
-#define MAX_WIDTH_HEIGHT	(float) 1.0f 
-//0.98611111111111111111111111111111		// 1 píxel border over 144
-
-CNormROI::CNormROI(void)
-{
-	m_x= 0.0;
-	m_y= 0.0;
-	m_width= MIN_WIDTH_HEIGHT;
-	m_height= MIN_WIDTH_HEIGHT;	
-	m_rotation= 0.0;
-	m_pParentROI= NULL;
-	SetCenter (0.5f, 0.5f);
-}
-
-CNormROI::CNormROI(float width, float height, float x, float y)
-{
-	m_x= 0.0;
-	m_y= 0.0;
-	m_width= MIN_WIDTH_HEIGHT;
-	m_height= MIN_WIDTH_HEIGHT;	
-	m_rotation= 0.0;
-	m_pParentROI= NULL;
-
-	SetSize (width, height);
-	if (x!= -1.0f && y!= -1.0f)	SetCenter (x, y);
-	else SetCenter (0.5f, 0.5f);
-}
-
-void CNormROI::Destroy()
-{
-	// Detach itself from parent
-	if (m_pParentROI) {
-		bool check= m_pParentROI->UnregisterChildROI (this);
-		assert (check);
-		assert (m_pParentROI== NULL);
-	}
-
-	TNormROIListIterator i;
-
-	i= m_childROIs.begin();
-
-	while (i!= m_childROIs.end())
-	{
-		delete (*i);
-		//i= m_childROIs.erase (i);
-		i= m_childROIs.begin();
-	}
-	
-	assert (m_childROIs.empty());
-}
-
-// delete registered childs
-CNormROI::~CNormROI(void)
-{
-	Destroy();
-}
-
-//
-// Working with native coordinates
-//
-
-// Find minimum child's P1 coordinates
-void CNormROI::FindMinChildP1 (float& x, float& y)
-{
-	TNormROIListIterator i;
-
-	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
-	{
-		(*i)->FindMinChildP1Rec (x, y);
-	}
-}
-
-void CNormROI::FindMinChildP1Rec (float& x, float& y)
-{
-	TNormROIListIterator i;
-
-	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
-	{
-		(*i)->FindMinChildP1Rec (x, y);
-	}
-
-	if (x> m_x) x= m_x;
-	if (y> m_y) y= m_y;
-}
-
-// Find miaximum child's P2 coordinates
-void CNormROI::FindMaxChildP2 (float& x, float& y)
-{
-	TNormROIListIterator i;
-
-	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
-	{
-		(*i)->FindMaxChildP2Rec (x, y);
-	}
-}
-
-void CNormROI::FindMaxChildP2Rec (float& x, float& y)
-{
-	TNormROIListIterator i;
-
-	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
-	{
-		(*i)->FindMaxChildP2Rec (x, y);
-	}
-
-	if (x< m_x + m_width) x= m_x + m_width;
-	if (y< m_y + m_height) y= m_y + m_height;
-}
-
-void CNormROI::SetP1Resize (const float x, const float y)
-{
-	float min_p1x, min_p1y, max_p1x, max_p1y;
-
-	CvPoint2D32f p2;
-
-	p2.x= m_x + m_width;
-	p2.y= m_y + m_height;
-
-	if (m_pParentROI)
-	{
-		min_p1x= m_pParentROI->m_x;
-		min_p1y= m_pParentROI->m_y;
-	}
-	else
-	{
-		 min_p1x= min_p1y= 0.0f;
-	}
-	max_p1x= p2.x - MIN_WIDTH_HEIGHT;
-	max_p1y= p2.y - MIN_WIDTH_HEIGHT;
-	FindMinChildP1 (max_p1x, max_p1y);
-	assert (max_p1x>= 0.0f);
-	assert (max_p1y>= 0.0f);
-
-	if (x< min_p1x) m_x= min_p1x;
-	else if (x> max_p1x) m_x= max_p1x;
-	else m_x= x;
-
-	if (y< min_p1y) m_y= min_p1y;
-	else if (y> max_p1y) m_y= max_p1y;
-	else m_y= y;
-
-	m_width= p2.x - m_x;
-	m_height= p2.y - m_y;
-}	
-		
-void CNormROI::SetP1Move (const float x, const float y)
-{
-	float min_p1x, min_p1y, max_p1x, max_p1y;
-
-	float min_p2x, min_p2y;
-
-	// Compute minimum valid p1 coordinates
-	if (m_pParentROI)
-	{
-		min_p1x= m_pParentROI->m_x;
-		min_p1y= m_pParentROI->m_y;
-	}
-	else
-	{
-		 min_p1x= min_p1y= 0.0f;
-	}
-	min_p2x= min_p1x + m_width;
-	min_p2y= min_p1y + m_height;
-	FindMaxChildP2 (min_p2x, min_p2y);
-	min_p1x= min_p2x - m_width;
-	min_p1y= min_p2y - m_height;
-	if (min_p1x< 0.0f) min_p1x= 0.0f;
-	if (min_p1y< 0.0f) min_p1y= 0.0f;
-
-	// Compute maximum valid p1 coordinates
-	if (m_pParentROI)
-	{
-		max_p1x= m_pParentROI->m_x + m_pParentROI->m_width - m_width;
-		max_p1y= m_pParentROI->m_y + m_pParentROI->m_height - m_height;
-	}
-	else
-	{
-		max_p1x= MAX_WIDTH_HEIGHT - m_width;
-		max_p1y= MAX_WIDTH_HEIGHT - m_height;
-	}
-	FindMinChildP1 (max_p1x, max_p1y);
-	assert (max_p1x>= 0.0f);
-	assert (max_p1y>= 0.0f);
-
-	// Apply restrictions
-	if (x< min_p1x) m_x= min_p1x;
-	else if (x> max_p1x) m_x= max_p1x;
-	else m_x= x;
-
-	if (y< min_p1y) m_y= min_p1y;
-	else if (y> max_p1y) m_y= max_p1y;
-	else m_y= y;	
-}
-
-void CNormROI::SetP2Resize (const float x, const float y)
-{
-	// Setting P2 always resize
-	float min_p2x, min_p2y, max_p2x, max_p2y;
-
-	min_p2x= m_x + MIN_WIDTH_HEIGHT;
-	min_p2y= m_y + MIN_WIDTH_HEIGHT;
-	assert (min_p2x<= MAX_WIDTH_HEIGHT);
-	assert (min_p2y<= MAX_WIDTH_HEIGHT);
-	FindMaxChildP2 (min_p2x, min_p2y);
-
-	if (m_pParentROI)
-	{
-		max_p2x= m_pParentROI->m_x + m_pParentROI->m_width;
-		max_p2y= m_pParentROI->m_y + m_pParentROI->m_height;
-	}
-	else
-	{
-		max_p2x= max_p2y= MAX_WIDTH_HEIGHT;
-	}
-
-	if (x< min_p2x) m_width= min_p2x - m_x;
-	else if (x> max_p2x) m_width= max_p2x - m_x;
-	else m_width= x - m_x;
-
-	if (y< min_p2y) m_height= min_p2y - m_y;
-	else if (y> max_p2y) m_height= max_p2y - m_y;
-	else m_height= y - m_y;	
-}
-
-void CNormROI::SetCenter (const float x, const float y)
-{
-	SetP1Move (x - (m_width / 2.0f), y - (m_height / 2.0f));
-}
-
-void CNormROI::GetCenter (float& x, float& y)
-{
-	x= m_x + (m_width / 2.0f);
-	y= m_y + (m_height / 2.0f);
-}
-
-void CNormROI::SetSize (const float width, const float height)
-{
-	SetP2Resize (width + m_x, height + m_y);
-}
-
-void CNormROI::GetSize (float& width, float& height)
-{
-	width= m_width;
-	height= m_height;
-}
-
-//
-// Working with generic integer coordinates
-//
-inline void CNormROI::Integer2Normalized (const CvSize& size, const int ix, const int iy, float &nx, float &ny)
-{
-	assert (size.width> 0);
-	assert (size.height> 0);
-	
-	nx= (float) ix / (float) size.width;
-	ny= (float) iy / (float) size.height;
-}
-
-inline void CNormROI::Normalized2Integer (const CvSize& size, const float nx, const float ny, int &ix, int &iy)
-{
-	assert (size.width> 0);
-	assert (size.height> 0);
-
-	ix= (int) (nx * (float) size.width + 0.5f);
-	iy= (int) (ny * (float) size.height + 0.5f);
-}
-
-//inline 
-void CNormROI::SetP1ResizeInteger (const CvSize& size, const int x, const int y)
-{
-	float new_x, new_y;
-
-	Integer2Normalized (size, x, y, new_x, new_y);
-
-	SetP1Resize (new_x, new_y);
-}
-
-//inline 
-void CNormROI::SetP1MoveInteger (const CvSize& size, const int x, const int y)
-{
-	float new_x, new_y;
-
-	Integer2Normalized (size, x, y, new_x, new_y);
-
-	SetP1Move (new_x, new_y);
-}
-
-//inline 
-void CNormROI::SetP2ResizeInteger (const CvSize& size, const int x, const int y)
-{
-	float new_x, new_y;
-
-	Integer2Normalized (size, x, y, new_x, new_y);
-
-	SetP2Resize (new_x, new_y);
-}
-
-//inline 
-void CNormROI::SetCenterInteger (const CvSize& size, const int x, const int y)
-{
-	float new_x, new_y;
-
-	Integer2Normalized (size, x, y, new_x, new_y);
-
-	SetCenter (new_x, new_y);
-}
-
-void CNormROI::GetCenterInteger (const CvSize& size, int& x, int& y)
-{
-	float fx, fy;
-
-	GetCenter (fx, fy);
-
-	Normalized2Integer (size, fx, fy, x, y);	
-}
-
-//inline 
-void CNormROI::SetSizeInteger (const CvSize& size, const int width, const int height)
-{
-	float new_width, new_height;
-
-	Integer2Normalized (size, width, height, new_width, new_height);
-
-	SetSize (new_width, new_height);
-}
-
-//inline 
-void CNormROI::GetBoxInteger (const CvSize& size, int& x, int& y, int& width, int& height)
-{
-	Normalized2Integer (size, m_x, m_y, x, y);
-	Normalized2Integer (size, m_width, m_height, width, height);
-}
-
-void CNormROI::GetBoxInteger (const CvSize& size, CvRect& box)
-{
-	GetBoxInteger (size, box.x, box.y, box.width, box.height);
-}
-
-void CNormROI::GetP1P2Integer (const CvSize& size, CvPoint& p1, CvPoint& p2)
-{
-	Normalized2Integer (size, m_x, m_y, p1.x, p1.y);
-	Normalized2Integer (size, m_x + m_width, m_y + m_height, p2.x, p2.y);
-}
-
-//
-// Facilities to work with CIplImage images
-//
-void CNormROI::SetP1ResizeImg (const CIplImage *pImg, const int x, const int y)
-{
-	assert (pImg);
-	assert (pImg->Origin()== IPL_ORIGIN_TL);
-
-	SetP1ResizeInteger (pImg->GetSize(), x, y);
-}
-
-void CNormROI::SetP1MoveImg (const CIplImage *pImg, const int x, const int y)
-{
-	assert (pImg);
-	assert (pImg->Origin()== IPL_ORIGIN_TL);
-
-	SetP1MoveInteger (pImg->GetSize(), x, y);
-}
-
-void CNormROI::SetP2ResizeImg (const CIplImage *pImg, const int x, const int y)
-{
-	assert (pImg);
-	assert (pImg->Origin()== IPL_ORIGIN_TL);
-
-	SetP2ResizeInteger (pImg->GetSize(), x, y);	
-}
-
-void CNormROI::SetCenterImg (const CIplImage *pImg, const int x, const int y)
-{
-	assert (pImg);
-	assert (pImg->Origin()== IPL_ORIGIN_TL);
-	
-	SetCenterInteger (pImg->GetSize(), x, y);
-}
-
-void CNormROI::GetCenterImg (const CIplImage *pImg, int& x, int& y)
-{
-	assert (pImg);
-	assert (pImg->Origin()== IPL_ORIGIN_TL);
-
-	GetCenterInteger (pImg->GetSize(), x, y);	
-}
-
-void CNormROI::SetSizeImg (const CIplImage *pImg, const int width, const int height)
-{
-	assert (pImg);
-	assert (pImg->Origin()== IPL_ORIGIN_TL);
-
-	SetSizeInteger (pImg->GetSize(), width, height);
-}
-
-void CNormROI::GetBoxImg (const CIplImage *pImg, int& x, int& y, int& width, int& height)
-{
-	assert (pImg);
-	assert (pImg->Origin()== IPL_ORIGIN_TL);
-
-	GetBoxInteger (pImg->GetSize(), x, y, width, height);
-}
-
-void CNormROI::GetBoxImg (const CIplImage *pImg, CvRect& box)
-{
-	GetBoxImg (pImg, box.x, box.y, box.width, box.height);
-}
-
-//
-// Registration service
-//
-bool CNormROI::RegisterChildROI (CNormROI* pNormROI)
-{
-	assert (pNormROI);
-	assert (pNormROI!= this);
-		
-	TNormROIListIterator i;
-
-	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
-	{
-		if ((*i)== pNormROI) return false;	// Already registered
-	}
-
-	// Check that no registered with other parent
-	if (pNormROI->m_pParentROI) return false;
-
-	m_childROIs.push_back (pNormROI);
-	pNormROI->m_pParentROI= this;
-
-	// Ensures that child is inside parent
-	if (pNormROI->m_width> m_width) pNormROI->m_width= m_width;
-	if (pNormROI->m_height> m_height) pNormROI->m_height= m_height;
-	pNormROI->SetP1Move (pNormROI->m_x, pNormROI->m_y);	
-
-	return true;
-}
-
-bool CNormROI::UnregisterChildROI (CNormROI* pNormROI)
-{
-	assert (pNormROI);
-
-	TNormROIListIterator i;
-
-	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
-	{
-		if ((*i)== pNormROI) break;	// Found!
-	}
-	if (i== m_childROIs.end()) return false;	// Not found
-	
-	assert ((*i)->m_pParentROI);
-	(*i)->m_pParentROI= NULL;
-	m_childROIs.erase (i);
-
-	return true;
-}
+/////////////////////////////////////////////////////////////////////////////
+#include "crvnormroi.h"
+
+// Area limits
+#define MIN_WIDTH_HEIGHT	(float) 0.041666666666666666666666666666667		// 6 píxels over 144
+#define MAX_WIDTH_HEIGHT	1.0f
+
+CNormROI::CNormROI(void)
+{
+	m_x= 0.0;
+	m_y= 0.0;
+	m_width= MIN_WIDTH_HEIGHT;
+	m_height= MIN_WIDTH_HEIGHT;	
+	m_rotation= 0.0;
+	m_pParentROI= NULL;
+	SetCenter (0.5f, 0.5f);
+}
+
+CNormROI::CNormROI(float width, float height, float x, float y)
+{
+	m_x= 0.0;
+	m_y= 0.0;
+	m_width= MIN_WIDTH_HEIGHT;
+	m_height= MIN_WIDTH_HEIGHT;	
+	m_rotation= 0.0;
+	m_pParentROI= NULL;
+
+	SetSize (width, height);
+	if (x!= -1.0f && y!= -1.0f)	SetCenter (x, y);
+	else SetCenter (0.5f, 0.5f);
+}
+
+void CNormROI::Destroy()
+{
+	// Detach itself from parent
+	if (m_pParentROI) {
+		bool check= m_pParentROI->UnregisterChildROI (this);
+		((void)check);	// Remove warning
+		assert (check);
+		assert (m_pParentROI== NULL);
+	}
+
+	TNormROIListIterator i;
+
+	i= m_childROIs.begin();
+
+	while (i!= m_childROIs.end())
+	{
+		delete (*i);
+		//i= m_childROIs.erase (i);
+		i= m_childROIs.begin();
+	}
+	
+	assert (m_childROIs.empty());
+}
+
+// delete registered childs
+CNormROI::~CNormROI(void)
+{
+	Destroy();
+}
+
+//
+// Working with native coordinates
+//
+
+void CNormROI::CheckInvariant() {
+	assert (m_x>= 0.0f && m_x< MAX_WIDTH_HEIGHT);
+	assert (m_y>= 0.0f && m_y< MAX_WIDTH_HEIGHT);
+	assert (m_width>= MIN_WIDTH_HEIGHT && m_width<= MAX_WIDTH_HEIGHT);
+	assert (m_height>= MIN_WIDTH_HEIGHT && m_height<= MAX_WIDTH_HEIGHT);
+	assert (m_x + m_width<= MAX_WIDTH_HEIGHT);
+	assert (m_y + m_height<= MAX_WIDTH_HEIGHT);
+}
+
+// Trick to see a float as int. Only for little-endian machines.
+// TODO: seriously, change the internal implementation of this class!
+typedef union {
+	float f;
+	int i32;
+} FloatInt32;
+
+#define COMPILE_TIME_ASSERT(pred) switch(0){case 0:case pred:;}
+
+void CNormROI::FitInternalState() {
+	// Fix internal state to make sure class invariant is honoured.
+	// Invariant may have been violated by imprecisions on FP calculations
+	// TODO: replace FP arithmetic with integer arithmetic.
+	COMPILE_TIME_ASSERT(sizeof(FloatInt32)== sizeof(float));
+	COMPILE_TIME_ASSERT(sizeof(FloatInt32)== sizeof(int));
+
+	if (m_width< MIN_WIDTH_HEIGHT) m_width= MIN_WIDTH_HEIGHT;
+	if (m_x + m_width> MAX_WIDTH_HEIGHT) {
+		FloatInt32 f2i;
+		if (m_width> MIN_WIDTH_HEIGHT) {
+			f2i.f= m_width;
+			f2i.i32--;
+			m_width= f2i.f;
+		}
+		else {
+			f2i.f= m_x;
+			f2i.i32--;
+			m_x= f2i.f;
+		}
+	}
+
+	if (m_height< MIN_WIDTH_HEIGHT) m_height= MIN_WIDTH_HEIGHT;
+	if (m_y + m_height> MAX_WIDTH_HEIGHT) {
+		FloatInt32 f2i;
+		if (m_height> MIN_WIDTH_HEIGHT) {
+			f2i.f= m_height;
+			f2i.i32--;
+			m_height= f2i.f;
+		}
+		else {
+			f2i.f= m_y;
+			f2i.i32--;
+			m_y= f2i.f;
+		}
+	}
+}
+
+// Find minimum child's P1 coordinates
+void CNormROI::FindMinChildP1 (float& x, float& y)
+{
+	TNormROIListIterator i;
+
+	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
+	{
+		(*i)->FindMinChildP1Rec (x, y);
+	}
+}
+
+void CNormROI::FindMinChildP1Rec (float& x, float& y)
+{
+	TNormROIListIterator i;
+
+	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
+	{
+		(*i)->FindMinChildP1Rec (x, y);
+	}
+
+	if (x> m_x) x= m_x;
+	if (y> m_y) y= m_y;
+}
+
+// Find miaximum child's P2 coordinates
+void CNormROI::FindMaxChildP2 (float& x, float& y)
+{
+	TNormROIListIterator i;
+
+	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
+	{
+		(*i)->FindMaxChildP2Rec (x, y);
+	}
+}
+
+void CNormROI::FindMaxChildP2Rec (float& x, float& y)
+{
+	TNormROIListIterator i;
+
+	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
+	{
+		(*i)->FindMaxChildP2Rec (x, y);
+	}
+
+	if (x< m_x + m_width) x= m_x + m_width;
+	if (y< m_y + m_height) y= m_y + m_height;
+}
+
+void CNormROI::SetP1Resize (const float x, const float y)
+{
+	float min_p1x, min_p1y, max_p1x, max_p1y;
+
+	CvPoint2D32f p2_lim;
+
+	p2_lim.x= m_x + m_width;
+	p2_lim.y= m_y + m_height;
+
+	if (m_pParentROI)
+	{
+		min_p1x= m_pParentROI->m_x;
+		min_p1y= m_pParentROI->m_y;
+	}
+	else
+	{
+		 min_p1x= min_p1y= 0.0f;
+	}
+	max_p1x= p2_lim.x - MIN_WIDTH_HEIGHT;
+	max_p1y= p2_lim.y - MIN_WIDTH_HEIGHT;
+	FindMinChildP1 (max_p1x, max_p1y);
+	assert (max_p1x>= 0.0f);
+	assert (max_p1y>= 0.0f);
+
+	if (x< min_p1x) m_x= min_p1x;
+	else if (x> max_p1x) m_x= max_p1x;
+	else m_x= x;
+
+	if (y< min_p1y) m_y= min_p1y;
+	else if (y> max_p1y) m_y= max_p1y;
+	else m_y= y;
+
+	m_width= p2_lim.x - m_x;
+	m_height= p2_lim.y - m_y;
+
+	FitInternalState();
+
+	CheckInvariant();
+}	
+		
+void CNormROI::SetP1Move (const float x, const float y)
+{
+	float min_p1x, min_p1y, max_p1x, max_p1y;
+	float min_p2x_lim, min_p2y_lim;
+
+	// Compute minimum valid p1 coordinates
+	if (m_pParentROI)
+	{
+		min_p1x= m_pParentROI->m_x;
+		min_p1y= m_pParentROI->m_y;
+	}
+	else
+	{
+		 min_p1x= min_p1y= 0.0f;
+	}
+	min_p2x_lim= min_p1x + m_width;
+	min_p2y_lim= min_p1y + m_height;
+	FindMaxChildP2 (min_p2x_lim, min_p2y_lim);
+		
+	min_p1x= min_p2x_lim - m_width;
+	min_p1y= min_p2y_lim - m_height;
+	if (min_p1x< 0.0f) min_p1x= 0.0f;
+	if (min_p1y< 0.0f) min_p1y= 0.0f;
+
+	// Compute maximum valid p1 coordinates
+	if (m_pParentROI)
+	{
+		max_p1x= m_pParentROI->m_x + m_pParentROI->m_width - m_width;
+		max_p1y= m_pParentROI->m_y + m_pParentROI->m_height - m_height;
+	}
+	else
+	{
+		max_p1x= MAX_WIDTH_HEIGHT - m_width;
+		max_p1y= MAX_WIDTH_HEIGHT - m_height;
+	}
+	FindMinChildP1 (max_p1x, max_p1y);
+	assert (max_p1x>= 0.0f);
+	assert (max_p1y>= 0.0f);
+
+	// Apply restrictions
+	if (x< min_p1x) m_x= min_p1x;
+	else if (x> max_p1x) m_x= max_p1x;
+	else m_x= x;
+
+	if (y< min_p1y) m_y= min_p1y;
+	else if (y> max_p1y) m_y= max_p1y;
+	else m_y= y;
+
+	FitInternalState();
+
+	CheckInvariant();
+}
+
+void CNormROI::SetP2Resize (const float x, const float y)
+{
+	// Setting P2 always resize
+	float min_p2x, min_p2y, max_p2x, max_p2y;
+
+	min_p2x= m_x + MIN_WIDTH_HEIGHT;
+	min_p2y= m_y + MIN_WIDTH_HEIGHT;
+	assert (min_p2x<= MAX_WIDTH_HEIGHT);
+	assert (min_p2y<= MAX_WIDTH_HEIGHT);
+	FindMaxChildP2 (min_p2x, min_p2y);
+
+	if (m_pParentROI)
+	{
+		max_p2x= m_pParentROI->m_x + m_pParentROI->m_width;
+		max_p2y= m_pParentROI->m_y + m_pParentROI->m_height;
+	}
+	else
+	{
+		max_p2x= max_p2y= MAX_WIDTH_HEIGHT;
+	}
+
+	if (x< min_p2x) m_width= min_p2x - m_x;
+	else if (x> max_p2x) m_width= max_p2x - m_x;
+	else m_width= x - m_x;
+
+	if (y< min_p2y) m_height= min_p2y - m_y;
+	else if (y> max_p2y) m_height= max_p2y - m_y;
+	else m_height= y - m_y;
+
+	FitInternalState();
+
+	CheckInvariant();
+}
+
+void CNormROI::SetCenter (const float x, const float y)
+{
+	SetP1Move (x - (m_width / 2.0f), y - (m_height / 2.0f));
+}
+
+void CNormROI::GetCenter (float& x, float& y)
+{
+	x= m_x + (m_width / 2.0f);
+	y= m_y + (m_height / 2.0f);
+}
+
+void CNormROI::SetSize (const float width, const float height)
+{
+	SetP2Resize (width + m_x, height + m_y);
+}
+
+void CNormROI::GetSize (float& width, float& height)
+{
+	width= m_width;
+	height= m_height;
+}
+
+//
+// Working with generic integer coordinates
+//
+inline void CNormROI::Integer2Normalized (const CvSize& size, const int ix, const int iy, float &nx, float &ny)
+{
+	assert (size.width> 0);
+	assert (size.height> 0);
+	
+	nx= (float) ix / (float) size.width;
+	ny= (float) iy / (float) size.height;
+}
+
+inline void CNormROI::Normalized2Integer (const CvSize& size, const float nx, const float ny, int &ix, int &iy)
+{
+	assert (size.width> 0);
+	assert (size.height> 0);
+
+	// Round using the float value just below 0.5. We do this way to avoid
+	// overflows when both coordinate and size finish with 0.5
+	ix= (int) (nx * (float) size.width + 0.4999999701976776f);
+	iy= (int) (ny * (float) size.height + 0.4999999701976776f);
+}
+
+//inline 
+void CNormROI::SetP1ResizeInteger (const CvSize& size, const int x, const int y)
+{
+	float new_x, new_y;
+
+	Integer2Normalized (size, x, y, new_x, new_y);
+
+	SetP1Resize (new_x, new_y);
+}
+
+//inline 
+void CNormROI::SetP1MoveInteger (const CvSize& size, const int x, const int y)
+{
+	float new_x, new_y;
+
+	Integer2Normalized (size, x, y, new_x, new_y);
+
+	SetP1Move (new_x, new_y);
+}
+
+//inline 
+void CNormROI::SetP2ResizeInteger (const CvSize& size, const int x, const int y)
+{
+	float new_x, new_y;
+
+	Integer2Normalized (size, x, y, new_x, new_y);
+
+	SetP2Resize (new_x, new_y);
+}
+
+//inline 
+void CNormROI::SetCenterInteger (const CvSize& size, const int x, const int y)
+{
+	float new_x, new_y;
+
+	Integer2Normalized (size, x, y, new_x, new_y);
+
+	SetCenter (new_x, new_y);
+}
+
+void CNormROI::GetCenterInteger (const CvSize& size, int& x, int& y)
+{
+	float fx, fy;
+
+	GetCenter (fx, fy);
+
+	Normalized2Integer (size, fx, fy, x, y);	
+}
+
+//inline 
+void CNormROI::SetSizeInteger (const CvSize& size, const int width, const int height)
+{
+	float new_width, new_height;
+
+	Integer2Normalized (size, width, height, new_width, new_height);
+
+	SetSize (new_width, new_height);
+}
+
+//inline 
+void CNormROI::GetBoxInteger (const CvSize& size, int& x, int& y, int& width, int& height)
+{
+	// DEBUG, 
+	CheckInvariant();
+
+	Normalized2Integer (size, m_x, m_y, x, y);
+	Normalized2Integer (size, m_width, m_height, width, height);
+
+	assert (x + width<= size.width);
+	assert (y + height<= size.height);
+}
+
+void CNormROI::GetBoxInteger (const CvSize& size, CvRect& box)
+{
+	GetBoxInteger (size, box.x, box.y, box.width, box.height);
+}
+
+void CNormROI::GetP1P2Integer (const CvSize& size, CvPoint& p1, CvPoint& p2)
+{
+	Normalized2Integer (size, m_x, m_y, p1.x, p1.y);
+	Normalized2Integer (size, m_x + m_width, m_y + m_height, p2.x, p2.y);
+}
+
+//
+// Facilities to work with CIplImage images
+//
+void CNormROI::SetP1ResizeImg (const CIplImage *pImg, const int x, const int y)
+{
+	assert (pImg);
+	assert (pImg->Origin()== IPL_ORIGIN_TL);
+
+	SetP1ResizeInteger (pImg->GetSize(), x, y);
+}
+
+void CNormROI::SetP1MoveImg (const CIplImage *pImg, const int x, const int y)
+{
+	assert (pImg);
+	assert (pImg->Origin()== IPL_ORIGIN_TL);
+
+	SetP1MoveInteger (pImg->GetSize(), x, y);
+}
+
+void CNormROI::SetP2ResizeImg (const CIplImage *pImg, const int x, const int y)
+{
+	assert (pImg);
+	assert (pImg->Origin()== IPL_ORIGIN_TL);
+
+	SetP2ResizeInteger (pImg->GetSize(), x, y);	
+}
+
+void CNormROI::SetCenterImg (const CIplImage *pImg, const int x, const int y)
+{
+	assert (pImg);
+	assert (pImg->Origin()== IPL_ORIGIN_TL);
+	
+	SetCenterInteger (pImg->GetSize(), x, y);
+}
+
+void CNormROI::GetCenterImg (const CIplImage *pImg, int& x, int& y)
+{
+	assert (pImg);
+	assert (pImg->Origin()== IPL_ORIGIN_TL);
+
+	GetCenterInteger (pImg->GetSize(), x, y);	
+}
+
+void CNormROI::SetSizeImg (const CIplImage *pImg, const int width, const int height)
+{
+	assert (pImg);
+	assert (pImg->Origin()== IPL_ORIGIN_TL);
+
+	SetSizeInteger (pImg->GetSize(), width, height);
+}
+
+void CNormROI::GetBoxImg (const CIplImage *pImg, int& x, int& y, int& width, int& height)
+{
+	assert (pImg);
+	assert (pImg->Origin()== IPL_ORIGIN_TL);
+
+	GetBoxInteger (pImg->GetSize(), x, y, width, height);
+}
+
+void CNormROI::GetBoxImg (const CIplImage *pImg, CvRect& box)
+{
+	GetBoxImg (pImg, box.x, box.y, box.width, box.height);
+}
+
+//
+// Registration service
+//
+bool CNormROI::RegisterChildROI (CNormROI* pNormROI)
+{
+	assert (pNormROI);
+	assert (pNormROI!= this);
+		
+	TNormROIListIterator i;
+
+	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
+	{
+		if ((*i)== pNormROI) return false;	// Already registered
+	}
+
+	// Check that no registered with other parent
+	if (pNormROI->m_pParentROI) return false;
+
+	m_childROIs.push_back (pNormROI);
+	pNormROI->m_pParentROI= this;
+
+	// Ensures that child is inside parent
+	if (pNormROI->m_width> m_width) pNormROI->m_width= m_width;
+	if (pNormROI->m_height> m_height) pNormROI->m_height= m_height;
+	pNormROI->SetP1Move (pNormROI->m_x, pNormROI->m_y);	
+
+	return true;
+}
+
+bool CNormROI::UnregisterChildROI (CNormROI* pNormROI)
+{
+	assert (pNormROI);
+
+	TNormROIListIterator i;
+
+	for(i= m_childROIs.begin(); i != m_childROIs.end(); ++i)
+	{
+		if ((*i)== pNormROI) break;	// Found!
+	}
+	if (i== m_childROIs.end()) return false;	// Not found
+	
+	assert ((*i)->m_pParentROI);
+	(*i)->m_pParentROI= NULL;
+	m_childROIs.erase (i);
+
+	return true;
+}
diff --git a/src/creavision/crvnormroi.h b/src/creavision/crvnormroi.h
index 831a625..388ebaf 100755
--- a/src/creavision/crvnormroi.h
+++ b/src/creavision/crvnormroi.h
@@ -4,7 +4,7 @@
 // Author:      Cesar Mauri Loba (cesar at crea-si dot com)
 // Modified by: 
 // Created:     30/05/2008
-// Copyright:   (C) 2008 Cesar Mauri Loba - CREA Software Systems
+// Copyright:   (C) 2008-11 Cesar Mauri Loba - CREA Software Systems
 // 
 //  This program is free software: you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
@@ -93,7 +93,16 @@ protected:
 	TNormROIList m_childROIs;
 
 private:
+	void CheckInvariant();
+	void FitInternalState();
+
 	// Normalized coordinates
+	//
+	// TODO: implement these using integer arithmethic only,
+	// for instance, using 32bit integers and a certain range 
+	// (say 0..32768) thus avoiding FP arithmethic ans its 
+	// inherent "unexpected" behaviour.
+	// 
 	float m_x, m_y, m_width, m_height;
 	float m_rotation;
 };
diff --git a/src/mod_audio/CMakeLists.txt b/src/mod_audio/CMakeLists.txt
new file mode 100755
index 0000000..23e49b8
--- /dev/null
+++ b/src/mod_audio/CMakeLists.txt
@@ -0,0 +1,15 @@
+cmake_minimum_required(VERSION 2.6)
+project(spmod_audio)
+
+set(spmod_audio_SRCS	
+	mod_audio.cpp
+)
+
+find_package(wxWidgets COMPONENTS core base adv REQUIRED)
+message (STATUS "wxWidgets_LIBRARIES:${wxWidgets_LIBRARIES}")
+
+add_library (spmod_audio MODULE ${spmod_audio_SRCS})
+target_link_libraries(spmod_audio spcore)
+target_link_libraries(spmod_audio ${wxWidgets_LIBRARIES})
+
+INSTALL (TARGETS spmod_audio RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
\ No newline at end of file
diff --git a/src/mod_audio/mod_audio.cpp b/src/mod_audio/mod_audio.cpp
new file mode 100644
index 0000000..21882e2
--- /dev/null
+++ b/src/mod_audio/mod_audio.cpp
@@ -0,0 +1,162 @@
+/////////////////////////////////////////////////////////////////////////////
+// File:        mod_audio.cpp
+// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
+// Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////////
+#include "spcore/component.h"
+#include "spcore/module.h"
+#include "spcore/libimpexp.h"
+#include "spcore/basictypes.h"
+
+#include <wx/sound.h>
+
+#include <string>
+
+/**
+	Quick and dirty audio player implementation based on wx.
+
+	@todo consider better audio libraries such as:
+		- http://audiere.sourceforge.net/
+		- http://www.xiph.org/ao/doc/
+		- http://connect.creativelabs.com/openal/default.aspx
+		- http://sourceforge.net/projects/osalp/
+		- http://ffmpeg.org/about.html
+		- http://www.portaudio.com/docs.html (streaming only)
+		- Gstreamer???
+
+*/
+
+using namespace spcore;
+
+namespace mod_audio {
+
+/**
+	wav_player component
+
+		Plays a WAV file.
+		
+	Input pins:
+		play (any)			- Start playing
+		stop (any)			- Stop playing
+			
+	Ouput pins:		
+
+	Command line:
+		[-p <path>]		Set initial path
+*/
+class WavPlayer : public CComponentAdapter {
+public:
+	static const char* getTypeName() { return "wav_player"; }
+	virtual const char* GetTypeName() const { return WavPlayer::getTypeName(); }
+	WavPlayer(const char * name, int argc, const char * argv[]) 
+	: CComponentAdapter(name, argc, argv)
+	{
+		//m_opinElapsed= CTypeInt::CreateOutputPin("elapsed");
+		//if (RegisterOutputPin(*m_opinElapsed)!= 0)
+		//	throw std::runtime_error("error registering output pin");
+
+		if (RegisterInputPin(*SmartPtr<IInputPin>(new InputPinPlay("play", *this), false))!= 0)
+			throw std::runtime_error("error creating input pin play");
+
+		if (RegisterInputPin(*SmartPtr<IInputPin>(new InputPinStop("stop", *this), false))!= 0)
+			throw std::runtime_error("error creating input pin stop");
+
+		// Process arguments
+		if (argc) {			
+			for (int i= 0; i< argc; ++i) {
+				if (argv[i] && strcmp ("-p", argv[i])== 0) {
+					// Path					
+				
+					++i;
+					if (i< argc && argv[i]) {						
+						wxString filePath(argv[i], wxConvUTF8);
+						if (!m_sound.Create (filePath) && m_sound.IsOk()) {
+							std::string error_msg("wav_player. Cannot open file:");
+							error_msg+= argv[i];
+							throw std::runtime_error(error_msg);
+						}
+					}
+					else throw std::runtime_error("wav_player. Missing value for option -p");
+				}			
+				else if (argv[i] && strlen(argv[i])) {
+					std::string error_msg("wave_player. Unknown option:");
+					error_msg+= argv[i];
+					throw std::runtime_error(error_msg);
+				}
+			}
+		}
+	}
+
+private:
+	virtual ~WavPlayer() {}
+
+	class InputPinPlay : public CInputPinWriteOnly<CTypeAny, WavPlayer> {
+	public:
+		InputPinPlay (const char * name, WavPlayer & component)
+		: CInputPinWriteOnly<CTypeAny, WavPlayer>(name, component) { }
+
+		virtual int DoSend(const CTypeAny & ) {
+			m_component->m_sound.Play();
+			return 0;
+		}
+	};
+
+	class InputPinStop : public CInputPinWriteOnly<CTypeAny, WavPlayer> {
+	public:
+		InputPinStop (const char * name, WavPlayer & component)
+		: CInputPinWriteOnly<CTypeAny, WavPlayer>(name, component) { }
+
+		virtual int DoSend(const CTypeAny & ) {
+			m_component->m_sound.Stop();
+			return 0;
+		}
+	};
+
+	//
+	// Data members
+	//
+	//SmartPtr<IOutputPin> m_opinElapsed;
+	wxSound m_sound;
+};
+
+typedef ComponentFactory<WavPlayer> WavPlayerFactory;
+
+/* ******************************************************************************
+	audio  module
+****************************************************************************** */
+class AudioModule : public CModuleAdapter {
+public:
+	AudioModule() {
+		//
+		// components
+		//
+		RegisterComponentFactory(SmartPtr<spcore::IComponentFactory>(new WavPlayerFactory(), false));
+	}
+
+	~AudioModule() {
+	}
+
+	virtual const char * GetName() const { return "mod_audio"; }
+};
+
+static spcore::IModule* g_module= NULL;
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
+{
+	if (g_module== NULL) g_module= new AudioModule();
+	return g_module;
+}
+
+};
diff --git a/src/mod_camera/CMakeLists.txt b/src/mod_camera/CMakeLists.txt
index 8f421be..5ea5723 100755
--- a/src/mod_camera/CMakeLists.txt
+++ b/src/mod_camera/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.6)
-project(mod_camera)
+project(spmod_camera)
 
-set(mod_camera_SRCS
+set(spmod_camera_SRCS
 	${CUSTOM_INCLUDE_PATH}/mod_camera/iplimagetype.h
 	${CUSTOM_INCLUDE_PATH}/mod_camera/roitype.h
 	roitype.cpp
@@ -20,13 +20,15 @@ FIND_PACKAGE( OpenCV REQUIRED )
 INCLUDE_DIRECTORIES (${OpenCV_INCLUDE_DIR})
 INCLUDE_DIRECTORIES (..)
 
-add_library (mod_camera SHARED ${mod_camera_SRCS})
-target_link_libraries(mod_camera creavision)
-target_link_libraries(mod_camera spcore)
-target_link_libraries(mod_camera ${Boost_THREAD_LIBRARY})
-target_link_libraries(mod_camera ${Boost_PROGRAM_OPTIONS_LIBRARY})
-target_link_libraries(mod_camera ${wxWidgets_LIBRARIES})
+add_library (spmod_camera MODULE ${spmod_camera_SRCS})
+target_link_libraries(spmod_camera creavision)
+target_link_libraries(spmod_camera spcore)
+target_link_libraries(spmod_camera ${Boost_THREAD_LIBRARY})
+target_link_libraries(spmod_camera ${Boost_PROGRAM_OPTIONS_LIBRARY})
+target_link_libraries(spmod_camera ${wxWidgets_LIBRARIES})
 
-ADD_SUBDIRECTORY(tests)
+IF(BUILD_TESTS)
+	ADD_SUBDIRECTORY(tests)
+ENDIF(BUILD_TESTS)
 
-INSTALL (TARGETS mod_camera RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+INSTALL (TARGETS spmod_camera RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
\ No newline at end of file
diff --git a/src/mod_camera/a la espera/mod_camera.pjd.bak b/src/mod_camera/a la espera/mod_camera.pjd.bak
deleted file mode 100755
index 8058260..0000000
--- a/src/mod_camera/a la espera/mod_camera.pjd.bak	
+++ /dev/null
@@ -1,1211 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<anthemion-project version="1.0.0.0" xmlns="http://www.anthemion.co.uk">
-  <header>
-    <long name="name_counter">0</long>
-    <string name="html_path">""</string>
-    <string name="title">""</string>
-    <string name="author">""</string>
-    <string name="description">""</string>
-    <string name="xrc_filename">""</string>
-    <long name="image_mode">0</long>
-    <bool name="inline_images">0</bool>
-    <bool name="generate_cpp_for_xrc">0</bool>
-    <long name="working_mode">1</long>
-    <bool name="use_help_text_for_tooltips">1</bool>
-    <bool name="translate_strings">1</bool>
-    <bool name="make_unicode_strings">1</bool>
-    <bool name="extract_strings">0</bool>
-    <string name="user_name">"César Mauri Loba"</string>
-    <string name="copyright_string">"(C) 2009 Cesar Mauri from CREA Sistemes Informatics"</string>
-    <string name="resource_prefix">""</string>
-    <bool name="use_two_step_construction">1</bool>
-    <bool name="use_enums">0</bool>
-    <bool name="generate_for_xrced">0</bool>
-    <bool name="generate_virtual_eventhandlers">0</bool>
-    <string name="current_platform">"<All platforms>"</string>
-    <string name="target_wx_version">"2.8.7"</string>
-    <string name="app_kind">"Standard"</string>
-    <string name="cpp_header_comment">"/////////////////////////////////////////////////////////////////////////////
-// Name:        %HEADER-FILENAME%
-// Purpose:     
-// Author:      %AUTHOR%
-// Modified by: 
-// Created:     %DATE%
-// RCS-ID:      
-// Copyright:   %COPYRIGHT%
-// Licence:     
-/////////////////////////////////////////////////////////////////////////////
-
-"</string>
-    <string name="cpp_implementation_comment">"/////////////////////////////////////////////////////////////////////////////
-// Name:        %SOURCE-FILENAME%
-// Purpose:     
-// Author:      %AUTHOR%
-// Modified by: 
-// Created:     %DATE%
-// RCS-ID:      
-// Copyright:   %COPYRIGHT%
-// Licence:     
-/////////////////////////////////////////////////////////////////////////////
-
-"</string>
-    <string name="cpp_symbols_file_comment">"/////////////////////////////////////////////////////////////////////////////
-// Name:        %SYMBOLS-FILENAME%
-// Purpose:     Symbols file
-// Author:      %AUTHOR%
-// Modified by: 
-// Created:     %DATE%
-// RCS-ID:      
-// Copyright:   %COPYRIGHT%
-// Licence:     
-/////////////////////////////////////////////////////////////////////////////
-
-"</string>
-    <string name="cpp_header_preamble">""</string>
-    <string name="cpp_implementation_preamble">"// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-"</string>
-    <string name="cpp_function_declaration_comment">"	/// %BODY%
-"</string>
-    <string name="cpp_function_implementation_comment">"
-/*!
- * %BODY%
- */
-
-"</string>
-    <string name="resource_file_header">"app_resources.h"</string>
-    <string name="resource_file_implementation">"app_resources.cpp"</string>
-    <string name="resource_class_name">"AppResources"</string>
-    <string name="app_file_header">"app.h"</string>
-    <string name="app_file_implementation">"app.cpp"</string>
-    <string name="app_class_name">"Application"</string>
-    <bool name="generate_app_class">0</bool>
-    <string name="external_symbol_filenames">""</string>
-    <string name="configuration">"<None>"</string>
-    <string name="source_encoding">"iso-8859-1"</string>
-    <string name="xrc_encoding">"utf-8"</string>
-    <string name="project_encoding">"utf-8"</string>
-    <string name="resource_archive">""</string>
-    <long name="text_file_type">0</long>
-    <bool name="use_tabs">0</bool>
-    <long name="indent_size">4</long>
-    <string name="whitespace_after_return_type">" "</string>
-    <string name="resource_xrc_cpp">""</string>
-    <bool name="use_resource_archive">0</bool>
-    <bool name="use_generated_xrc_cpp">0</bool>
-    <bool name="always_generate_xrc">1</bool>
-    <bool name="use_id_name_for_name">0</bool>
-    <bool name="archive_xrc_files">1</bool>
-    <bool name="archive_image_files">1</bool>
-    <bool name="archive_all_image_files">0</bool>
-    <bool name="xrc_retain_relative_paths">1</bool>
-    <bool name="xrc_generate_id_tags">0</bool>
-    <bool name="xrc_use_name_property">0</bool>
-  </header>
-  <data>
-    <document>
-      <string name="title">""</string>
-      <string name="type">"data-document"</string>
-      <string name="filename">""</string>
-      <string name="icon-name">""</string>
-      <long name="is-transient">0</long>
-      <long name="owns-file">1</long>
-      <long name="title-mode">0</long>
-      <long name="locked">0</long>
-      <document>
-        <string name="title">"Configurations"</string>
-        <string name="type">"config-data-document"</string>
-        <string name="filename">""</string>
-        <string name="icon-name">""</string>
-        <long name="is-transient">0</long>
-        <long name="owns-file">1</long>
-        <long name="title-mode">0</long>
-        <long name="locked">0</long>
-        <string name="template-name">""</string>
-        <bool name="dirty">1</bool>
-        <long name="makefile-last-written">-8519680</long>
-        <string name="Compiler name">""</string>
-        <string name="Build mode">"Debug"</string>
-        <string name="Unicode mode">"ANSI"</string>
-        <string name="Shared mode">"Static"</string>
-        <string name="Modularity">"Modular"</string>
-        <string name="GUI mode">"GUI"</string>
-        <string name="Toolkit">"wxMSW"</string>
-        <string name="Processor type">"Default"</string>
-        <string name="Runtime linking">"Dynamic"</string>
-        <string name="Use exceptions">"Yes"</string>
-        <string name="Use ODBC">"No"</string>
-        <string name="Use XRC">"Yes"</string>
-        <string name="Use OpenGL">"No"</string>
-        <string name="Use wxMediaCtrl">"No"</string>
-        <string name="Use wxRichTextCtrl">"Yes"</string>
-        <string name="Use wxHTML">"Yes"</string>
-        <string name="Use wxPropertyGrid">"Yes"</string>
-        <string name="Use wxAUI">"Yes"</string>
-        <string name="Use wxSTC">"Yes"</string>
-        <string name="Use wxRibbonControl">"Yes"</string>
-        <string name="Executable name">"%EXECUTABLE%"</string>
-        <string name="Program arguments">""</string>
-        <string name="Working path">"%AUTO%"</string>
-        <string name="Output path">"%AUTO%"</string>
-        <string name="Objects path">"%AUTO%"</string>
-        <string name="Project makefile">"%AUTO%"</string>
-        <string name="wxWidgets version">"%WXVERSION%"</string>
-        <string name="wxWidgets makefile">"%AUTO%"</string>
-        <string name="wxWidgets location">"%AUTO%"</string>
-        <string name="wxWidgets build path">"%AUTO%"</string>
-        <string name="wxWidgets build command">"%AUTO%"</string>
-        <string name="wxWidgets clean command">"%AUTO%"</string>
-        <string name="CFG">""</string>
-        <string name="Compiler location">"%AUTO%"</string>
-        <string name="Compiler bin path">"%AUTO%"</string>
-        <string name="Compiler include path">"%AUTO%"</string>
-        <string name="Compiler lib path">"%AUTO%"</string>
-        <string name="PATH variable">"%AUTO%"</string>
-        <string name="C++ command">"%AUTO%"</string>
-        <string name="C command">"%AUTO%"</string>
-        <string name="Linker command">"%AUTO%"</string>
-        <string name="Resource compiler">"%AUTO%"</string>
-        <string name="Make command">"%AUTO%"</string>
-        <string name="Preprocessor flags">"%AUTO%"</string>
-        <string name="Optimizations">"%AUTO%"</string>
-        <string name="Warnings">"%AUTO%"</string>
-        <string name="Debug flags">"%AUTO%"</string>
-        <string name="Extra compile flags">"%AUTO%"</string>
-        <string name="Libraries">"%AUTO%"</string>
-        <string name="Library path">"%AUTO%"</string>
-        <string name="Linker flags">"%AUTO%"</string>
-        <string name="Include path">"%AUTO%"</string>
-        <string name="Resource flags">"%AUTO%"</string>
-        <string name="Resource path">"%AUTO%"</string>
-        <bool name="Suppress source rules">0</bool>
-        <bool name="Enable makefile generation">1</bool>
-      </document>
-    </document>
-  </data>
-
-  <documents>
-    <document>
-      <string name="title">"Projects"</string>
-      <string name="type">"root-document"</string>
-      <string name="filename">""</string>
-      <string name="icon-name">"project"</string>
-      <long name="is-transient">1</long>
-      <long name="owns-file">1</long>
-      <long name="title-mode">0</long>
-      <long name="locked">1</long>
-      <document>
-        <string name="title">"Windows"</string>
-        <string name="type">"html-document"</string>
-        <string name="filename">""</string>
-        <string name="icon-name">"dialogsfolder"</string>
-        <long name="is-transient">1</long>
-        <long name="owns-file">1</long>
-        <long name="title-mode">0</long>
-        <long name="locked">1</long>
-        <document>
-          <string name="title">"Camera Configuration"</string>
-          <string name="type">"dialog-document"</string>
-          <string name="filename">""</string>
-          <string name="icon-name">"dialog"</string>
-          <long name="is-transient">0</long>
-          <long name="owns-file">1</long>
-          <long name="title-mode">0</long>
-          <long name="locked">0</long>
-          <string name="proxy-type">"wbDialogProxy"</string>
-          <long name="base-id">10000</long>
-          <bool name="use-id-prefix">0</bool>
-          <string name="id-prefix">""</string>
-          <bool name="use-id-suffix">0</bool>
-          <string name="id-suffix">""</string>
-          <string name="app-kind">"Standard"</string>
-          <long name="use-xrc">0</long>
-          <long name="working-mode">0</long>
-          <string name="event-handler-0">"wxEVT_CLOSE_WINDOW|OnCloseWindow|NONE||"</string>
-          <string name="event-handler-1">"wxEVT_DESTROY|OnDestroy|NONE||"</string>
-          <string name="proxy-Id name">"ID_CCAMERACONFIGURATION"</string>
-          <long name="proxy-Id value">10060</long>
-          <string name="proxy-Class">"CCameraConfiguration"</string>
-          <string name="proxy-Base class">"wxPanel"</string>
-          <string name="proxy-Window kind">"wxPanel"</string>
-          <string name="proxy-Implementation filename">"wcameraconfiguration.cpp"</string>
-          <string name="proxy-Header filename">"wcameraconfiguration.h"</string>
-          <string name="proxy-XRC filename">""</string>
-          <string name="proxy-Title">"Camera Configuration"</string>
-          <bool name="proxy-Centre">1</bool>
-          <string name="proxy-Icon">""</string>
-          <bool name="proxy-Dialog units">0</bool>
-          <string name="proxy-Help text">""</string>
-          <string name="proxy-Tooltip text">""</string>
-          <string name="proxy-Background colour">""</string>
-          <string name="proxy-Foreground colour">""</string>
-          <string name="proxy-Font">""</string>
-          <bool name="proxy-Hidden">0</bool>
-          <bool name="proxy-Enabled">1</bool>
-          <string name="proxy-Platform">"<Any platform>"</string>
-          <string name="proxy-Data source">""</string>
-          <string name="proxy-Data class name">""</string>
-          <string name="proxy-Data class implementation filename">""</string>
-          <string name="proxy-Data class header filename">""</string>
-          <string name="proxy-Data class manager window">""</string>
-          <string name="proxy-Texture">""</string>
-          <string name="proxy-Texture style">"Tiled"</string>
-          <bool name="proxy-wxDEFAULT_DIALOG_STYLE">0</bool>
-          <bool name="proxy-wxCAPTION">1</bool>
-          <bool name="proxy-wxRESIZE_BORDER">1</bool>
-          <bool name="proxy-wxSYSTEM_MENU">1</bool>
-          <bool name="proxy-wxSTAY_ON_TOP">0</bool>
-          <bool name="proxy-wxDIALOG_NO_PARENT">0</bool>
-          <bool name="proxy-wxCLOSE_BOX">1</bool>
-          <bool name="proxy-wxMAXIMIZE_BOX">0</bool>
-          <bool name="proxy-wxMINIMIZE_BOX">0</bool>
-          <bool name="proxy-wxDIALOG_MODAL">1</bool>
-          <bool name="proxy-wxNO_BORDER">0</bool>
-          <bool name="proxy-wxSIMPLE_BORDER">0</bool>
-          <bool name="proxy-wxDOUBLE_BORDER">0</bool>
-          <bool name="proxy-wxBORDER_THEME">0</bool>
-          <bool name="proxy-wxSUNKEN_BORDER">0</bool>
-          <bool name="proxy-wxRAISED_BORDER">0</bool>
-          <bool name="proxy-wxSTATIC_BORDER">0</bool>
-          <bool name="proxy-wxWANTS_CHARS">0</bool>
-          <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-          <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-          <bool name="proxy-wxCLIP_CHILDREN">0</bool>
-          <bool name="proxy-wxTAB_TRAVERSAL">1</bool>
-          <bool name="proxy-wxWS_EX_VALIDATE_RECURSIVELY">0</bool>
-          <bool name="proxy-wxWS_EX_BLOCK_EVENTS">1</bool>
-          <bool name="proxy-wxWS_EX_TRANSIENT">0</bool>
-          <string name="proxy-Custom styles">""</string>
-          <bool name="proxy-wxDIALOG_EX_CONTEXTHELP">0</bool>
-          <bool name="proxy-Fit to content">1</bool>
-          <long name="proxy-X">-1</long>
-          <long name="proxy-Y">-1</long>
-          <long name="proxy-Width">400</long>
-          <long name="proxy-Height">300</long>
-          <bool name="proxy-AUI manager">0</bool>
-          <string name="proxy-Event sources">""</string>
-          <document>
-            <string name="title">"wxBoxSizer V"</string>
-            <string name="type">"dialog-control-document"</string>
-            <string name="filename">""</string>
-            <string name="icon-name">"sizer"</string>
-            <long name="is-transient">0</long>
-            <long name="owns-file">1</long>
-            <long name="title-mode">0</long>
-            <long name="locked">0</long>
-            <string name="proxy-type">"wbBoxSizerProxy"</string>
-            <string name="proxy-Orientation">"Vertical"</string>
-            <string name="proxy-Member variable name">""</string>
-            <bool name="proxy-wxSHAPED">0</bool>
-            <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-            <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-            <string name="proxy-Platform">"<Any platform>"</string>
-            <document>
-              <string name="title">"wxStaticBoxSizer V"</string>
-              <string name="type">"dialog-control-document"</string>
-              <string name="filename">""</string>
-              <string name="icon-name">"sizer"</string>
-              <long name="is-transient">0</long>
-              <long name="owns-file">1</long>
-              <long name="title-mode">0</long>
-              <long name="locked">0</long>
-              <string name="proxy-type">"wbStaticBoxSizerProxy"</string>
-              <string name="proxy-Id name">"wxID_ANY"</string>
-              <long name="proxy-Id value">-1</long>
-              <string name="proxy-Label">""</string>
-              <string name="proxy-Member variable name">""</string>
-              <string name="proxy-Sizer member variable name">""</string>
-              <string name="proxy-Foreground colour">""</string>
-              <string name="proxy-Font">""</string>
-              <bool name="proxy-Hidden">0</bool>
-              <bool name="proxy-Enabled">1</bool>
-              <string name="proxy-Static box class">"wxStaticBox"</string>
-              <string name="proxy-Orientation">"Vertical"</string>
-              <string name="proxy-AlignH">"Centre"</string>
-              <string name="proxy-AlignV">"Centre"</string>
-              <long name="proxy-Stretch factor">0</long>
-              <long name="proxy-Border">5</long>
-              <bool name="proxy-wxLEFT">1</bool>
-              <bool name="proxy-wxRIGHT">1</bool>
-              <bool name="proxy-wxTOP">1</bool>
-              <bool name="proxy-wxBOTTOM">1</bool>
-              <bool name="proxy-wxSHAPED">0</bool>
-              <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-              <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-              <string name="proxy-Platform">"<Any platform>"</string>
-              <document>
-                <string name="title">"CCamWindow2: ID_PANEL_CAMERA"</string>
-                <string name="type">"dialog-control-document"</string>
-                <string name="filename">""</string>
-                <string name="icon-name">"panel"</string>
-                <long name="is-transient">0</long>
-                <long name="owns-file">1</long>
-                <long name="title-mode">0</long>
-                <long name="locked">0</long>
-                <string name="proxy-type">"wbPanelProxy"</string>
-                <string name="proxy-Id name">"ID_PANEL_CAMERA"</string>
-                <long name="proxy-Id value">10061</long>
-                <string name="proxy-Name">""</string>
-                <string name="proxy-Class">"CCamWindow2"</string>
-                <string name="proxy-Base class">"wxPanel"</string>
-                <bool name="proxy-External implementation">1</bool>
-                <bool name="proxy-Separate files">0</bool>
-                <string name="proxy-Implementation filename">""</string>
-                <string name="proxy-Header filename">""</string>
-                <string name="proxy-Member variable name">"m_camPanel"</string>
-                <string name="proxy-Help text">""</string>
-                <string name="proxy-Tooltip text">""</string>
-                <string name="proxy-Background colour">""</string>
-                <string name="proxy-Foreground colour">""</string>
-                <string name="proxy-Font">""</string>
-                <bool name="proxy-Hidden">0</bool>
-                <bool name="proxy-Enabled">1</bool>
-                <string name="proxy-Platform">"<Any platform>"</string>
-                <string name="proxy-Data source">""</string>
-                <string name="proxy-Data class name">""</string>
-                <string name="proxy-Data class implementation filename">""</string>
-                <string name="proxy-Data class header filename">""</string>
-                <string name="proxy-Data class manager window">""</string>
-                <string name="proxy-Texture">""</string>
-                <string name="proxy-Texture style">"Tiled"</string>
-                <bool name="proxy-wxNO_BORDER">0</bool>
-                <bool name="proxy-wxSIMPLE_BORDER">0</bool>
-                <bool name="proxy-wxDOUBLE_BORDER">0</bool>
-                <bool name="proxy-wxBORDER_THEME">0</bool>
-                <bool name="proxy-wxSUNKEN_BORDER">1</bool>
-                <bool name="proxy-wxRAISED_BORDER">0</bool>
-                <bool name="proxy-wxSTATIC_BORDER">0</bool>
-                <bool name="proxy-wxWANTS_CHARS">0</bool>
-                <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-                <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-                <bool name="proxy-wxCLIP_CHILDREN">0</bool>
-                <bool name="proxy-wxHSCROLL">0</bool>
-                <bool name="proxy-wxVSCROLL">0</bool>
-                <bool name="proxy-wxTAB_TRAVERSAL">1</bool>
-                <bool name="proxy-wxALWAYS_SHOW_SB">0</bool>
-                <bool name="proxy-wxWS_EX_VALIDATE_RECURSIVELY">0</bool>
-                <bool name="proxy-wxWS_EX_BLOCK_EVENTS">0</bool>
-                <string name="proxy-Custom styles">""</string>
-                <bool name="proxy-Fit to content">1</bool>
-                <long name="proxy-X">-1</long>
-                <long name="proxy-Y">-1</long>
-                <long name="proxy-Width">320</long>
-                <long name="proxy-Height">240</long>
-                <string name="proxy-AlignH">"Expand"</string>
-                <string name="proxy-AlignV">"Centre"</string>
-                <long name="proxy-Stretch factor">0</long>
-                <long name="proxy-Border">5</long>
-                <bool name="proxy-wxLEFT">1</bool>
-                <bool name="proxy-wxRIGHT">1</bool>
-                <bool name="proxy-wxTOP">1</bool>
-                <bool name="proxy-wxBOTTOM">1</bool>
-                <bool name="proxy-wxSHAPED">0</bool>
-                <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                <string name="proxy-Custom arguments">""</string>
-                <string name="proxy-Custom ctor arguments">""</string>
-                <string name="proxy-Event sources">""</string>
-                <bool name="proxy-AUI manager">0</bool>
-              </document>
-              <document>
-                <string name="title">"wxStaticBoxSizer V"</string>
-                <string name="type">"dialog-control-document"</string>
-                <string name="filename">""</string>
-                <string name="icon-name">"sizer"</string>
-                <long name="is-transient">0</long>
-                <long name="owns-file">1</long>
-                <long name="title-mode">0</long>
-                <long name="locked">0</long>
-                <string name="proxy-type">"wbStaticBoxSizerProxy"</string>
-                <string name="proxy-Id name">"wxID_ANY"</string>
-                <long name="proxy-Id value">-1</long>
-                <string name="proxy-Label">"Camera properties"</string>
-                <string name="proxy-Member variable name">""</string>
-                <string name="proxy-Sizer member variable name">""</string>
-                <string name="proxy-Foreground colour">""</string>
-                <string name="proxy-Font">""</string>
-                <bool name="proxy-Hidden">0</bool>
-                <bool name="proxy-Enabled">1</bool>
-                <string name="proxy-Static box class">"wxStaticBox"</string>
-                <string name="proxy-Orientation">"Vertical"</string>
-                <string name="proxy-AlignH">"Expand"</string>
-                <string name="proxy-AlignV">"Centre"</string>
-                <long name="proxy-Stretch factor">0</long>
-                <long name="proxy-Border">5</long>
-                <bool name="proxy-wxLEFT">1</bool>
-                <bool name="proxy-wxRIGHT">1</bool>
-                <bool name="proxy-wxTOP">1</bool>
-                <bool name="proxy-wxBOTTOM">1</bool>
-                <bool name="proxy-wxSHAPED">0</bool>
-                <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                <string name="proxy-Platform">"<Any platform>"</string>
-                <document>
-                  <string name="title">"wxGridSizerProxy"</string>
-                  <string name="type">"dialog-control-document"</string>
-                  <string name="filename">""</string>
-                  <string name="icon-name">"sizer"</string>
-                  <long name="is-transient">0</long>
-                  <long name="owns-file">1</long>
-                  <long name="title-mode">0</long>
-                  <long name="locked">0</long>
-                  <string name="proxy-type">"wbGridSizerProxy"</string>
-                  <long name="proxy-Columns">2</long>
-                  <long name="proxy-Rows">0</long>
-                  <long name="proxy-ColumnSpacing">0</long>
-                  <long name="proxy-RowSpacing">0</long>
-                  <string name="proxy-Member variable name">""</string>
-                  <string name="proxy-Platform">"<Any platform>"</string>
-                  <string name="proxy-AlignH">"Expand"</string>
-                  <string name="proxy-AlignV">"Centre"</string>
-                  <long name="proxy-Stretch factor">0</long>
-                  <long name="proxy-Border">5</long>
-                  <bool name="proxy-wxLEFT">1</bool>
-                  <bool name="proxy-wxRIGHT">1</bool>
-                  <bool name="proxy-wxTOP">1</bool>
-                  <bool name="proxy-wxBOTTOM">1</bool>
-                  <bool name="proxy-wxSHAPED">0</bool>
-                  <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                  <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                  <document>
-                    <string name="title">"wxStaticText: wxID_STATIC"</string>
-                    <string name="type">"dialog-control-document"</string>
-                    <string name="filename">""</string>
-                    <string name="icon-name">"statictext"</string>
-                    <long name="is-transient">0</long>
-                    <long name="owns-file">1</long>
-                    <long name="title-mode">0</long>
-                    <long name="locked">0</long>
-                    <string name="proxy-type">"wbStaticTextProxy"</string>
-                    <string name="proxy-Id name">"wxID_STATIC"</string>
-                    <long name="proxy-Id value">5105</long>
-                    <string name="proxy-Name">""</string>
-                    <string name="proxy-Class">"wxStaticText"</string>
-                    <string name="proxy-Base class">"wxStaticText"</string>
-                    <bool name="proxy-External implementation">1</bool>
-                    <bool name="proxy-Separate files">0</bool>
-                    <string name="proxy-Implementation filename">""</string>
-                    <string name="proxy-Header filename">""</string>
-                    <string name="proxy-Member variable name">""</string>
-                    <string name="proxy-Label">"Selected camera:"</string>
-                    <long name="proxy-Wrapping width">-1</long>
-                    <string name="proxy-Help text">""</string>
-                    <string name="proxy-Tooltip text">""</string>
-                    <string name="proxy-Background colour">""</string>
-                    <string name="proxy-Foreground colour">""</string>
-                    <string name="proxy-Font">""</string>
-                    <bool name="proxy-Hidden">0</bool>
-                    <bool name="proxy-Enabled">1</bool>
-                    <string name="proxy-Platform">"<Any platform>"</string>
-                    <string name="proxy-Data variable">""</string>
-                    <string name="proxy-Data validator">""</string>
-                    <string name="proxy-Data source">""</string>
-                    <string name="proxy-Data class name">""</string>
-                    <string name="proxy-Data class implementation filename">""</string>
-                    <string name="proxy-Data class header filename">""</string>
-                    <string name="proxy-Data class manager window">""</string>
-                    <bool name="proxy-wxALIGN_LEFT">0</bool>
-                    <bool name="proxy-wxALIGN_RIGHT">0</bool>
-                    <bool name="proxy-wxALIGN_CENTRE">0</bool>
-                    <bool name="proxy-wxST_NO_AUTORESIZE">0</bool>
-                    <bool name="proxy-wxNO_BORDER">0</bool>
-                    <bool name="proxy-wxSIMPLE_BORDER">0</bool>
-                    <bool name="proxy-wxDOUBLE_BORDER">0</bool>
-                    <bool name="proxy-wxBORDER_THEME">0</bool>
-                    <bool name="proxy-wxSUNKEN_BORDER">0</bool>
-                    <bool name="proxy-wxRAISED_BORDER">0</bool>
-                    <bool name="proxy-wxSTATIC_BORDER">0</bool>
-                    <bool name="proxy-wxWANTS_CHARS">0</bool>
-                    <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-                    <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-                    <string name="proxy-Custom styles">""</string>
-                    <long name="proxy-X">-1</long>
-                    <long name="proxy-Y">-1</long>
-                    <long name="proxy-Width">-1</long>
-                    <long name="proxy-Height">-1</long>
-                    <string name="proxy-AlignH">"Left"</string>
-                    <string name="proxy-AlignV">"Centre"</string>
-                    <long name="proxy-Stretch factor">0</long>
-                    <long name="proxy-Border">5</long>
-                    <bool name="proxy-wxLEFT">1</bool>
-                    <bool name="proxy-wxRIGHT">1</bool>
-                    <bool name="proxy-wxTOP">1</bool>
-                    <bool name="proxy-wxBOTTOM">1</bool>
-                    <bool name="proxy-wxSHAPED">0</bool>
-                    <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                    <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                    <string name="proxy-Custom arguments">""</string>
-                    <string name="proxy-Custom ctor arguments">""</string>
-                  </document>
-                  <document>
-                    <string name="title">"wxStaticText: wxID_STATIC_CAMERA_NAME"</string>
-                    <string name="type">"dialog-control-document"</string>
-                    <string name="filename">""</string>
-                    <string name="icon-name">"statictext"</string>
-                    <long name="is-transient">0</long>
-                    <long name="owns-file">1</long>
-                    <long name="title-mode">0</long>
-                    <long name="locked">0</long>
-                    <string name="proxy-type">"wbStaticTextProxy"</string>
-                    <string name="proxy-Id name">"wxID_STATIC_CAMERA_NAME"</string>
-                    <long name="proxy-Id value">10062</long>
-                    <string name="proxy-Name">""</string>
-                    <string name="proxy-Class">"wxStaticText"</string>
-                    <string name="proxy-Base class">"wxStaticText"</string>
-                    <bool name="proxy-External implementation">1</bool>
-                    <bool name="proxy-Separate files">0</bool>
-                    <string name="proxy-Implementation filename">""</string>
-                    <string name="proxy-Header filename">""</string>
-                    <string name="proxy-Member variable name">"m_txtCameraName"</string>
-                    <string name="proxy-Label">"_"</string>
-                    <long name="proxy-Wrapping width">-1</long>
-                    <string name="proxy-Help text">""</string>
-                    <string name="proxy-Tooltip text">""</string>
-                    <string name="proxy-Background colour">""</string>
-                    <string name="proxy-Foreground colour">""</string>
-                    <string name="proxy-Font">""</string>
-                    <bool name="proxy-Hidden">0</bool>
-                    <bool name="proxy-Enabled">1</bool>
-                    <string name="proxy-Platform">"<Any platform>"</string>
-                    <string name="proxy-Data variable">""</string>
-                    <string name="proxy-Data validator">""</string>
-                    <string name="proxy-Data source">""</string>
-                    <string name="proxy-Data class name">""</string>
-                    <string name="proxy-Data class implementation filename">""</string>
-                    <string name="proxy-Data class header filename">""</string>
-                    <string name="proxy-Data class manager window">""</string>
-                    <bool name="proxy-wxALIGN_LEFT">0</bool>
-                    <bool name="proxy-wxALIGN_RIGHT">0</bool>
-                    <bool name="proxy-wxALIGN_CENTRE">0</bool>
-                    <bool name="proxy-wxST_NO_AUTORESIZE">0</bool>
-                    <bool name="proxy-wxNO_BORDER">0</bool>
-                    <bool name="proxy-wxSIMPLE_BORDER">0</bool>
-                    <bool name="proxy-wxDOUBLE_BORDER">0</bool>
-                    <bool name="proxy-wxBORDER_THEME">0</bool>
-                    <bool name="proxy-wxSUNKEN_BORDER">0</bool>
-                    <bool name="proxy-wxRAISED_BORDER">0</bool>
-                    <bool name="proxy-wxSTATIC_BORDER">0</bool>
-                    <bool name="proxy-wxWANTS_CHARS">0</bool>
-                    <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-                    <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-                    <string name="proxy-Custom styles">""</string>
-                    <long name="proxy-X">-1</long>
-                    <long name="proxy-Y">-1</long>
-                    <long name="proxy-Width">-1</long>
-                    <long name="proxy-Height">-1</long>
-                    <string name="proxy-AlignH">"Left"</string>
-                    <string name="proxy-AlignV">"Centre"</string>
-                    <long name="proxy-Stretch factor">0</long>
-                    <long name="proxy-Border">5</long>
-                    <bool name="proxy-wxLEFT">1</bool>
-                    <bool name="proxy-wxRIGHT">1</bool>
-                    <bool name="proxy-wxTOP">1</bool>
-                    <bool name="proxy-wxBOTTOM">1</bool>
-                    <bool name="proxy-wxSHAPED">0</bool>
-                    <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                    <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                    <string name="proxy-Custom arguments">""</string>
-                    <string name="proxy-Custom ctor arguments">""</string>
-                  </document>
-                  <document>
-                    <string name="title">"wxStaticText: wxID_STATIC"</string>
-                    <string name="type">"dialog-control-document"</string>
-                    <string name="filename">""</string>
-                    <string name="icon-name">"statictext"</string>
-                    <long name="is-transient">0</long>
-                    <long name="owns-file">1</long>
-                    <long name="title-mode">0</long>
-                    <long name="locked">0</long>
-                    <string name="proxy-type">"wbStaticTextProxy"</string>
-                    <string name="proxy-Id name">"wxID_STATIC"</string>
-                    <long name="proxy-Id value">5105</long>
-                    <string name="proxy-Name">""</string>
-                    <string name="proxy-Class">"wxStaticText"</string>
-                    <string name="proxy-Base class">"wxStaticText"</string>
-                    <bool name="proxy-External implementation">1</bool>
-                    <bool name="proxy-Separate files">0</bool>
-                    <string name="proxy-Implementation filename">""</string>
-                    <string name="proxy-Header filename">""</string>
-                    <string name="proxy-Member variable name">""</string>
-                    <string name="proxy-Label">"Format:"</string>
-                    <long name="proxy-Wrapping width">-1</long>
-                    <string name="proxy-Help text">""</string>
-                    <string name="proxy-Tooltip text">""</string>
-                    <string name="proxy-Background colour">""</string>
-                    <string name="proxy-Foreground colour">""</string>
-                    <string name="proxy-Font">""</string>
-                    <bool name="proxy-Hidden">0</bool>
-                    <bool name="proxy-Enabled">1</bool>
-                    <string name="proxy-Platform">"<Any platform>"</string>
-                    <string name="proxy-Data variable">""</string>
-                    <string name="proxy-Data validator">""</string>
-                    <string name="proxy-Data source">""</string>
-                    <string name="proxy-Data class name">""</string>
-                    <string name="proxy-Data class implementation filename">""</string>
-                    <string name="proxy-Data class header filename">""</string>
-                    <string name="proxy-Data class manager window">""</string>
-                    <bool name="proxy-wxALIGN_LEFT">0</bool>
-                    <bool name="proxy-wxALIGN_RIGHT">0</bool>
-                    <bool name="proxy-wxALIGN_CENTRE">0</bool>
-                    <bool name="proxy-wxST_NO_AUTORESIZE">0</bool>
-                    <bool name="proxy-wxNO_BORDER">0</bool>
-                    <bool name="proxy-wxSIMPLE_BORDER">0</bool>
-                    <bool name="proxy-wxDOUBLE_BORDER">0</bool>
-                    <bool name="proxy-wxBORDER_THEME">0</bool>
-                    <bool name="proxy-wxSUNKEN_BORDER">0</bool>
-                    <bool name="proxy-wxRAISED_BORDER">0</bool>
-                    <bool name="proxy-wxSTATIC_BORDER">0</bool>
-                    <bool name="proxy-wxWANTS_CHARS">0</bool>
-                    <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-                    <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-                    <string name="proxy-Custom styles">""</string>
-                    <long name="proxy-X">-1</long>
-                    <long name="proxy-Y">-1</long>
-                    <long name="proxy-Width">-1</long>
-                    <long name="proxy-Height">-1</long>
-                    <string name="proxy-AlignH">"Left"</string>
-                    <string name="proxy-AlignV">"Centre"</string>
-                    <long name="proxy-Stretch factor">0</long>
-                    <long name="proxy-Border">5</long>
-                    <bool name="proxy-wxLEFT">1</bool>
-                    <bool name="proxy-wxRIGHT">1</bool>
-                    <bool name="proxy-wxTOP">1</bool>
-                    <bool name="proxy-wxBOTTOM">1</bool>
-                    <bool name="proxy-wxSHAPED">0</bool>
-                    <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                    <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                    <string name="proxy-Custom arguments">""</string>
-                    <string name="proxy-Custom ctor arguments">""</string>
-                  </document>
-                  <document>
-                    <string name="title">"wxStaticText: wxID_STATIC_CAMERA_FORMAT"</string>
-                    <string name="type">"dialog-control-document"</string>
-                    <string name="filename">""</string>
-                    <string name="icon-name">"statictext"</string>
-                    <long name="is-transient">0</long>
-                    <long name="owns-file">1</long>
-                    <long name="title-mode">0</long>
-                    <long name="locked">0</long>
-                    <string name="proxy-type">"wbStaticTextProxy"</string>
-                    <string name="proxy-Id name">"wxID_STATIC_CAMERA_FORMAT"</string>
-                    <long name="proxy-Id value">10067</long>
-                    <string name="proxy-Name">""</string>
-                    <string name="proxy-Class">"wxStaticText"</string>
-                    <string name="proxy-Base class">"wxStaticText"</string>
-                    <bool name="proxy-External implementation">1</bool>
-                    <bool name="proxy-Separate files">0</bool>
-                    <string name="proxy-Implementation filename">""</string>
-                    <string name="proxy-Header filename">""</string>
-                    <string name="proxy-Member variable name">"m_txtCameraFormat"</string>
-                    <string name="proxy-Label">"_"</string>
-                    <long name="proxy-Wrapping width">-1</long>
-                    <string name="proxy-Help text">""</string>
-                    <string name="proxy-Tooltip text">""</string>
-                    <string name="proxy-Background colour">""</string>
-                    <string name="proxy-Foreground colour">""</string>
-                    <string name="proxy-Font">""</string>
-                    <bool name="proxy-Hidden">0</bool>
-                    <bool name="proxy-Enabled">1</bool>
-                    <string name="proxy-Platform">"<Any platform>"</string>
-                    <string name="proxy-Data variable">""</string>
-                    <string name="proxy-Data validator">""</string>
-                    <string name="proxy-Data source">""</string>
-                    <string name="proxy-Data class name">""</string>
-                    <string name="proxy-Data class implementation filename">""</string>
-                    <string name="proxy-Data class header filename">""</string>
-                    <string name="proxy-Data class manager window">""</string>
-                    <bool name="proxy-wxALIGN_LEFT">0</bool>
-                    <bool name="proxy-wxALIGN_RIGHT">0</bool>
-                    <bool name="proxy-wxALIGN_CENTRE">0</bool>
-                    <bool name="proxy-wxST_NO_AUTORESIZE">0</bool>
-                    <bool name="proxy-wxNO_BORDER">0</bool>
-                    <bool name="proxy-wxSIMPLE_BORDER">0</bool>
-                    <bool name="proxy-wxDOUBLE_BORDER">0</bool>
-                    <bool name="proxy-wxBORDER_THEME">0</bool>
-                    <bool name="proxy-wxSUNKEN_BORDER">0</bool>
-                    <bool name="proxy-wxRAISED_BORDER">0</bool>
-                    <bool name="proxy-wxSTATIC_BORDER">0</bool>
-                    <bool name="proxy-wxWANTS_CHARS">0</bool>
-                    <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-                    <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-                    <string name="proxy-Custom styles">""</string>
-                    <long name="proxy-X">-1</long>
-                    <long name="proxy-Y">-1</long>
-                    <long name="proxy-Width">-1</long>
-                    <long name="proxy-Height">-1</long>
-                    <string name="proxy-AlignH">"Left"</string>
-                    <string name="proxy-AlignV">"Centre"</string>
-                    <long name="proxy-Stretch factor">0</long>
-                    <long name="proxy-Border">5</long>
-                    <bool name="proxy-wxLEFT">1</bool>
-                    <bool name="proxy-wxRIGHT">1</bool>
-                    <bool name="proxy-wxTOP">1</bool>
-                    <bool name="proxy-wxBOTTOM">1</bool>
-                    <bool name="proxy-wxSHAPED">0</bool>
-                    <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                    <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                    <string name="proxy-Custom arguments">""</string>
-                    <string name="proxy-Custom ctor arguments">""</string>
-                  </document>
-                </document>
-              </document>
-              <document>
-                <string name="title">"wxBoxSizer H"</string>
-                <string name="type">"dialog-control-document"</string>
-                <string name="filename">""</string>
-                <string name="icon-name">"sizer"</string>
-                <long name="is-transient">0</long>
-                <long name="owns-file">1</long>
-                <long name="title-mode">0</long>
-                <long name="locked">0</long>
-                <string name="proxy-type">"wbBoxSizerProxy"</string>
-                <string name="proxy-Orientation">"Horizontal"</string>
-                <string name="proxy-Member variable name">""</string>
-                <string name="proxy-AlignH">"Left"</string>
-                <string name="proxy-AlignV">"Centre"</string>
-                <long name="proxy-Stretch factor">0</long>
-                <long name="proxy-Border">5</long>
-                <bool name="proxy-wxLEFT">1</bool>
-                <bool name="proxy-wxRIGHT">1</bool>
-                <bool name="proxy-wxTOP">1</bool>
-                <bool name="proxy-wxBOTTOM">1</bool>
-                <bool name="proxy-wxSHAPED">0</bool>
-                <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                <string name="proxy-Platform">"<Any platform>"</string>
-                <document>
-                  <string name="title">"wxButton: ID_BUTTON_CHANGE_CAMERA"</string>
-                  <string name="type">"dialog-control-document"</string>
-                  <string name="filename">""</string>
-                  <string name="icon-name">"dialogcontrol"</string>
-                  <long name="is-transient">0</long>
-                  <long name="owns-file">1</long>
-                  <long name="title-mode">0</long>
-                  <long name="locked">0</long>
-                  <string name="proxy-type">"wbButtonProxy"</string>
-                  <string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnButtonChangeCameraClick|NONE||CCameraConfiguration"</string>
-                  <string name="proxy-Id name">"ID_BUTTON_CHANGE_CAMERA"</string>
-                  <long name="proxy-Id value">10063</long>
-                  <string name="proxy-Name">""</string>
-                  <string name="proxy-Class">"wxButton"</string>
-                  <string name="proxy-Base class">"wxButton"</string>
-                  <bool name="proxy-External implementation">1</bool>
-                  <bool name="proxy-Separate files">0</bool>
-                  <string name="proxy-Implementation filename">""</string>
-                  <string name="proxy-Header filename">""</string>
-                  <string name="proxy-Member variable name">""</string>
-                  <string name="proxy-Label">"Change"</string>
-                  <bool name="proxy-Default">0</bool>
-                  <string name="proxy-Help text">""</string>
-                  <string name="proxy-Tooltip text">""</string>
-                  <string name="proxy-Data variable">""</string>
-                  <string name="proxy-Data validator">""</string>
-                  <string name="proxy-Data source">""</string>
-                  <string name="proxy-Data class name">""</string>
-                  <string name="proxy-Data class implementation filename">""</string>
-                  <string name="proxy-Data class header filename">""</string>
-                  <string name="proxy-Data class manager window">""</string>
-                  <string name="proxy-Background colour">""</string>
-                  <string name="proxy-Foreground colour">""</string>
-                  <string name="proxy-Font">""</string>
-                  <bool name="proxy-Hidden">0</bool>
-                  <bool name="proxy-Enabled">1</bool>
-                  <string name="proxy-Platform">"<Any platform>"</string>
-                  <bool name="proxy-wxBU_LEFT">0</bool>
-                  <bool name="proxy-wxBU_RIGHT">0</bool>
-                  <bool name="proxy-wxBU_TOP">0</bool>
-                  <bool name="proxy-wxBU_BOTTOM">0</bool>
-                  <bool name="proxy-wxBU_EXACTFIT">0</bool>
-                  <bool name="proxy-wxNO_BORDER">0</bool>
-                  <bool name="proxy-wxWANTS_CHARS">0</bool>
-                  <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-                  <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-                  <string name="proxy-Custom styles">""</string>
-                  <long name="proxy-X">-1</long>
-                  <long name="proxy-Y">-1</long>
-                  <long name="proxy-Width">-1</long>
-                  <long name="proxy-Height">-1</long>
-                  <string name="proxy-AlignH">"Centre"</string>
-                  <string name="proxy-AlignV">"Centre"</string>
-                  <long name="proxy-Stretch factor">0</long>
-                  <long name="proxy-Border">5</long>
-                  <bool name="proxy-wxLEFT">1</bool>
-                  <bool name="proxy-wxRIGHT">1</bool>
-                  <bool name="proxy-wxTOP">1</bool>
-                  <bool name="proxy-wxBOTTOM">1</bool>
-                  <bool name="proxy-wxSHAPED">0</bool>
-                  <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                  <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                  <string name="proxy-Custom arguments">""</string>
-                  <string name="proxy-Custom ctor arguments">""</string>
-                </document>
-                <document>
-                  <string name="title">"wxButton: ID_BUTTON_PROPERTIES"</string>
-                  <string name="type">"dialog-control-document"</string>
-                  <string name="filename">""</string>
-                  <string name="icon-name">"dialogcontrol"</string>
-                  <long name="is-transient">0</long>
-                  <long name="owns-file">1</long>
-                  <long name="title-mode">0</long>
-                  <long name="locked">0</long>
-                  <string name="proxy-type">"wbButtonProxy"</string>
-                  <string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnButtonPropertiesClick|NONE||CCameraConfiguration"</string>
-                  <string name="proxy-Id name">"ID_BUTTON_PROPERTIES"</string>
-                  <long name="proxy-Id value">10064</long>
-                  <string name="proxy-Name">""</string>
-                  <string name="proxy-Class">"wxButton"</string>
-                  <string name="proxy-Base class">"wxButton"</string>
-                  <bool name="proxy-External implementation">1</bool>
-                  <bool name="proxy-Separate files">0</bool>
-                  <string name="proxy-Implementation filename">""</string>
-                  <string name="proxy-Header filename">""</string>
-                  <string name="proxy-Member variable name">""</string>
-                  <string name="proxy-Label">"Properties"</string>
-                  <bool name="proxy-Default">0</bool>
-                  <string name="proxy-Help text">""</string>
-                  <string name="proxy-Tooltip text">""</string>
-                  <string name="proxy-Data variable">""</string>
-                  <string name="proxy-Data validator">""</string>
-                  <string name="proxy-Data source">""</string>
-                  <string name="proxy-Data class name">""</string>
-                  <string name="proxy-Data class implementation filename">""</string>
-                  <string name="proxy-Data class header filename">""</string>
-                  <string name="proxy-Data class manager window">""</string>
-                  <string name="proxy-Background colour">""</string>
-                  <string name="proxy-Foreground colour">""</string>
-                  <string name="proxy-Font">""</string>
-                  <bool name="proxy-Hidden">0</bool>
-                  <bool name="proxy-Enabled">1</bool>
-                  <string name="proxy-Platform">"<Any platform>"</string>
-                  <bool name="proxy-wxBU_LEFT">0</bool>
-                  <bool name="proxy-wxBU_RIGHT">0</bool>
-                  <bool name="proxy-wxBU_TOP">0</bool>
-                  <bool name="proxy-wxBU_BOTTOM">0</bool>
-                  <bool name="proxy-wxBU_EXACTFIT">0</bool>
-                  <bool name="proxy-wxNO_BORDER">0</bool>
-                  <bool name="proxy-wxWANTS_CHARS">0</bool>
-                  <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-                  <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-                  <string name="proxy-Custom styles">""</string>
-                  <long name="proxy-X">-1</long>
-                  <long name="proxy-Y">-1</long>
-                  <long name="proxy-Width">-1</long>
-                  <long name="proxy-Height">-1</long>
-                  <string name="proxy-AlignH">"Centre"</string>
-                  <string name="proxy-AlignV">"Centre"</string>
-                  <long name="proxy-Stretch factor">0</long>
-                  <long name="proxy-Border">5</long>
-                  <bool name="proxy-wxLEFT">1</bool>
-                  <bool name="proxy-wxRIGHT">1</bool>
-                  <bool name="proxy-wxTOP">1</bool>
-                  <bool name="proxy-wxBOTTOM">1</bool>
-                  <bool name="proxy-wxSHAPED">0</bool>
-                  <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-                  <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-                  <string name="proxy-Custom arguments">""</string>
-                  <string name="proxy-Custom ctor arguments">""</string>
-                </document>
-              </document>
-            </document>
-            <document>
-              <string name="title">"wxButton: ID_BUTTON_CLOSE_CCONFIG"</string>
-              <string name="type">"dialog-control-document"</string>
-              <string name="filename">""</string>
-              <string name="icon-name">"dialogcontrol"</string>
-              <long name="is-transient">0</long>
-              <long name="owns-file">1</long>
-              <long name="title-mode">0</long>
-              <long name="locked">0</long>
-              <string name="proxy-type">"wbButtonProxy"</string>
-              <string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnButtonCloseCconfigClick|NONE|ID_CCAMERACONFIGURATION|CCameraConfiguration"</string>
-              <string name="proxy-Id name">"ID_BUTTON_CLOSE_CCONFIG"</string>
-              <long name="proxy-Id value">10065</long>
-              <string name="proxy-Name">""</string>
-              <string name="proxy-Class">"wxButton"</string>
-              <string name="proxy-Base class">"wxButton"</string>
-              <bool name="proxy-External implementation">1</bool>
-              <bool name="proxy-Separate files">0</bool>
-              <string name="proxy-Implementation filename">""</string>
-              <string name="proxy-Header filename">""</string>
-              <string name="proxy-Member variable name">""</string>
-              <string name="proxy-Label">"Close"</string>
-              <bool name="proxy-Default">0</bool>
-              <string name="proxy-Help text">""</string>
-              <string name="proxy-Tooltip text">""</string>
-              <string name="proxy-Data variable">""</string>
-              <string name="proxy-Data validator">""</string>
-              <string name="proxy-Data source">""</string>
-              <string name="proxy-Data class name">""</string>
-              <string name="proxy-Data class implementation filename">""</string>
-              <string name="proxy-Data class header filename">""</string>
-              <string name="proxy-Data class manager window">""</string>
-              <string name="proxy-Background colour">""</string>
-              <string name="proxy-Foreground colour">""</string>
-              <string name="proxy-Font">""</string>
-              <bool name="proxy-Hidden">0</bool>
-              <bool name="proxy-Enabled">1</bool>
-              <string name="proxy-Platform">"<Any platform>"</string>
-              <bool name="proxy-wxBU_LEFT">0</bool>
-              <bool name="proxy-wxBU_RIGHT">0</bool>
-              <bool name="proxy-wxBU_TOP">0</bool>
-              <bool name="proxy-wxBU_BOTTOM">0</bool>
-              <bool name="proxy-wxBU_EXACTFIT">0</bool>
-              <bool name="proxy-wxNO_BORDER">0</bool>
-              <bool name="proxy-wxWANTS_CHARS">0</bool>
-              <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-              <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-              <string name="proxy-Custom styles">""</string>
-              <long name="proxy-X">-1</long>
-              <long name="proxy-Y">-1</long>
-              <long name="proxy-Width">-1</long>
-              <long name="proxy-Height">-1</long>
-              <string name="proxy-AlignH">"Centre"</string>
-              <string name="proxy-AlignV">"Centre"</string>
-              <long name="proxy-Stretch factor">0</long>
-              <long name="proxy-Border">5</long>
-              <bool name="proxy-wxLEFT">1</bool>
-              <bool name="proxy-wxRIGHT">1</bool>
-              <bool name="proxy-wxTOP">1</bool>
-              <bool name="proxy-wxBOTTOM">1</bool>
-              <bool name="proxy-wxSHAPED">0</bool>
-              <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-              <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-              <string name="proxy-Custom arguments">""</string>
-              <string name="proxy-Custom ctor arguments">""</string>
-            </document>
-          </document>
-        </document>
-        <document>
-          <string name="title">"Camera Dialog"</string>
-          <string name="type">"dialog-document"</string>
-          <string name="filename">""</string>
-          <string name="icon-name">"dialog"</string>
-          <long name="is-transient">0</long>
-          <long name="owns-file">1</long>
-          <long name="title-mode">0</long>
-          <long name="locked">0</long>
-          <string name="proxy-type">"wbDialogProxy"</string>
-          <long name="base-id">10000</long>
-          <bool name="use-id-prefix">0</bool>
-          <string name="id-prefix">""</string>
-          <bool name="use-id-suffix">0</bool>
-          <string name="id-suffix">""</string>
-          <string name="app-kind">"Standard"</string>
-          <long name="use-xrc">0</long>
-          <long name="working-mode">0</long>
-          <string name="event-handler-0">"wxEVT_CLOSE_WINDOW|OnCloseWindow|NONE||"</string>
-          <string name="proxy-Id name">"ID_CAMERADIALOG"</string>
-          <long name="proxy-Id value">10032</long>
-          <string name="proxy-Class">"CameraDialog"</string>
-          <string name="proxy-Base class">"wxPanel"</string>
-          <string name="proxy-Window kind">"wxPanel"</string>
-          <string name="proxy-Implementation filename">"cameradialog2.cpp"</string>
-          <string name="proxy-Header filename">"cameradialog2.h"</string>
-          <string name="proxy-XRC filename">""</string>
-          <string name="proxy-Title">"Camera Dialog"</string>
-          <bool name="proxy-Centre">1</bool>
-          <string name="proxy-Icon">""</string>
-          <bool name="proxy-Dialog units">0</bool>
-          <string name="proxy-Help text">""</string>
-          <string name="proxy-Tooltip text">""</string>
-          <string name="proxy-Background colour">""</string>
-          <string name="proxy-Foreground colour">""</string>
-          <string name="proxy-Font">""</string>
-          <bool name="proxy-Hidden">0</bool>
-          <bool name="proxy-Enabled">1</bool>
-          <string name="proxy-Platform">"<Any platform>"</string>
-          <string name="proxy-Data source">""</string>
-          <string name="proxy-Data class name">""</string>
-          <string name="proxy-Data class implementation filename">""</string>
-          <string name="proxy-Data class header filename">""</string>
-          <string name="proxy-Data class manager window">""</string>
-          <string name="proxy-Texture">""</string>
-          <string name="proxy-Texture style">"Tiled"</string>
-          <bool name="proxy-wxDEFAULT_DIALOG_STYLE">0</bool>
-          <bool name="proxy-wxCAPTION">1</bool>
-          <bool name="proxy-wxRESIZE_BORDER">1</bool>
-          <bool name="proxy-wxSYSTEM_MENU">0</bool>
-          <bool name="proxy-wxSTAY_ON_TOP">0</bool>
-          <bool name="proxy-wxDIALOG_NO_PARENT">0</bool>
-          <bool name="proxy-wxCLOSE_BOX">0</bool>
-          <bool name="proxy-wxMAXIMIZE_BOX">0</bool>
-          <bool name="proxy-wxMINIMIZE_BOX">0</bool>
-          <bool name="proxy-wxDIALOG_MODAL">0</bool>
-          <bool name="proxy-wxNO_BORDER">0</bool>
-          <bool name="proxy-wxSIMPLE_BORDER">0</bool>
-          <bool name="proxy-wxDOUBLE_BORDER">0</bool>
-          <bool name="proxy-wxBORDER_THEME">0</bool>
-          <bool name="proxy-wxSUNKEN_BORDER">0</bool>
-          <bool name="proxy-wxRAISED_BORDER">0</bool>
-          <bool name="proxy-wxSTATIC_BORDER">0</bool>
-          <bool name="proxy-wxWANTS_CHARS">0</bool>
-          <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-          <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-          <bool name="proxy-wxCLIP_CHILDREN">0</bool>
-          <bool name="proxy-wxTAB_TRAVERSAL">1</bool>
-          <bool name="proxy-wxWS_EX_VALIDATE_RECURSIVELY">0</bool>
-          <bool name="proxy-wxWS_EX_BLOCK_EVENTS">1</bool>
-          <bool name="proxy-wxWS_EX_TRANSIENT">0</bool>
-          <string name="proxy-Custom styles">""</string>
-          <bool name="proxy-wxDIALOG_EX_CONTEXTHELP">0</bool>
-          <bool name="proxy-Fit to content">1</bool>
-          <long name="proxy-X">-1</long>
-          <long name="proxy-Y">-1</long>
-          <long name="proxy-Width">-1</long>
-          <long name="proxy-Height">-1</long>
-          <bool name="proxy-AUI manager">0</bool>
-          <string name="proxy-Event sources">""</string>
-          <document>
-            <string name="title">"CCamWindow2: ID_PANEL3"</string>
-            <string name="type">"dialog-control-document"</string>
-            <string name="filename">""</string>
-            <string name="icon-name">"panel"</string>
-            <long name="is-transient">0</long>
-            <long name="owns-file">1</long>
-            <long name="title-mode">0</long>
-            <long name="locked">0</long>
-            <string name="proxy-type">"wbPanelProxy"</string>
-            <string name="proxy-Id name">"ID_PANEL3"</string>
-            <long name="proxy-Id value">10033</long>
-            <string name="proxy-Name">""</string>
-            <string name="proxy-Class">"CCamWindow2"</string>
-            <string name="proxy-Base class">"wxPanel"</string>
-            <bool name="proxy-External implementation">1</bool>
-            <bool name="proxy-Separate files">0</bool>
-            <string name="proxy-Implementation filename">""</string>
-            <string name="proxy-Header filename">""</string>
-            <string name="proxy-Member variable name">"m_camWindow"</string>
-            <string name="proxy-Help text">""</string>
-            <string name="proxy-Tooltip text">""</string>
-            <string name="proxy-Background colour">""</string>
-            <string name="proxy-Foreground colour">""</string>
-            <string name="proxy-Font">""</string>
-            <bool name="proxy-Hidden">0</bool>
-            <bool name="proxy-Enabled">1</bool>
-            <string name="proxy-Platform">"<Any platform>"</string>
-            <string name="proxy-Data source">""</string>
-            <string name="proxy-Data class name">""</string>
-            <string name="proxy-Data class implementation filename">""</string>
-            <string name="proxy-Data class header filename">""</string>
-            <string name="proxy-Data class manager window">""</string>
-            <string name="proxy-Texture">""</string>
-            <string name="proxy-Texture style">"Tiled"</string>
-            <bool name="proxy-wxNO_BORDER">0</bool>
-            <bool name="proxy-wxSIMPLE_BORDER">0</bool>
-            <bool name="proxy-wxDOUBLE_BORDER">0</bool>
-            <bool name="proxy-wxBORDER_THEME">0</bool>
-            <bool name="proxy-wxSUNKEN_BORDER">1</bool>
-            <bool name="proxy-wxRAISED_BORDER">0</bool>
-            <bool name="proxy-wxSTATIC_BORDER">0</bool>
-            <bool name="proxy-wxWANTS_CHARS">0</bool>
-            <bool name="proxy-wxNO_FULL_REPAINT_ON_RESIZE">0</bool>
-            <bool name="proxy-wxFULL_REPAINT_ON_RESIZE">0</bool>
-            <bool name="proxy-wxCLIP_CHILDREN">0</bool>
-            <bool name="proxy-wxHSCROLL">0</bool>
-            <bool name="proxy-wxVSCROLL">0</bool>
-            <bool name="proxy-wxTAB_TRAVERSAL">1</bool>
-            <bool name="proxy-wxALWAYS_SHOW_SB">0</bool>
-            <bool name="proxy-wxWS_EX_VALIDATE_RECURSIVELY">0</bool>
-            <bool name="proxy-wxWS_EX_BLOCK_EVENTS">0</bool>
-            <string name="proxy-Custom styles">""</string>
-            <bool name="proxy-Fit to content">1</bool>
-            <long name="proxy-X">-1</long>
-            <long name="proxy-Y">-1</long>
-            <long name="proxy-Width">-1</long>
-            <long name="proxy-Height">-1</long>
-            <string name="proxy-AlignH">"Centre"</string>
-            <string name="proxy-AlignV">"Centre"</string>
-            <long name="proxy-Stretch factor">0</long>
-            <long name="proxy-Border">5</long>
-            <bool name="proxy-wxLEFT">1</bool>
-            <bool name="proxy-wxRIGHT">1</bool>
-            <bool name="proxy-wxTOP">1</bool>
-            <bool name="proxy-wxBOTTOM">1</bool>
-            <bool name="proxy-wxSHAPED">0</bool>
-            <bool name="proxy-wxADJUST_MINSIZE">0</bool>
-            <bool name="proxy-wxFIXED_MINSIZE">0</bool>
-            <string name="proxy-Custom arguments">""</string>
-            <string name="proxy-Custom ctor arguments">""</string>
-            <string name="proxy-Event sources">""</string>
-            <bool name="proxy-AUI manager">0</bool>
-          </document>
-        </document>
-      </document>
-      <document>
-        <string name="title">"Sources"</string>
-        <string name="type">"html-document"</string>
-        <string name="filename">""</string>
-        <string name="icon-name">"sourcesfolder"</string>
-        <long name="is-transient">1</long>
-        <long name="owns-file">1</long>
-        <long name="title-mode">0</long>
-        <long name="locked">1</long>
-        <document>
-          <string name="title">"mviacam.rc"</string>
-          <string name="type">"source-editor-document"</string>
-          <string name="filename">"mviacam.rc"</string>
-          <string name="icon-name">"source-editor"</string>
-          <long name="is-transient">0</long>
-          <long name="owns-file">0</long>
-          <long name="title-mode">1</long>
-          <long name="locked">0</long>
-          <string name="created">"3/8/2009"</string>
-          <string name="language">""</string>
-        </document>
-      </document>
-      <document>
-        <string name="title">"Images"</string>
-        <string name="type">"html-document"</string>
-        <string name="filename">""</string>
-        <string name="icon-name">"bitmapsfolder"</string>
-        <long name="is-transient">1</long>
-        <long name="owns-file">1</long>
-        <long name="title-mode">0</long>
-        <long name="locked">1</long>
-        <document>
-          <string name="title">"disable_icon.xpm"</string>
-          <string name="type">"image-document"</string>
-          <string name="filename">"bitmaps/disable_icon.xpm"</string>
-          <string name="icon-name">"image"</string>
-          <long name="is-transient">0</long>
-          <long name="owns-file">0</long>
-          <long name="title-mode">0</long>
-          <long name="locked">0</long>
-          <long name="zoom-level">100</long>
-        </document>
-        <document>
-          <string name="title">"sitplus_logo_16x16.xpm"</string>
-          <string name="type">"image-document"</string>
-          <string name="filename">"bitmaps/sitplus_logo_16x16.xpm"</string>
-          <string name="icon-name">"image"</string>
-          <long name="is-transient">0</long>
-          <long name="owns-file">0</long>
-          <long name="title-mode">0</long>
-          <long name="locked">0</long>
-          <long name="zoom-level">100</long>
-        </document>
-        <document>
-          <string name="title">"sitplus_logo_32x32.xpm"</string>
-          <string name="type">"image-document"</string>
-          <string name="filename">"bitmaps/sitplus_logo_32x32.xpm"</string>
-          <string name="icon-name">"image"</string>
-          <long name="is-transient">0</long>
-          <long name="owns-file">0</long>
-          <long name="title-mode">0</long>
-          <long name="locked">0</long>
-          <long name="zoom-level">100</long>
-        </document>
-      </document>
-    </document>
-  </documents>
-
-</anthemion-project>
diff --git a/src/mod_camera/a la espera/wxnormroi.cpp b/src/mod_camera/a la espera/wxnormroi.cpp
deleted file mode 100755
index 252b589..0000000
--- a/src/mod_camera/a la espera/wxnormroi.cpp	
+++ /dev/null
@@ -1,104 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        wxnormroi.cpp
-// Purpose:		
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Modified by: 
-// Created:     
-// Copyright:   (C) 2008 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
-#include "wxnormroi.h"
-#include <wx/window.h>
-#include "visiblenormroi.h"
-
-CWXNormROI::CWXNormROI(CVisibleNormROI* pVisibleNormROI, wxWindow* pWindow)
-{
-	assert (pVisibleNormROI);
-	m_pVisibleNormROI= pVisibleNormROI;
-
-	assert (pWindow);
-	m_pWindow= pWindow;
-}
-
-CWXNormROI::~CWXNormROI(void)
-{
-}
-
-// Window events
-
-bool CWXNormROI::OnEvtMotion ( wxMouseEvent& event, wxPoint prevCursor )
-{
-	CvSize winSize;
-	bool processed;
-
-	m_pWindow->GetClientSize (&winSize.width, &winSize.height);
-
-	if (!event.LeftIsDown())
-	{
-		processed= true;
-
-		int retval= m_pVisibleNormROI->OnMouseMovedNoClick (winSize, cvPoint (event.GetX(), event.GetY()));
-
-		switch (retval)
-		{
-		case CVisibleNormROI::OVER_NONE:
-			m_pWindow->SetCursor (wxNullCursor);
-			processed= false;
-			break;
-		case CVisibleNormROI::OVER_LEFT_LINE:
-		case CVisibleNormROI::OVER_RIGHT_LINE:
-		{
-			wxCursor cur (wxCURSOR_SIZEWE);
-			m_pWindow->SetCursor (cur);
-		}
-			break;
-		case CVisibleNormROI::OVER_BOTTOM_LINE:
-		case CVisibleNormROI::OVER_UPPER_LINE:
-		{
-			wxCursor cur (wxCURSOR_SIZENS);
-			m_pWindow->SetCursor (cur);
-		}
-			break;
-		case CVisibleNormROI::OVER_ORIENTER:
-		case CVisibleNormROI::OVER_UL_CORNER:
-		case CVisibleNormROI::OVER_BR_CORNER:
-		{
-			wxCursor cur (wxCURSOR_HAND);
-			m_pWindow->SetCursor (cur);
-		}
-			break;
-		}
-	}
-	else
-	{
-		processed= m_pVisibleNormROI->OnMouseMovedClick (winSize, cvPoint (event.GetX(), event.GetY()), cvPoint (prevCursor.x, prevCursor.y));
-	}
-
-	return processed;	
-}
-
-bool CWXNormROI::OnEvtLeftDClick ( wxMouseEvent& WXUNUSED(event) )
-{
-	//m_pVisibleNormROI->SetCenterWindow (m_pWindow->GetClientSize(), event.GetX(), event.GetY());
-	return true;
-}
-
-void CWXNormROI::OnPaint (CIplImage *pImg)
-{
-	CvSize winSize;
-	m_pWindow->GetClientSize(&winSize.width, &winSize.height);
-	m_pVisibleNormROI->OnPaint (winSize, pImg);
-}
-
diff --git a/src/mod_camera/a la espera/wxnormroi.h b/src/mod_camera/a la espera/wxnormroi.h
deleted file mode 100755
index 0da504f..0000000
--- a/src/mod_camera/a la espera/wxnormroi.h	
+++ /dev/null
@@ -1,52 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        wxnormroi.h
-// Purpose:  This class is used to display and interact with ROI objects
-//           it's used to link between window object and CVisibleNormROI
-//           object and to properly handle mouse events. 
-//           Only used inside this package.
-// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
-// Modified by: 
-// Created:     
-// Copyright:   (C) 2008 Cesar Mauri Loba - CREA Software Systems
-// 
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef WXNORMROI_H
-#define WXNORMROI_H
-
-#include <wx/event.h>
-
-class CVisibleNormROI;
-class wxWindow;
-class CIplImage;
-
-class CWXNormROI
-{
-public:
-	CWXNormROI(CVisibleNormROI* pVisibleNormROI, wxWindow* pWindow);
-	virtual ~CWXNormROI(void);
-
-	CVisibleNormROI* GetVisibleNormROI () { return m_pVisibleNormROI; }
-	
-	// Returns true if event was processed
-	bool OnEvtMotion ( wxMouseEvent& event, wxPoint prevCursor );
-	bool OnEvtLeftDClick ( wxMouseEvent& event );	
-	void OnPaint (CIplImage *pImg);
-private:
-	CVisibleNormROI* m_pVisibleNormROI;
-	wxWindow* m_pWindow;
-};
-
-#endif
diff --git a/src/mod_camera/mod_camera.cpp b/src/mod_camera/mod_camera.cpp
index e9d4927..a68bdbf 100644
--- a/src/mod_camera/mod_camera.cpp
+++ b/src/mod_camera/mod_camera.cpp
@@ -21,7 +21,7 @@
 #include "wcamerapanel.h"
 #include "mod_camera/roitype.h"
 #include "wxroicontrol.h"
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 
 #include <boost/bind.hpp>
 #include <boost/shared_ptr.hpp>
@@ -97,17 +97,17 @@ private:
 		m_oPinResult->Send(img);
 	}
 
-	virtual bool ProvidesExecThread() { return true; }
+	virtual bool ProvidesExecThread() const { return true; }
 
 	// Starts the component
     // \return 0 if successfully started, -1 otherwise
-	virtual int Start() {
+	virtual int DoStart() {
 		m_cameraConfig->RegisterListener (*this);
 		return 0;
 	}
 
     //Stops the component.
-	virtual void Stop() {
+	virtual void DoStop() {
 		m_cameraConfig->UnregisterListener (*this);
 	}
 };
@@ -236,6 +236,9 @@ typedef ComponentFactory<CameraViewer> CameraViewerFactory;
 		roi (roi): internally stores a copy of the ROI object and sends the
 			result through the output pin
 
+		roi_same_id:  internally stores a copy of the ROI object if has the same ID 
+			and sends the result through the output pin
+
 		centre (compsite of 2 floats):
 			centres the roi around the given point and sends the
 			result through the output pin
@@ -267,6 +270,7 @@ public:
 			throw std::runtime_error("roi_storage. output pin creation failed.");
 		RegisterOutputPin (*m_oPinResult);		
 		RegisterInputPin (*SmartPtr<InputPinROI>(new InputPinROI(*this), false));
+		RegisterInputPin (*SmartPtr<InputPinROISameID>(new InputPinROISameID(*this), false));
 		RegisterInputPin (*SmartPtr<InputPinCentre>(new InputPinCentre(*this), false));
 
 		m_ROI= CTypeROI::CreateInstance();
@@ -283,8 +287,7 @@ public:
 			throw std::runtime_error("error parsing options");
 	}
 
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize() {
+	virtual int DoInitialize() {
 		return m_oPinResult->Send (m_ROI);
 	}
 
@@ -311,6 +314,19 @@ private:
 		}
 	};
 
+	// Write pin to send ROIs. Only these with the same ID are taken into account
+	class InputPinROISameID : public CInputPinWriteOnly<CTypeROI, RoiStorage> {
+	public:
+		InputPinROISameID (RoiStorage & component) : CInputPinWriteOnly<CTypeROI, RoiStorage>("roi_same_id", component) {}		
+		virtual int DoSend(const CTypeROI &src) {
+			if (m_component->m_Id== src.GetRegistrationId()) {
+				src.Clone(m_component->m_ROI.get(), true);
+				return m_component->m_oPinResult->Send (m_component->m_ROI);
+			}
+			return 0;
+		}
+	};
+
 	// Allows to centre the ROI around a given point. Expects a composite type with 2 normalized float values (x,y)
 	class InputPinCentre : public CInputPinWriteOnly<CTypeAny, RoiStorage> {
 	public:
@@ -405,7 +421,7 @@ public:
 };
 
 static spcore::IModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new CCameraModule();
 	return g_module;
diff --git a/src/mod_camera/tests/CMakeLists.txt b/src/mod_camera/tests/CMakeLists.txt
index 96b0859..8eab1c1 100755
--- a/src/mod_camera/tests/CMakeLists.txt
+++ b/src/mod_camera/tests/CMakeLists.txt
@@ -6,7 +6,7 @@ target_link_libraries(test_mod_camera_gui spcore)
 target_link_libraries(test_mod_camera_gui testcommon)
 target_link_libraries(test_mod_camera_gui ${wxWidgets_LIBRARIES})
 target_link_libraries(test_mod_camera_gui nvwa)
-target_link_libraries(test_mod_camera_gui mod_camera)
+target_link_libraries(test_mod_camera_gui spmod_camera)
 add_test (NAME test_mod_camera_gui COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_mod_camera_gui>)
 
 add_executable(test_mod_camera_viewer test_mod_camera_viewer.cpp)
@@ -14,12 +14,12 @@ target_link_libraries(test_mod_camera_viewer spcore)
 target_link_libraries(test_mod_camera_viewer testcommon)
 target_link_libraries(test_mod_camera_viewer ${wxWidgets_LIBRARIES})
 target_link_libraries(test_mod_camera_viewer nvwa)
-target_link_libraries(test_mod_camera_viewer mod_camera)
+target_link_libraries(test_mod_camera_viewer spmod_camera)
 add_test (NAME test_mod_camera_viewer COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_mod_camera_viewer>)
 
 add_executable(test_mod_camera_rois test_mod_camera_rois.cpp)
 target_link_libraries(test_mod_camera_rois spcore)
 target_link_libraries(test_mod_camera_rois testcommon)
 target_link_libraries(test_mod_camera_rois nvwa)
-target_link_libraries(test_mod_camera_rois mod_camera)
+target_link_libraries(test_mod_camera_rois spmod_camera)
 add_test (NAME test_mod_camera_rois COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_mod_camera_rois>)
\ No newline at end of file
diff --git a/src/mod_camera/tests/test_mod_camera_rois.cpp b/src/mod_camera/tests/test_mod_camera_rois.cpp
index 5822c1b..f272df7 100755
--- a/src/mod_camera/tests/test_mod_camera_rois.cpp
+++ b/src/mod_camera/tests/test_mod_camera_rois.cpp
@@ -31,6 +31,7 @@
 
 using namespace spcore;
 using namespace mod_camera;
+using namespace std;
 
 void dump_roi ( const CTypeROI& roi,  std::ostream& stream= std::cout, char const * tab = "")
 {
diff --git a/src/mod_camera/wxroicontrol.cpp b/src/mod_camera/wxroicontrol.cpp
index ba7c8bf..65aebc8 100755
--- a/src/mod_camera/wxroicontrol.cpp
+++ b/src/mod_camera/wxroicontrol.cpp
@@ -29,6 +29,8 @@
 
 #define SELECTION_TOLERANCE 3
 
+using namespace std;
+
 namespace mod_camera {
 
 WXRoiControls::WXRoiControls(ROIModifiedNotification rmn) 
diff --git a/src/mod_collage/CMakeLists.txt b/src/mod_collage/CMakeLists.txt
index d8f02db..7ae42ea 100755
--- a/src/mod_collage/CMakeLists.txt
+++ b/src/mod_collage/CMakeLists.txt
@@ -1,19 +1,19 @@
 cmake_minimum_required(VERSION 2.6)
-project(mod_collage)
+project(spmod_collage)
 
 find_package(POCO)
 find_package ( SDL REQUIRED )
 find_package ( SDL_image REQUIRED )
 find_package ( SDL_gfx REQUIRED )
 
-set(mod_collage_SRCS
+set(spmod_collage_SRCS
 	mod_collage.cpp
 )
 
-set (mod_collage_gui_SRCS
-	config_gui.h
-	config_gui.cpp
-)
+#set (mod_collage_gui_SRCS
+#	config_gui.h
+#	config_gui.cpp
+#)
 
 include_directories (${SDL_INCLUDE_DIR})
 include_directories (${SDLIMAGE_INCLUDE_DIR})
@@ -23,31 +23,34 @@ include_directories (${POCO_INCLUDE_DIR})
 include_directories (${POCO_XML_INCLUDE_DIR})
 
 # Base library
-add_library (mod_collage SHARED ${mod_collage_SRCS})
-target_link_libraries(mod_collage spcore)
-target_link_libraries(mod_collage mod_XMLImplementation)
-target_link_libraries(mod_collage mod_Pictures)
-target_link_libraries(mod_collage mod_Kernel)
-target_link_libraries(mod_collage mod_collage_gui)
+add_library (spmod_collage MODULE ${spmod_collage_SRCS})
+target_link_libraries(spmod_collage spcore)
+target_link_libraries(spmod_collage mod_XMLImplementation)
+target_link_libraries(spmod_collage mod_Pictures)
+target_link_libraries(spmod_collage mod_Kernel)
+#target_link_libraries(spmod_collage mod_collage_gui)
 
-target_link_libraries(mod_collage ${SDL_LIBRARY})
-target_link_libraries(mod_collage ${SDLIMAGE_LIBRARY})
-target_link_libraries(mod_collage ${SDLGFX_LIBRARY})
+target_link_libraries(spmod_collage ${SDL_LIBRARY})
+target_link_libraries(spmod_collage ${SDLIMAGE_LIBRARY})
+target_link_libraries(spmod_collage ${SDLGFX_LIBRARY})
 
-target_link_libraries(mod_collage ${POCO_XML_LIBRARY})
+target_link_libraries(spmod_collage ${POCO_XML_LIBRARY})
 
 
 # Base gui library
-add_library (mod_collage_gui STATIC ${mod_collage_gui_SRCS})
-target_link_libraries(mod_collage_gui spcore)
-target_link_libraries(mod_collage_gui ${wxWidgets_LIBRARIES})
+#add_library (mod_collage_gui STATIC ${mod_collage_gui_SRCS})
+#target_link_libraries(mod_collage_gui spcore)
+#target_link_libraries(mod_collage_gui ${wxWidgets_LIBRARIES})
 
-add_subdirectory(tests)
 add_subdirectory(XMLImplementation)
 add_subdirectory(Pictures)
 add_subdirectory(Kernel)
 
-INSTALL (TARGETS mod_collage RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
+IF(BUILD_TESTS)
+	ADD_SUBDIRECTORY(tests)
+ENDIF(BUILD_TESTS)
+
+INSTALL (TARGETS spmod_collage RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
 IF (WIN32)
 	FIND_PATH (SDL_image_RUNTIME_LIBS_DIR SDL_image.dll
 		HINTS
diff --git a/src/mod_collage/Kernel/kernel.h b/src/mod_collage/Kernel/kernel.h
index 5af5c19..a59df5c 100644
--- a/src/mod_collage/Kernel/kernel.h
+++ b/src/mod_collage/Kernel/kernel.h
@@ -83,8 +83,8 @@ namespace Kernel{
 			float m_elapsedTime;
 
 			int   m_imageShow;
-			vector<SmartPtr<mod_sdl::CTypeSDLSurface> > m_backgroundList;
-			vector<SmartPtr<mod_sdl::CTypeSDLSurface> > m_backgroundResizedList;
+			std::vector<SmartPtr<mod_sdl::CTypeSDLSurface> > m_backgroundList;
+			std::vector<SmartPtr<mod_sdl::CTypeSDLSurface> > m_backgroundResizedList;
 	};
 	
 	
diff --git a/src/mod_collage/Pictures/Pictures.h b/src/mod_collage/Pictures/Pictures.h
index 5c91c80..af5d12e 100644
--- a/src/mod_collage/Pictures/Pictures.h
+++ b/src/mod_collage/Pictures/Pictures.h
@@ -99,7 +99,7 @@ namespace Pictures{
 			boost::shared_ptr<PictureNode> m_Normal;
 			float m_status;
 			SmartPtr<mod_sdl::CTypeSDLSurface> m_result;
-			string m_name;
+			std::string m_name;
 			PicturesTransition();
 	};
 	
@@ -146,7 +146,7 @@ namespace Pictures{
 	 */
 	class ChangePictureTransition:public PicturesTransition{
 		private:
-			string m_destinationSrc;
+			std::string m_destinationSrc;
 			int m_old_w, m_old_h;
 			SmartPtr<mod_sdl::CTypeSDLSurface> m_Base, m_original;
 			
diff --git a/src/mod_collage/XMLImplementation/DBImages.cpp b/src/mod_collage/XMLImplementation/DBImages.cpp
index 174fb6b..2ecd7a6 100644
--- a/src/mod_collage/XMLImplementation/DBImages.cpp
+++ b/src/mod_collage/XMLImplementation/DBImages.cpp
@@ -31,6 +31,7 @@ using std::string;
 using mod_sdl::CTypeSDLSurface;
 using boost::shared_ptr;
 using Poco::FileNotFoundException;
+using namespace std;
 
 namespace XMLImplementation{
 	
diff --git a/src/mod_collage/XMLImplementation/Implementation.h b/src/mod_collage/XMLImplementation/Implementation.h
index 6803313..06c4a75 100644
--- a/src/mod_collage/XMLImplementation/Implementation.h
+++ b/src/mod_collage/XMLImplementation/Implementation.h
@@ -114,7 +114,7 @@ namespace XMLImplementation{
 			SmartPtr<mod_sdl::CTypeSDLSurface> getImage(std::string src,int degRot=0);
 		private:
 			DBImages();
-			map<string,SmartPtr<mod_sdl::CTypeSDLSurface>,Classcomp> m_images;
+			std::map<std::string,SmartPtr<mod_sdl::CTypeSDLSurface>,Classcomp> m_images;
 	};
 };
 
diff --git a/src/mod_collage/XMLImplementation/InterfaceXML.h b/src/mod_collage/XMLImplementation/InterfaceXML.h
index 3f1df47..6ae80f6 100755
--- a/src/mod_collage/XMLImplementation/InterfaceXML.h
+++ b/src/mod_collage/XMLImplementation/InterfaceXML.h
@@ -104,7 +104,7 @@ namespace XMLImplementation{
 		boost::shared_ptr<Activity> m_configuracio;
 		boost::shared_ptr<LogError> m_errors;
 	public:
-		LoadXML(string dir,string file, boost::shared_ptr<DBImages> images);
+		LoadXML(std::string dir, std::string file, boost::shared_ptr<DBImages> images);
 		~LoadXML();
 		boost::shared_ptr<Activity> getConfiguration();
 		boost::shared_ptr<LogError> getErrors();
diff --git a/src/mod_collage/XMLImplementation/LoadXML.cpp b/src/mod_collage/XMLImplementation/LoadXML.cpp
index ebf0f9b..9c9b948 100644
--- a/src/mod_collage/XMLImplementation/LoadXML.cpp
+++ b/src/mod_collage/XMLImplementation/LoadXML.cpp
@@ -28,6 +28,7 @@
 
 using boost::shared_ptr;
 using Poco::XML::XMLReader;
+using namespace std;
 
 namespace XMLImplementation{
 	/*
diff --git a/src/mod_collage/XMLImplementation/XmlHandler.cpp b/src/mod_collage/XMLImplementation/XmlHandler.cpp
index 42bc59b..87ce665 100755
--- a/src/mod_collage/XMLImplementation/XmlHandler.cpp
+++ b/src/mod_collage/XMLImplementation/XmlHandler.cpp
@@ -148,25 +148,27 @@ namespace XMLImplementation{
 	/*
 	 * Constructor from class XMLHandler, initializes varibles
 	 */
-	XMLHandler::XMLHandler(string dir, shared_ptr<Activity> activity, shared_ptr<LogError> errors, shared_ptr<DBImages> images):m_pLocator(0){
-			m_activitat = activity;
-			m_errors = errors;
-			m_image = shared_ptr<Picture>();
-			m_mod = shared_ptr<Module>();
-			m_defTrIn = typeTransition(0);
-			m_defTrOut = typeTransition(0);
-			m_errorSrc = false;
-			m_trans = false;
-			m_dir = dir;
-			m_degrees = 90;
-			m_errorKrnl = false;
-			m_def = false;
-			m_x = 0.0f;
-			m_y = 0.0f;
-			m_images = images;
-			m_level = 0;
-			m_tagError = false;
+	XMLHandler::XMLHandler(string dir, shared_ptr<Activity> activity, shared_ptr<LogError> errors, shared_ptr<DBImages> images)
+	: m_pLocator(0)
+	{
+		m_activitat = activity;
+		m_errors = errors;
+		m_image = shared_ptr<Picture>();
+		m_mod = shared_ptr<Module>();
+		m_defTrIn= m_defTrOut= m_trIn= m_trOut= Pictures::NIL;
+		m_errorKrnl = false;
+		m_errorSrc = false;
+		m_trans = false;
+		m_def = false;
+		m_tagError = false;
+		m_level = 0;
+		m_dir = dir;
+		m_degrees = 90;		
+		m_x = 0.0f;
+		m_y = 0.0f;
+		m_images = images;		
 	}
+
 	/*
 	 * Destructor from class XMLHandler
 	 */
diff --git a/src/mod_collage/mod_collage.cpp b/src/mod_collage/mod_collage.cpp
index 5cf2246..17c3c6a 100644
--- a/src/mod_collage/mod_collage.cpp
+++ b/src/mod_collage/mod_collage.cpp
@@ -21,7 +21,7 @@
 #include "spcore/basictypes.h"
 #include "spcore/pin.h"
 #include "spcore/component.h"
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 
 // Do not include <SDL.h> directly. The following
 // include provides the SDL library headers
@@ -37,7 +37,7 @@
 #include "Poco/Exception.h"
 #include <time.h>
 
-#include "config_gui.h"
+//#include "config_gui.h"
 
 #include <math.h>
 #include <stdexcept>
@@ -74,7 +74,6 @@ class CollageGraphics : public CComponentAdapter {
 public:
 	CollageGraphics(const char * name, int argc, const char * argv[]) 
 	: CComponentAdapter(name, argc, argv)
-	, m_initialized(false)
 	, m_filechanged(false)
 	, m_deadZone(0)
 	, m_responsiveness(1.0f)
@@ -121,36 +120,15 @@ public:
 	static const char* getTypeName() { return "collage_graphics"; };
 	virtual const char* GetTypeName() const { return CollageGraphics::getTypeName(); };
 	
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize() { 
-		m_initialized= true;
-		if (m_xmlfile!=""){
-			this->loadFile();
-		}
+	virtual int DoInitialize() { 
+		if (m_xmlfile!="") this->loadFile();
 		return 0; 
 	}
-	virtual void Finish() { 
-		m_initialized= false; 
-	}
-
-	virtual wxWindow* GetGUI(wxWindow* parent) {
-		CollageConfigurationGUI* ccgui=new CollageConfigurationGUI(parent);
-		ccgui->setFilePin(IComponent::FindInputPin(*this, "file"));
-		ccgui->setSensibilityPin(IComponent::FindInputPin(*this, "Responsiveness"));
-		ccgui->setDeadZonePin(IComponent::FindInputPin(*this, "deadZone"));
-		ccgui->setMaxPin(IComponent::FindInputPin(*this, "maximum"));
-		ccgui->setScenePin(IComponent::FindInputPin(*this, "NextScene"));
-		ccgui->setSpeedAnimationPin(IComponent::FindInputPin(*this, "SpeedAnimation"));
-		ccgui->setVanishPin(IComponent::FindInputPin(*this, "vanish"));
-		ccgui->InitPanel();
-		return ccgui;
-	}
 
 private:
 	//
 	// Attributes
 	//
-	bool m_initialized;
 	bool m_filechanged;
 	
 	SmartPtr<IOutputPin> m_oPinResult;
@@ -303,7 +281,7 @@ private:
 	int setFileName(string file){
 		m_xmlfile=file;
 		m_filechanged=true;
-		if (m_initialized)
+		if (IsInitialized())
 			return this->loadFile();
 		else
 			return 0;
@@ -496,7 +474,7 @@ public:
 };
 
 static spcore::IModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new CollageModule();
 	return g_module;
diff --git a/src/mod_hid/CMakeLists.txt b/src/mod_hid/CMakeLists.txt
new file mode 100755
index 0000000..d78f02f
--- /dev/null
+++ b/src/mod_hid/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 2.6)
+project(spmod_hid)
+
+set(spmod_hid_SRCS	
+	mod_hid.cpp
+	mousecontrol.h
+	mousecontrol.cpp
+)
+
+add_library (spmod_hid MODULE ${spmod_hid_SRCS})
+target_link_libraries(spmod_hid spcore)
+#target_link_libraries(spmod_hid ${Boost_THREAD_LIBRARY})
+
+#
+# X11
+#
+
+if(NOT WIN32)
+	find_package(X11 REQUIRED)
+	if (NOT X11_XTest_FOUND)
+		message (FATAL_ERROR "X11_XTest extensions not found.")
+	endif(NOT X11_XTest_FOUND)
+	include_directories(${X11_INCLUDE_DIR})
+	target_link_libraries(spmod_hid ${X11_X11_LIB})
+	target_link_libraries(spmod_hid ${X11_XTest_LIB})
+endif(NOT WIN32)
+
+INSTALL (TARGETS spmod_hid RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
\ No newline at end of file
diff --git a/src/mod_hid/mod_hid.cpp b/src/mod_hid/mod_hid.cpp
new file mode 100644
index 0000000..be4f91e
--- /dev/null
+++ b/src/mod_hid/mod_hid.cpp
@@ -0,0 +1,134 @@
+/////////////////////////////////////////////////////////////////////////////
+// File:        mod_hid.cpp
+// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
+// Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////////
+#include "spcore/component.h"
+#include "spcore/module.h"
+#include "spcore/libimpexp.h"
+#include "spcore/basictypes.h"
+
+#include "mousecontrol.h"
+
+using namespace spcore;
+
+namespace mod_hid {
+
+/**
+	mouse_output component
+
+		Send mouse events.
+		
+	Input pins:
+		left_click (any)	- Perform left click when message received.
+		right_click (any)	- Perform right click when message received.
+		middle_click (any)	- Perform middle click when message received.
+	
+	Ouput pins:		
+
+	Command line:
+*/
+class MouseOutput : public CComponentAdapter {
+public:
+	static const char* getTypeName() { return "mouse_output"; }
+	virtual const char* GetTypeName() const { return MouseOutput::getTypeName(); }
+	MouseOutput(const char * name, int argc, const char * argv[]) 
+	: CComponentAdapter(name, argc, argv)
+	{
+		//m_opinElapsed= CTypeInt::CreateOutputPin("elapsed");
+		//if (RegisterOutputPin(*m_opinElapsed)!= 0)
+		//	throw std::runtime_error("error registering output pin");
+
+		if (RegisterInputPin(*SmartPtr<IInputPin>(new InputPinClick("left_click", *this, MouseOutput::LEFT_CLICK), false))!= 0)
+			throw std::runtime_error("error creating input pin left_click");
+
+		if (RegisterInputPin(*SmartPtr<IInputPin>(new InputPinClick("right_click", *this, MouseOutput::RIGHT_CLICK), false))!= 0)
+			throw std::runtime_error("error creating input pin right_click");
+
+		if (RegisterInputPin(*SmartPtr<IInputPin>(new InputPinClick("middle_click", *this, MouseOutput::MIDDLE_CLICK), false))!= 0)
+			throw std::runtime_error("error creating input pin middle_click");
+	}
+
+	enum EClickType { LEFT_CLICK= 0, RIGHT_CLICK= 1, MIDDLE_CLICK= 2 } ;
+
+private:
+	virtual ~MouseOutput() {}
+
+	class InputPinClick : public CInputPinWriteOnly<CTypeAny, MouseOutput> {
+	public:
+		InputPinClick (const char * name, MouseOutput & component, MouseOutput::EClickType ct)
+		: CInputPinWriteOnly<CTypeAny, MouseOutput>(name, component) 
+		, m_clickType(ct) 
+		{			
+		}
+
+		virtual int DoSend(const CTypeAny & ) {
+			switch (m_clickType) {
+				case MouseOutput::LEFT_CLICK:
+					this->m_component->m_mouseControl.LeftClick();
+					break;
+				case MouseOutput::RIGHT_CLICK:
+					this->m_component->m_mouseControl.RightClick();
+					break;
+				case MouseOutput::MIDDLE_CLICK:
+					this->m_component->m_mouseControl.MiddleClick();
+					break;
+				default:
+					assert(false);
+			}
+			return 0;
+		}
+
+	private:
+		MouseOutput::EClickType m_clickType;
+	};
+
+	//
+	// Data members
+	//
+	//SmartPtr<IOutputPin> m_opinElapsed;
+	CMouseControl m_mouseControl;
+	
+};
+
+typedef ComponentFactory<MouseOutput> MouseOutputFactory;
+
+/* ******************************************************************************
+	hid  module
+****************************************************************************** */
+class HidModule : public CModuleAdapter {
+public:
+	HidModule() {
+		//
+		// components
+		//
+		RegisterComponentFactory(SmartPtr<spcore::IComponentFactory>(new MouseOutputFactory(), false));
+	}
+
+	~HidModule() {
+	}
+
+	virtual const char * GetName() const { return "mod_hid"; }
+};
+
+static spcore::IModule* g_module= NULL;
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
+{
+	if (g_module== NULL) g_module= new HidModule();
+	return g_module;
+}
+
+};
diff --git a/src/mod_hid/mousecontrol.cpp b/src/mod_hid/mousecontrol.cpp
new file mode 100644
index 0000000..83c6a6c
--- /dev/null
+++ b/src/mod_hid/mousecontrol.cpp
@@ -0,0 +1,552 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        mousecontrol.cpp
+// Purpose: cross platform mouse control api
+// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
+// Modified by: 
+// Created:     
+// Copyright:   (C) 2008-11 Cesar Mauri Loba - CREA Software Systems
+// 
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////////
+
+// TODO: under X11. Test XTest extensions enabled
+//if(!XTestQueryExtension(display, &ev, &er, &ma, &mi))
+//{
+//fprintf(stderr, "XTest extension not supported on server.\n");
+//exit(1);
+//}
+#include <math.h>
+#include <stdio.h>
+
+#if defined(WIN32)
+//
+// Windows
+//
+#define _WIN32_WINNT 0x0500
+#include <windows.h>
+#define MOUSE_EXTRA_INFO 69
+
+inline float roundf(float x) { return (x-floorf(x))>0.5 ? ceilf(x) : floorf(x); }
+
+#else	// WIN32
+//
+// Linux
+//
+#include <X11/extensions/XTest.h>
+#include <stdexcept>
+
+#endif // WIN32
+
+#include <assert.h>
+#include <string.h>
+#include "mousecontrol.h"
+
+// Mouse actions
+#define MOUSE_MOVE_ABS	0x8000		// Absolute motion
+#define MOUSE_MOVE_REL	0x0000		// Relative motion
+#define MOUSE_LEFTDOWN  0x0002		// Left button down
+#define MOUSE_LEFTUP    0x0004		// Left button up
+#define MOUSE_RIGHTDOWN   0x0008	// Right button down
+#define MOUSE_RIGHTUP     0x0010	// Right button up 
+#define MOUSE_MIDDLEDOWN  0x0020	// Middle button down
+#define MOUSE_MIDDLEUP    0x0040	// Middle button up 
+
+CMouseControl::CMouseControl (void* pDisplay)
+: m_enabledRestrictedWorkingArea(false)
+, m_enabledWrapPointer(false)
+#if !defined(WIN32)
+, m_closeDisplay(false)
+#endif
+{
+	m_leftPercent= m_rightPercent= m_topPercent= m_bottomPercent= 1.0f;
+        
+	// Under Windows display parameter is ignored
+	#if defined(WIN32)
+	assert (pDisplay== NULL);
+	#else
+	if (pDisplay) m_pDisplay= (Display *) pDisplay;
+	else {
+		m_pDisplay= XOpenDisplay(NULL);
+		m_closeDisplay= true;
+		assert (m_pDisplay);
+		if (!m_pDisplay) throw std::runtime_error("mousecontrol: cannot open display");
+	}	
+	#endif	
+
+	// Read screen size
+	OnDisplayChanged ();
+
+	m_VirtualXIni= m_VirtualYIni= 0;
+	m_VirtualHeight= (float) m_ScreenHeight; 
+	m_VirtualWidth= (float) m_ScreenWidth;
+
+	ResetClickArea ();
+
+	m_fDx= m_fDy= 1.0f;
+	m_minDeltaThreshold= 0.0f;
+	m_actualMotionWeight= 1.0f;
+	m_dxant= 0.0f; m_dyant= 0.0f;
+
+	for (int i= 0; i< ACCEL_ARRAY_SIZE; i++) m_accelArray[i]= (float) 1;
+}
+
+CMouseControl::~CMouseControl()
+{
+#if !defined(WIN32)
+	if (m_closeDisplay) XCloseDisplay(m_pDisplay);
+#endif
+}
+
+void CMouseControl::GetScreenSize()
+{
+#if defined(WIN32)
+	DEVMODE devMode;
+	// Get screen size. TODO: test with multiple displays
+	BOOL retval= EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devMode);
+	if (!retval) { exit (-1); }
+
+	m_ScreenHeight= devMode.dmPelsHeight;
+	m_ScreenWidth= devMode.dmPelsWidth;
+#else // Linux
+//	BEGIN_GUI_CALL_MUTEX();
+	m_ScreenHeight= DisplayHeight (m_pDisplay, DefaultScreen (m_pDisplay));
+	m_ScreenWidth= DisplayWidth (m_pDisplay, DefaultScreen (m_pDisplay));
+//	END_GUI_CALL_MUTEX();	
+#endif
+
+}
+
+void CMouseControl::GetPointerLocation (long& x, long& y)
+{
+#if defined(WIN32)
+
+	CURSORINFO pci;
+
+	pci.cbSize= sizeof(CURSORINFO);
+	pci.ptScreenPos.x= 0;
+	pci.ptScreenPos.y= 0;
+
+	GetCursorInfo(&pci);
+
+	x= pci.ptScreenPos.x;
+	y= pci.ptScreenPos.y;
+
+#else // Linux
+	
+	Window root, child;
+	int rootX, rootY, winX, winY;
+	unsigned int xstate;
+
+//	BEGIN_GUI_CALL_MUTEX();
+	Window rootWin= RootWindow (m_pDisplay, DefaultScreen (m_pDisplay));
+	XQueryPointer( m_pDisplay, rootWin, &root, &child, &rootX, &rootY, &winX, &winY, &xstate );
+//	END_GUI_CALL_MUTEX();
+	x= winX;
+	y= winY;
+#endif
+}
+
+void CMouseControl::OnDisplayChanged ()
+{
+	GetScreenSize();
+	RecomputeWorkingArea ();
+}
+
+void CMouseControl::SetAbsVirtualResolution (float xIni, float yIni, float width, float height)
+{
+	assert (xIni>= 0 && yIni>= 0 && width> 0 && height> 0);
+	
+	m_VirtualXIni= xIni;
+	m_VirtualYIni= yIni;
+	m_VirtualWidth= width;
+	m_VirtualHeight= height;
+}
+
+void CMouseControl::SetWorkingArea (float leftPercent, float rightPercent, float topPercent, float bottomPercent)
+{
+	SetTopPercent (topPercent);		
+	SetLeftPercent (leftPercent);
+	SetRightPercent (rightPercent);
+	SetBottomPercent (bottomPercent);
+}
+
+void CMouseControl::RecomputeWorkingArea ()
+{
+	m_minScreenX=	(m_ScreenWidth - 
+					 (int) ((float) m_ScreenWidth * m_leftPercent)) / 2;
+	m_minScreenY=	(m_ScreenHeight - 
+					 (int) ((float) m_ScreenHeight * m_topPercent)) / 2;
+	m_maxScreenX=	(m_ScreenWidth - 1) - (m_ScreenWidth - 
+					 (int) ((float) m_ScreenWidth * m_rightPercent)) / 2;
+	m_maxScreenY=	(m_ScreenHeight - 1) - (m_ScreenHeight - 
+					 (int) ((float) m_ScreenHeight * m_bottomPercent)) / 2;
+}
+
+void CMouseControl::SetClickArea (long minX, long minY, long maxX, long maxY)
+{
+	assert (minX>= 0 && minY>= 0);
+	assert (maxX< m_ScreenWidth && maxY< m_ScreenHeight);
+
+	m_minClicAreaX= minX;
+	m_minClicAreaY= minY;
+	m_maxClicAreaX= maxX;
+	m_maxClicAreaY= maxY;
+}
+
+void CMouseControl::ResetClickArea ()
+{
+	m_minClicAreaX= m_minClicAreaY= 0;
+	m_maxClicAreaX= m_maxScreenX;
+	m_maxClicAreaY= m_maxScreenY;
+}
+
+bool CMouseControl::CheckClickArea ()
+{
+	long x, y;
+
+	GetPointerLocation (x, y);
+	
+	return (x>= m_minClicAreaX && x<= m_maxClicAreaX &&
+			y>= m_minClicAreaY && y<= m_maxClicAreaY );		
+}
+
+void CMouseControl::SetRelAcceleration2 (long delta0, float factor0,
+						long delta1, float factor1)
+{
+	assert (delta0> 2 &&delta1> 2); 
+	assert (factor0> 0.0f && factor1> 0.0f);
+	
+	if (delta0>= ACCEL_ARRAY_SIZE) delta0= ACCEL_ARRAY_SIZE;
+	if (delta1>= ACCEL_ARRAY_SIZE) delta1= ACCEL_ARRAY_SIZE;
+
+	int i;
+
+	for (i= 0; i< delta0; i++) m_accelArray[i]= 1;
+	for (;i< delta1; i++) m_accelArray[i]= factor0;
+	float j= 0;
+	for (;i< ACCEL_ARRAY_SIZE; i++) {
+		m_accelArray[i]= factor0 * factor1 + j;
+		j+= 0.1f;
+	}
+}
+
+bool CMouseControl::EnforceWorkingAreaLimits (long &x, long &y)
+{
+	bool retval= false;
+
+	if (x< m_minScreenX) { x= m_minScreenX; retval= true; }
+	else if (x> m_maxScreenX) { x= m_maxScreenX; retval= true; }
+	
+	if (y< m_minScreenY) { y= m_minScreenY; retval= true; }
+	else if (y> m_maxScreenY) { y= m_maxScreenY; retval= true; }
+
+	return retval;
+}
+
+void CMouseControl::Virt2Fis (float virtX, float virtY, float &fisX, float &fisY)
+{
+	float fFisX, fFisY, fVirtWidth, fVirtHeight;
+
+	fFisX= virtX - m_VirtualXIni;
+	fFisY= virtY - m_VirtualYIni;
+	fVirtWidth= m_VirtualWidth; 
+	fVirtHeight= m_VirtualHeight;
+
+	if (fFisX< 0.0f) fFisX= 0.0f;
+	else if (fFisX>= fVirtWidth) fFisX= 1.0f; 
+	else fFisX/= fVirtWidth;
+
+	if (fFisY< 0.0f) fFisY= 0.0f;
+	else if (fFisY>= fVirtHeight) fFisY= 1.0f; 
+	else fFisY/= fVirtHeight;
+
+	// To integer
+	fisX= fFisX * (float) (m_ScreenWidth - 1);
+	fisY= fFisY * (float) (m_ScreenHeight - 1);
+}
+
+void CMouseControl::MovePointerAbs (float x, float y)
+{
+//	OnDisplayChanged ();
+
+	long iX, iY;
+	float fisX, fisY, dx, dy;	
+
+	Virt2Fis (x, y, fisX, fisY);
+
+	GetPointerLocation (iX, iY);	
+	dx= fisX - (float) iX;
+	dy= fisY - (float) iY;
+	
+	// Low-pass filter	
+	dx= dx * (1.0f - m_actualMotionWeight) + m_dxant * m_actualMotionWeight;
+	dy= dy * (1.0f - m_actualMotionWeight) + m_dyant * m_actualMotionWeight;
+	m_dxant= dx; m_dyant= dy;
+
+	// Map to screen coordinates
+	iX= iX + (long) dx;
+	iY= iY + (long) dy;
+	
+	EnforceWorkingAreaLimits (iX, iY);
+	DoMovePointerAbs (iX, iY);
+}
+
+float CMouseControl::MovePointerRel (float dx, float dy, int* dxRes, int* dyRes)
+{
+	OnDisplayChanged ();
+
+	// Apply factors
+	dx*= m_fDx;
+	dy*= m_fDy;
+
+	// Low-pass filter	
+	dx= dx * (1.0f - m_actualMotionWeight) + m_dxant * m_actualMotionWeight;
+	dy= dy * (1.0f - m_actualMotionWeight) + m_dyant * m_actualMotionWeight;
+	m_dxant= dx; m_dyant= dy;
+
+	// Acceleration
+	float distance= (float) ::sqrt (dx * dx + dy * dy);
+
+	unsigned int iAccelArray= (unsigned int) (distance + 0.5f);
+	if (iAccelArray>= ACCEL_ARRAY_SIZE) iAccelArray= ACCEL_ARRAY_SIZE - 1;
+	dx*= m_accelArray[iAccelArray];
+	dy*= m_accelArray[iAccelArray];
+
+	// Apply delta threshold
+	if (-m_minDeltaThreshold < dx && dx < m_minDeltaThreshold) dx= 0.0f;
+	if (-m_minDeltaThreshold < dy && dy < m_minDeltaThreshold) dy= 0.0f;
+	
+	int idx= (int) roundf(dx);
+	int idy= (int) roundf(dy);
+	long mouseX, mouseY;
+	if (m_enabledRestrictedWorkingArea && !m_enabledWrapPointer) {
+		GetPointerLocation (mouseX, mouseY);
+		if (mouseX + idx< m_minScreenX) idx= m_minScreenX - mouseX;
+		else if (mouseX + idx > m_maxScreenX) idx= m_maxScreenX - mouseX;
+		if (mouseY + idy < m_minScreenY) idy= m_minScreenY - mouseY;
+		else if (mouseY + idy > m_maxScreenY) idy= m_maxScreenY - mouseY;
+	}
+	
+	if (m_enabledWrapPointer) {
+		int minWrapX= 0;
+		int maxWrapX= m_ScreenWidth;
+		int minWrapY= 0;
+		int maxWrapY= m_ScreenHeight;
+				
+		if (m_enabledRestrictedWorkingArea) {
+			minWrapX= m_minScreenX;
+			maxWrapX= m_maxScreenX;
+			minWrapY= m_minScreenY;
+			maxWrapY= m_maxScreenY;
+		}
+
+		GetPointerLocation(mouseX, mouseY);
+		if (mouseX + idx < minWrapX) {
+			idx -= mouseX - minWrapX;
+			DoMovePointerAbs(maxWrapX, mouseY);
+		}		
+		if (mouseX + idx > maxWrapX) {
+			idx -= maxWrapX - mouseX;
+			DoMovePointerAbs(minWrapX, mouseY);
+		}
+		if (mouseY + idy < minWrapY) {
+			idy -= mouseY - minWrapY;
+			DoMovePointerAbs(mouseX, maxWrapY);
+		}
+		if (mouseY + idy > maxWrapY) {
+			idy -= maxWrapY - mouseY;
+			DoMovePointerAbs(mouseX, minWrapY);
+		}
+	}
+
+	DoMovePointerRel (idx, idy);
+	if (dxRes) *dxRes= idx;
+	if (dyRes) *dyRes= idy;
+
+	return (float) sqrt((double)(idx * idx + idy * idy));
+}
+
+void CMouseControl::DoMovePointerAbs (long x, long y)
+{
+	SendMouseCommand (x, y, MOUSE_MOVE_ABS);
+}
+
+void CMouseControl::DoMovePointerRel (long dx, long dy)
+{
+	SendMouseCommand (dx, dy, MOUSE_MOVE_REL);
+}
+
+// Send a mouse control system command
+void CMouseControl::SendMouseCommand (long x, long y, int flags)
+{
+#if defined(WIN32)
+	INPUT ip;
+
+	// Allways define MOUSEEVENTF_MOVE flag, other flags are coincident
+	// with native flags under windows
+	flags|= MOUSEEVENTF_MOVE;
+
+	if (flags & MOUSE_MOVE_ABS)
+	{
+		// Normalize absolute motion
+		x= (x * 65535) / (m_ScreenWidth - 1);
+		y= (y * 65535) / (m_ScreenHeight - 1);
+	}
+	ip.type = INPUT_MOUSE;
+	ip.mi.dwFlags = flags;
+	ip.mi.mouseData = 0;
+	ip.mi.dwExtraInfo = MOUSE_EXTRA_INFO;
+	ip.mi.time = 0;
+	ip.mi.dx= x;
+	ip.mi.dy= y;
+
+	SendInput(1, &ip, sizeof(ip));
+#else
+//	BEGIN_GUI_CALL_MUTEX();
+	if (flags== MOUSE_MOVE_ABS) 
+		// Absolute motion
+		XTestFakeMotionEvent(m_pDisplay, DefaultScreen(m_pDisplay), x, y, CurrentTime);
+	else if (flags== MOUSE_MOVE_REL) 
+		// Relative motion
+		XTestFakeRelativeMotionEvent(m_pDisplay, x, y, CurrentTime);		
+	else
+	{
+		// Button press
+		bool is_press= false;
+		unsigned int button= 0;;
+
+		switch (flags)
+		{		
+		case MOUSE_LEFTDOWN:  	// Left button down
+			button= 1; is_press= true;
+			break;
+		case MOUSE_LEFTUP:		// Left button up
+			button= 1; is_press= false;
+			break;
+		case MOUSE_RIGHTDOWN:	// Right button down
+			button= 3; is_press= true;
+			break;
+		case MOUSE_RIGHTUP:		// Right button up
+			button= 3; is_press= false;
+			break;
+		case MOUSE_MIDDLEDOWN:	// Middle button down
+			button= 2; is_press= true;
+			break;
+		case MOUSE_MIDDLEUP:	// Middle button up
+			button= 2; is_press= false;
+			break;
+		default:
+			assert (false);
+		}
+
+		XTestFakeButtonEvent(m_pDisplay, button, is_press, CurrentTime);
+	}
+	XFlush (m_pDisplay);
+//	END_GUI_CALL_MUTEX();
+#endif
+}
+
+void CMouseControl::CenterPointer ()
+{
+	DoMovePointerAbs(m_ScreenWidth/2, m_ScreenHeight/2);
+}
+
+bool CMouseControl::LeftDown ()
+{
+	if (CheckClickArea ()) {
+		SendMouseCommand (0, 0,	MOUSE_LEFTDOWN);
+		return true;
+	}
+
+	return false;
+}
+
+void CMouseControl::LeftUp ()
+{
+	SendMouseCommand (0, 0,	MOUSE_LEFTUP);
+}
+
+bool CMouseControl::MiddleDown ()
+{
+	if (CheckClickArea ()) {
+		SendMouseCommand (0, 0,	MOUSE_MIDDLEDOWN);
+		return true;
+	}
+
+	return false;
+}
+
+void CMouseControl::MiddleUp ()
+{
+	SendMouseCommand (0, 0,	MOUSE_MIDDLEUP);
+}
+
+bool CMouseControl::RightDown ()
+{
+	if (CheckClickArea ()) {
+		SendMouseCommand (0, 0,	MOUSE_RIGHTDOWN);
+		return true;
+	}
+	
+	return false;
+}
+
+void CMouseControl::RightUp ()
+{
+	SendMouseCommand (0, 0,	MOUSE_RIGHTUP);
+}
+
+bool CMouseControl::LeftClick ()
+{
+	if (CheckClickArea ()) {
+		LeftDown ();
+		LeftUp ();
+		return true;
+	}
+
+	return false;
+}
+
+bool CMouseControl::MiddleClick ()
+{
+	if (CheckClickArea ()) {
+		MiddleDown ();
+		MiddleUp ();
+		return true;
+	}
+
+	return false;
+}
+
+bool CMouseControl::RightClick ()
+{	
+	if (CheckClickArea ()) {
+		RightDown ();
+		RightUp ();
+		return true;
+	}
+
+	return false;
+}
+
+bool CMouseControl::LeftDblClick ()
+{
+	if (CheckClickArea ()) {
+		LeftClick ();
+		LeftClick ();
+		return true;
+	}
+
+	return false;
+}
diff --git a/src/mod_hid/mousecontrol.h b/src/mod_hid/mousecontrol.h
new file mode 100644
index 0000000..082e204
--- /dev/null
+++ b/src/mod_hid/mousecontrol.h
@@ -0,0 +1,167 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        mousecontrol.h
+// Purpose: cross platform mouse control api
+// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
+// Modified by: 
+// Created:     
+// Copyright:   (C) 2008-11 Cesar Mauri Loba - CREA Software Systems
+// 
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////////
+#if !defined(MOUSECONTROL_H)
+#define MOUSECONTROL_H
+
+#if !defined(WIN32)
+#include <X11/Xlib.h>		// Display struct
+#endif
+#include <stdlib.h>		// NULL
+#include <assert.h>		
+
+class CMouseControl
+{
+public:
+	CMouseControl(void* pDisplay= NULL);
+	virtual ~CMouseControl();
+
+	void SetRestrictedWorkingArea (bool value) { m_enabledRestrictedWorkingArea = value; }
+	bool GetRestrictedWorkingArea() const { return m_enabledRestrictedWorkingArea; }
+	void SetWorkingArea (float leftPercent, float rightPercent, float topPercent, float bottomPercent);
+	
+	void SetWrapPointer (bool value) { m_enabledWrapPointer = value; }
+	bool GetWrapPointer() const { return m_enabledWrapPointer; }
+
+	float GetTopPercent () const { return m_topPercent; }
+	void SetTopPercent (float topPercent) { 
+		//assert (0.009f < topPercent && topPercent <= 1.0f);
+		assert (0 <= topPercent && topPercent <= 1.0f);
+		m_topPercent = topPercent; 
+	}
+	float GetLeftPercent () const { return m_leftPercent; }
+	void SetLeftPercent (float leftPercent) { 
+		assert (0 <=  leftPercent && leftPercent <= 1.0f);
+		m_leftPercent = leftPercent; 
+	}
+	float GetRightPercent () const { return m_rightPercent; }
+	void SetRightPercent (float rightPercent) { 
+		assert (0 <=  rightPercent && rightPercent <= 1.0f);
+		m_rightPercent = rightPercent; 
+	}
+	float GetBottomPercent () const { return m_bottomPercent; }
+	void SetBottomPercent (float bottomPercent) { 
+		assert (0 <=  bottomPercent && bottomPercent <= 1.0f);
+		m_bottomPercent = bottomPercent;
+	}
+	
+	void SetClickArea (long minX, long minY, long maxX, long maxY);
+	void ResetClickArea ();
+	
+	void SetAbsVirtualResolution (float xIni, float yIni, 
+								  float width, float height);
+	void SetRelFactorX (float fDx) { m_fDx= fDx; }
+	void SetRelFactorY (float fDy) { m_fDy= fDy; }
+        
+	void SetRelFactors (float fDx, float fDy) {	SetRelFactorX (fDx); SetRelFactorY (fDy); }
+	void SetRelAcceleration2 (long delta0= 9999, float factor0= 1.0f,
+					long delta1= 9999, float factor1= 1.0f);
+
+	inline float GetRelDeltaThreshold () const;
+	inline void SetRelDeltaThreshold (float deltaThreshold);
+	
+	inline float GetLowPassFilterWeight () const;
+	inline void SetLowPassFilterWeight (float w);
+	
+	void MovePointerAbs (float x, float y);
+	void DoMovePointerAbs (long x, long y);
+	float MovePointerRel (float dx, float dy, int* dxRes= NULL, int* dyRes= NULL);
+	
+	void CenterPointer ();
+
+	// Click actions
+	bool LeftDown ();
+	void LeftUp ();
+	bool MiddleDown ();
+	void MiddleUp ();
+	bool RightDown ();
+	void RightUp ();
+	bool LeftClick ();
+	bool MiddleClick ();
+	bool RightClick ();
+	bool LeftDblClick ();
+
+	void GetPointerLocation (long& x, long& y);
+
+	// Display properties change (resolution)
+	void OnDisplayChanged ();
+
+protected:
+
+	void Virt2Fis (float virtX, float virtY, float &fisX, float &fisY);
+	bool CheckClickArea ();
+	bool EnforceWorkingAreaLimits (long &x, long &y);
+	void SendMouseCommand (long x, long y, int flags);
+	
+	void DoMovePointerRel (long dx, long dy);
+	void RecomputeWorkingArea ();
+
+	// TODO: derive a X11 file stuff for these
+	void GetScreenSize();
+	
+	
+private:	
+	int m_ScreenWidth, m_ScreenHeight;
+	int m_minScreenX, m_minScreenY, m_maxScreenX, m_maxScreenY;
+	float m_leftPercent, m_rightPercent, m_topPercent, m_bottomPercent;
+	int m_minClicAreaX, m_minClicAreaY, m_maxClicAreaX, m_maxClicAreaY;
+	float m_VirtualXIni, m_VirtualYIni;
+	float m_VirtualWidth, m_VirtualHeight;
+	float m_fDx, m_fDy;
+	float m_minDeltaThreshold;
+	float m_dxant, m_dyant;
+	// Motion low pass filter (relative motion)
+	float m_actualMotionWeight;
+	bool m_enabledRestrictedWorkingArea;
+	bool m_enabledWrapPointer;
+	
+#if !defined(WIN32)
+	bool m_closeDisplay;	// Destructor should close display connection?
+	Display* m_pDisplay;
+#endif
+	enum { ACCEL_ARRAY_SIZE= 30 };
+	float m_accelArray[ACCEL_ARRAY_SIZE];
+};
+
+inline float CMouseControl::GetLowPassFilterWeight () const
+{
+	return m_actualMotionWeight;
+}
+
+inline void CMouseControl::SetLowPassFilterWeight (float w)
+{ 
+	assert (0.0f<= w && 1.0f>= w);
+	m_actualMotionWeight= w; 
+}
+
+inline float CMouseControl::GetRelDeltaThreshold () const	
+{
+	return m_minDeltaThreshold;
+}
+
+inline void CMouseControl::SetRelDeltaThreshold (float deltaThreshold)	
+{
+	assert (deltaThreshold>= 0);
+
+	m_minDeltaThreshold= deltaThreshold;
+}
+
+#endif
diff --git a/src/mod_io/CMakeLists.txt b/src/mod_io/CMakeLists.txt
old mode 100755
new mode 100644
index df25c68..5f50aa3
--- a/src/mod_io/CMakeLists.txt
+++ b/src/mod_io/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.6)
-project(mod_io)
+project(spmod_io)
 
-set(mod_io_SRCS
+set(spmod_io_SRCS
 	mod_io.cpp
 	filebrowser.h
 	filebrowser.cpp
@@ -9,13 +9,16 @@ set(mod_io_SRCS
 	textfiledump.cpp
 )
 
-find_package(Boost COMPONENTS filesystem REQUIRED)
-add_library (mod_io SHARED ${mod_io_SRCS})
+add_library (spmod_io MODULE ${spmod_io_SRCS})
+
+# Boost
+find_package(Boost COMPONENTS filesystem system REQUIRED)
+target_link_libraries(spmod_io ${Boost_FILESYSTEM_LIBRARY})
+target_link_libraries(spmod_io ${Boost_SYSTEM_LIBRARY})
+target_link_libraries(spmod_io spcore)
 
-target_link_libraries(mod_io ${Boost_FILESYSTEM_LIBRARY})
-target_link_libraries(mod_io spcore)
 if (ENABLE_NLS)
-	target_link_libraries(mod_io ${LIBINTL_LIBRARIES})
+	target_link_libraries(spmod_io ${LIBINTL_LIBRARIES})
 endif(ENABLE_NLS)
 
-INSTALL (TARGETS mod_io RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+INSTALL (TARGETS spmod_io RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
diff --git a/src/mod_io/filebrowser.cpp b/src/mod_io/filebrowser.cpp
index 360e2fa..1796afb 100644
--- a/src/mod_io/filebrowser.cpp
+++ b/src/mod_io/filebrowser.cpp
@@ -28,6 +28,7 @@
 
 using namespace spcore;
 using namespace boost::filesystem;
+using namespace std;
 
 namespace mod_io {
 
@@ -90,7 +91,7 @@ FileBrowserComponent::FileBrowserComponent(const char * name, int argc, const ch
 	}
 }
 
-int FileBrowserComponent::Initialize()
+int FileBrowserComponent::DoInitialize()
 {
 	Refresh();
 
diff --git a/src/mod_io/filebrowser.h b/src/mod_io/filebrowser.h
index 23e9146..c3e8aed 100755
--- a/src/mod_io/filebrowser.h
+++ b/src/mod_io/filebrowser.h
@@ -59,8 +59,7 @@ public:
 	//
 	FileBrowserComponent(const char * name, int argc, const char * argv[]);
 	
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize();
+	virtual int DoInitialize();
 
 private:
 	//
diff --git a/src/mod_io/mod_io.cpp b/src/mod_io/mod_io.cpp
index afb2bae..8f64908 100644
--- a/src/mod_io/mod_io.cpp
+++ b/src/mod_io/mod_io.cpp
@@ -17,7 +17,7 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /////////////////////////////////////////////////////////////////////////////
 
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 #include "spcore/module.h"
 #include "filebrowser.h"
 #include "textfiledump.h"
@@ -40,7 +40,7 @@ public:
 };
 
 static spcore::IModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new IoModule();
 	return g_module;
diff --git a/src/mod_io/textfiledump.cpp b/src/mod_io/textfiledump.cpp
index 7fd933a..45ef880 100755
--- a/src/mod_io/textfiledump.cpp
+++ b/src/mod_io/textfiledump.cpp
@@ -21,6 +21,7 @@
 #include <stdio.h>
 
 using namespace spcore;
+using namespace std;
 
 namespace mod_io {
 
@@ -55,7 +56,7 @@ TextFileDumpComponent::TextFileDumpComponent(const char * name, int argc, const
 	}
 }
 
-int TextFileDumpComponent::Initialize()
+int TextFileDumpComponent::DoInitialize()
 {
 	Refresh();
 
diff --git a/src/mod_io/textfiledump.h b/src/mod_io/textfiledump.h
index e40cb2c..f201af9 100755
--- a/src/mod_io/textfiledump.h
+++ b/src/mod_io/textfiledump.h
@@ -55,8 +55,7 @@ public:
 	//
 	TextFileDumpComponent(const char * name, int argc, const char * argv[]);
 	
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize();
+	virtual int DoInitialize();
 
 private:
 	// Set a reasonable maximum size
diff --git a/src/mod_ipl_sdl/CMakeLists.txt b/src/mod_ipl_sdl/CMakeLists.txt
new file mode 100644
index 0000000..ae1bf27
--- /dev/null
+++ b/src/mod_ipl_sdl/CMakeLists.txt
@@ -0,0 +1,31 @@
+cmake_minimum_required(VERSION 2.6)
+project(spmod_ipl_sdl)
+
+set(spmod_ipl_sdl_SRCS
+	mod_ipl_sdl.cpp
+)
+
+FIND_PACKAGE( OpenCV REQUIRED )
+INCLUDE_DIRECTORIES (${OpenCV_INCLUDE_DIR})
+INCLUDE_DIRECTORIES (..)
+
+set (SDL_BUILDING_LIBRARY ON)
+find_package ( SDL REQUIRED )
+find_package ( SDL_gfx REQUIRED )
+include_directories (${SDL_INCLUDE_DIR})
+include_directories (${SDLGFX_INCLUDE_DIR})
+
+add_library (spmod_ipl_sdl MODULE ${spmod_ipl_sdl_SRCS})
+
+#
+# Cannot link against other modules
+#
+#target_link_libraries(spmod_ipl_sdl spmod_camera)
+#target_link_libraries(spmod_ipl_sdl spmod_sdl)
+
+target_link_libraries(spmod_ipl_sdl spcore)
+target_link_libraries(spmod_ipl_sdl ${SDL_LIBRARY})
+target_link_libraries(spmod_ipl_sdl ${SDLGFX_LIBRARY})
+target_link_libraries(spmod_ipl_sdl creavision)
+
+INSTALL (TARGETS spmod_ipl_sdl RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
\ No newline at end of file
diff --git a/src/mod_ipl_sdl/mod_ipl_sdl.cpp b/src/mod_ipl_sdl/mod_ipl_sdl.cpp
new file mode 100644
index 0000000..0a4a275
--- /dev/null
+++ b/src/mod_ipl_sdl/mod_ipl_sdl.cpp
@@ -0,0 +1,353 @@
+/////////////////////////////////////////////////////////////////////////////
+// File:        mod_ipl_sdl.cpp
+// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
+// Copyright:   (C) 2012 Cesar Mauri Loba - CREA Software Systems
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////////
+#include "mod_camera/iplimagetype.h"
+#include "mod_sdl/sdlsurfacetype.h"
+#include "spcore/libimpexp.h"
+#include <SDL_rotozoom.h>
+
+#include "creavision/crvimage.h"
+
+using namespace spcore;
+using namespace mod_sdl;
+using namespace mod_camera;
+
+namespace mod_ipl_sdl {
+
+static int Ipl2SDL_zoomSurface (const CTypeIplImage &src, SmartPtr<CTypeSDLSurface>& dst)
+{
+	const SDL_VideoInfo* vi= SDL_GetVideoInfo();
+	if (!vi) {
+		getSpCoreRuntime()->LogMessage(ICoreRuntime::LOG_ERROR, "SDL_GetVideoInfo call failed", "mod_collage");
+		return -1;
+	}
+
+	if (src.getImage()->depth!= IPL_DEPTH_8U) {
+		getSpCoreRuntime()->LogMessage(ICoreRuntime::LOG_ERROR, "IPL image format non-supported (depth).", "mod_collage");
+		return -1;
+	}
+
+	Uint32 rmask, gmask, bmask, amask= 0;
+	int nChannels= src.getImage()->nChannels;
+	const char* channelSeq= src.getImage()->channelSeq;
+
+	if (nChannels== 2) {
+		getSpCoreRuntime()->LogMessage(ICoreRuntime::LOG_ERROR, "IPL image format non-supported (# channels).", "mod_collage");
+		return -1;
+	}
+
+	if (nChannels== 1) { rmask= gmask= bmask= 0xff; }				
+	else {
+		if (channelSeq[0]== 'R' && channelSeq[1]== 'G' && channelSeq[2]== 'B') {
+			// RGB channel sequence
+			if (nChannels== 4) {
+				#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+					rmask = 0xff000000;
+					gmask = 0x00ff0000;
+					bmask = 0x0000ff00;
+					amask = 0x000000ff;
+				#else
+					rmask = 0x000000ff;
+					gmask = 0x0000ff00;
+					bmask = 0x00ff0000;
+					amask = 0xff000000;
+				#endif
+			}
+			else {
+				#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+					rmask = 0xff0000;
+					gmask = 0x00ff00;
+					bmask = 0x0000ff;
+				#else
+					rmask = 0x0000ff;
+					gmask = 0x00ff00;
+					bmask = 0xff0000;
+				#endif
+			}
+		}
+		else {
+			// BGR channel sequence
+			if (nChannels== 4) {
+			#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+				rmask = 0x000000ff;
+				gmask = 0x0000ff00;
+				bmask = 0x00ff0000;
+				amask = 0xff000000;
+			#else
+				rmask = 0xff000000;
+				gmask = 0x00ff0000;
+				bmask = 0x0000ff00;
+				amask = 0x000000ff;
+			#endif
+			}
+			else {
+			#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+				rmask = 0x0000ff;
+				gmask = 0x00ff00;
+				bmask = 0xff0000;
+			#else
+				rmask = 0xff0000;
+				gmask = 0x00ff00;
+				bmask = 0x0000ff;							
+			#endif
+			}
+		}
+	}			
+
+	int depth= nChannels * 8;
+
+	// Create surface from ipl image pixels
+	SDL_Surface *orig_surface= 
+		SDL_CreateRGBSurfaceFrom(
+			src.getImage()->imageData, 
+			src.getImage()->width, 
+			src.getImage()->height,
+			depth, 
+			src.getImage()->widthStep,
+			rmask, gmask, bmask, amask);
+
+	// Compute zoom ratio
+	double zoomx= (double) vi->current_w / (double) src.getImage()->width;
+	double zoomy= (double) vi->current_h / (double) src.getImage()->height;
+	
+	SDL_Surface* result_surface= zoomSurface (orig_surface, zoomx, zoomy, SMOOTHING_OFF);
+	
+	dst->setSurface(result_surface);
+	
+	// Free orig_surface
+	SDL_FreeSurface(orig_surface);
+
+	return 0;
+}
+
+// -2 not-supported error, -1 fatal error
+static int Ipl2SDL_opencv (const CTypeIplImage &src, SmartPtr<CTypeSDLSurface>& dst)
+{
+	const SDL_VideoInfo* vi= SDL_GetVideoInfo();
+	if (!vi) {
+		getSpCoreRuntime()->LogMessage(ICoreRuntime::LOG_ERROR, "SDL_GetVideoInfo call failed", "mod_collage");
+		return -1;
+	}
+
+	//
+	// Temporal IPL image to match colorspace
+	//
+	
+	// frame buffer channel sequence
+	if (vi->vfmt->BytesPerPixel== 2) return -2; // Not supported.
+	int fbOrder;	// false RGB, true BGR
+	int fbHasAlpha= 0;
+	if (vi->vfmt->BytesPerPixel== 4) fbHasAlpha= 1;
+
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+	if (vi->vfmt->Rmask> vi->vfmt->Bmask) fbOrder= 0;
+	else fbOrder= 1;
+#else		
+	if (vi->vfmt->Rmask> vi->vfmt->Bmask) fbOrder= 1;
+	else fbOrder= 0;
+#endif
+
+	// src image channel order
+	int srcOrder;	// false RGB, true BGR
+	int srcHasAlpha= 0;
+	if (src.getImage()->nChannels== 2) return -2;	// Non-supported
+	if (src.getImage()->nChannels== 4) srcHasAlpha= 1;
+
+	if (src.getImage()->channelSeq[0]== 'R' || src.getImage()->channelSeq[0]== 'r') srcOrder= 0;
+	else srcOrder= 1;
+
+	// conversion code
+	int code= -1;
+	if (src.getImage()->nChannels== 1) {
+		// source is GRAY
+		if (fbOrder) {
+			if (fbHasAlpha) code= CV_GRAY2BGRA;
+			else code= CV_GRAY2BGR;
+		}
+		else {
+			if (fbHasAlpha) code= CV_GRAY2RGBA;
+			else code= CV_GRAY2RGB;
+		}
+	}
+	else {
+		// source has colour
+		static const int codeArray[]=	// srcOrder, srcHasAlpha, fbOrder, fbHasAlpha
+		{
+			-1,				// b0000
+			CV_RGB2RGBA,	// b0001
+			CV_RGB2BGR,		// b0010
+			CV_RGB2BGRA,	// b0011
+			CV_RGBA2RGB,	// b0100
+			-1,				// b0101
+			CV_RGBA2BGR,	// b0110
+			CV_RGBA2BGRA,	// b0111
+			CV_BGR2RGB,		// b1000
+			CV_BGR2RGBA,	// b1001
+			-1,				// b1010
+			CV_BGR2BGRA,	// b1011
+			CV_BGRA2RGB,	// b1100
+			CV_BGRA2RGBA,	// b1101
+			CV_BGRA2BGR,	// b1110
+			-1				// b1111
+		};
+		
+		code= codeArray[(srcOrder << 3) | (srcHasAlpha << 2) | (fbOrder << 1) | fbHasAlpha];
+	}
+
+	// Create tmp img
+	CIplImage* srcImg_tmp= NULL;
+	if (code!= -1) {
+		const char* fbChannelSeq= NULL;
+		if (fbOrder) {
+			if (fbHasAlpha) fbChannelSeq= "BGRA";
+			else fbChannelSeq= "BGR";
+		}
+		else {
+			if (fbHasAlpha) fbChannelSeq= "RGBA";
+			else fbChannelSeq= "RGB";
+		}
+		srcImg_tmp= new CIplImage (src.getImage()->width, src.getImage()->height, IPL_DEPTH_8U, fbChannelSeq);
+		cvCvtColor(src.getImage(), srcImg_tmp->ptr(), code );
+	}
+
+	//
+	// Temporal IPL image using the SDL pixels (on hardware)
+	//
+
+	// Create surface
+	SDL_Surface* surface_result= SDL_CreateRGBSurface(
+		SDL_HWSURFACE, 
+		vi->current_w, vi->current_h, 
+		vi->vfmt->BitsPerPixel, 
+		vi->vfmt->Rmask, vi->vfmt->Gmask, vi->vfmt->Bmask, vi->vfmt->Amask);
+
+	// Create IPL image with the same properties as the resulting sdl format
+	IplImage* img_result= cvCreateImageHeader( cvSize(vi->current_w, vi->current_h), IPL_DEPTH_8U, vi->vfmt->BytesPerPixel );
+
+	// Adjust fields to meet fb format
+	for (int i= 0; i< 4; ++i) img_result->channelSeq[i]= src.getImage()->channelSeq[i];
+	img_result->widthStep= surface_result->pitch;
+	img_result->imageData= static_cast<char*>(surface_result->pixels);	// Point to SDL pixels
+	img_result->imageSize= surface_result->pitch * surface_result->h;
+
+	// Resize
+	if (SDL_MUSTLOCK(surface_result)) SDL_LockSurface(surface_result);
+	//cvConvertScale (src.getImage(), img_result, scale, 0);
+	if (code!= -1)
+		cvResize(srcImg_tmp->ptr(), img_result, CV_INTER_LINEAR);
+	else
+		cvResize(src.getImage(), img_result, CV_INTER_LINEAR);
+	if (SDL_MUSTLOCK(surface_result)) SDL_UnlockSurface(surface_result);
+
+	// Release resources
+	cvReleaseImageHeader(&img_result);
+	delete srcImg_tmp;
+
+	// Store result
+	dst->setSurface(surface_result);
+
+	return 0;
+}
+
+
+
+
+/* ******************************************************************************
+	ipl2sdl		Convert IPL image into SDL surfaces
+
+	Input pins:
+		in (iplimage): input image
+
+	Output pins:
+		out (sdl_surface): output sdl surface
+
+	Command line flags:		
+*/
+
+class Ipl2Sdl : public CComponentAdapter
+{
+public:
+	static const char * getTypeName() { return "ipl2sdl"; }
+	virtual const char * GetTypeName() const { return Ipl2Sdl::getTypeName(); }
+
+	Ipl2Sdl(const char * name, int argc, const char * argv[])
+	: CComponentAdapter(name, argc, argv)
+	{
+		m_oPinResult= CTypeSDLSurface::CreateOutputPin("out");
+		if (m_oPinResult.get()== NULL)
+			// Output pin creation failed. Shouldn't happen but...
+			throw std::runtime_error("Ipl2Sdl: output pin creation failed.");
+		RegisterOutputPin (*m_oPinResult);
+
+		RegisterInputPin (*SmartPtr<InputPinIPL>(new InputPinIPL(*this), false));
+		
+		m_SDLSurface= CTypeSDLSurface::CreateInstance();
+		if (m_SDLSurface.get()== NULL)
+			throw std::runtime_error("Ipl2Sdl: cannot create internal instance.");
+	}
+
+private:
+	SmartPtr<CTypeSDLSurface> m_SDLSurface;
+	SmartPtr<spcore::IOutputPin> m_oPinResult;
+
+	// Write pin to send the SDL surface
+	class InputPinIPL : public CInputPinWriteOnly<CTypeIplImage, Ipl2Sdl> {
+	public:
+		InputPinIPL (Ipl2Sdl & component) : CInputPinWriteOnly<CTypeIplImage, Ipl2Sdl>("in", component) {}
+		virtual int DoSend(const CTypeIplImage &src) {
+			assert (getSpCoreRuntime()->IsMainThread());
+			if (!getSpCoreRuntime()->IsMainThread()) {
+				getSpCoreRuntime()->LogMessage (ICoreRuntime::LOG_ERROR, "message from non-main thread. ignoring", "ipl2sdl");
+				return -1;
+			}
+			else {
+				// First try the fastest function
+				int retval= Ipl2SDL_opencv(src, m_component->m_SDLSurface);
+				if (retval== -2) 
+					// If the previous function failed by a non-fatal error try the slow function
+					retval= Ipl2SDL_zoomSurface (src, m_component->m_SDLSurface);
+				if (retval) return retval;
+				
+				return m_component->m_oPinResult->Send (m_component->m_SDLSurface);
+			}
+		}
+	};
+};
+
+// camera_viewer component factory
+typedef ComponentFactory<Ipl2Sdl> Ipl2SdlFactory;
+
+/* ******************************************************************************
+	sdl_base module
+*/
+class Ipl2SdlModule : public spcore::CModuleAdapter {
+public:
+	Ipl2SdlModule() {
+		RegisterComponentFactory(SmartPtr<spcore::IComponentFactory>(new Ipl2SdlFactory(), false));
+	}
+	virtual const char * GetName() const { return "mod_ipl_sdl"; }
+};
+
+static spcore::IModule* g_module= NULL;
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
+{
+	if (g_module== NULL) g_module= new Ipl2SdlModule();
+	return g_module;
+}
+
+};
diff --git a/src/mod_midi/CMakeLists.txt b/src/mod_midi/CMakeLists.txt
index 7f2bf98..79d4db4 100755
--- a/src/mod_midi/CMakeLists.txt
+++ b/src/mod_midi/CMakeLists.txt
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 2.8)
-project(mod_midi)
+project(spmod_midi)
 
 find_package ( PortMidi REQUIRED )
 if (MSVC)	
@@ -10,7 +10,7 @@ if (MSVC)
 	install_to_msvc_build_directory("${EXECUTABLE_OUTPUT_PATH}" "${PortMidi_RUNTIME_DBG}")
 endif(MSVC)
 
-set(mod_midi_SRCS
+set(spmod_midi_SRCS
 	${CUSTOM_INCLUDE_PATH}/mod_midi/midi_types.h
 	mod_midi.cpp
 	midiconfiggui.h
@@ -18,14 +18,16 @@ set(mod_midi_SRCS
 )
 
 include_directories (${PortMidi_INCLUDE_DIRS})
-add_library (mod_midi SHARED ${mod_midi_SRCS})
-target_link_libraries(mod_midi spcore)
-target_link_libraries(mod_midi ${PortMidi_LIBRARIES})
-target_link_libraries(mod_midi ${wxWidgets_LIBRARIES})
+add_library (spmod_midi MODULE ${spmod_midi_SRCS})
+target_link_libraries(spmod_midi spcore)
+target_link_libraries(spmod_midi ${PortMidi_LIBRARIES})
+target_link_libraries(spmod_midi ${wxWidgets_LIBRARIES})
 
-ADD_SUBDIRECTORY(tests)
+IF(BUILD_TESTS)
+	ADD_SUBDIRECTORY(tests)
+ENDIF(BUILD_TESTS)
 
-INSTALL (TARGETS mod_midi RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
+INSTALL (TARGETS spmod_midi RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
 
 if(WIN32)
 	install(FILES ${PortMidi_RUNTIME_DBG} DESTINATION "${LIBRUNTIMEDIR}" CONFIGURATIONS Debug)
diff --git a/src/mod_midi/mod_midi.cpp b/src/mod_midi/mod_midi.cpp
index b70933a..9fe2bd9 100644
--- a/src/mod_midi/mod_midi.cpp
+++ b/src/mod_midi/mod_midi.cpp
@@ -20,7 +20,7 @@
 #include "spcore/component.h"
 #include "spcore/module.h"
 #include "spcore/basictypes.h"
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 #include "spcore/pinimpl.h"
 #include "portmidi.h"
 #include "midiconfiggui.h"
@@ -33,6 +33,7 @@ BOOST_STATIC_ASSERT(sizeof(unsigned int) == sizeof(PmTimestamp));
 BOOST_STATIC_ASSERT(sizeof(unsigned int) == sizeof(PmMessage));
 
 using namespace spcore;
+using namespace std;
 
 namespace mod_midi {
 
@@ -228,9 +229,7 @@ public:
 		RegisterInputPin (*SmartPtr<InputPinAllOff>(new InputPinAllOff(*this), false));
 	}
 
-	virtual bool NeedsInitialization() { return true; }
-
-	virtual int Initialize() {
+	virtual int DoInitialize() {
 		if (m_stream)
 			// Already initialized
 			return 0;
@@ -254,7 +253,7 @@ public:
 		return 0;
 	}
 
-	virtual void Finish() {
+	virtual void DoFinish() {
 		if (m_stream) {
 			// Stop sound
 			AllNotesOff ();
@@ -263,6 +262,13 @@ public:
 			m_stream= NULL;
 		}
 	}
+
+	virtual void DoStop() {
+		if (m_stream) {
+			// Stop sound
+			AllNotesOff ();			
+		}
+	}
 private:
 	//
 	// Attributes
@@ -354,7 +360,7 @@ public:
 };
 
 static MidiModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new MidiModule();
 	return g_module;
diff --git a/src/mod_midi/tests/CMakeLists.txt b/src/mod_midi/tests/CMakeLists.txt
index c403d5c..a5afb7a 100755
--- a/src/mod_midi/tests/CMakeLists.txt
+++ b/src/mod_midi/tests/CMakeLists.txt
@@ -5,7 +5,7 @@ add_executable(test_mod_midi_config_gui test_mod_midi_config_gui.cpp)
 target_link_libraries(test_mod_midi_config_gui spcore)
 target_link_libraries(test_mod_midi_config_gui testcommon)
 target_link_libraries(test_mod_midi_config_gui nvwa)
-target_link_libraries(test_mod_midi_config_gui mod_wiimotes)
+#target_link_libraries(test_mod_midi_config_gui mod_wiimotes)
 target_link_libraries(test_mod_midi_config_gui ${wxWidgets_LIBRARIES})
 add_test (NAME test_mod_midi_config_gui COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_mod_midi_config_gui>)
 
diff --git a/src/mod_puredata/CMakeLists.txt b/src/mod_puredata/CMakeLists.txt
index fd529c0..4d37804 100755
--- a/src/mod_puredata/CMakeLists.txt
+++ b/src/mod_puredata/CMakeLists.txt
@@ -1,10 +1,10 @@
 cmake_minimum_required(VERSION 2.6)
-project(mod_puredata)
+project(spmod_puredata)
 
 ADD_SUBDIRECTORY(oscpack)
 INCLUDE_DIRECTORIES (oscpack)
 
-set(mod_puredata_SRCS
+set(spmod_puredata_SRCS
 	puredatawrapper.h
 	puredatawrapper.cpp
 	puredataconfig.h
@@ -25,12 +25,12 @@ endif(NOT ENABLE_WXWIDGETS)
 
 find_package(wxWidgets COMPONENTS core base net REQUIRED)
 
-add_library (mod_puredata SHARED ${mod_puredata_SRCS})
-target_link_libraries(mod_puredata spcore)
-target_link_libraries(mod_puredata oscpack)
-target_link_libraries(mod_puredata ${wxWidgets_LIBRARIES})
+add_library (spmod_puredata MODULE ${spmod_puredata_SRCS})
+target_link_libraries(spmod_puredata spcore)
+target_link_libraries(spmod_puredata oscpack)
+target_link_libraries(spmod_puredata ${wxWidgets_LIBRARIES})
 
-INSTALL (TARGETS mod_puredata RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
+INSTALL (TARGETS spmod_puredata RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
 if (WIN32)
 	if (MSVC)
 		install_to_msvc_build_directory( "${EXECUTABLE_OUTPUT_PATH}" "${wxWidgets_ROOT_DIR}/lib/vc_dll/wxbase28ud_vc_custom.dll")		
diff --git a/src/mod_puredata/mod_puredata.cpp b/src/mod_puredata/mod_puredata.cpp
old mode 100755
new mode 100644
index 7729106..07b08ff
--- a/src/mod_puredata/mod_puredata.cpp
+++ b/src/mod_puredata/mod_puredata.cpp
@@ -20,7 +20,7 @@
 #include "spcore/component.h"
 #include "spcore/module.h"
 #include "spcore/basictypes.h"
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 #include "spcore/pinimpl.h"
 
 #include "puredatawrapper.h"
@@ -51,7 +51,7 @@ public:
 };
 
 static PureDataModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new PureDataModule();
 	return g_module;
diff --git a/src/mod_puredata/playwithvoice.cpp b/src/mod_puredata/playwithvoice.cpp
index 0a9d13c..a02d841 100755
--- a/src/mod_puredata/playwithvoice.cpp
+++ b/src/mod_puredata/playwithvoice.cpp
@@ -43,6 +43,7 @@
 #include <iostream>
 
 using namespace spcore;
+using namespace std;
 
 namespace mod_puredata {
 
@@ -128,7 +129,7 @@ wxWindow* PlayWithVoiceComponent::GetGUI(wxWindow * parent)
 	return m_panel;
 }
 
-int PlayWithVoiceComponent::Start()
+int PlayWithVoiceComponent::DoStart()
 {
 	if (m_running) return 0;
 
@@ -166,7 +167,7 @@ int PlayWithVoiceComponent::Start()
 	return 0;
 }
 
-void PlayWithVoiceComponent::Stop()
+void PlayWithVoiceComponent::DoStop()
 {
 	if (!m_running) return;
 
diff --git a/src/mod_puredata/playwithvoice.h b/src/mod_puredata/playwithvoice.h
index 557a51d..57c30d9 100755
--- a/src/mod_puredata/playwithvoice.h
+++ b/src/mod_puredata/playwithvoice.h
@@ -273,10 +273,10 @@ public:
 	virtual wxWindow* GetGUI(wxWindow * parent);
 	void OnPanelDestroyed ();
 	
-	virtual bool ProvidesExecThread() { return true; }
+	virtual bool ProvidesExecThread() const { return true; }
 	
-	virtual int Start();
-    virtual void Stop();
+	virtual int DoStart();
+    virtual void DoStop();
 		
 	//
 	//
diff --git a/src/mod_puredata/puredataconfig.cpp b/src/mod_puredata/puredataconfig.cpp
index ac21a1a..9002f14 100755
--- a/src/mod_puredata/puredataconfig.cpp
+++ b/src/mod_puredata/puredataconfig.cpp
@@ -46,13 +46,13 @@
 ////@end XPM images
 
 using namespace spcore;
+using namespace std;
 
 namespace mod_puredata {
 
 PureDataConfigComponent::PureDataConfigComponent(const char * name, int argc, const char * argv[])
 : CComponentAdapter(name, argc, argv)
 , m_pdError(false)
-, m_initialized(false)
 , m_panel(NULL)
 , m_oscIn(50003, this)
 , m_oscOut(50002)
@@ -125,10 +125,8 @@ wxWindow* PureDataConfigComponent::GetGUI(wxWindow * parent)
 
 
 	
-int PureDataConfigComponent::Initialize()
+int PureDataConfigComponent::DoInitialize()
 {
-	if (m_initialized) return 0;
-
 	try {
 		// Register this patch (which starts pd)
 		PureDataController::getInstance()->RegisterPatch(this);
@@ -137,9 +135,7 @@ int PureDataConfigComponent::Initialize()
 		m_oscOut.Open();
 
 		// Open inbound socket and starts listening to it
-		m_oscIn.Open(); //Run(true);
-
-		m_initialized= true;
+		m_oscIn.Open();
 	}
 	catch (std::exception& e) {
 		getSpCoreRuntime()->LogMessage(ICoreRuntime::LOG_ERROR, e.what(),  GetTypeName());
@@ -150,10 +146,8 @@ int PureDataConfigComponent::Initialize()
 	return 0;	
 }
  
-void PureDataConfigComponent::Finish()
+void PureDataConfigComponent::DoFinish()
 {
-	if (!m_initialized) return;
-
 	// Save settings
 	SaveSettings();
 
@@ -165,7 +159,6 @@ void PureDataConfigComponent::Finish()
 	
 	try {
 		PureDataController::getInstance()->UnregisterPatch(this);
-		m_initialized= false;
 	}
 	catch (std::exception& e) {
 		assert (false);
diff --git a/src/mod_puredata/puredataconfig.h b/src/mod_puredata/puredataconfig.h
index 572cede..3ab7475 100755
--- a/src/mod_puredata/puredataconfig.h
+++ b/src/mod_puredata/puredataconfig.h
@@ -187,10 +187,8 @@ public:
 	virtual wxWindow* GetGUI(wxWindow * parent);
 	void OnPanelDestroyed ();
 	
-	virtual bool NeedsInitialization() { return true; }
-	
-	virtual int Initialize();
-    virtual void Finish();
+	virtual int DoInitialize();
+    virtual void DoFinish();
 		
 	//
 	//
@@ -232,7 +230,6 @@ private:
 	virtual ~PureDataConfigComponent();
 	
 	bool m_pdError;
-	bool m_initialized;
 	PureDataConfigPanel* m_panel;
 
 	COscIn m_oscIn;
diff --git a/src/mod_score_player/CMakeLists.txt b/src/mod_score_player/CMakeLists.txt
index 7094785..cc48d1f 100755
--- a/src/mod_score_player/CMakeLists.txt
+++ b/src/mod_score_player/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.6)
-project(mod_score_player)
+project(spmod_score_player)
 
-set(mod_score_player_SRCS
+set(spmod_score_player_SRCS
 	mod_score_player.cpp
 	scoreplayer.h
 	scoreplayer.cpp
@@ -9,8 +9,8 @@ set(mod_score_player_SRCS
 	instrselect.cpp
 )
 
-add_library (mod_score_player SHARED ${mod_score_player_SRCS})
-target_link_libraries(mod_score_player spcore)
-target_link_libraries(mod_score_player ${Boost_THREAD_LIBRARY})
+add_library (spmod_score_player MODULE ${spmod_score_player_SRCS})
+target_link_libraries(spmod_score_player spcore)
+target_link_libraries(spmod_score_player ${Boost_THREAD_LIBRARY})
 
-INSTALL (TARGETS mod_score_player RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+INSTALL (TARGETS spmod_score_player RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
\ No newline at end of file
diff --git a/src/mod_score_player/instrselect.cpp b/src/mod_score_player/instrselect.cpp
index 419186a..4a73f80 100755
--- a/src/mod_score_player/instrselect.cpp
+++ b/src/mod_score_player/instrselect.cpp
@@ -30,6 +30,7 @@
 
 using namespace spcore;
 using namespace boost;
+using namespace std;
 
 namespace mod_score_player {
 
@@ -170,7 +171,6 @@ static const unsigned int g_instruments_size= sizeof(g_instruments) / sizeof(g_i
 
 InstrumentSelectorComponent::InstrumentSelectorComponent(const char * name, int argc, const char * argv[])
 : CComponentAdapter(name, argc, argv)
-, m_initialized(false)
 , m_instrIdx(0)	
 {
 	//
@@ -261,11 +261,8 @@ void InstrumentSelectorComponent::AddInstrumentToSet(unsigned int num, bool appe
 	m_instrumentSet.push_back(nn);
 }
 
-int InstrumentSelectorComponent::Initialize()
+int InstrumentSelectorComponent::DoInitialize()
 {
-	if (m_initialized) return 0;
-	m_initialized= true;
-
 	assert (m_instrIdx< m_instrumentSet.size());
 
 	//
@@ -288,11 +285,6 @@ int InstrumentSelectorComponent::Initialize()
 	return 0;
 }
 
-void InstrumentSelectorComponent::Finish()
-{
-	m_initialized= false;
-}
-
 void InstrumentSelectorComponent::SendNameAndMIDINumber()
 {
 	// Name
diff --git a/src/mod_score_player/instrselect.h b/src/mod_score_player/instrselect.h
index 99f4eb0..35ff61a 100755
--- a/src/mod_score_player/instrselect.h
+++ b/src/mod_score_player/instrselect.h
@@ -55,9 +55,7 @@ public:
 
 	InstrumentSelectorComponent(const char * name, int argc, const char * argv[]);
 
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize();
-	virtual void Finish();
+	virtual int DoInitialize();
 
 private:
 	//
@@ -71,7 +69,6 @@ private:
 	//
 	// Data members
 	//
-	bool m_initialized;
 	unsigned char m_instrIdx;	
 	std::vector<struct Name_MIDINum> m_instrumentSet;
 	SmartPtr<spcore::IOutputPin> m_oPinInstruments;
diff --git a/src/mod_score_player/mod_score_player.cpp b/src/mod_score_player/mod_score_player.cpp
old mode 100755
new mode 100644
index f3d80d6..4bcb422
--- a/src/mod_score_player/mod_score_player.cpp
+++ b/src/mod_score_player/mod_score_player.cpp
@@ -17,7 +17,7 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /////////////////////////////////////////////////////////////////////////////
 
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 #include "spcore/module.h"
 #include "scoreplayer.h"
 #include "instrselect.h"
@@ -40,7 +40,7 @@ public:
 };
 
 static spcore::IModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new ScorePlayerModule();
 	return g_module;
diff --git a/src/mod_score_player/scoreplayer.cpp b/src/mod_score_player/scoreplayer.cpp
index 08bc648..c294004 100644
--- a/src/mod_score_player/scoreplayer.cpp
+++ b/src/mod_score_player/scoreplayer.cpp
@@ -37,6 +37,7 @@
 
 using namespace spcore;
 using namespace boost;
+using namespace std;
 
 namespace mod_score_player {
 
@@ -56,7 +57,6 @@ ScorePlayerComponent::ScorePlayerComponent(const char * name, int argc, const ch
 , m_newChannel(0)
 , m_originalChannel(0)
 , m_scoreWrap(false)
-, m_initialized(false)
 , m_duration(500)
 , m_runningChord(-1)
 , m_lastPlayedChord(-1)
@@ -121,21 +121,9 @@ ScorePlayerComponent::ScorePlayerComponent(const char * name, int argc, const ch
 	m_progressFactor= 1.0f / (float) m_score.size();
 }
 
-int ScorePlayerComponent::Initialize() {
-	m_initialized= true;
-	return 0;
-}
-
-void ScorePlayerComponent::Finish()
-{
-	if (m_initialized) {
-		m_initialized= false;
-	}
-}
-
 void ScorePlayerComponent::StopAllNotes()
 {
-	assert (m_initialized);
+	assert (IsInitialized());
 
 	m_note->SetStatus(0xB, m_channel);
 	m_note->SetData1(123);
@@ -215,8 +203,8 @@ void ScorePlayerComponent::ProcessPointerUpdate (float pointer)
 
 void ScorePlayerComponent::OnPinPointer (const CTypeFloat & msg)
 {
-	assert (m_initialized);
-	if (!m_initialized) return;
+	assert (this->IsInitialized());
+	if (!this->IsInitialized()) return;
 
 	// In principle pointer should be between 0 and 1.0f, so in debug
 	// mode we assert to help developers to detect the error
@@ -233,8 +221,8 @@ void ScorePlayerComponent::OnPinPointer (const CTypeFloat & msg)
 
 void ScorePlayerComponent::OnPinProgress (const CTypeFloat & msg)
 {
-	assert (m_initialized);
-	if (!m_initialized) return;
+	assert (IsInitialized());
+	if (!IsInitialized()) return;
 
 	if (!m_scoreWrap) {
 		m_progressPointer+= msg.getValue() * m_progressFactor;
diff --git a/src/mod_score_player/scoreplayer.h b/src/mod_score_player/scoreplayer.h
index 057c34f..a97abd4 100644
--- a/src/mod_score_player/scoreplayer.h
+++ b/src/mod_score_player/scoreplayer.h
@@ -87,10 +87,6 @@ public:
 
 	ScorePlayerComponent(const char * name, int argc, const char * argv[]);
 
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize();
-	virtual void Finish();
-
 	//
 	// Types
 	//
@@ -118,8 +114,6 @@ private:
 
 	bool m_scoreWrap;
 
-	bool m_initialized;
-
 	// Note duration
 	unsigned int m_duration;
 
diff --git a/src/mod_sdl/CMakeLists.txt b/src/mod_sdl/CMakeLists.txt
index 5ccd6f5..c877d1d 100755
--- a/src/mod_sdl/CMakeLists.txt
+++ b/src/mod_sdl/CMakeLists.txt
@@ -1,10 +1,10 @@
 cmake_minimum_required(VERSION 2.6)
-project(mod_sdl)
+project(spmod_sdl)
 
 set (SDL_BUILDING_LIBRARY ON)
 find_package ( SDL REQUIRED )
 
-set(mod_sdl_SRCS
+set(spmod_sdl_SRCS
 	${CUSTOM_INCLUDE_PATH}/mod_sdl/sdlsurfacetype.h
 	mod_sdl.cpp
 )
@@ -17,18 +17,20 @@ set(mod_sdl_gui_SRCS
 include_directories (${SDL_INCLUDE_DIR})
 
 # Base library
-add_library (mod_sdl SHARED ${mod_sdl_SRCS})
-target_link_libraries(mod_sdl spcore)
-target_link_libraries(mod_sdl ${SDL_LIBRARY})
+add_library (spmod_sdl MODULE ${spmod_sdl_SRCS})
+target_link_libraries(spmod_sdl spcore)
+target_link_libraries(spmod_sdl ${SDL_LIBRARY})
 
 # Base gui library
-add_library (mod_sdl_gui SHARED ${mod_sdl_gui_SRCS})
+add_library (mod_sdl_gui MODULE ${mod_sdl_gui_SRCS})
 target_link_libraries(mod_sdl_gui spcore)
 target_link_libraries(mod_sdl_gui ${wxWidgets_LIBRARIES})
 
-add_subdirectory(tests)
+IF(BUILD_TESTS)
+	ADD_SUBDIRECTORY(tests)
+ENDIF(BUILD_TESTS)
 
-INSTALL (TARGETS mod_sdl RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
+INSTALL (TARGETS spmod_sdl RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
 
 IF (WIN32)
 	FIND_PATH (SDL_RUNTIME_LIBS_DIR SDL.dll
diff --git a/src/mod_sdl/config_gui.cpp b/src/mod_sdl/config_gui.cpp
index b551ec2..1475710 100644
--- a/src/mod_sdl/config_gui.cpp
+++ b/src/mod_sdl/config_gui.cpp
@@ -293,7 +293,7 @@ public:
 };
 
 static spcore::IModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new CSDLConfigGUIModule();
 	return g_module;
diff --git a/src/mod_sdl/mod_sdl.cpp b/src/mod_sdl/mod_sdl.cpp
index 0037362..791e9e6 100644
--- a/src/mod_sdl/mod_sdl.cpp
+++ b/src/mod_sdl/mod_sdl.cpp
@@ -19,7 +19,7 @@
 #include "spcore/basictypes.h"
 #include "spcore/pin.h"
 #include "spcore/component.h"
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 #include "mod_sdl/sdlsurfacetype.h"
 
 #ifdef WIN32
@@ -27,6 +27,7 @@
 #endif
 
 using namespace spcore;
+using namespace std;
 
 namespace mod_sdl {
 
@@ -164,13 +165,13 @@ typedef SingletonComponentFactory<SDLConfig> SDLConfigFactory;
 	sdl_drawer component
 
 	Input pins:
-		- do_draw (any)
+		- draw (any)
 
 		Used to trigger the drawing routine. It draws and but NOT releases all queued 
 		surfaces since last "do_draw". If the object passed to this pin is an 
 		"sdl_surface" it is also drawn BEFORE the queued ones (as background).
 	
-		- queue_surface (sdl_surface)
+		- queue (sdl_surface)
 
 		adds a surface to the queue
 
@@ -186,7 +187,6 @@ public:
 
 	SDLDrawer(const char * name, int argc, const char * argv[])
 	: CComponentAdapter(name, argc, argv) 
-	, m_initialized(false)	
 	, m_frameBuffer(NULL)	
 	{
 		assert (getSpCoreRuntime()->IsMainThread());
@@ -212,10 +212,9 @@ public:
 			// NOTE to SDL based components implementors. Remember that you component
 			// should NEVER initialize the SDL library nor use any SDL function BEFORE
 			// the method Initialize gets called and AFTER the method Finish gets called.
-			// You MUST implement both methods plus NeedsInitialization() so that it 
-			// returns true. Moreover, your Finish() method MUST free all SDL related 
-			// resources otherwise a crash is almost guaranteed. Finally remember to be
-			// aware of calls before Initialize is called.			
+			// You MUST implement both methods. Moreover, your Finish() method MUST 
+			// free all SDL related resources otherwise a crash is almost guaranteed. Finally 
+			// remember to be aware of calls before Initialize is called.
 			//			
 			assert (false);	// Read above
 
@@ -234,19 +233,9 @@ public:
 		RegisterInputPin (*SmartPtr<InputPinQueue>(new InputPinQueue("queue", *this), false));
 	}
 
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize() { 
-		m_initialized= true; 
-		return 0; 
-	}
-	virtual void Finish() { 
-		m_initialized= false; 
-	}
-
 private:
 	enum { DRAWER_SDL_FLAGS= SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_RESIZABLE };
 
-	bool m_initialized;
 	SDL_Surface* m_frameBuffer;
 	vector<SmartPtr<const CTypeSDLSurface> > m_surfaceQueue;
 	SmartPtr<SDLConfig> m_sdlConfig;
@@ -254,8 +243,8 @@ private:
 	~SDLDrawer() {
 		SDL_QuitSubSystem(SDL_INIT_VIDEO);
 		m_sdlConfig->ExistsDrawer(false);
-		assert (!m_initialized);
-		if (m_initialized)
+		assert (!IsInitialized());
+		if (IsInitialized())
 			getSpCoreRuntime()->LogMessage(ICoreRuntime::LOG_WARNING,
 				"destroyed uninitialized", SDLDrawer::getTypeName());
 	}
@@ -268,7 +257,7 @@ private:
 				"received message from other thread other than the main one", SDLDrawer::getTypeName());
 			return false;
 		}
-		if (!m_initialized) {
+		if (!IsInitialized()) {
 			// Message received before initialitzation completed
 			// This could happen if the component which calls us has been initialized
 			// before than us. This message could have been generated as part of the initialization
@@ -383,7 +372,7 @@ public:
 };
 
 static spcore::IModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new SDLBaseModule();
 	return g_module;
diff --git a/src/mod_vision/CMakeLists.txt b/src/mod_vision/CMakeLists.txt
index 135f50d..548dcfe 100755
--- a/src/mod_vision/CMakeLists.txt
+++ b/src/mod_vision/CMakeLists.txt
@@ -1,18 +1,18 @@
 cmake_minimum_required(VERSION 2.8)
-project(mod_vision)
+project(spmod_vision)
 
 FIND_PACKAGE( OpenCV REQUIRED )
 INCLUDE_DIRECTORIES (${OpenCV_INCLUDE_DIR})
 INCLUDE_DIRECTORIES (..)
 
-set(mod_vision_SRCS
+set(spmod_vision_SRCS
 	mod_vision.cpp	
 	oftracker.h
 	oftracker.cpp
 )
 
-add_library (mod_vision SHARED ${mod_vision_SRCS})
-target_link_libraries(mod_vision creavision)
-target_link_libraries(mod_vision spcore)
+add_library (spmod_vision MODULE ${spmod_vision_SRCS})
+target_link_libraries(spmod_vision creavision)
+target_link_libraries(spmod_vision spcore)
 
-INSTALL (TARGETS mod_vision RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+INSTALL (TARGETS spmod_vision RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
\ No newline at end of file
diff --git a/src/mod_vision/mod_vision.cpp b/src/mod_vision/mod_vision.cpp
index 5917a21..4e1f7d4 100644
--- a/src/mod_vision/mod_vision.cpp
+++ b/src/mod_vision/mod_vision.cpp
@@ -20,7 +20,7 @@
 #include "spcore/component.h"
 #include "spcore/module.h"
 #include "spcore/basictypes.h"
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 #include "spcore/pinimpl.h"
 #include "mod_camera/iplimagetype.h"
 #include "oftracker.h"
@@ -150,7 +150,7 @@ public:
 };
 
 static VisionModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new VisionModule();
 	return g_module;
diff --git a/src/mod_widgets/CMakeLists.txt b/src/mod_widgets/CMakeLists.txt
index e4fe268..392133d 100755
--- a/src/mod_widgets/CMakeLists.txt
+++ b/src/mod_widgets/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.6)
-project(mod_widgets)
+project(spmod_widgets)
 
-set(mod_widgets_SRCS
+set(spmod_widgets_SRCS
 	mod_widgets.cpp
 	base_widget.h
 	slider.h
@@ -19,9 +19,9 @@ set(mod_widgets_SRCS
 	button.cpp
 )
 
-add_library (mod_widgets SHARED ${mod_widgets_SRCS})
-target_link_libraries(mod_widgets spcore)
+add_library (spmod_widgets MODULE ${spmod_widgets_SRCS})
+target_link_libraries(spmod_widgets spcore)
 #target_link_libraries(mod_widgets widgets_base)
-target_link_libraries(mod_widgets ${wxWidgets_LIBRARIES})
+target_link_libraries(spmod_widgets ${wxWidgets_LIBRARIES})
 
-INSTALL (TARGETS mod_widgets RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+INSTALL (TARGETS spmod_widgets RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
\ No newline at end of file
diff --git a/src/mod_widgets/base_widget.h b/src/mod_widgets/base_widget.h
index 7c481ca..92c11ce 100755
--- a/src/mod_widgets/base_widget.h
+++ b/src/mod_widgets/base_widget.h
@@ -99,8 +99,7 @@ public:
 		}
 	}
 	
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize()= 0;
+	virtual int DoInitialize()= 0;
 
 	virtual wxWindow* GetGUI(wxWindow * parent) {
 		assert (wxIsMainThread());
diff --git a/src/mod_widgets/button.cpp b/src/mod_widgets/button.cpp
index 900dfc2..8a52957 100755
--- a/src/mod_widgets/button.cpp
+++ b/src/mod_widgets/button.cpp
@@ -41,6 +41,7 @@
 ////@end XPM images
 
 using namespace spcore;
+using namespace std;
 
 namespace mod_widgets {
 
@@ -69,12 +70,6 @@ ButtonComponent::ButtonComponent(const char * name, int argc, const char * argv[
 	}
 }
 
-int ButtonComponent::Initialize()
-{
-	// Do nothing
-	return 0;
-}
-
 // 
 // Private methods
 //	
diff --git a/src/mod_widgets/button.h b/src/mod_widgets/button.h
index e9b7def..9817fe4 100755
--- a/src/mod_widgets/button.h
+++ b/src/mod_widgets/button.h
@@ -123,7 +123,7 @@ public:
 	//
 	ButtonComponent(const char * name, int argc, const char * argv[]);
 	
-	virtual int Initialize();
+	virtual int DoInitialize() { return 0; }
 
 	// 
 	// Called from GUI
diff --git a/src/mod_widgets/checkbox.cpp b/src/mod_widgets/checkbox.cpp
index 6eb8a41..ac9cbbf 100755
--- a/src/mod_widgets/checkbox.cpp
+++ b/src/mod_widgets/checkbox.cpp
@@ -32,6 +32,7 @@
 ////@end XPM images
 
 using namespace spcore;
+using namespace std;
 
 namespace mod_widgets {
 
@@ -78,7 +79,7 @@ CheckboxComponent::CheckboxComponent(const char * name, int argc, const char * a
 	}
 }
 
-int CheckboxComponent::Initialize()
+int CheckboxComponent::DoInitialize()
 {
 	m_oPin->Send(m_value);
 
diff --git a/src/mod_widgets/checkbox.h b/src/mod_widgets/checkbox.h
index 98f01a1..0474627 100755
--- a/src/mod_widgets/checkbox.h
+++ b/src/mod_widgets/checkbox.h
@@ -153,8 +153,7 @@ public:
 	//
 	CheckboxComponent(const char * name, int argc, const char * argv[]);
 	
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize();
+	virtual int DoInitialize();
 
 	virtual wxWindow* GetGUI(wxWindow * parent);
 
diff --git a/src/mod_widgets/choice.cpp b/src/mod_widgets/choice.cpp
index c59de46..5f2ee6a 100755
--- a/src/mod_widgets/choice.cpp
+++ b/src/mod_widgets/choice.cpp
@@ -37,6 +37,7 @@
 ////@end XPM images
 using namespace spcore;
 using namespace boost;
+using namespace std;
 
 namespace mod_widgets {
 
@@ -106,7 +107,7 @@ ChoiceComponent::ChoiceComponent(const char * name, int argc, const char * argv[
 	}
 }
 
-int ChoiceComponent::Initialize()
+int ChoiceComponent::DoInitialize()
 {
 	// No sync needed here, by definition Initialize is called before
 	// any data is flowing through the graph
diff --git a/src/mod_widgets/choice.h b/src/mod_widgets/choice.h
index 8bc1773..ce6b695 100755
--- a/src/mod_widgets/choice.h
+++ b/src/mod_widgets/choice.h
@@ -153,13 +153,13 @@ public:
 	//
 	ChoiceComponent(const char * name, int argc, const char * argv[]);
 	
-	virtual int Initialize();
+	virtual int DoInitialize();
 
 	// 
 	// Called from GUI
 	//	
 
-	void GetOptionsAndSelection(vector<string>& op, int& selection) const;
+	void GetOptionsAndSelection(std::vector<std::string>& op, int& selection) const;
 	
 	// Return true if a new item has been selected
 	bool SetSelection(int s);
diff --git a/src/mod_widgets/collapsible.cpp b/src/mod_widgets/collapsible.cpp
index 42dee53..4cea025 100755
--- a/src/mod_widgets/collapsible.cpp
+++ b/src/mod_widgets/collapsible.cpp
@@ -41,6 +41,7 @@
 
 using namespace spcore;
 using namespace boost;
+using namespace std;
 
 namespace mod_widgets {
 
@@ -77,7 +78,7 @@ CollapsibleComponent::CollapsibleComponent(const char * name, int argc, const ch
 	}
 }
 
-int CollapsibleComponent::Initialize()
+int CollapsibleComponent::DoInitialize()
 {
 	m_oPinExpanded->Send(m_expanded);
 	return 0;
diff --git a/src/mod_widgets/collapsible.h b/src/mod_widgets/collapsible.h
index 6a3f9fb..cc2ee0d 100755
--- a/src/mod_widgets/collapsible.h
+++ b/src/mod_widgets/collapsible.h
@@ -140,8 +140,7 @@ public:
 	//
 	CollapsibleComponent(const char * name, int argc, const char * argv[]);
 	
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize();
+	virtual int DoInitialize();
 
 	virtual wxWindow* GetGUI(wxWindow * parent);
 
diff --git a/src/mod_widgets/filepicker.cpp b/src/mod_widgets/filepicker.cpp
index 503537a..dd2cc53 100755
--- a/src/mod_widgets/filepicker.cpp
+++ b/src/mod_widgets/filepicker.cpp
@@ -53,6 +53,7 @@ typedef struct stat t_stat;
 ////@end XPM images
 
 using namespace spcore;
+using namespace std;
 
 namespace mod_widgets {
 
@@ -129,7 +130,7 @@ bool FilePickerComponent::IsValid(const char* path) const
 		return false;
 }
 
-int FilePickerComponent::Initialize()
+int FilePickerComponent::DoInitialize()
 {
 	if (IsValid(m_value->get())) {
 		if (m_panel) m_panel->ValueChanged();
diff --git a/src/mod_widgets/filepicker.h b/src/mod_widgets/filepicker.h
index 35d16cc..7bb4cee 100755
--- a/src/mod_widgets/filepicker.h
+++ b/src/mod_widgets/filepicker.h
@@ -163,8 +163,7 @@ public:
 	//
 	FilePickerComponent(const char * name, int argc, const char * argv[]);
 	
-	virtual bool NeedsInitialization() { return true; }
-	virtual int Initialize();
+	virtual int DoInitialize();
 
 	virtual wxWindow* GetGUI(wxWindow * parent);
 
diff --git a/src/mod_widgets/mod_widgets.cpp b/src/mod_widgets/mod_widgets.cpp
old mode 100755
new mode 100644
index cdce4da..e4cce87
--- a/src/mod_widgets/mod_widgets.cpp
+++ b/src/mod_widgets/mod_widgets.cpp
@@ -17,7 +17,7 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /////////////////////////////////////////////////////////////////////////////
 
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 #include "spcore/module.h"
 #include "slider.h"
 #include "checkbox.h"
@@ -48,7 +48,7 @@ public:
 };
 
 static spcore::IModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new WidgetsModule();
 	return g_module;
diff --git a/src/mod_widgets/slider.cpp b/src/mod_widgets/slider.cpp
index 683056c..975fc13 100755
--- a/src/mod_widgets/slider.cpp
+++ b/src/mod_widgets/slider.cpp
@@ -95,6 +95,8 @@ void MyClass::OnCloseWindow( wxCloseEvent& event )
 ////@begin XPM images
 ////@end XPM images
 
+using namespace std;
+
 namespace mod_widgets {
 
 //
@@ -227,7 +229,7 @@ SliderComponent::SliderComponent(const char * name, int argc, const char * argv[
 		m_linear2exp.SetParams ((float) m_sliderMin,  m_fmin, (float) m_sliderMax, m_fmax, logSpeed);
 }
 
-int SliderComponent::Initialize()
+int SliderComponent::DoInitialize()
 {
 	if (m_sldType!= SLD_INT)
 		m_oPin->Send(m_valueFloat);
diff --git a/src/mod_widgets/slider.h b/src/mod_widgets/slider.h
index 5dc28d2..58ce01f 100755
--- a/src/mod_widgets/slider.h
+++ b/src/mod_widgets/slider.h
@@ -166,7 +166,7 @@ public:
 	//
 	SliderComponent(const char * name, int argc, const char * argv[]);
 	
-	virtual int Initialize();
+	virtual int DoInitialize();
 
 	// 
 	// Called from GUI
diff --git a/src/mod_wiimotes/CMakeLists.txt b/src/mod_wiimotes/CMakeLists.txt
index e4f5594..eed2ef2 100755
--- a/src/mod_wiimotes/CMakeLists.txt
+++ b/src/mod_wiimotes/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.6)
-project(mod_wiimotes)
+project(spmod_wiimotes)
 
-set(mod_wiimotes_SRCS
+set(spmod_wiimotes_SRCS
 	${CUSTOM_INCLUDE_PATH}/mod_wiimotes/wiimotes_types.h
 	wiimotes_types.cpp
 	mod_wiimotes.cpp
@@ -12,12 +12,14 @@ set(mod_wiimotes_SRCS
 	wwiimotesproperties.cpp
 )
 
-add_library (mod_wiimotes SHARED ${mod_wiimotes_SRCS})
-target_link_libraries(mod_wiimotes wiiuse)
-target_link_libraries(mod_wiimotes spcore)
-target_link_libraries(mod_wiimotes ${Boost_THREAD_LIBRARY})
-target_link_libraries(mod_wiimotes ${wxWidgets_LIBRARIES})
+add_library (spmod_wiimotes MODULE ${spmod_wiimotes_SRCS})
+target_link_libraries(spmod_wiimotes wiiuse)
+target_link_libraries(spmod_wiimotes spcore)
+target_link_libraries(spmod_wiimotes ${Boost_THREAD_LIBRARY})
+target_link_libraries(spmod_wiimotes ${wxWidgets_LIBRARIES})
 
-ADD_SUBDIRECTORY(tests)
+IF(BUILD_TESTS)
+	ADD_SUBDIRECTORY(tests)
+ENDIF(BUILD_TESTS)
 
-INSTALL (TARGETS mod_wiimotes RUNTIME DESTINATION ${PLUGINDIR} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+INSTALL (TARGETS spmod_wiimotes RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})
\ No newline at end of file
diff --git a/src/mod_wiimotes/mod_wiimotes.cpp b/src/mod_wiimotes/mod_wiimotes.cpp
index ce52366..2d2cdb6 100644
--- a/src/mod_wiimotes/mod_wiimotes.cpp
+++ b/src/mod_wiimotes/mod_wiimotes.cpp
@@ -19,7 +19,7 @@
 // TODO: fix linux working issue, may require permanent pairing
 #include "spcore/component.h"
 #include "spcore/module.h"
-#include "spcore/libexports.h"
+#include "spcore/libimpexp.h"
 #include "spcore/basictypes.h"
 #include "mod_wiimotes.h"
 #include "wwiimotesconfiguration.h"
@@ -608,18 +608,16 @@ public:
 	static const char* getTypeName() { return "wiimotes_config"; };
 	virtual const char* GetTypeName() const { return WiimotesConfig::getTypeName(); };
 
-	virtual bool ProvidesExecThread() { return true; }
+	virtual bool ProvidesExecThread() const { return true; }
 
-	virtual bool NeedsInitialization() { return true; }
-
-	virtual int Initialize() {
+	virtual int DoInitialize() {
 		if (m_oPinStatus->GetNumComsumers()> 0) {
 			WiiuseThreadController::getInstance()->RegisterListener(*this, WiiuseThread::NONE, 0);
 		}
 		return 0;
 	}
 
-	virtual void Finish() {
+	virtual void DoFinish() {
 		WiiuseThreadController::getInstance()->UnregisterListener(*this);
 	}
 
@@ -755,11 +753,9 @@ public:
 	static const char* getTypeName() { return "wiimotes_input"; };
 	virtual const char* GetTypeName() const { return WiimotesInput::getTypeName(); };
 
-	virtual bool ProvidesExecThread() { return true; }
-
-	//virtual bool NeedsInitialization() { return true; }
+	virtual bool ProvidesExecThread() const { return true; }
 
-	virtual int Start() {
+	virtual int DoStart() {
 		unsigned int flags= 0, consumers= 0;
 
 		if (m_oPinWiimoteAcc->GetNumComsumers() > 0) {
@@ -789,7 +785,7 @@ public:
 		return 0;
 	}
 
-	virtual void Stop() {
+	virtual void DoStop() {
 		WiiuseThreadController::getInstance()->UnregisterListener(*this);
 	}
 
@@ -1187,7 +1183,7 @@ public:
 };
 
 static spcore::IModule* g_module= NULL;
-EXPORT_FUNCTION spcore::IModule* module_create_instance()
+SPEXPORT_FUNCTION spcore::IModule* module_create_instance()
 {
 	if (g_module== NULL) g_module= new WiiMotesModule();
 	return g_module;
diff --git a/src/mod_wiimotes/tests/CMakeLists.txt b/src/mod_wiimotes/tests/CMakeLists.txt
index 49cb242..959dbdb 100755
--- a/src/mod_wiimotes/tests/CMakeLists.txt
+++ b/src/mod_wiimotes/tests/CMakeLists.txt
@@ -5,14 +5,14 @@ add_executable(test_mod_wiimotes_basic test_mod_wiimotes_basic.cpp)
 target_link_libraries(test_mod_wiimotes_basic spcore)
 target_link_libraries(test_mod_wiimotes_basic testcommon)
 target_link_libraries(test_mod_wiimotes_basic nvwa)
-target_link_libraries(test_mod_wiimotes_basic mod_wiimotes)
+target_link_libraries(test_mod_wiimotes_basic spmod_wiimotes)
 #add_test (NAME test_mod_wiimotes_basic COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_mod_wiimotes_basic>)
 
 add_executable(test_mod_wiimites_config_gui test_mod_wiimites_config_gui.cpp)
 target_link_libraries(test_mod_wiimites_config_gui spcore)
 target_link_libraries(test_mod_wiimites_config_gui testcommon)
 target_link_libraries(test_mod_wiimites_config_gui nvwa)
-target_link_libraries(test_mod_wiimites_config_gui mod_wiimotes)
+target_link_libraries(test_mod_wiimites_config_gui spmod_wiimotes)
 target_link_libraries(test_mod_wiimites_config_gui ${wxWidgets_LIBRARIES})
 add_test (NAME test_mod_wiimites_config_gui COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_mod_wiimites_config_gui>)
 
diff --git a/src/mod_wiimotes/tests/test_mod_wiimotes_basic.cpp b/src/mod_wiimotes/tests/test_mod_wiimotes_basic.cpp
index f8a295f..df5d945 100644
--- a/src/mod_wiimotes/tests/test_mod_wiimotes_basic.cpp
+++ b/src/mod_wiimotes/tests/test_mod_wiimotes_basic.cpp
@@ -50,7 +50,7 @@ void DumpStatus (const CTypeWiimotesStatus & msg)
 		std::cout << "Connected count:" << msg.GetConnectedCount() << std::endl;
 		for (unsigned int i= 0; i< msg.GetMaxCount(); ++i) {
 			if (msg.IsConnected(i)) {
-				cout << "Wiimote " << i+1 << " is connected\n";
+				std::cout << "Wiimote " << i+1 << " is connected\n";
 				if (msg.HasNunchuk(i)) std::cout << "Nunchuck found\n";
 				if (msg.HasBalanceBoard(i)) std::cout << "Balance board\n";
 				if (msg.HasMotionPlus(i)) std::cout << "Motion plus\n";
diff --git a/src/sitplus/activitymanager.cpp b/src/sitplus/activitymanager.cpp
old mode 100755
new mode 100644
index 196518a..fca2435
--- a/src/sitplus/activitymanager.cpp
+++ b/src/sitplus/activitymanager.cpp
@@ -170,16 +170,14 @@ bool ActivityManager::InitializeActivity()
 {
 	OpenComponentPanels (*m_rootComponent);
 
-	if (m_rootComponent->NeedsInitialization()) {
-		if (m_rootComponent->Initialize()!= 0) {
-			wxString message= _("Initialization of activity component ")
-				+ wxString(m_rootComponent->GetName(), wxConvUTF8)
-				+ _(" failed.\nSee console for details.");
-			wxMessageDialog dlg(this, message, _("SITPLUS error"), wxOK);
-			dlg.ShowModal();
-			m_rootComponent.reset();
-			return false;
-		}
+	if (m_rootComponent->Initialize()!= 0) {
+		wxString message= _("Initialization of activity component ")
+			+ wxString(m_rootComponent->GetName(), wxConvUTF8)
+			+ _(" failed.\nSee console for details.");
+		wxMessageDialog dlg(this, message, _("SITPLUS error"), wxOK);
+		dlg.ShowModal();
+		m_rootComponent.reset();
+		return false;
 	}
 
 	if (GetSizer())
@@ -302,7 +300,7 @@ wxIcon ActivityManager::GetIconResource( const wxString& name )
 void ActivityManager::OnToolPlayClick( wxCommandEvent& event )
 {
 	assert ( m_rootComponent.get()!= NULL);
-	if (m_rootComponent->Initialize()!= 0 || m_rootComponent->Start()!= 0) {
+	if (m_rootComponent->Start()!= 0) {
 		wxMessageDialog dlg(this, _("Can not start activity.\nSee console for details."), _("SITPLUS error"), wxOK);
 		dlg.ShowModal();
 	}
@@ -322,7 +320,7 @@ void ActivityManager::OnToolStopClick( wxCommandEvent& event )
 {
 	assert ( m_rootComponent.get()!= NULL);
 	m_rootComponent->Stop();
-	m_rootComponent->Finish();
+	//m_rootComponent->Finish();
 	m_toolBar->EnableTool(ID_TOOL_PLAY, true);
 	m_toolBar->EnableTool(ID_TOOL_STOP, false);
     event.Skip();
@@ -345,6 +343,3 @@ void ActivityManager::OnSize( wxSizeEvent& event )
 		event.Skip (false);
 	}
 }
-
-
-
diff --git a/src/sitplus/activitymanager.h b/src/sitplus/activitymanager.h
old mode 100755
new mode 100644
diff --git a/src/sitplus/sitplus_main.cpp b/src/sitplus/sitplus_main.cpp
index b06ba20..b41bb2b 100755
--- a/src/sitplus/sitplus_main.cpp
+++ b/src/sitplus/sitplus_main.cpp
@@ -49,6 +49,7 @@
 
 using namespace spcore;
 using namespace sphost;
+using namespace std;
 
 // ----------------------------------------------------------------------------
 // show initialization errors
@@ -79,9 +80,10 @@ public:
 		}
 
 #ifdef WIN32
-		MessageBoxA(NULL, message, msgtype, MB_OK);
+		//MessageBoxA(NULL, message, msgtype, MB_OK);
+		fprintf (stderr, "%s: %s\n", msgtype, message);
 #else
-		fprintf (stderr, "%s: %s\n", msgtype, message);		
+		fprintf (stderr, "%s: %s\n", msgtype, message);
 #endif
 	}
 };
@@ -95,30 +97,37 @@ LogInitErrors g_logInitErrors;
 static
 bool LoadModule(const char* mname)
 {
-	int retval= getSpCoreRuntime()->LoadModule(mname);
-	if (retval!= 0) {
-		char buff[250];
-		sprintf (buff, "error %d loading %s", retval, mname);
-		g_logInitErrors.LogMessage(ICoreRuntime::LOG_FATAL, buff);
-		return false;
-	}
-
-	return true;
+	ICoreRuntime* cr= getSpCoreRuntime();
+	int retval= cr->LoadModule(mname, cr->GetPaths().GetPluginsDir());
+	if (retval== 0) return true;
+
+	// Load failed. Try without specifiyig directory
+	retval= cr->LoadModule(mname);
+	if (retval== 0) return true;
+
+	// Load failed	
+	char buff[250];
+	sprintf (buff, "error %d loading %s", retval, mname);
+	g_logInitErrors.LogMessage(ICoreRuntime::LOG_FATAL, buff);
+	return false;
 }
 
 bool LoadModules()
 {
-	if (!LoadModule("mod_camera")) return false;
-	if (!LoadModule("mod_wiimotes")) return false;
-	if (!LoadModule("mod_sdl")) return false;
-//	if (!LoadModule("mod_sdl_gui")) return false;
-	if (!LoadModule("mod_midi")) return false;
-	if (!LoadModule("mod_vision")) return false;
-	if (!LoadModule("mod_widgets")) return false;
-	if (!LoadModule("mod_score_player")) return false;
-	if (!LoadModule("mod_collage")) return false;
-	if (!LoadModule("mod_puredata")) return false;
-	if (!LoadModule("mod_io")) return false;
+	if (!LoadModule("spmod_camera")) return false;
+	if (!LoadModule("spmod_wiimotes")) return false;
+	if (!LoadModule("spmod_sdl")) return false;
+//	if (!LoadModule("spmod_sdl_gui")) return false;
+	if (!LoadModule("spmod_midi")) return false;
+	if (!LoadModule("spmod_vision")) return false;
+	if (!LoadModule("spmod_widgets")) return false;
+	if (!LoadModule("spmod_score_player")) return false;
+	if (!LoadModule("spmod_collage")) return false;
+	if (!LoadModule("spmod_puredata")) return false;
+	if (!LoadModule("spmod_io")) return false;
+	if (!LoadModule("spmod_hid")) return false;
+	if (!LoadModule("spmod_audio")) return false;
+	if (!LoadModule("spmod_ipl_sdl")) return false;
 
 	return true;
 }
diff --git a/src/sitplus/sitplus_main_window.cpp b/src/sitplus/sitplus_main_window.cpp
index 2199216..b4f966c 100755
--- a/src/sitplus/sitplus_main_window.cpp
+++ b/src/sitplus/sitplus_main_window.cpp
@@ -58,6 +58,7 @@
 
 using namespace spcore;
 using namespace sphost;
+using namespace std;
 
 // Flag to control whether more than one activity can be opened simultaneously.
 #define ALLOW_MULTIPLE_ACTIVITIES	0
@@ -364,13 +365,11 @@ void SitplusMainWindow::OpenConfigDialog(const char* component, const std::vecto
 	assert (panel);
 	dlg.AddSitplusPanel(panel);
 
-	if (compo->NeedsInitialization()) {
-		if (compo->Initialize()!= 0) {
-			wxMessageDialog msg(this, 
-				_("Configuration of ") + wxString(component, wxConvUTF8) + _(" failed.\nSee console for details"));
-			msg.ShowModal();
-			return;
-		}
+	if (compo->Initialize()!= 0) {
+		wxMessageDialog msg(this, 
+			_("Configuration of ") + wxString(component, wxConvUTF8) + _(" failed.\nSee console for details"));
+		msg.ShowModal();
+		return;
 	}
 
 	dlg.ShowModal();
diff --git a/src/spcore/CMakeLists.txt b/src/spcore/CMakeLists.txt
old mode 100755
new mode 100644
index 643e33e..9aa272e
--- a/src/spcore/CMakeLists.txt
+++ b/src/spcore/CMakeLists.txt
@@ -1,6 +1,10 @@
 cmake_minimum_required(VERSION 2.6)
 project(spcore)
 
+set (SPCORE_MAJOR_VERSION 1)
+set (SPCORE_RELEASE_VERSION 0)
+set (SPCORE_EPOCH_VERSION 0)
+
 set(spcore_SRCS
 	${CUSTOM_INCLUDE_PATH}/spcore/baseobj.h
 	${CUSTOM_INCLUDE_PATH}/spcore/component.h
@@ -13,12 +17,13 @@ set(spcore_SRCS
 	${CUSTOM_INCLUDE_PATH}/spcore/pin.h
 	${CUSTOM_INCLUDE_PATH}/spcore/module.h
 	${CUSTOM_INCLUDE_PATH}/spcore/coreversion.h
-	${CUSTOM_INCLUDE_PATH}/spcore/libexports.h
+	${CUSTOM_INCLUDE_PATH}/spcore/libimpexp.h
 	${CUSTOM_INCLUDE_PATH}/spcore/conversion.h
 	basictypesimpl.cpp
 	coreruntimeimpl.cpp
 	conversion.cpp
 	commoncomponents.h
+	timecomponents.h
 	${CUSTOM_INCLUDE_PATH}/spcore/language.h
 	language.cpp
 	${CUSTOM_INCLUDE_PATH}/spcore/configuration.h
@@ -32,11 +37,17 @@ if (WIN32)
 endif(WIN32)
 
 include_directories (${POCO_INCLUDE_DIRS})
+
+#
+# This library should always be shared because several
+# plugings might use it.
+#
+
 add_library (spcore SHARED ${spcore_SRCS})
+
 target_link_libraries(spcore ${POCO_LIBRARIES})
 
 # libconfig
-
 if(WIN32)
 	include_directories("${CMAKE_SOURCE_DIR}/3rdparty/libconfig/")
 	target_link_libraries(spcore libconfig)
@@ -53,6 +64,43 @@ if (ENABLE_NLS)
 endif(ENABLE_NLS)
 target_link_libraries(spcore ${wxWidgets_LIBRARIES})
 
-add_subdirectory(tests)
+add_definitions(-DSPMAKING_DLL_SPCORE)
+set_target_properties(spcore PROPERTIES 
+	VERSION "${SPCORE_MAJOR_VERSION}.${SPCORE_RELEASE_VERSION}.${SPCORE_EPOCH_VERSION}"
+	SOVERSION ${SPCORE_MAJOR_VERSION}
+	)
+INSTALL (TARGETS spcore RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${LIBDIR})
+
+IF(BUILD_TESTS)
+	ADD_SUBDIRECTORY(tests)
+ENDIF(BUILD_TESTS)
+
+#####################################################################
+# Doxygen
+#####################################################################
+IF(GENERATE_DOXYGEN)
+	#get_property(inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
+	#message("inc_dirs = ${inc_dirs}")
+
+	# check if doxygen is even installed
+	find_package(Doxygen)
+	if (DOXYGEN_FOUND STREQUAL "NO")
+		message(SEND_ERROR "Doxygen not found. Please get a copy http://www.doxygen.org")
+	endif (DOXYGEN_FOUND STREQUAL "NO")
+
+	# prepare doxygen configuration file
+	configure_file(Doxyfile.in Doxyfile)
+
+	# add doxygen as target
+	add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+	# cleanup $build/api-doc on "make clean"
+	set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES api-doc)
 
-INSTALL (TARGETS spcore RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+	# add doxygen as dependency to doc-target
+	get_target_property(DOC_TARGET doc TYPE)
+	if(NOT DOC_TARGET)
+		add_custom_target(doc)
+	endif()
+	add_dependencies(doc doxygen)
+ENDIF(GENERATE_DOXYGEN)
diff --git a/Doxyfile.in b/src/spcore/Doxyfile.in
similarity index 99%
copy from Doxyfile.in
copy to src/spcore/Doxyfile.in
index 079ad59..14981be 100644
--- a/Doxyfile.in
+++ b/src/spcore/Doxyfile.in
@@ -114,7 +114,7 @@ FULL_PATH_NAMES        = YES
 # If left blank the directory from which doxygen is run is used as the 
 # path to strip.
 
-STRIP_FROM_PATH        = ${CMAKE_CURRENT_SOURCE_DIR}
+STRIP_FROM_PATH        = ${CUSTOM_INCLUDE_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 
@@ -295,7 +295,7 @@ EXTRACT_STATIC         = NO
 # 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
+EXTRACT_LOCAL_CLASSES  = NO
 
 # 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 
@@ -536,7 +536,7 @@ WARN_LOGFILE           =
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT                  = ${CMAKE_CURRENT_SOURCE_DIR}
+INPUT                  = ${CUSTOM_INCLUDE_PATH}/spcore
 
 # 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 
@@ -559,7 +559,7 @@ FILE_PATTERNS          =
 # should be searched for input files as well. Possible values are YES and NO. 
 # If left blank NO is used.
 
-RECURSIVE              = YES
+RECURSIVE              = NO
 
 # 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 
@@ -1160,7 +1160,7 @@ INCLUDE_FILE_PATTERNS  =
 # undefined via #undef or recursively expanded use the := operator 
 # instead of the = operator.
 
-PREDEFINED             = 
+PREDEFINED             = ENABLE_WXWIDGETS ENABLE_NLS
 
 # 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. 
diff --git a/src/spcore/basictypesimpl.cpp b/src/spcore/basictypesimpl.cpp
index 06e9eb8..6e7622e 100644
--- a/src/spcore/basictypesimpl.cpp
+++ b/src/spcore/basictypesimpl.cpp
@@ -18,6 +18,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #include "commoncomponents.h"
+#include "timecomponents.h"
 
 #include "spcore/basictypes.h"
 #include "spcore/pin.h"
@@ -821,6 +822,9 @@ CBasicTypesModule::CBasicTypesModule() {
 	RegisterComponentFactory(SmartPtr<IComponentFactory>(new SendMainAsyncFactory(), false));
 
 	RegisterComponentFactory(SmartPtr<IComponentFactory>(new PrintComponentFactory(), false));
+
+	// Time components
+	RegisterComponentFactory(SmartPtr<IComponentFactory>(new ChronoFactory(), false));
 }
 
 const char * CBasicTypesModule::GetName() const {
diff --git a/src/spcore/commoncomponents.h b/src/spcore/commoncomponents.h
index 8e323e3..91c40f7 100644
--- a/src/spcore/commoncomponents.h
+++ b/src/spcore/commoncomponents.h
@@ -32,6 +32,8 @@
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/condition.hpp>
 
+using namespace std;
+
 namespace spcore {
 
 /**
@@ -713,9 +715,9 @@ public:
 		m_cr= getSpCoreRuntime();
 	}
 
-	virtual bool ProvidesExecThread() { return true; }
+	virtual bool ProvidesExecThread() const { return true; }
 
-	virtual int Start() {
+	virtual int DoStart() {
 		assert (m_cr->IsMainThread());
 
 		boost::mutex::scoped_lock (m_mutex);
@@ -724,7 +726,7 @@ public:
 		return 0;
 	}
    
-	virtual void Stop() {
+	virtual void DoStop() {
 		assert (m_cr->IsMainThread());
 
 		boost::mutex::scoped_lock lock(m_mutex);
@@ -858,14 +860,14 @@ public:
 		m_cr= getSpCoreRuntime();
 	}
 
-	virtual bool ProvidesExecThread() { return true; }
+	virtual bool ProvidesExecThread() const { return true; }
 
-	virtual int Start() {
+	virtual int DoStart() {
 		m_running= true;
 		return 0;
 	}
    
-	virtual void Stop() { m_running= false;	}
+	virtual void DoStop() { m_running= false; }
 
 	int OnSendReceived (const CTypeAny& msg) {
 		// If no listeners, do nothing
diff --git a/src/spcore/configurationimpl.h b/src/spcore/configurationimpl.h
index 4c8eb2d..606f2b2 100755
--- a/src/spcore/configurationimpl.h
+++ b/src/spcore/configurationimpl.h
@@ -236,7 +236,7 @@ private:
 			std::vector<std::string> tokens;
 			boost::char_separator<char> sep(".");
 			boost::tokenizer<boost::char_separator<char> > tok(epath, sep);	
-			BOOST_FOREACH(string t, tok) {
+			BOOST_FOREACH(std::string t, tok) {
 				tokens.push_back(t);
 			}
 			assert (!tokens.empty());
diff --git a/src/spcore/conversion.cpp b/src/spcore/conversion.cpp
index dc893dd..1e54115 100755
--- a/src/spcore/conversion.cpp
+++ b/src/spcore/conversion.cpp
@@ -63,7 +63,7 @@ int CopySubsts (const char* orig, char* dst)
 
 	\return true is conversion successful, or false otherwise
 */
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 bool StrToFloat (const char* str, float* val)
 {
 	char dst[MAX_NUMBER_SIZE];
@@ -80,7 +80,7 @@ bool StrToFloat (const char* str, float* val)
 
 	\return true is conversion successful, or false otherwise
 */
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 bool StrToDouble (const char* str, double* val)
 {
 	char dst[MAX_NUMBER_SIZE];
@@ -97,7 +97,7 @@ bool StrToDouble (const char* str, double* val)
 
 	\return true is conversion successful, or false otherwise
 */
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 bool StrToLongDouble (const char* str, long double* val)
 {
 	char dst[MAX_NUMBER_SIZE];
@@ -114,7 +114,7 @@ bool StrToLongDouble (const char* str, long double* val)
 
 	\return true is conversion successful, or false otherwise
 */
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 bool StrToInt (const char* str, int* val)
 {
 	return (sscanf(str, "%d", val)== 1);
@@ -125,7 +125,7 @@ bool StrToInt (const char* str, int* val)
 
 	\return true is conversion successful, or false otherwise
 */
-EXPORT_FUNCTION 
+SPEXPORT_FUNCTION 
 bool StrToUint (const char* str, unsigned int* val)
 {
 	return (sscanf(str, "%u", val)== 1);
@@ -136,7 +136,7 @@ bool StrToUint (const char* str, unsigned int* val)
 
 	\return true is conversion successful, or false otherwise
 */
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 bool StrToLongInt (const char* str, long* val)
 {
 	return (sscanf(str, "%ld", val)== 1);
diff --git a/src/spcore/coreruntimeimpl.cpp b/src/spcore/coreruntimeimpl.cpp
index 67faa6d..02e62a8 100644
--- a/src/spcore/coreruntimeimpl.cpp
+++ b/src/spcore/coreruntimeimpl.cpp
@@ -45,6 +45,7 @@
 #include <errno.h>
 
 using namespace spcore;
+using namespace std;
 
 #ifdef WIN32
 #include <io.h>
@@ -508,7 +509,7 @@ private:
 	//
 	// Types
 	//
-	std::map<string,int> m_name2TypeID;
+	map<string,int> m_name2TypeID;
 	vector<ITypeFactory*> m_typeFactories;
 
 	//
@@ -865,7 +866,7 @@ static CCoreRuntime* g_coreRuntime= NULL;
 static boost::mutex g_spcore_mutex;
 static bool g_spcore_freed= false;
 
-EXPORT_FUNCTION ICoreRuntime* getSpCoreRuntime()
+SPEXPORT_FUNCTION ICoreRuntime* getSpCoreRuntime()
 {
 	assert (!g_spcore_freed);
 	boost::mutex::scoped_lock lock(g_spcore_mutex);
@@ -874,7 +875,7 @@ EXPORT_FUNCTION ICoreRuntime* getSpCoreRuntime()
 	return g_coreRuntime;
 }
 
-EXPORT_FUNCTION void freeSpCoreRuntime()
+SPEXPORT_FUNCTION void freeSpCoreRuntime()
 {
 //	boost::mutex::scoped_lock lock(g_spcore_mutex);
 
diff --git a/src/spcore/language.cpp b/src/spcore/language.cpp
index fc9b342..04921d5 100755
--- a/src/spcore/language.cpp
+++ b/src/spcore/language.cpp
@@ -274,7 +274,7 @@ int SearchLangId(const char* id)
 }
 
 
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 int spSetLanguage (const char* id)
 {
 	// Search whether the language id exists
@@ -302,7 +302,7 @@ int spSetLanguage (const char* id)
 	return 0;
 }
 
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 int spBindTextDomain(const char* domain, const char* dirname)
 {
 #ifdef ENABLE_WXWIDGETS
@@ -316,13 +316,13 @@ int spBindTextDomain(const char* domain, const char* dirname)
 	return 0;
 }
 
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 unsigned int spGetAvailableLanguages()
 {
 	return g_supported_lang_num;
 }
 
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 const char* spGetLanguageId (unsigned int idx)
 {
 	if (idx>= g_supported_lang_num) return NULL;
@@ -330,7 +330,7 @@ const char* spGetLanguageId (unsigned int idx)
 	return g_supported_lang_ids[idx];
 }
 
-EXPORT_FUNCTION
+SPEXPORT_FUNCTION
 const char* spGetLanguageNativeName (unsigned int idx, const char* domain)
 {
 	if (idx>= g_supported_lang_num) return NULL;
@@ -344,7 +344,7 @@ const char* spGetLanguageNativeName (unsigned int idx, const char* domain)
 }
 
 /*
-EXPORT_FUNCTION void TestLang()
+SPEXPORT_FUNCTION void TestLang()
 {
 	/// DEBUG
 	spSetLanguage ("ca_ES");
diff --git a/src/spcore/pathsimpl.h b/src/spcore/pathsimpl.h
index 2144a95..175b929 100755
--- a/src/spcore/pathsimpl.h
+++ b/src/spcore/pathsimpl.h
@@ -116,10 +116,36 @@ public:
 
 	virtual void SetLocalesDir (const char* dir) { if (dir) m_localeDir= dir; }
 
+
+
+	virtual const char* GetPluginsDir() const {
+		if (m_pluginsDir.empty()) {
+			const char* pluginsDir= getenv("SP_PLUGINS_DIR");
+			if (pluginsDir) m_pluginsDir= pluginsDir;
+			else {
+#ifdef WIN32
+				// On Windows rely on the location of the binary
+				const char* dataDir= GetDataDir();
+				if (!dataDir) return NULL;
+				m_pluginsDir= dataDir;
+#else
+				// On linux Plugins are supposed to be found in the standard location
+				m_pluginsDir= INSTALL_PREFIX;
+				m_pluginsDir+= "/lib/sitplus";
+#endif	// WIN32
+			}
+		}
+
+		return m_pluginsDir.c_str();
+	}
+
+	virtual void SetPluginsDir (const char* dir) { if (dir) m_pluginsDir= dir; }
+
 private:
 	mutable std::string m_dataDir;
 	mutable std::string m_userDataDir;
 	mutable std::string m_localeDir;
+	mutable std::string m_pluginsDir;
 };
 
 } // namespace spcore
diff --git a/src/spcore/timecomponents.h b/src/spcore/timecomponents.h
new file mode 100644
index 0000000..676281f
--- /dev/null
+++ b/src/spcore/timecomponents.h
@@ -0,0 +1,153 @@
+/////////////////////////////////////////////////////////////////////////////
+// File:        timecomponents.cpp
+// Author:      Cesar Mauri Loba (cesar at crea-si dot com)
+// Copyright:   (C) 2011 Cesar Mauri Loba - CREA Software Systems
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+/////////////////////////////////////////////////////////////////////////////
+#ifndef TIMECOMPONENTS_H
+	#define TIMECOMPONENTS_H
+#else
+	#error This file is intended to be included only once
+#endif
+
+#include "spcore/basictypes.h"
+#include "spcore/pinimpl.h"
+#include "spcore/component.h"
+//#include <vector>
+//#include <string>
+//#include <stdio.h>
+//#include <boost/thread/mutex.hpp>
+//#include <boost/thread/condition.hpp>
+
+#if defined(WIN32)
+	#include <windows.h>
+#else
+	#include <time.h>
+#endif
+
+using namespace std;
+
+namespace spcore {
+
+/**
+	chrono component - Chronograph
+		
+		Provides elapsed time in ms since reset.
+		
+	Input pins:
+		reset (CTypeAny)- Any received message resets the chronograph
+		read (CTypeAny)	- Any received message sends current elapsed time to output
+
+	Output pins:
+		elapsed (CTypeInt)
+
+	Command line
+*/
+class Chrono : public CComponentAdapter {
+public:
+	static const char* getTypeName() { return "chrono"; }
+	virtual const char* GetTypeName() const { return Chrono::getTypeName(); }
+	Chrono(const char * name, int argc, const char * argv[]) 
+	: CComponentAdapter(name, argc, argv)
+	{
+		m_opinElapsed= CTypeInt::CreateOutputPin("elapsed");
+		if (RegisterOutputPin(*m_opinElapsed)!= 0)
+			throw std::runtime_error("error registering output pin");
+
+  		if (RegisterInputPin(*SmartPtr<IInputPin>(new InputPinInReset("reset", *this), false))!= 0)
+			throw std::runtime_error("error creating input pin reset");
+
+
+  		if (RegisterInputPin(*SmartPtr<IInputPin>(new InputPinInRead("read", *this), false))!= 0)
+			throw std::runtime_error("error creating input pin read");
+
+		m_elapsed= CTypeInt::CreateInstance();
+	}
+
+	int OnReset () {
+
+#if defined(WIN32)
+		m_lastTickCount= GetTickCount();
+#else
+		clock_gettime(CLOCK_MONOTONIC, &m_lastTStamp);
+#endif
+		return 0;
+	}
+
+	int OnRead () {
+
+#if defined(WIN32)
+		DWORD now= GetTickCount();
+		if (now - m_lastTickCount> MAX_CHRONO_MS)
+			m_elapsed->setValue (MAX_CHRONO_MS);
+		else
+			m_elapsed->setValue((int)(now - m_lastTickCount));
+#else
+		struct timespec now;
+		clock_gettime(CLOCK_MONOTONIC, &now);
+
+		if (now.tv_sec - m_lastTStamp.tv_sec>= MAX_CHRONO_MS / 1000)
+			m_elapsed->setValue (MAX_CHRONO_MS);
+		else {
+			m_elapsed->setValue ((int) (now.tv_sec - m_lastTStamp.tv_sec) * 1000 + 
+				(now.tv_nsec - m_lastTStamp.tv_nsec) / 1000000);
+		}
+#endif
+		return m_opinElapsed->Send(m_elapsed);
+	}
+
+	virtual int	DoInitialize () {
+		OnReset(); 
+		return 0;
+	}
+
+private:
+	virtual ~Chrono() {}
+
+	// Max. measured ms
+	enum { MAX_CHRONO_MS= 2147483646 };
+
+	class InputPinInReset : public CInputPinWriteOnly<CTypeAny, Chrono> {
+	public:
+		InputPinInReset (const char * name, Chrono & component)
+		: CInputPinWriteOnly<CTypeAny, Chrono>(name, component) { }
+
+		virtual int DoSend(const CTypeAny & ) {	return this->m_component->OnReset(); }
+	};
+
+	class InputPinInRead : public CInputPinWriteOnly<CTypeAny, Chrono> {
+	public:
+		InputPinInRead (const char * name, Chrono & component)
+		: CInputPinWriteOnly<CTypeAny, Chrono>(name, component) { }
+
+		virtual int DoSend(const CTypeAny & ) {	return this->m_component->OnRead(); }
+	};
+
+	//
+	// Data members
+	//
+	SmartPtr<IOutputPin> m_opinElapsed;
+	SmartPtr<CTypeInt> m_elapsed;
+
+#if defined(WIN32)
+	DWORD m_lastTickCount;
+#else
+	struct timespec m_lastTStamp;
+#endif
+};
+
+typedef ComponentFactory<Chrono> ChronoFactory;
+
+} // namespace spcore
diff --git a/src/sphost/CMakeLists.txt b/src/sphost/CMakeLists.txt
old mode 100755
new mode 100644
index 180a764..0f8d7db
--- a/src/sphost/CMakeLists.txt
+++ b/src/sphost/CMakeLists.txt
@@ -1,11 +1,16 @@
 cmake_minimum_required(VERSION 2.6)
 project(sphost)
 
+set (SPHOST_MAJOR_VERSION 1)
+set (SPHOST_RELEASE_VERSION 0)
+set (SPHOST_EPOCH_VERSION 0)
+
 set(sphost_SRCS
 	${CUSTOM_INCLUDE_PATH}/sphost/componenthelper.h
 	componenthelper.cpp
 	${CUSTOM_INCLUDE_PATH}/sphost/configutils.h
 	configutils.cpp
+	${CUSTOM_INCLUDE_PATH}/sphost/libimpexp_sphost.h
 )
 
 if (ENABLE_NLS)
@@ -16,16 +21,31 @@ set(sphost_SRCS
 )
 endif(ENABLE_NLS)
 
+# This library could be static
+
+add_library (sphost ${sphost_SRCS})
 
-add_library (sphost STATIC ${sphost_SRCS})
 target_link_libraries(sphost spcore)
 target_link_libraries(sphost widgets_base)
+
+# Boost
+find_package(Boost COMPONENTS filesystem thread system REQUIRED)
 target_link_libraries(sphost ${Boost_FILESYSTEM_LIBRARY})
 target_link_libraries(sphost ${Boost_THREAD_LIBRARY})
+target_link_libraries(sphost ${Boost_SYSTEM_LIBRARY})
 
 if (ENABLE_NLS)
 	target_link_libraries(sphost ${LIBINTL_LIBRARIES})
 endif(ENABLE_NLS)
 
+IF(BUILD_SHARED_LIBS)
+	add_definitions(-DSPMAKING_DLL_SPHOST)
+	add_definitions(-DSPUSING_DLL)
 
-#add_subdirectory(tests)
+	set_target_properties(sphost PROPERTIES 
+		VERSION "${SPHOST_MAJOR_VERSION}.${SPHOST_RELEASE_VERSION}.${SPHOST_EPOCH_VERSION}"
+		SOVERSION ${SPHOST_MAJOR_VERSION}
+	)
+	
+	INSTALL (TARGETS sphost RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${LIBDIR})
+ENDIF(BUILD_SHARED_LIBS)
diff --git a/src/testcommon/testcommon.cpp b/src/testcommon/testcommon.cpp
index 462898c..d1dd0dd 100644
--- a/src/testcommon/testcommon.cpp
+++ b/src/testcommon/testcommon.cpp
@@ -101,7 +101,6 @@ void DumpComponent (IComponent &c)
 {
 	cout << "Component name:" << c.GetName() << endl;
 	cout << "\tComponent type:" << c.GetTypeName() << endl;
-	cout << "\tNeeds initialization:" << c.NeedsInitialization() << endl;
 	cout << "\tProvides thread:" << c.ProvidesExecThread() << endl;
 	
 	cout << "\tInput pins\n";
diff --git a/src/widgets_base/CMakeLists.txt b/src/widgets_base/CMakeLists.txt
index bf44eaf..3abae24 100755
--- a/src/widgets_base/CMakeLists.txt
+++ b/src/widgets_base/CMakeLists.txt
@@ -1,6 +1,10 @@
 cmake_minimum_required(VERSION 2.6)
 project(widgets_base)
 
+set (SPWIDGETSBASE_MAJOR_VERSION 1)
+set (SPWIDGETSBASE_RELEASE_VERSION 0)
+set (SPWIDGETSBASE_EPOCH_VERSION 0)
+
 set(widgets_base_SRCS
 	${CUSTOM_INCLUDE_PATH}/widgets_base/containerpanel.h
 	containerpanel.cpp	
@@ -12,10 +16,25 @@ set(widgets_base_SRCS
 	containerbook.cpp
 	${CUSTOM_INCLUDE_PATH}/widgets_base/containercollapsible.h
 	containercollapsible.cpp
+	${CUSTOM_INCLUDE_PATH}/widgets_base/libimpexp_widgetsbase.h
 )
 
+#
+# This library should always be shared because several
+# plugings might use it.
+#
+
 add_library (widgets_base SHARED ${widgets_base_SRCS})
 target_link_libraries(widgets_base nvwa)
 target_link_libraries(widgets_base ${wxWidgets_LIBRARIES})
 
-INSTALL (TARGETS widgets_base RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${LIBDIR})
\ No newline at end of file
+
+add_definitions(-DSPMAKING_DLL_SPWIDGETSBASE)
+#add_definitions(-DSPUSING_DLL)
+
+set_target_properties(widgets_base PROPERTIES 
+	VERSION "${SPWIDGETSBASE_MAJOR_VERSION}.${SPWIDGETSBASE_RELEASE_VERSION}.${SPWIDGETSBASE_EPOCH_VERSION}"
+	SOVERSION ${SPWIDGETSBASE_MAJOR_VERSION}
+)
+
+INSTALL (TARGETS widgets_base RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${LIBDIR})

-- 
Free software framework for ludic-therapeutic activities



More information about the debian-med-commit mailing list